[Openstack] KVM cannot start vm when the disk is on NFS

Razique Mahroua razique.mahroua at gmail.com
Thu Mar 29 10:00:43 UTC 2012


Hello Yong,
as you may understand, the chmod 777 is not the best thing to do.
it looks like the files belong to the user root, while it's the user nova which runs the cloud.

The first thing to do is to give the rights to the user nova of the directory (755) to nova:nova.
Thanks!

Nuage & Co - Razique Mahroua 
razique.mahroua at gmail.com



Le 29 mars 2012 à 09:50, Yong Sheng Gong a écrit :

> I have to run chmod 777 /var/lib/nova/instances/instance-00000007 to start the vm on kvm. Appreciate any help from stackers. 
> 
> HostA ( 192.168.1.90): redhat 6.1 nfs4
> /etc/exports:
> /var/lib/nova/instances 192.168.1.0/24(rw,sync,fsid=0,no_root_squash)
> 
> /etc/idmapd:
> [General]
> Domain = openstack
> 
> #service nfs restart
> #service rpcidmapd restart
> 
> HostB ( 192.168.1.94): ubuntu 11.10
> #sudo bash
> 
> /etc/idmapd:
> [General]
> 
> Verbosity = 0
> Pipefs-Directory = /var/lib/nfs/rpc_pipefs
> Domain = openstack
> /etc/fstab:
> 192.168.1.90:/ /var/lib/nova/instances nfs4 defaults 0 0
> 
> #mount -a -v
> root at openubuntu:/var/lib/nova/instances/instance-00000007# ll
> total 14168
> drwxr-xr-x 2 root   root       4096 2012-03-29 14:23 ./
> drwxr-xr-x 9 nobody nogroup    4096 2012-03-29 14:21 ../
> -rw-rw---- 1 root   root          0 2012-03-29 14:17 console.log
> -rw-r--r-- 1 root   root    6291968 2012-03-29 14:18 disk
> -rw-r--r-- 1 root   root    4404752 2012-03-29 14:18 kernel
> -rw-r--r-- 1 root   root       1619 2012-03-29 14:17 libvirt.xml
> -rw-r--r-- 1 root   root    5882349 2012-03-29 14:18 ramdisk
> root at openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007
> error: Failed to start domain instance-00000007
> error: internal error Process exited while reading console log output: chardev: opening backend "file" failed
> 
> root at openubuntu:/var/lib/nova/instances/instance-00000007# chmod 777 console.log
> root at openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007
> error: Failed to start domain instance-00000007
> error: internal error Process exited while reading console log output: char device redirected to /dev/pts/3
> kvm: -drive file=/var/lib/nova/instances/instance-00000007/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none: could not open disk image /var/lib/nova/instances/instance-00000007/disk: Permission denied
> 
> root at openubuntu:/var/lib/nova/instances/instance-00000007# chmod 777 *
> root at openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007
> Domain instance-00000007 started
> 
> 
> Thanks
> Yong Sheng Gong
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120329/61405f3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUAGECO-LOGO-Fblan_petit.jpg
Type: image/jpeg
Size: 10122 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120329/61405f3e/attachment.jpg>


More information about the Openstack mailing list