So does this mean that KVM is not properly supported on Ubuntu 10.04 Server LTS? The ability to automatically shutdown VMs when someone logs into a production host server and types /sbin/shutdown does not exist on a server operating sytstem flagged LTS that is supposed to be for production? This can't be. There must be something that is being overlooked here.
I tried creating a simple traditional sys5 init script to test this out after the script I wrote failed to shutdown the guests on reboot or shutdown but works manually from the command line.
[code]
!/bin/bash
### BEGIN INIT INFO
# Provides: virsh test
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Gracefull shutdown of all KVM guests.
# Description: Shutdown KVM guests on host shutdown
### END INIT INFO
/usr/bin/virsh list >>/var/log/kvmguest.log 2>&1
[/code]
this works when i run it manually.
I created a link from /etc/init.d/testscript to /etc/rc6.d/K5testscript.
reboot server.
and I get this message in the log
error: unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
error: failed to connect to the hypervisor
So ofcourse the guests are not shutdown gracefully on host shutdown. A very basic feature of running a virtual machine server. Wow. Just WOW!
So does this mean that KVM is not properly supported on Ubuntu 10.04 Server LTS? The ability to automatically shutdown VMs when someone logs into a production host server and types /sbin/shutdown does not exist on a server operating sytstem flagged LTS that is supposed to be for production? This can't be. There must be something that is being overlooked here.
I tried creating a simple traditional sys5 init script to test this out after the script I wrote failed to shutdown the guests on reboot or shutdown but works manually from the command line.
[code]
!/bin/bash
### BEGIN INIT INFO
# Provides: virsh test
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Gracefull shutdown of all KVM guests.
# Description: Shutdown KVM guests on host shutdown
### END INIT INFO
/usr/bin/virsh list >>/var/ log/kvmguest. log 2>&1
[/code]
this works when i run it manually. d/testscript to /etc/rc6. d/K5testscript.
I created a link from /etc/init.
reboot server.
and I get this message in the log libvirt/ libvirt- sock': Connection refused
error: unable to connect to '/var/run/
error: failed to connect to the hypervisor
So ofcourse the guests are not shutdown gracefully on host shutdown. A very basic feature of running a virtual machine server. Wow. Just WOW!