[one-users] qcow image problem

Javier Fontan jfontan at gmail.com
Thu Sep 30 06:09:18 PDT 2010


Hello,

qcow2 images hold the path of the backing image as you specify them.
In your case you just tell that it is called ubuntu.img but not the
path. When virsh is called from opennebula the current path is not the
same as when you do it manually (probably you are launching it from
the same dir the image is) and cannot find the backing file. When you
create that qcow2 images try telling the full path of the backing
file, and also make sure that this path is accessible from the remote
nodes.

Bye

On Tue, Sep 21, 2010 at 5:34 PM, Luca Lorenzini
<lorenzini.luca at gmail.com> wrote:
> Hi i'm using OpenNebula 1.4 with libvirtd 0.7.5. I'm using an
> ubuntu-10.4-desktop installation for my VMs and i'm trying to use qcow2 file
> system for the images. I said try because when i submit the template i get
> fail status and error message. I installed ubuntu on a 4GB raw image and, to
> save disk space, i converted it in qcow2 with the option "backing_file" to
> keep it safe (qemu-img create -f qcow2 -o backing_file=ubuntu.img
> ubuntu.qcow). When i use the raw image it will works fine, but if i use the
> qcow2 image i get the error listed below.I noticed that changing in the
> deploying file the disk path to the qcow2 image and submitting the Vm with
> "virsh --connect qemu:///system create /var/lib/one//25/deployment.0"
> command it works. So, what's the problem?
>
> --------------------------------
> LOG FILE
> --------------------------------
> Tue Sep 21 17:23:15 2010 [DiM][I]: New VM state is ACTIVE.
> Tue Sep 21 17:23:16 2010 [LCM][I]: New VM state is PROLOG.
> Tue Sep 21 17:23:16 2010 [VM][I]: Virtual Machine has no context
> Tue Sep 21 17:23:16 2010 [TM][I]: tm_ln.sh: Creating directory
> /var/lib/one/25/images
> Tue Sep 21 17:23:16 2010 [TM][I]: tm_ln.sh: Executed "mkdir -p
> /var/lib/one/25/images".
> Tue Sep 21 17:23:16 2010 [TM][I]: tm_ln.sh: Executed "chmod a+w
> /var/lib/one/25/images".
> Tue Sep 21 17:23:16 2010 [TM][I]: tm_ln.sh: Link
> /home/luca/images/ubuntu.img
> Tue Sep 21 17:23:16 2010 [TM][I]: tm_ln.sh: Executed "ln -s
> /home/luca/images/ubuntu.qcow2 /var/lib/one/25/images/disk.0".
> Tue Sep 21 17:23:16 2010 [LCM][I]: New VM state is BOOT
> Tue Sep 21 17:23:16 2010 [VMM][I]: Generating deployment file:
> /var/lib/one/25/deployment.0
> Tue Sep 21 17:23:47 2010 [VMM][I]: Command execution fail: 'mkdir -p
> /var/lib/one//25/images && cat > /var/lib/one//25/images/deployment.0 &&
> virsh --connect qemu:///system create /var/lib/one//25/images/deployment.0'
> Tue Sep 21 17:23:47 2010 [VMM][I]: STDERR follows.
> Tue Sep 21 17:23:47 2010 [VMM][I]: error: Failed to create domain from
> /var/lib/one//25/images/deployment.0
> Tue Sep 21 17:23:47 2010 [VMM][I]: error: monitor socket did not show up.:
> Connection refused
> Tue Sep 21 17:23:47 2010 [VMM][I]: ExitCode: 1
> Tue Sep 21 17:23:47 2010 [VMM][E]: Error deploying virtual machine
> Tue Sep 21 17:23:48 2010 [DiM][I]: New VM state is FAILED
> Tue Sep 21 17:23:48 2010 [TM][W]: Ignored: LOG - 25 tm_delete.sh: Deleting
> /var/lib/one/25/images
>
> Tue Sep 21 17:23:48 2010 [TM][W]: Ignored: LOG - 25 tm_delete.sh: Executed
> "rm -rf /var/lib/one/25/images".
>
> Tue Sep 21 17:23:48 2010 [TM][W]: Ignored: TRANSFER SUCCESS 25
> --------------------------------
> TEMPLATE FILE
> --------------------------------
>
> NAME   = ubuntu-desk.qcow2
> MEMORY = 1024
> CPU=1.0
>
> OS = [
> boot="hd",
> kernel="/vmlinuz",
> initrd="/initrd.img",
> root="sda1"
> ]
>
> DISK = [
>   source = "/home/luca/images/ubuntu.qcow2",
>   target   = "sda",
>   readonly = "no",
>   clone = "no"
> ]
>
> INPUT = [ type = "tablet", bus = "usb" ]
> GRAPHICS = [TYPE = "vnc", LISTEN = "localhost", PORT = 5913]
> NIC    = [ NETWORK = "private" ]
>
> FEATURES=[ acpi="no" ]
>
>
>
> --------------------------------
> DEPLOY FILE GENERATED
> --------------------------------
>
> <domain type='kvm'>
>     <name>one-25</name>
>     <memory>1048576</memory>
>     <os>
>         <type>hvm</type>
>         <kernel>/vmlinuz</kernel>
>         <initrd>/initrd.img</initrd>
>         <cmdline>root=/dev/sda1 </cmdline>
>         <boot dev='hd'/>
>     </os>
>     <devices>
>         <emulator>/usr/bin/kvm</emulator>
>         <disk type='file' device='disk'>
>             <source file='/var/lib/one//25/images/disk.0'/>
>             <target dev='sda'/>
>         </disk>
>         <interface type='bridge'>
>             <source bridge='virbr0'/>
>             <mac address='00:03:c0:a8:7a:07'/>
>         </interface>
>         <graphics type='vnc' listen='localhost' port='5913'/>
>         <input type='tablet' bus='usb'/>
>     </devices>
> </domain>
>
>
> Luca
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



-- 
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



More information about the Users mailing list