Does Slackware tell qemu/kvm virtual machines to shutdown?
When I do a "reboot" or "shutdown -h now", does the Slackware init system tell any virtual machines running with qemu/kvm/libvirt to also shutdown or do I need to make an rc. file with "virsh shutdown VMHERE" ? I am in the process of making one and am wondering if I need to.
|
You should make an /etc/rc.d/rc.local_shutdown file, set it executable, and add your shutdown commands in there.
|
Quote:
Code:
#!/bin/sh |
Sure.
If you want the colors, you should source /etc/init.d/functions in your script and use the success or failure functions. |
Quote:
|
Quote:
|
here I add a block like this to /etc/rc.d/rc.local
Code:
# Start libvirt: Code:
# Stop libvirt: when you will run "/etc/rc.d/rc.libvirt stop" all the active virtual machines will be shut down. if you want the virtual machines to power on when the libvirtd daemon starts, you can set this option easily using a gui connecting to libvirt via virt-manager: click on the virtual machine, go to "View" -> "Details" and check it under "Boot Options" -> "Start virtual machine on host boot up". |
All times are GMT -5. The time now is 10:40 PM. |