Hi Jhon,

The qemu configuration was fine, and also the NFS is (or
 at least seems to be) working fine, the problem indeed was with the 
permission settings of the specific image file in the /images directory.
 It only had RW permissions for owner (oneadmin) and root, and forbidden
 for others.

The problem is now solved, the VM's created from the
 persistent image are running, and I indeed checked their persistency 
after a graceful shutdown.

Thank you very much for taking the time to answer, and for your detailed 
description.

Have a great day,
Cheers,
Lehel.

--- On Thu, 3/29/12, Jhon Masschelein <[email protected]> wrote:

From: Jhon Masschelein <[email protected]>
Subject: Re: [one-users] Error when instantiating VM from persistent image
To: "biro lehel" <[email protected]>, [email protected]
Date: Thursday, March 29, 2012, 9:33 AM

Hi,

it looks like this is the problem:
> Wed Mar 28 10:50:00 2012 [VMM][I]: error: internal error process
> exited while connecting to monitor: qemu-kvm: -drive
> file=/var/lib/one//25/images/disk.2,if=none,id=drive-ide0-0-0,format=raw:
> could not open disk image /var/lib/one//25/images/disk.2: Permission
> denied

At this point it would appear that oneadmin has access to the disk image file 
/var/lib/one//25/images/disk.2, but qemu does not. The error is coming from 
qemu.


As far as I know, the difference between a persistent image and a non 
persistent image is that, when it is not persistent, the image get copied by 
oneadmin and new permissions are set on the new file, but when you are using a 
persistent image, a symbolic link is created.

With symbolic links, the permissions of the link are not important, the 
permissions on the original file are used.

So, when you look at the file that is listed as the "SOURCE" of your image. 
(Should be something like
/var/lib/one/images/c0dc71ebe6562d4e8c9e186b249bff13,
what are the permissions and is qemu (on the execution node) able to read&write 
to it?

Probably that is the problem and the next thing to look for is why his file is 
not readable by qemu. The file was created by oneadmin at the time the onimage 
command was run on the opennebula server to create the Image object.

Now the qemu process on the execution node is trying, and failing, to access 
the file.

Do you have special directory permissions on the image directory? Is it an NFS 
mount that is doing "strange" things?

A couple of other things that could be related:
- did you set dynamic_ownership = 0 in the qemu.conf file onthe execution node?
- did you change the user or group the qemu process is running as?

I hope this is of some help to you,

Wkr,

Jhon


-- Jhon Masschelein
Senior Systeemprogrammeur
SARA - HPCV

Science Park 140
1098 XG Amsterdam
T +31 (0)20 592 8099
F +31 (0)20 668 3167
M +31 (0)6 4748 9328
E [email protected]
http://www.sara.nl
_______________________________________________
Users mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to