singularity-tools: create VM disk image outside $out
Place the VM disk image in a local directory "disk-image" instead of "$out", so that we don't have to delete it to reserve "$out" for the container image.
This commit is contained in:
@@ -92,11 +92,13 @@ lib.makeExtensible (final: {
|
||||
preVM = vmTools.createEmptyImage {
|
||||
size = diskSize;
|
||||
fullName = "${projectName}-run-disk";
|
||||
# Leaving "$out" for the Singularity/Container image
|
||||
destination = "disk-image";
|
||||
};
|
||||
inherit memSize;
|
||||
}
|
||||
''
|
||||
rm -rf $out
|
||||
rmdir "$out"
|
||||
mkdir disk
|
||||
mkfs -t ext3 -b 4096 /dev/${vmTools.hd}
|
||||
mount /dev/${vmTools.hd} disk
|
||||
|
||||
Reference in New Issue
Block a user