<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div><div>Please have a look at my experience to see if it can help.<br></div><div><br>Thanks<br><div><br></div><font color="#990099">-----openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net wrote: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid #000000; margin-right: 0px;">To: Razique Mahroua <a class="moz-txt-link-rfc2396E" href="mailto:razique.mahroua@gmail.com"><razique.mahroua@gmail.com></a><br>From: Yong Sheng Gong/China/IBM@IBMCN<br>Sent by: <a class="moz-txt-link-abbreviated" href="mailto:openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net">openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net</a><br>Date: 03/29/2012 07:39PM<br>Cc: <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net%5C%28openstack@lists.launchpad.net%5C%29">"openstack@lists.launchpad.net \(openstack@lists.launchpad.net\)"</a> <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net"><openstack@lists.launchpad.net></a><br>Subject: Re: [Openstack] KVM cannot start vm when the disk is on NFS<br><br><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">Thanks for the reply. <br><br>I have figured it out.<br><br><div>I  am running nova control node with root account on the side of nfs4  server side (redhat6.1), while on the side of compute node is ubuntu.<br><br>So on ubuntu side, I have executed:<br>$sudo bash,<br>#nova-compute<br><br>In fact what I need to do is to let kvm binary run under root user id.<br>I found the solution from <a class="moz-txt-link-freetext" href="http://libvirt.org/drvqemu.html">http://libvirt.org/drvqemu.html</a>.<br><br>Here are what I did on ubuntu side:<br>#chown root:root /var/run/libvirt/qemu  /var/lib/libvirt/qemu  /var/cache/libvirt/qemu<br><br>edit /etc/libvirt/qemu.conf<br><div style="margin-left: 40px;"># The user ID for QEMU processes run by the system instance.<br>user = "root"<br><br># The group ID for QEMU processes run by the system instance.<br>group = "root"<br></div><br><div>after restarting libvirt-bin, nova-compute can provision vm from the images on NFS share dir now.<br><br><br></div><font color="#990099">-----Razique Mahroua <a class="moz-txt-link-rfc2396E" href="mailto:razique.mahroua@gmail.com"><razique.mahroua@gmail.com></a> wrote: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid #000000; margin-right: 0px;">To: Yong Sheng Gong/China/IBM@IBMCN<br>From: Razique Mahroua <a class="moz-txt-link-rfc2396E" href="mailto:razique.mahroua@gmail.com"><razique.mahroua@gmail.com></a><br>Date: 03/29/2012 06:00PM<br>Cc: <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net%28openstack@lists.launchpad.net%29">"openstack@lists.launchpad.net (openstack@lists.launchpad.net)"</a> <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net"><openstack@lists.launchpad.net></a><br>Subject: Re: [Openstack] KVM cannot start vm when the disk is on NFS<br><br>Hello Yong,<div>as you may understand, the chmod 777 is not the best thing to do.</div><div>it looks like the files belong to the user root, while it's the user nova which runs the cloud.</div><div><br></div><div>The first thing to do is to give the rights to the user nova of the directory (755) to nova:nova.</div><div>Thanks!</div><div><br></div><div><div> <span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Grande'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><font color="#000000"><span class="Apple-style-span" style="font-family: Helvetica;"><span class="Apple-style-span" style="font-family: Helvetica;"><b style=""><font color="#13708a">Nuage & Co - Razique Mahroua</font></b></span><span class="Apple-style-span" style="font-family: Helvetica;"><font color="#13708a"><b> </b></font></span><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><div style="font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal;"><font color="#000000"><font class="Apple-style-span" color="#13708a"><a href="mailto:razique.mahroua@gmail.com">razique.mahroua@gmail.com</a></font></font></div></span><br class="Apple-interchange-newline"><span></span><span style="font-family: Helvetica; font-size: medium; font-weight: normal; font-style: normal;"></span><span style="font-weight: normal;"></span></span><span><img  src="cid:00E07450-433E-43E6-9005-48B8FD5C669F@la.fabrique"></span> </span></span></font></span></div><br><div><div>Le 29 mars 2012 à 09:50, Yong Sheng Gong a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div>I have to run chmod 777 /var/lib/nova/instances/instance-00000007 to start the vm on kvm. Appreciate any help from stackers. <br><br><ul><li>HostA ( 192.168.1.90): redhat 6.1 nfs4</li></ul>/etc/exports:<br><div style="margin-left: 40px;">/var/lib/nova/instances 192.168.1.0/24(rw,sync,fsid=0,no_root_squash)<br></div><br>/etc/idmapd:<br><div style="margin-left: 40px;">[General]<br>Domain = openstack<br></div><br>#service nfs restart<br>#service rpcidmapd restart<br><br><ul><li>HostB ( 192.168.1.94): ubuntu 11.10</li></ul>#sudo bash<br><br>/etc/idmapd:<br><div style="margin-left: 40px;">[General]<br><br>Verbosity = 0<br>Pipefs-Directory = /var/lib/nfs/rpc_pipefs<br>Domain = openstack<br></div>/etc/fstab:<br><div style="margin-left: 40px;">192.168.1.90:/ /var/lib/nova/instances nfs4 defaults 0 0<br></div><br>#mount -a -v<br>root@openubuntu:/var/lib/nova/instances/instance-00000007# ll<br>total 14168<br>drwxr-xr-x 2 root   root       4096 2012-03-29 14:23 ./<br>drwxr-xr-x 9 nobody nogroup    4096 2012-03-29 14:21 ../<br>-rw-rw---- 1 root   root          0 2012-03-29 14:17 console.log<br>-rw-r--r-- 1 root   root    6291968 2012-03-29 14:18 disk<br>-rw-r--r-- 1 root   root    4404752 2012-03-29 14:18 kernel<br>-rw-r--r-- 1 root   root       1619 2012-03-29 14:17 libvirt.xml<br>-rw-r--r-- 1 root   root    5882349 2012-03-29 14:18 ramdisk<br>root@openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007<br>error: Failed to start domain instance-00000007<br>error: internal error Process exited while reading console log output: chardev: opening backend "file" failed<br><br>root@openubuntu:/var/lib/nova/instances/instance-00000007# chmod 777 console.log<br>root@openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007<br>error: Failed to start domain instance-00000007<br>error: internal error Process exited while reading console log output: char device redirected to /dev/pts/3<br>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<br><br>root@openubuntu:/var/lib/nova/instances/instance-00000007# chmod 777 *<br>root@openubuntu:/var/lib/nova/instances/instance-00000007# virsh start instance-00000007<br>Domain instance-00000007 started<br><br><br>Thanks<br>Yong Sheng Gong<br></div><div><br></div></font><br> _______________________________________________<br>Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></blockquote></div><br></div></blockquote><br></div></font><br> <font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></font> </blockquote><br></div></div><div><br><div><br></div><font color="#990099">-----openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net wrote: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid #000000; margin-right: 0px;">To: Nathanael Burton <a class="moz-txt-link-rfc2396E" href="mailto:nathanael.i.burton@gmail.com"><nathanael.i.burton@gmail.com></a>, Diego Parrilla Santamaría <a class="moz-txt-link-rfc2396E" href="mailto:diego.parrilla.santamaria@gmail.com"><diego.parrilla.santamaria@gmail.com></a><br>From: "Vaze, Mandar" <a class="moz-txt-link-rfc2396E" href="mailto:Mandar.Vaze@nttdata.com"><Mandar.Vaze@nttdata.com></a><br>Sent by: <a class="moz-txt-link-abbreviated" href="mailto:openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net">openstack-bounces+gongysh=cn.ibm.com@lists.launchpad.net</a><br>Date: 04/04/2012 06:28PM<br>Cc: <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net">"openstack@lists.launchpad.net"</a> <a class="moz-txt-link-rfc2396E" href="mailto:openstack@lists.launchpad.net"><openstack@lists.launchpad.net></a><br>Subject: Re: [Openstack] Instance fails to spawn when instance_path is      nfs     mounted<br><br><font face="Courier New,Courier,monospace" size="3">> I had a problem like this when the umask was locked down.  Setting the umask to 022 in the init script for nova-compute solved my problem.<br><br>I'm running from devstack setup - so I don't have an init-script. All the processes run in a "screen" session.<br>Here is what I did :<br><br>1. Stopped nova-compute using Ctrl-C<br>2. Checked existing umask using "umask command" it was set to 0002<br>3. Updated umask using "umask 022" - checked that it was indeed updated - this time "umask" command returned 0022<br>4. Started nova-compute as follows :<br>     mandar@ubuntu-dev-mandar:/opt/stack/nova$ cd /opt/stack/nova && sg libvirtd /opt/stack/nova/bin/nova-compute<br>5. Spawned an instance from Dashboard<br><br><br>Still getting same error.<br><br><br>-Mandar<br><br><br><br><br>On Tue, Apr 3, 2012 at 1:56 PM, Diego Parrilla Santamaría <a class="moz-txt-link-rfc2396E" href="mailto:diego.parrilla.santamaria@gmail.com"><diego.parrilla.santamaria@gmail.com></a> wrote:<br>> We use nfs backed instances a lot, and this problem normally has to do <br>> with wrong permission management in your filer and/or client.<br>><br>> Check if not only root can write on the nfs share (specially libvirt user).<br>><br>> Diego<br>> --<br>> Diego Parrilla<br>> CEO<br>> <a class="moz-txt-link-abbreviated" href="http://www.stackops.com&nbsp">www.stackops.com&nbsp</a>;|  diego.parrilla@stackops.com | +34 649 94 43 29<br>> | skype:diegoparrilla<br>><br>><br>><br>><br>> On Tue, Apr 3, 2012 at 6:43 PM, Mandar Vaze / मंदार वझे <br>> <a class="moz-txt-link-rfc2396E" href="mailto:mandarvaze@gmail.com"><mandarvaze@gmail.com></a> wrote:<br>>><br>>> I saw an old question posted here :<br>>> <a href="https://answers.launchpad.net/nova/+question/164689">https://answers.launchpad.net/nova/+question/164689</a><br>>><br>>> But I am not trying live migration.<br>>><br>>> I have nfs mounted instances_path - so when I try to spawn an <br>>> instance I run into the above errors. Especially following :<br>>><br>>> File "/usr/lib/python2.7/dist-packages/libvirt.py", line 372, in <br>>> createWithFlags<br>>> 40842 2012-04-03 05:42:27 TRACE nova.rpc.amqp     if ret == -1: raise <br>>> libvirtError ('virDomainCreateWithFlags() failed', dom=self)<br>>> 40843 2012-04-03 05:42:27 TRACE nova.rpc.amqp libvirtError: internal <br>>> error Process exited while reading console log output: chardev: <br>>> opening backend "file" failed<br>>><br>>> But as you can see below, several files are created in this folder, <br>>> so I am not sure if mine if permissions issue (Else none of the files <br>>> would get created) The problem is reported when libvirt tries to <br>>> write to console.log (File itself is created with correct permissions <br>>> - just that this is zero byte file)<br>>><br>>> mandar@ubuntu-dev-mandar:/nfs_shared_instances_path/instance-00000005<br>>> $ ll total 10944 drwxrwxr-x 2 mandar libvirtd    4096 2012-04-03 <br>>> 05:42 ./ drwxrwxrwx 4 root   root        4096 2012-04-03 05:42 ../<br>>> -rw-rw---- 1 mandar libvirtd       0 2012-04-03 05:42 console.log<br>>> -rw-r--r-- 1 mandar libvirtd 6291968 2012-04-03 05:42 disk<br>>> -rw-rw-r-- 1 mandar libvirtd 4731440 2012-04-03 05:42 kernel<br>>> -rw-rw-r-- 1 mandar libvirtd    1067 2012-04-03 05:42 libvirt.xml<br>>> -rw-rw-r-- 1 mandar libvirtd 2254249 2012-04-03 05:42 ramdisk<br>>><br>>> I'm suspecting :<br>>> <a href="https://bugs.launchpad.net/ubuntu/maverick/+source/libvirt/+bug/63269">https://bugs.launchpad.net/ubuntu/maverick/+source/libvirt/+bug/63269</a><br>>> 6 But I the above doesn't show itself in non-NFS setup<br>>><br>>> Please suggest !!!<br>>><br>>> -Mandar<br>>><br>>><br>>> _______________________________________________<br>>> Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a> Post to     : <br>>> <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a> Unsubscribe : <br>>> <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a> More help   : <br>>> <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br>>><br>><br>><br>> _______________________________________________<br>> Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a> Post to     : <br>> <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a> Unsubscribe : <br>> <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a> More help   : <br>> <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br>><br><br>_______________________________________________<br>Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br><br>______________________________________________________________________<br>Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data.  If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding<br>_______________________________________________<br>Mailing list: <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/%7Eopenstack">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br></font> </blockquote><br></div></font> <br/>