yes , it's works, thanks all !<br><br><div class="gmail_quote">On Mon, Oct 22, 2012 at 6:17 PM, Pádraig Brady <span dir="ltr"><<a href="mailto:P@draigbrady.com" target="_blank">P@draigbrady.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/22/2012 10:33 AM, hzguanqiang wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Pádraig<br>
I think you are right. I met the same probelm just as 念远 did when I tried lxc with openstack folsom.<br>
To solve the problem, I tried to modify the function setup_container, adding a partition argument to _DiskImage(...) just as follow:<br>
<br>
  #img = _DiskImage(image=image, use_cow=use_cow, mount_dir=container_dir)<br>
  img = _DiskImage(image=image, partition=FLAGS.libvirt_<u></u>inject_partition, use_cow=use_cow, mount_dir=container_dir)<br>
<br>
And it works!<br>
</blockquote>
<br></div>
Right. I'm not sure why LXC is treated differently in this regard,<br>
but I'm looking at improving config in this area.<br>
Note a global libvirt_inject_partition config option isn't<br>
appropriate for disparate images, so it seems like we could benefit<br>
from some image introspection, and/or image tagging in glance,<br>
to indicate which partition to use.<br>
Note if using libguestfs with libvirt_inject_partition=-1<br>
we already support inspection of the image to determine<br>
the best way to mount.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But I still have a little doubt about the lxc image.<br>
It seems to me that many kvm images can not be used to create lxc while another little few can.<br>
Why does this happen?<br>
</blockquote>
<br></div>
I can only guess that a single partition within the image<br>
is not enough to use it. I'd need info about the images though<br>
and specific errors to deduce further.<br>
<br>
thanks,<br>
Pádraig.<br>
</blockquote></div><br>