Test VM trouble

Hi

I have a problem with deploying a test VM to check that everything is working as it should. I am running opennebula od Ubuntu 16.04 in VirtualBox.

This chapter in the guide: http://docs.opennebula.org/5.4/deployment/node_installation/verify.html#verify-installation

The VM gets an error and when I look in to the log this is what it says:

Mon Aug 28 19:45:58 2017 [Z0][VM][I]: New state is ACTIVE
Mon Aug 28 19:45:58 2017 [Z0][VM][I]: New LCM state is PROLOG
Mon Aug 28 19:46:01 2017 [Z0][VM][I]: New LCM state is BOOT
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/5/deployment.0
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/5/deployment.0’ ‘oblak’ 5 oblak
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/5/deployment.0
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: error: invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm
Mon Aug 28 19:46:02 2017 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/5/deployment.0
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: ExitCode: 255
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.

Can someone help/explain what could be wrong.

Thank you

seems a libvirt error regarding your CPU features. Is nested virtualization activated in virtualbox and/or your cpu ?

quote from ONE docs:
However it is recommended execute virtual machines in hosts with virtualization extensions. To test if your host supports virtualization extensions, please run:

grep -E ‘svm|vmx’ /proc/cpuinfo

If you don’t get any output you probably don’t have virtualization extensions supported/enabled in your server.

Hi,

sorry for the late replay, I had some things to take care of and it was a bit time consuming.

Regarding your advice I checked if my host supports virtualization extensions and the command returned nothing. In virtualbox everything is as it should be, so i decided to use a different computer and I installed everything from the start.

I did enable the VT-X in the Bios and in VirtualBox. But ther result is still the same and I still have the same error as before:

Mon Aug 28 19:45:58 2017 [Z0][VM][I]: New state is ACTIVE
Mon Aug 28 19:45:58 2017 [Z0][VM][I]: New LCM state is PROLOG
Mon Aug 28 19:46:01 2017 [Z0][VM][I]: New LCM state is BOOT
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/5/deployment.0
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Mon Aug 28 19:46:01 2017 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/5/deployment.0’ ‘oblak’ 5 oblak
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/5/deployment.0
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: error: invalid argument: could not find capabilities for arch=x86_64 domaintype=kvm
Mon Aug 28 19:46:02 2017 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/5/deployment.0
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: ExitCode: 255
Mon Aug 28 19:46:02 2017 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.

Then I used another computer and the result is still the same.

So I am wondering is there something that I am missing, do I need to do anything else.

I maintain an opennebula tutorial which uses nested virtualization with kvm on Ubuntu host.


You have all steps documented, try it to see if it helps.

VirtualBox doesn’t support nested virtualization (running HW accelerated virtual machines inside the HW accelerated virtual machines). Inside the VirtualBox, you can run only emulated virtual machines. That means, they will be much slower. But it’s enough for the testing.

First, you have to switch the TYPE from KVM to QEMU in /etc/one/oned.conf, e.g.:

VM_MAD = [
    NAME           = "kvm",
    SUNSTONE_NAME  = "KVM",
    EXECUTABLE     = "one_vmm_exec",
    ARGUMENTS      = "-t 15 -r 0 kvm",
    DEFAULT        = "vmm_exec/vmm_exec_kvm.conf",
    TYPE           = "qemu",    # <------------------------------
    KEEP_SNAPSHOTS = "no",
    IMPORTED_VMS_ACTIONS = "terminate, terminate-hard, hold, release, suspend,
        resume, delete, reboot, reboot-hard, resched, unresched, disk-attach,
        disk-detach, nic-attach, nic-detach, snap-create, snap-delete"
]

and restart the OpenNebula. Now, if you see errors like unsupported machine type on VM run, you have to modify VM template and force the machine type. E.g.:

OS = [ MACHINE="pc" ]

And, maybe you’ll have to force disks on IDE (hd) or SCSI (sd), e.g.:

DISK = [ ..., DEV_PREFIX="sd" ]

You can also take the OpenNebula Sandbox ready for the VirtualBox https://opennebula.org/tryout/sandboxvirtualbox/. It’s modified to run the emulated virtual machines.

Best regards,
Vlastimil Holer

1 Like

Thanks for your help. I solved the same problem.