[one-users] Opennebula 3.0 RC1 and persistent images in KVM VMs
Alberto Picón Couselo
alpicon1 at gmail.com
Sat Sep 24 15:27:11 PDT 2011
Hello,
We have some a problems using persistent KVM images in Opennebula 3.0 RC1.
Our configuration is as follows:
Opennebula Front-End Ubuntu LTS 10.04
KVM worker node Debian Queeze 6.0.2
NAS for NFS Shared storage
When we deploy a KVM virtual machine that uses an image marked as
persistent, deployment fails due to virsh "permission denied access" to
the registered image in the repository. The deployment steps are as follows:
1. Instance is launched in Sunstone
2. tm_ln is launched and creates symbolic links to persistent image
(registered in /var/lib/one/images):
~# ls -la /var/lib/one/212/images
drwxrwxrwx 2 oneadmin oneadmin 4 2011-09-24 23:43 .
drwxrwxrwx 3 oneadmin oneadmin 5 2011-09-24 23:43 ..
-rw-r--r-- 1 oneadmin oneadmin 642 2011-09-24 23:43 deployment.0
lrwxrwxrwx 1 oneadmin oneadmin 52 2011-09-24 23:43 disk.0 ->
/var/lib/one/images/c2c2dd2a258184994a3f6b953fb0343e
3. User and group permissions of persistent image in repository change
from oneadmin:oneadmin to libvirt-qemu:kvm for a second and finally to
root:root:
Before deployment:
~# ls -la /var/lib/one/images
-rw-rw---- 1 oneadmin oneadmin 33285996544 2011-09-20 13:16
c2c2dd2a258184994a3f6b953fb0343e
For a less than a second:
~# ls -la /var/lib/one/images
-rw-rw---- 1 libvirt-qemu kvm 33285996544 2011-09-20 13:16
c2c2dd2a258184994a3f6b953fb0343e
After a failed deployment:
~# ls -la /var/lib/one/images
-rw-rw---- 1 root root 33285996544 2011-09-20 13:16
c2c2dd2a258184994a3f6b953fb0343e
4. Deployment fails a leaves persistent image with root:root file
permissions.
Sat Sep 24 23:49:05 2011 [DiM][I]: New VM state is ACTIVE.
Sat Sep 24 23:49:05 2011 [LCM][I]: New VM state is PROLOG.
Sat Sep 24 23:49:05 2011 [VM][I]: Virtual Machine has no context
Sat Sep 24 23:49:05 2011 [TM][I]: tm_ln.sh: Creating directory
/var/lib/one/212/images
Sat Sep 24 23:49:05 2011 [TM][I]: tm_ln.sh: Executed "mkdir -p
/var/lib/one/212/images".
Sat Sep 24 23:49:05 2011 [TM][I]: tm_ln.sh: Executed "chmod a+w
/var/lib/one/212/images".
Sat Sep 24 23:49:05 2011 [TM][I]: tm_ln.sh: Link
/var/lib/one/images/c2c2dd2a258184994a3f6b953fb0343e
Sat Sep 24 23:49:05 2011 [TM][I]: tm_ln.sh: Executed "ln -s
/var/lib/one/images/c2c2dd2a258184994a3f6b953fb0343e
/var/lib/one/212/images/disk.0".
Sat Sep 24 23:49:05 2011 [TM][I]: ExitCode: 0
Sat Sep 24 23:49:05 2011 [LCM][I]: New VM state is BOOT
Sat Sep 24 23:49:05 2011 [VMM][I]: Generating deployment file:
/var/lib/one/212/deployment.0
Sat Sep 24 23:49:05 2011 [HKM][I]: ExitCode: 0
Sat Sep 24 23:49:08 2011 [VMM][I]: Command execution fail: 'if [ -x
"/var/lib/one/remotes/vmm/kvm/deploy" ]; then
/var/lib/one/remotes/vmm/kvm/deploy /var/lib/one/212/images/deployment.0
tc-kvm-hv02 212 tc-kvm-hv02; else exit 42; fi'
Sat Sep 24 23:49:08 2011 [VMM][I]: error: Failed to create domain from
/var/lib/one/212/images/deployment.0
Sat Sep 24 23:49:08 2011 [VMM][I]: error: internal error process exited
while connecting to monitor: qemu: could not open disk image
/var/lib/one/212/images/disk.0: Permission denied
Sat Sep 24 23:49:08 2011 [VMM][I]:
Sat Sep 24 23:49:08 2011 [VMM][E]: Could not create domain from
/var/lib/one/212/images/deployment.0
Sat Sep 24 23:49:08 2011 [VMM][I]: ExitCode: 255
Sat Sep 24 23:49:08 2011 [VMM][E]: Error deploying virtual machine:
Could not create domain from /var/lib/one/212/images/deployment.0
Sat Sep 24 23:49:08 2011 [DiM][I]: New VM state is FAILED
Sun Sep 25 00:07:09 2011 [DiM][I]: New VM state is DONE.
Sun Sep 25 00:07:10 2011 [TM][W]: Ignored: LOG I 212 tm_delete.sh:
Deleting /var/lib/one/212/images
Sun Sep 25 00:07:10 2011 [TM][W]: Ignored: LOG I 212 ExitCode: 0
Sun Sep 25 00:07:10 2011 [TM][W]: Ignored: TRANSFER SUCCESS 212 -
When we create a new deployment changing the same registered image to
non-persistent mode (and restoring its file access permissions to
oneadmin:oneadmin in /var/lib/one/images), the instance is deployed
correctly, the image is cloned and executed by the KVM worked node
without problems.
~# ls -laR /var/lib/one/212
total 14
drwxrwxrwx 3 oneadmin oneadmin 5 2011-09-25 00:16 .
drwxr-xr-x 198 oneadmin oneadmin 208 2011-09-25 00:09 ..
-rw-r--r-- 1 oneadmin oneadmin 642 2011-09-25 00:16 deployment.0
drwxrwxrwx 2 oneadmin oneadmin 4 2011-09-25 00:16 images
-rw-r--r-- 1 oneadmin oneadmin 116 2011-09-25 00:09 transfer.0.prolog
182/images:
total 16471867
drwxrwxrwx 2 oneadmin oneadmin 4 2011-09-25 00:16 .
drwxrwxrwx 3 oneadmin oneadmin 5 2011-09-25 00:16 ..
-rw-r--r-- 1 oneadmin oneadmin 642 2011-09-25 00:16 deployment.0
-rw-rw-rw- 1 hacluster postdrop 33285996544 2011-09-25 00:18 disk.0
Please, can you give us any clue regarding this issue?. Persistent mode
for KVM VMs is essential for us...
BTW, oneadmin is member of kvm group in worker node.
Best Regards,
Alberto Picón
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110925/ea4a4f6d/attachment-0002.htm>
More information about the Users
mailing list