Comment 87 for bug 350936

Revision history for this message
dbendlin (diego-bendlin) wrote :

Hello Guys,

I wanned to share my workarroud on this issue, Im using debian squeeze as OS for a couple of virtualization hosts, each one of them holding a number of vm's.

What I need is that when shuting down my virtualization host (from cli, by cron, by ups low batt or by pressing the power button (ACPI)), the host hast to shutdown each vm before going down.

I used one of the scripts from earlier posts:
1.- I copied it to /usr/local/bin
2.- Changed ownership (chown root:root /usr/local/bin/libvirt-shutdown-domains)
3.- Chandeg permitions (chmod 775 /usr/local/bin/libvirt-shutdown-domains)
4.- Edited /etc/init.d/libvirt-bin, adding a reference to this file as the secound line in the stop section of the init file

Before actually executing the libvirt-bin stop logic, it calls the first script witch shutdown each vm's, when that script ends (after every vm is gracefully halted), the libvirt-bin init script continues.