Ask Your Question
0

Nested KVM w/ CentOS 7.3

asked 2017-03-21 11:08:40 -0500

mraoul gravatar image

Has anyone gotten Nested KVM working with CentOS 7.3 and Ocata on either VMWare ESXi (6.5) or Workstation (12.5).

I've installed OpenStack Ocata using Packstack on CentOS 7.3. I've verified hardware virtualization is enabled in the VM config and nested kvm support is enabled in the kernel module config of the CentOS vm

[root@centos7 ~]# egrep -c "vmx" /proc/cpuinfo 
4
[root@centos7 ~]# cat /sys/module/kvm_intel/parameters/nested 
Y

I've verified a cirros 3.4 image will boot using qemu using the relevant settings in /etc/nova/nova.conf:

virt_type=qemu
cpu_mode=none
#cpu_model

But when i try to use kvm, the instance doesn't go further than attempting to boot grub.

Booting from Hard Disk...
GRUB

This is using the following in nova.conf:

virt_type=kvm
cpu_mode=host-model

Using host-passthrough as the cpu_mode, the instance throws an error during creation. The error in the nova-compute.log is this:

2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [req-3a0b3f9e-0e67-4079-a18e-50e8325e728c 3d1f99f4dce944ff8fa21b6f85565dcf 9790155505224c269da4e7a232b1ec61 - - -] [instance: 0df15379-6e47-4826-adec-606f10b2e835] Instance failed to spawn
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835] Traceback (most recent call last):
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2078, in _build_resources
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     yield resources
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1920, in _build_and_run_instance
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     block_device_info=block_device_info)
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2615, in spawn
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     post_xml_callback=gen_confdrive)
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4885, in _create_domain_and_network
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     block_device_info, guest)
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     self.force_reraise()
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     six.reraise(self.type_, self.value, self.tb)
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4860, in _create_domain_and_network
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]     post_xml_callback=post_xml_callback)
2017-03-21 02:24:03.206 5508 ERROR nova.compute.manager [instance: 0df15379-6e47-4826-adec-606f10b2e835]   File "/usr/lib/python2.7/site-packages/nova/virt ...
(more)
edit retag flag offensive close merge delete

Comments

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-01 11:38:58 -0500

BigQEd gravatar image

updated 2017-05-01 11:39:50 -0500

A "work around" is to use virt_type=qemu and cpu_mode=none in nova.conf, however, if virt_type kvm is needed I'm not sure the current qemu-kvm version has a solution. There seems to be a resolution when libvirtd moves to 2.5.0 but that is not released yet.

See the following bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1404627 (https://bugzilla.redhat.com/show_bug....) https://bugs.launchpad.net/nova/+bug/1653430 (https://bugs.launchpad.net/nova/+bug/...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-03-21 11:08:40 -0500

Seen: 840 times

Last updated: May 01 '17