VMware Communities
gbohn
Enthusiast
Enthusiast
Jump to solution

KVM in Centos 6.2 Guest under Workstation 8.0.2

Hi;

   I wanted to see if I could get KVM nested virtualization running in a 64-Bit CentOS 6.2 Guest (under a Windows 7 64-Bit Host running Workstation 8.0.2).

  This doesn't seem to be working, and I was wondering if anyone has gotten this to work (presuming it's supposed to be able to work in the first place). I'm a beginner to CentOS and KVM/QEMU, so I'm not sure how to debug the problem.

  If I launch the 'Virtual Machine Manager' (in the Centos Guest), and try to create a VM, it says there are no connections. If I try to get it to 'connect', I get the status of 'connecting' forever. (See the attachment image). So, my guess is something is wrong at the 'QEMU-KVM' level.

   I enabled the Vt-X/EPT option in the CentOS 6.2 Guests settings, and when I boot the CentOS 6.2 Guest, I see the 'vmx' option listed in the CPU flags, which I believe is supposed to be a good thing:

[/home/greg] cat /proc/cpuinfo | grep "vmx"

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse

                    sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc

                    aperfmperf  unfair_spinlock pni pclmulqdq vmx ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor

                    lahf_lm ida arat epb dts tpr_shadow vnmi ept vpid

I also see that some kvm modules appear to be loaded:

[/home/greg] lsmod | grep "kvm"
kvm_intel              50412  0
kvm                   305113  1 kvm_intel

  And, the libvirtd Daemon appears to be running (at least according to the 'Service Configuration' panel.

  Is KVM Nested Virtualization (in a Workstation 8 Guest environment) supposed to work?

  If so, any ideas how I can narrow down what my problem is? Since I'm not very familiar with KVM or qemu, I'm not sure where to start.

  Trying to google info. has just left me confused, since some hits mention commands like 'qemu', or a 'qemu-kvm', or a 'qemu-system-x86_64'.

  I see that /usr/bin/ on my Guest system only contains two qemu commands:

[/home/greg] ls -l /usr/bin/qemu*
-rwxr-xr-x. 1 root root 317216 Jan 23 16:26 /usr/bin/qemu-img
-rwxr-xr-x. 1 root root 329504 Jan 23 16:26 /usr/bin/qemu-io

  Any help would be appreciated.

   Thanks;

        -Greg

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

This seems to be caused by a bug in the virtual BIOS in Workstation 8.0.2.

As a workaround, look for the following line in your VM configuration file:

vcpu.hotadd = "TRUE"

If you change "TRUE" to "FALSE" (while the VM is powered off), you should be able to connect to the local hypervisor.  Of course, you won't be able to hot-add virtual CPUs.

View solution in original post

Reply
0 Kudos
4 Replies
admin
Immortal
Immortal
Jump to solution

I'm seeing the same issue with this combination.  I'll look into it more next week.  In the meantime, if you aren't wedded to CentOS 6.2, I believe that the guest KVM testing for Workstation 8 was done with Ubuntu 10.10 as the guest OS.  You might want to give that a shot.

Reply
0 Kudos
gbohn
Enthusiast
Enthusiast
Jump to solution

> if you aren't wedded to CentOS 6.2

  At the moment I need for this to be CentOS 6.2/RHEL 6.2 for various reasons. But, since I'm just testing this out I'm not desperate to get this working (at least for now).

  On the bright side, I guess it's good news that it's not just me...

  Thanks;

     -Greg

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

This seems to be caused by a bug in the virtual BIOS in Workstation 8.0.2.

As a workaround, look for the following line in your VM configuration file:

vcpu.hotadd = "TRUE"

If you change "TRUE" to "FALSE" (while the VM is powered off), you should be able to connect to the local hypervisor.  Of course, you won't be able to hot-add virtual CPUs.

Reply
0 Kudos
gbohn
Enthusiast
Enthusiast
Jump to solution

That did the trick. Things seem to be working now.

Thanks!

       -Greg

Reply
0 Kudos