[one-users] QEMU Error: could not open disk image

Ruben Diez rdiez at cesga.es
Wed Sep 22 05:27:25 PDT 2010


We found some problem that Huang....

The issue seems to be related to how the virsh command works. Look to 
this command sequence:
=================

oneadmin at nubacesga-09-2:~/var/339/images$ ls -l
total 6291864
-rwxrwxrwx 1 oneadmin cloud       1065 Sep 22 12:53 deployment.0
-rwxrwxrwx 1 oneadmin cloud 1073741824 Sep 22 12:52 disk.0
-rwxrwxrwx 1 oneadmin cloud 5368709120 Sep 22 12:53 disk.1
-rwxrwxrwx 1 oneadmin cloud     405504 Sep 22 12:53 disk.2
oneadmin at nubacesga-09-2:~/var/339/images$

oneadmin at nubacesga-09-2:~/var/339/images$ virsh --connect qemu:///system 
create deployment.0
error: Failed to create domain from deployment.0
error: internal error process exited while connecting to monitor: qemu: 
could not open disk image /srv/cloud/one/var//339/images/disk.0: 
Permission denied

oneadmin at nubacesga-09-2:~/var/339/images$ ls -l
total 6291864
-rwxrwxrwx 1 oneadmin     cloud       1065 Sep 22 12:53 deployment.0
-rwxrwxrwx 1 root         root  1073741824 Sep 22 12:52 disk.0
-rwxrwxrwx 1 root         root  5368709120 Sep 22 12:53 disk.1
-rwxrwxrwx 1 libvirt-qemu kvm       405504 Sep 22 12:53 disk.2

=================

As you can see, the virsh command change the file owned at some 
point..., and then the original user (oneadmin) can't read the image file

Anyone know how to arrange this issue????

Regards



Jaime Melis escribió:
> Hello,
>
> It looks like the problem is the NFS configuration. KVM runs as root
> and needs read/write acces to the disk image. It this disk image has
> been exported by NFS with the root_squash option (by default) the
> local root user of the worker node won't have the permissions it
> needs. You might wan't to change your /etc/exports in the frontend (or
> NFS server) and configure it with no_root_squash.
>
> Regards,
> Jaime
>
> On Wed, Sep 1, 2010 at 3:56 PM, Huang Zhiteng <winston.d at gmail.com> wrote:
>   
>> Hi guys,
>>
>> I encountered a qemu error while using ONE 2.0b.  Does anyone have any idea
>> what is wrong?
>> "error: internal error process exited while connecting to monitor: qemu:
>> could not open disk image /srv/cloud/one/var//16/images/disk.0: Permission
>> denied"
>>
>> My environment is:
>> Hardware:
>> Intel Xeon 2.93GHz x 2
>> 12 GB memory
>>
>> Software:
>> RHEL 6 beta (kernel 2.6.32)
>> qemu-kvm-0.12.1.2
>>
>> SELinux is disabled on all nodes/front-end.  So the root cause shouldn't be
>> SELinux.  Below is error log from ONE.
>>
>> Wed Sep  1 18:46:47 2010 [DiM][I]: New VM state is ACTIVE.
>> Wed Sep  1 18:46:50 2010 [LCM][I]: New VM state is PROLOG.
>> Wed Sep  1 18:46:50 2010 [VM][I]: Virtual Machine has no context
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh:
>> rhel6-nhm:/srv/cloud/one/var/images/9c2fea820bf6ec3793dfb6102e5834d41c4bd481
>> n5:/srv/cloud/one/var//16/images/disk.0
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: DST:
>> /srv/cloud/one/var//16/images/disk.0
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Creating directory
>> /srv/cloud/one/var//16/images
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Executed "mkdir -p
>> /srv/cloud/one/var//16/images".
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Executed "chmod a+w
>> /srv/cloud/one/var//16/images".
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Cloning
>> /srv/cloud/one/var/images/9c2fea820bf6ec3793dfb6102e5834d41c4bd481
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Executed "cp
>> /srv/cloud/one/var/images/9c2fea820bf6ec3793dfb6102e5834d41c4bd481
>> /srv/cloud/one/var//16/images/disk.0".
>> Wed Sep  1 18:47:40 2010 [TM][I]: tm_clone.sh: Executed "chmod a+w
>> /srv/cloud/one/var//16/images/disk.0".
>> Wed Sep  1 18:47:55 2010 [LCM][I]: New VM state is BOOT
>> Wed Sep  1 18:47:55 2010 [VMM][I]: Generating deployment file:
>> /srv/cloud/one/var/16/deployment.0
>> Wed Sep  1 18:47:58 2010 [VMM][I]: Command execution fail: 'mkdir -p
>> /srv/cloud/one/var//16/images && cat >
>> /srv/cloud/one/var//16/images/deployment.0 && virsh --connect
>> qemu+tcp:///system create /srv/cloud/one/var//16/images/deployment.0'
>> Wed Sep  1 18:47:58 2010 [VMM][I]: STDERR follows.
>> Wed Sep  1 18:47:58 2010 [VMM][I]: error: Failed to create domain from
>> /srv/cloud/one/var//16/images/deployment.0
>> Wed Sep  1 18:47:58 2010 [VMM][I]: error: internal error process exited
>> while connecting to monitor: qemu: could not open disk image
>> /srv/cloud/one/var//16/images/disk.0: Permission denied
>> Wed Sep  1 18:47:58 2010 [VMM][I]:
>> Wed Sep  1 18:47:58 2010 [VMM][I]: ExitCode: 1
>> Wed Sep  1 18:47:58 2010 [VMM][E]: Error deploying virtual machine
>> Wed Sep  1 18:48:02 2010 [DiM][I]: New VM state is FAILED
>> Wed Sep  1 18:48:03 2010 [TM][W]: Ignored: LOG - 16 tm_delete.sh: Deleting
>> /srv/cloud/one/var//16/images
>>
>> Wed Sep  1 18:48:03 2010 [TM][W]: Ignored: LOG - 16 tm_delete.sh: Executed
>> "rm -rf /srv/cloud/one/var//16/images".
>>
>> Wed Sep  1 18:48:03 2010 [TM][W]: Ignored: TRANSFER SUCCESS 16 -
>>
>>
>> --
>> Regards
>> Huang Zhiteng
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>>     
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>   



More information about the Users mailing list