[libvirt-users] pre/post vm start commands

Soeren Grunewald soeren.grunewald at avionic-design.de
Wed Feb 10 17:26:02 UTC 2010

Hi there,

for development i use a windows vm. which is installed into a disk 
image. because the compiler generates a lot of temporary files into the 
user tempdir (C:\\Documents And Users\\User\\Local Settings\\Temp) the 
vm becomes quite slow after a couple of weeks and i register a lot 
activity on the disk.
so i moved the temp directory to a ram disk and no more problems.

but because the ram disk is not formated on startup i need to do this by 
hand. so i disabled autostart for the vm and do the following:

$ sudo mkfs.ntfs -q -L TEMP -I /dev/ram0
$ sudo virsh start windows

so the question is, does libvirt provide some kind of pre startup script 
which is will be executed before the libvirtd does the autostart for the vm.
Best Regards

More information about the libvirt-users mailing list