vmware server virtual machine will not power on - check the kvm linux kernel module

I've had this a couple of times now in the last few weeks. I wanted to try out the Linux KVM virtualization hypervisor that comes with Fedora 11 since VMware Server 2 is giving my fits on F11 x86_64 so I installed qemu and all the supporting packages via yum.

I realized that I can't do some things with KVM that I can with VMware Server so I'm putting up with the signal 6 crashes every week or so and went back to VMware Server 2.0.1 for Linux. In order to get that running I had to apply some patches to get the kernel modules compiled but that's been done for a while.

BUT, I forgot to uninstall the KVM RPMs so when I reboot the kvm_intel and kvm kernel modules are loaded. KVM and VMware don't play nice together so when you try to boot a VMware VM with those modules loaded the startup process hangs at 95% and eventually times out.

The VMware logs don't really give much help in pointing out the problem. All you really get is something in /var/log/vmware/hostd.log that looks something like this:


[2009-08-20 10:38:43.138 'Libs' 140336295930128 info] connect to /var/run/vmware/root_0/1250779071591734_12917/testAutomation-fd: File not found
[2009-08-20 10:38:43.638 'Libs' 140336295930128 info] connect to /var/run/vmware/root_0/1250779071591734_12917/testAutomation-fd: File not found
[2009-08-20 10:38:43.638 'Vmsvc' 140336303999248 info] Failed to do Power Op: Error: (3008) Cannot connect to the virtual machine
[2009-08-20 10:38:43.639 'vm:/home/vmware/myws/myws.vmx' 140336303999248 warning] Failed operation
[2009-08-20 10:38:43.639 'ha-eventmgr' 140336303999248 info] Event 5 : Failed to power on myws on myhost.domain.com in ha-datacenter: A general system error occurred

If you see something like this in your hostd.log files, make sure that the KVM kernel modules aren't loaded. I removed them as such:


modprobe -r kvm_intel
modprobe -r kvm

Once you do that your VMs should start fine.

Happy VMing,
Flux.

thanks, got me out of trouble :)

No problem. We try to post content here that people will find useful. I'm glad it's helped at least one person :)

I considered that turning off the services would be sufficient, but I find that "kvm_intel" and "kvm" modules are still loaded.

Investigation reveals that this is because the "qemu-system" rpm adds the file "/etc/sysconfig/modules/kvm.modules" script which loads either "kvm-intel" or "kvm-amd" modules and its dependent "kvm" module, and the script is run by the Fedora "/etc/rc.d/rc.sysinit" initial startup script right after the "# Load other user-defined modules" comment.

I've hacked my "/etc/rc.d/init.d/vmware" startup script so that vmware will unload the kvm modules.

1: Add the following function near the top of the "/etc/rc.d/init.d/vmware" file.

disableqemu() {
  lsmod | grep -q kvm-intel && {
    echo -n Removing vmware incompatible kernel module kvm-intel...
    modprobe -r kvm-intel && echo Done. || {
      echo Fatal Error.
      exit 1
    }
  }
  lsmod | grep -q kvm-amd && {
    echo -n Removing vmware incompatible kernel module kvm-amd...
    modprobe -r kvm-amd && echo Done. || {
      echo Fatal Error.
      exit 1
    }
  }
}

2: Add a call to the function before starting the vmware services.

case $1 in
start)
disableqemu ;# THIS DISABLES THE kvm, intel-kvm, amd-kvm modules.
service_vmware "$1"
service_vmware_mgmt "$1"
service_vmware_autostart "$1"
;;

Cheers,

Paul More, Astute Systems

In debian and ubuntu, I disabled it on boot using module blacklisting.

Edit /etc/modprobe.d/blacklist-custom.conf and add:

blacklist kvm_intel
blacklist kvm

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.