Ask Your Question
0

Virtualbox on OpenStack Image

asked 2019-05-18 09:02:49 -0500

ericl42 gravatar image

Hello,

I recently spun up an OpenStack image running Ubuntu 16.04. My goal was to then use Virtualbox within it for some security testing but I ran into some issues.

When I tried to start a VM within Virtualbox it said, "A critical error has occurred while running the VM.". I looked through he logs and didn't see anything overly obvious on what was wrong but from Googling around, it mainly pointed to ensuring virtualization is turned on within the host.

I'm not that familiar with OpenStack but I got to the console of my Ubuntu image but could never get into the BIOS. I didn't think an OpenStack image would truly have a BIOS to get into as it's all settings from when you spin up the image. So I found a few articles regarding nested virtualization. I ran these commands and restarted but still didn't have any luck.

sudo rmmod kvm-intel
sudo sh -c "echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf"
sudo modprobe kvm-intel

Is there anything obvious I'm missing or has anyone else successfully ran VirtualBox within OpenStack? The really weird part is I spun up an image a few weeks ago and ran the exact same setup and VirtualBox did work then. I've tried re-imaging three times but still no luck.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-05-20 05:32:10 -0500

Mohit gravatar image

Vritualization is not enabled on the instance spawned up on openstack. you can check it via command

cat /proc/cpuinfo | grep vmx

You need to enable nested virtualization. Linux KVM supports nesting on recent virtualization-enabled processors. On compute node set

echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf

Update nova.conf with -:

virt_type=kvm
cpu_mode=host-passthrough

This is valid only for kvm hypervisor.

Reboot your compute node and Validate that nested virtualization is enabled

cat /sys/module/kvm_intel/parameters/nested
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

1 follower

Stats

Asked: 2019-05-18 09:02:49 -0500

Seen: 82 times

Last updated: May 20