materusPC: use qcow2 again
This commit is contained in:
parent
94db4c8851
commit
f833382298
|
@ -184,13 +184,15 @@ in
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.RemainAfterExit = true;
|
serviceConfig.RemainAfterExit = true;
|
||||||
script = ''
|
script = ''
|
||||||
|
modprobe nbd max_part=16
|
||||||
losetup -P /dev/loop6 /materus/data/VM/data.raw
|
sleep 1
|
||||||
mount /dev/loop6p1 /materus/data/Windows -o uid=1000,gid=100
|
qemu-nbd -c /dev/nbd10 /materus/data/VM/data.qcow2 --discard=unmap
|
||||||
|
sleep 1
|
||||||
|
mount /dev/nbd10p1 /materus/data/Windows -o uid=1000,gid=100
|
||||||
'';
|
'';
|
||||||
preStop = ''
|
preStop = ''
|
||||||
umount -lf /materus/data/Windows
|
umount -r /dev/nbd10p1
|
||||||
losetup -d /dev/loop6
|
qemu-nbd -d /dev/nbd10
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue