Oneimage creates locked images

Hi all!!
I’m following the guide
Quickstart: OpenNebula on Ubuntu 14.04 and KVM
http://docs.opennebula.org/4.6/design_and_installation/quick_starts/qs_ubuntu_kvm.html

I installed Ubuntu 14.04 on Virtualbox and installed opennebula

It works fine until i try to create an image…
as the guide suggests at step “3.2. Adding virtual resources” I try

$ oneimage create --name "CentOS-6.5_x86_64" \ --path "http://appliances.c12g.com/CentOS-6.5/centos6.5.qcow2.gz" \ --driver qcow2 \ --datastore default

but if I check status with oneimage list
I get status locked

if I use the locked image to create a template the image changes status to ready but when I try to instantiate the template i get
[TM][E]: missing DISK mandatory attributes (SOURCE, TM_MAD, CLONE, DATASTORE_ID) for VM 2, DISK 0 [DiM][I]: New VM state is FAILED
and if I look in the image attributes
Error copying image in the datastore: Error downloading http://appliances.c12g.com/CentOS-6.5/centos6.5.qcow2.gz

Thanks for your help!!!

as you have probably found out by now, images in status “locked” when work on it isnt done yet.
so you’re image probably didnt download fully yet, or the cloning wasnt completed. After it goes from locked > ready you can use an image to boot a VM.

in your case the http download failed, is dns setup properly ? can you wget the file from that url ?

1 Like

I think you are right…the image wasn’t fully downloaded yet…now it’s in ready status… :smile:
and if I wget it…works fine…but…
…but when i try t instantiate a template I get…

Tue Nov 24 11:34:52 2015 [DiM][I]: New VM state is ACTIVE. Tue Nov 24 11:34:52 2015 [LCM][I]: New VM state is PROLOG. Tue Nov 24 11:36:28 2015 [LCM][I]: New VM state is BOOT Tue Nov 24 11:36:28 2015 [VMM][I]: Generating deployment file: /var/lib/one/vms/0/deployment.0 Tue Nov 24 11:36:28 2015 [VMM][I]: ExitCode: 0 Tue Nov 24 11:36:28 2015 [VMM][I]: Successfully execute network driver operation: pre. Tue Nov 24 11:36:29 2015 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy '/var/lib/one//datastores/0/0/deployment.0' 'localhost' 0 localhost Tue Nov 24 11:36:29 2015 [VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/0/deployment.0 Tue Nov 24 11:36:29 2015 [VMM][I]: error: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules. Tue Nov 24 11:36:29 2015 [VMM][E]: Could not create domain from /var/lib/one//datastores/0/0/deployment.0 Tue Nov 24 11:36:29 2015 [VMM][I]: ExitCode: 255 Tue Nov 24 11:36:29 2015 [VMM][I]: Failed to execute virtualization driver operation: deploy. Tue Nov 24 11:36:29 2015 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/0/deployment.0 Tue Nov 24 11:36:29 2015 [DiM][I]: New VM state is FAILED

This can be caused by not having installed the KVM virtualization software yet, or the installed packages cant be used, because your CPU doesnt have the virtualizatie instructions on board (i.e. too old).

1 Like

thanks for your reply!!

this is the cpu…

Intel® Core™ i5-2450M Processor

Intel® Virtualization Technology ‡ Yes Intel® Virtualization Technology for Directed I/O ‡ No Intel® VT-x with Extended Page Tables ‡ Yes

on this notebook
http://www.cnet.com/products/acer-aspire-5750g-2454g50mnkk-15-6-core-i5-2450m-windows-7-home-premium-64-bit-4-gb-ram-500-gb-hdd/

if I put on terminal

paolo@Crea:~$ lsmod | grep kvm
kvm_intel             143187  0 
kvm                   455843  1 kvm_intel

I think that if CPU hadn’t support for virtualization, virtualbox wouldn’t have been working at all
do you agree?
EDIT: if I try opennebula-sandbox on virtualbox everything works well…i can instantiate a vm properly…

Thanks for your reply!!

I’ve found something…
according to this guide…
if I put in my pc terminal
$ egrep -c '(vmx|svm)' /proc/cpuinfo 4
but if try in a terminal on a vm running on virtualbox i get
$ egrep -c '(vmx|svm)' /proc/cpuinfo 0

it’s normal?
should I enable something on os running on virtualmachine?

this page: http://ark.intel.com/products/53452/Intel-Core-i5-2450M-Processor-3M-Cache-up-to-3_10-GHz

shows that you do have virtualization extensions on board your CPU, although you dont have VT-d
Go to your bios and check that your virtualization options are enabled there.

HTH

just an update…trying to understand something…

I installed opennebula on ubuntu without virtualbox…

everything works and this is the log

$ cat /var/log/one/2.log Mon Nov 30 14:32:45 2015 [DiM][I]: New VM state is ACTIVE. Mon Nov 30 14:32:46 2015 [LCM][I]: New VM state is PROLOG. Mon Nov 30 14:33:51 2015 [LCM][I]: New VM state is BOOT Mon Nov 30 14:33:51 2015 [VMM][I]: Generating deployment file: /var/lib/one/vms/2/deployment.0 Mon Nov 30 14:33:51 2015 [VMM][I]: ExitCode: 0 Mon Nov 30 14:33:51 2015 [VMM][I]: Successfully execute network driver operation: pre. Mon Nov 30 14:33:56 2015 [VMM][I]: ExitCode: 0 Mon Nov 30 14:33:56 2015 [VMM][I]: Successfully execute virtualization driver operation: deploy. Mon Nov 30 14:33:56 2015 [VMM][I]: ExitCode: 0 Mon Nov 30 14:33:56 2015 [VMM][I]: Successfully execute network driver operation: post. Mon Nov 30 14:33:57 2015 [LCM][I]: New VM state is RUNNING
the same ubuntu…the same notebook…just without using virtualbox
is there some feature to enable in virtualbox or somewhere else to make things work in a virtual environment?
Thank you for your reply :smile:

aha, so your using virtualbox, with a virtual Ubuntu-linux.
then you installed opennebula on that linux and you want to do virtualization in that virtual ubuntu, on a laptop? I hope you are a very patient guy :wink:

Anyway, the features of your CPU should be presented to the ubuntu VM and this doc shows more info: https://www.virtualbox.org/manual/ch03.html#settings-processor
to be more specifically: enable PAE/NX / enable nested paging (if your CPU has those features)

See CentOS 7 VM hangs at boot under Vagrant - it’s a complete guide for OpenNebula with kvm/libvirt under Vagrant using Ubuntu 14.04 as a host (your laptop).