CPU Virtualization Support
How to tell if your processor supports Virtualization.
egrep 'vmx|svm' /proc/cpuinfo
And look for the following CPU flags
- vmx – (intel)
- svm – (amd)
If your cpuinfo file has a flag "svm" then you have AMD-v hardware virtualization support (aka pacifica) on your cpu.
KVM ACPI Shutdown of Guests
These are hacks that allow guest system to be shutdown using the virtsh shutdown command. I found problems with WinXP and Ubuntu Lucid when trying to do a shutdown. This should be cleaner than using the destroy option.
Shutdown Guest Script for RedHat / CentOS 5.5
Here is a script I put together that will shutdown guests systems On Redhat and CentOS 5.5 systems. I think this method is more clean if you forget to shutdown all virtual systems before you shutdown the host system. You need to make sure that all guests can be turned off with ACPI Shutdown from libvirtd.
The above link should be save to /etc/init.d, permission set to 755, and then enables with chkconfig.
cp kvm_shutdown.txt /etc/init.d/kvm_shutdown chmod 755 /etc/init.d/kvm_shutdown chkconfig --add kvm_shutdown
The script will go through all running systems and send the virsh shutdown sys_name command. It will test every 5 seconds for 90 seconds to see if the system are still up. If the systems are down, it will exit and the host will continue to shutdown. If after 90 seconds systems are still running, the script will send a destroy command to the ones left running.
Ubuntu Lucid Desktop
Ubuntu desktop displays a dialog box for 60 seconds before it allows the image to be halted. To allow ACPI shutdown to work from KVM, acpid must be running and /etc/acpi/powerbtn.sh needs to be modified.
At the top of /etc/acpi/powerbtn.sh, Add the halt command,
#!/bin/sh # /etc/acpi/powerbtn.sh # Initiates a shutdown when the power putton has been # pressed. halt -p [ -r /usr/share/acpi-support/power-funcs ] && . /usr/share/acpi-support/power-funcs
Fix VMware 6.5.3 on Ubuntu Karmic 9.10
Install freezes when trying to do an install. I found the following tips to work properly.
You need to be root, so do something like sudo su - and change to the directory where the vmware bundle is.
chmod 755 VMware-Workstation-6.5.3-185404.*.bundle export VMWARE_SKIP_MODULES=true ./VMware-Workstation-6.5.3-185404.*.bundle
After the install completes, do the following.
vmware-modconfig --console --install-all
Fix vmware command if there is an issue with the mouse losing focus because the display is too big.
mv /usr/bin/vmware /usr/bin/vmware.real
and create the file /usr/bin/vmware with the following content.
#!/bin/bash export VMWARE_USE_SHIPPED_GTK=force /usr/bin/vmware.real $@
Make sure you chmod the file
chmod 755 /usr/bin/vmware