0

I am looking for some advice on configuring KVM on Red Hat 6.5 so that it is able to run Red Hat Hypervisor as a virtual guest.

When I am running Red Hat Virtialization Hypervisor as KVM guest then it is not detaching underlying hardware and thus shows a message that Virtualization Hardware not detected.

I'm sure there is a way to run Hypervisors as Nested KVM guests but can't really get hold of the exact configuration.

Can anyone out there help in that.

Thanks, Sandeep

sandeep.s85
  • 2,059
  • 1
  • 18
  • 26
  • I'm just curios, why would you need to nest virtualization? why not run your VM on original hypervisor instead? – alexus Sep 12 '14 at 16:23
  • I installed it on the box itself first but as you know the Red Hat Hypervisor once installed on a physical box won't let you use that box for any other purpose. – sandeep.s85 Sep 12 '14 at 16:28
  • so I Installed RHEL6.5 on physical box with 8GB RAM and 4 CPU and if I can run RHEV-H inside KVM then I can setup another virtual machine which will run as RHEV-M the Hypervisor manager. Once I have Hypervisor and Manager both up and running inside KVM then I can do the testing with other stuff. I'm preparing for the Red Hat Virtualization exam and for that I have to setup this way. I can't afford to buy multiple hardwares to run hypervisor and then Hypervisor manager and then manage those from my laptop – sandeep.s85 Sep 12 '14 at 16:30
  • use `RHEL` not `RHH`, or install RHH and run `RHEL` as `VM`! – alexus Sep 12 '14 at 16:32

3 Answers3

4

So I'm managed to run the nested Hypervisor inside KVM and it turns out to me that the Red Hat Kernel 2.6.32 did not support the nested keyword when it was passed using kvm-intel.nested=1

so that is the reason there was no file such as /sys/module/kvm_intel/parameters/nested

It worked for me in kernel 3.10

I installed it set the nested parameter. Created new VM, modified it's cpu and set as per the host CPU so that it can detect vmx extension Started Red Hat hypervisor and it detected the hardware.

hope it helps others.

Thanks,

sandeep.s85
  • 2,059
  • 1
  • 18
  • 26
2
  1. Your CPU needs to support either VMX (Intel) or SVM (AMD) - Check grep ^flags /proc/cpuinfo
  2. The kvm kernel module needs to have nested=Y set - check cat /sys/module/kvm_*/parameters/nested
  3. The virtual guest CPU has to export the VMX flag - check virsh dump <vm name> for a stanza like
  <cpu match='exact'>
    <model>Westmere</model>
    <feature policy='require' name='vmx'/>
  </cpu>
al.
  • 915
  • 6
  • 17
  • thanks for the info. the cpu does have the vmx flag set. the only issue i am facing right now is to enable nested=Y flag with kvm_intel kernel module. there is no file such as /sys/module/kvm*/parameter/nested in kernel version 2.6.32-431 I have tried everything with enabling kvm_intel.nested=1 in /boot/grub/grub.conf but seems like the present kernel does not recognise the nested parameter – sandeep.s85 Sep 12 '14 at 17:45
  • I'm wondering why this answer is getting downvoted. If it is wrong, please let me know. – al. Jan 08 '15 at 16:21
  • Nested KVM is not supported on EL6. The module option isn't even there. It's in Fedora/EL7 but not 6, and the OP is using 6. – suprjami Jan 13 '15 at 00:56
  • I see. I'd still argue that the answer is correct, as it describes the canonical way of finding the cause of the problem (missing support in kernel module). – al. Jan 13 '15 at 15:49
1

Recently,i'm trying to run xen hypervisor inside kvm .

I found that RHEL6 did not support Nested virtualization. see this redhat maillist

----- Original Message -----

From: "Gilles Dubreuil" To: rhos-list redhat com Sent: Monday, November 25, 2013 9:59:58 PM Subject: [rhos-list] RHEL6: Nested virtualization support for kvm_intel?

Hi,

Maybe I'm dreaming but I thought soon we'll able to go Inception level 3, well at least that's how I explain to my partner what we're doing.

I'm not sure if any previous OpenStack kernels did have the feature. But latest RHEL6.5 kernel seems not to support nested virtualization on kvm_intel kernel module.

I'm not 100% sure if CPU support is required besides normal vmx flag. But I can't see any flag advertising such feature or not while comparing Intel specs as well with my laptop where it works with Fedora.

If there is no specific CPU support needed then the blocker will be the module. In such case, do there is any road map for the feature? Didn't find much rhel6 support for it (google/BZ) either.

Not until RHEL 7, however it does work (but not supported) on AMD hardware.


But centos6 support. see howto

shalk
  • 11
  • 1