Restricted Shutdown KVM HOST
Dear All,
I have install RHEL-6 KVM Host, two guests are also installed on KVM Host.
Both Host and Guests are running well.
We need to start Host & VMs at morning and stop at night regularly.
If I shutdown the host without shutting down guest, it may corrupt guest and may loose unsaved data on guest OS.
My question is that how to prevent shutting down Host accidentally while guest are running ?
Currently I am using shutdown -h command on guest and host to turnoff the machine.
Responses
Hello Suvajlt - preventing Host shutdown is probably a bit challenging. However, would it be OK if the Host shutdown was to first shutdown the Guests?
If so, take a look at:
/etc/sysconfig/libvirt-guests
[root@centkvm01 sysconfig]# grep SHUT /etc/sysconfig/libvirt-guests
# ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a
#ON_SHUTDOWN=suspend
#PARALLEL_SHUTDOWN=0
#SHUTDOWN_TIMEOUT=300
I know other people have asked about altering the shutdown process of a host (for other reasons) and I believe people suggested wrappers for the shutdown command, changing the file permissions, shell alias, etc...
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
