[one-users] OpenNebula 3.2 VM deployment failure

Javier Fontan jfontan at opennebula.org
Wed Jan 18 07:43:28 PST 2012


Hello,

VM_DIR is only used for nodes, OpenNebula always expect to have image
files for the VMs in /var/lib/one. You can do two things in you
frontend:

 * Mount you shared storage in /var/lib/one
 * Make /var/lib/one a symlink to /p00 (supposing that the shared
storage is accesible in this path from the frontend)

Before making any of these changes stop OpenNebula and move the files
/var/lib/one to the shared storage.

Cheers

On Thu, Jan 12, 2012 at 8:56 PM, Deep Dish <deeepdish at gmail.com> wrote:
> Good Day,
>
> I'm trying to deploy virtual machines on OpenNebula and getting some
> inconsistencies, specifically where files are being copied to (deployed).
>
> My environment consists of:
>
> - OpenNebula 3.2 beta (v3.1.90 -- installed from .tar sources)
> ** I'm testing the beta release since there is a requirement for VLAN auto
> provisioning.   v3.0 and earlier have issues with hooks and migration.
> - Ubuntu 10.04LTS - KVM hypervisor
> - 3 servers --  1 x front end, 2 x compute nodes (hosts)
> - Using FC shared storage -- OCFS2 file system mounted as /p00 on both
> compute nodes.
>
> I've created two simple images:
>
> 1.  An Ubuntu 10.04LTS CDROM ISO
> 2.  A 10GB VirtIO disk (empty)
>
> My goal is to simply light up a single VM where I can install Ubuntu onto
> the 10G HD.   (simple test).
>
> I'm running into a strange issue, as described by the logs.   I see that the
> image files are being copied to my shared storage on the hosts that's
> mounted under /p00 (VM_DIR config parameter).   However, the image files are
> also being copied to /var/lib/one/images/<vm#>/images..
>
> This causes the deployment cycle to fail and VM doesn't boot successfully.
>  I know I'm missing something, however can't put my finger on it.   Has
> anyone else run into this issue?
>
> Thanks for your help.
>
> Relevant artifacts below (let me know if you need any additional info)
>
> $ oneimage show 0
> IMAGE 0
> INFORMATION
> ID             : 0
> NAME           : Ubuntu 10.04.3LTS ISO
> USER           : oneadmin
> GROUP          : oneadmin
> TYPE           : CDROM
> REGISTER TIME  : 01/12 12:22:01
> PUBLIC         : Yes
> PERSISTENT     : No
> SOURCE         : /var/lib/one/images/5360f849e918f8b27f832141ed48ca5e
> PATH           : http://10.0.0.18/iso/ubuntu-10.04.3-server-amd64.iso
> SIZE           : 680
> STATE          : used
> RUNNING_VMS    : 1
>
> IMAGE TEMPLATE
>
> BUS=IDE
> DEV_PREFIX=hd
>
> $ oneimage show 1
> IMAGE 1
> INFORMATION
> ID             : 1
> NAME           : 10GB VirtIO Disk
> USER           : oneadmin
> GROUP          : oneadmin
> TYPE           : DATABLOCK
> REGISTER TIME  : 01/12 12:24:40
> PUBLIC         : Yes
> PERSISTENT     : No
> SOURCE         : /var/lib/one/images/ee827a26b02b219abe62bf772d6995db
> FSTYPE         : ext4
> SIZE           : 10240
> STATE          : used
> RUNNING_VMS    : 1
>
> IMAGE
> TEMPLATE
> BUS=virtio
> DESCRIPTION="Empty 10GB Disk"
> DEV_PREFIX=hd
>
>
> $ onevm show 0
> VIRTUAL MACHINE 0
> INFORMATION
> ID                  : 0
> NAME                : test01
> USER                : oneadmin
> GROUP               : oneadmin
> STATE               : FAILED
> LCM_STATE           : LCM_INIT
> START TIME          : 01/12 12:26:39
> END TIME            : 01/12 13:09:54
> DEPLOY ID           : -
>
> VIRTUAL MACHINE
> MONITORING
> NET_TX              : 0
> NET_RX              : 0
> USED MEMORY         : 0
> USED CPU            : 0
>
> VIRTUAL MACHINE
> TEMPLATE
> CPU=1
> DISK=[
>   BUS=virtio,
>   CLONE=YES,
>   DISK_ID=0,
>   IMAGE="10GB VirtIO Disk",
>   IMAGE_ID=1,
>   READONLY=NO,
>   SAVE=NO,
>   SOURCE=/var/lib/one/images/ee827a26b02b219abe62bf772d6995db,
>   TARGET=hde,
>   TYPE=DISK ]
> DISK=[
>   BUS=ide,
>   CLONE=YES,
>   DISK_ID=1,
>   IMAGE="Ubuntu 10.04.3LTS ISO",
>   IMAGE_ID=0,
>   READONLY=YES,
>   SAVE=NO,
>   SOURCE=/var/lib/one/images/5360f849e918f8b27f832141ed48ca5e,
>   TARGET=hdc,
>   TYPE=CDROM ]
> ERROR=[
>   MESSAGE="Error deploying virtual machine: Could not create domain from
> /p00/0/images/deployment.2",
>   TIMESTAMP="Thu Jan 12 12:31:48 2012" ]
> ERROR=[
>   MESSAGE="Error deploying virtual machine: Could not create domain from
> /p00/0/images/deployment.3",
>   TIMESTAMP="Thu Jan 12 13:09:54 2012" ]
> GRAPHICS=[
>   PORT=5900,
>   TYPE=vnc ]
> INPUT=[
>   BUS=usb,
>   TYPE=mouse ]
> MEMORY=1024
> NAME=test01
> NIC=[
>   BRIDGE=vmbr0,
>   IP=10.0.0.20,
>   MAC=02:00:ac:1e:1e:14,
>   NETWORK="Management VLAN",
>   NETWORK_ID=0,
>   VLAN=NO ]
> OS=[
>   ARCH=x86_64,
>   BOOT=cdrom ]
> RAW=[
>   TYPE=kvm ]
> TEMPLATE_ID=0
> VCPU=1
> VMID=0
>
> VIRTUAL MACHINE
> HISTORY
>  SEQ        HOSTNAME REASON           START        TIME       PTIME
>    0     vm02   erro  01/12 12:27:01 00 00:00:21 00 00:00:19
>    1     vm02   erro  01/12 12:30:01 00 00:00:13 00 00:00:11
>    2     vm02   erro  01/12 12:31:01 00 00:00:47 00 00:00:10
>    3     vm02   erro  01/12 13:09:11 00 00:00:43 00 00:00:10
>
>
>
> # cat /var/one/0.log
> Thu Jan 12 13:09:11 2012 [DiM][I]: New VM state is ACTIVE.
> Thu Jan 12 13:09:11 2012 [LCM][I]: New VM state is PROLOG.
> Thu Jan 12 13:09:11 2012 [VM][I]: Virtual Machine has no context
> Thu Jan 12 13:09:20 2012 [TM][D]: tm_clone.sh:
> vm00:/var/lib/one/images/ee827a26b02b219abe62bf772d6995db
> vm02:/p00/0/images/disk.0
> Thu Jan 12 13:09:20 2012 [TM][D]: tm_clone.sh: DST:
> /var/lib/one/0/images/disk.0
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Creating directory
> /var/lib/one/0/images
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /var/lib/one/0/images".
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /var/lib/one/0/images".
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Cloning
> /var/lib/one/images/ee827a26b02b219abe62bf772d6995db
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Executed "cp -r
> /var/lib/one/images/ee827a26b02b219abe62bf772d6995db
> /var/lib/one/0/images/disk.0".
> Thu Jan 12 13:09:20 2012 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /var/lib/one/0/images/disk.0".
> Thu Jan 12 13:09:20 2012 [TM][I]: ExitCode: 0
> Thu Jan 12 13:09:21 2012 [TM][D]: tm_clone.sh:
> vm00:/var/lib/one/images/5360f849e918f8b27f832141ed48ca5e
> vm02:/p00/0/images/disk.1
> Thu Jan 12 13:09:21 2012 [TM][D]: tm_clone.sh: DST:
> /var/lib/one/0/images/disk.1
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Creating directory
> /var/lib/one/0/images
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /var/lib/one/0/images".
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /var/lib/one/0/images".
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Cloning
> /var/lib/one/images/5360f849e918f8b27f832141ed48ca5e
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Executed "cp -r
> /var/lib/one/images/5360f849e918f8b27f832141ed48ca5e
> /var/lib/one/0/images/disk.1".
> Thu Jan 12 13:09:21 2012 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /var/lib/one/0/images/disk.1".
> Thu Jan 12 13:09:21 2012 [TM][I]: ExitCode: 0
> Thu Jan 12 13:09:21 2012 [LCM][I]: New VM state is BOOT
> Thu Jan 12 13:09:21 2012 [VMM][I]: Generating deployment file:
> /var/lib/one/0/deployment.3
> Thu Jan 12 13:09:23 2012 [VMM][I]: ExitCode: 0
> Thu Jan 12 13:09:23 2012 [VMM][I]: Successfully execute network driver
> operation: pre.Thu Jan 12 13:09:54 2012 [VMM][I]: Command execution fail:
> cat << EOT | /var/tmp/one/vmm/kvm/deploy /p00/0/images/deployment.3 vm02 0
> 10.0.0.
> Thu Jan 12 13:09:54 2012 [VMM][I]: error: Failed to create domain from
> /p00/0/images/deployment.3
> Thu Jan 12 13:09:54 2012 [VMM][I]: error: cannot set ownership on
> /p00/0/images/disk.0: No such file or directory
> Thu Jan 12 13:09:54 2012 [VMM][E]: Could not create domain from
> /p00/0/images/deployment.3
> Thu Jan 12 13:09:54 2012 [VMM][I]: ExitCode: 255
> Thu Jan 12 13:09:54 2012 [VMM][I]: Failed to execute virtualization driver
> operation: deploy.
> Thu Jan 12 13:09:54 2012 [VMM][E]: Error deploying virtual machine: Could
> not create domain from /p00/0/images/deployment.3
> Thu Jan 12 13:09:54 2012 [DiM][I]: New VM state is FAILED
>
>
> # cat /etc/oned.conf
> HOST_MONITORING_INTERVAL = 600
>
> VM_POLLING_INTERVAL      = 600
>
> VM_DIR=/p00
>
> SCRIPTS_REMOTE_DIR=/var/tmp/one
>
> PORT = 2633
>
> DB = [ backend = "sqlite" ]
>
> VNC_BASE_PORT = 5900
>
> DEBUG_LEVEL = 3
>
> NETWORK_SIZE = 254
>
> MAC_PREFIX   = "02:00"
>
> DEFAULT_IMAGE_TYPE    = "OS"
> DEFAULT_DEVICE_PREFIX = "hd"
>
> IM_MAD = [
>       name       = "im_kvm",
>       executable = "one_im_ssh",
>       arguments  = "-r 0 -t 15 kvm" ]
>
> VM_MAD = [
>     name       = "vmm_kvm",
>     executable = "one_vmm_exec",
>     arguments  = "-t 15 -r 0 kvm",
>     default    = "vmm_exec/vmm_exec_kvm.conf",
>     type       = "kvm" ]
>
> TM_MAD = [
>     name       = "tm_shared",
>     executable = "one_tm",
>     arguments  = "tm_shared/tm_shared.conf" ]
>
> IMAGE_MAD = [
>     executable = "one_image",
>     arguments  = "fs -t 15" ]
>
> HM_MAD = [
>     executable = "one_hm" ]
>
> AUTH_MAD = [
>     executable = "one_auth_mad",
>     arguments  = "--authn ssh,x509,ldap,server_cipher,server_x509"
> ]
>
> SESSION_EXPIRATION_TIME = 900
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>



-- 
Javier Fontán Muiños
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula



More information about the Users mailing list