[Openstack] Can't boot lxc instance

念远 nianhz at gmail.com
Fri Nov 2 09:52:27 UTC 2012


yes , it's works, thanks all !

On Mon, Oct 22, 2012 at 6:17 PM, Pádraig Brady <P at draigbrady.com> wrote:

> On 10/22/2012 10:33 AM, hzguanqiang wrote:
>
>> Hi Pádraig
>> I think you are right. I met the same probelm just as 念远 did when I tried
>> lxc with openstack folsom.
>> To solve the problem, I tried to modify the function setup_container,
>> adding a partition argument to _DiskImage(...) just as follow:
>>
>>   #img = _DiskImage(image=image, use_cow=use_cow, mount_dir=container_dir)
>>   img = _DiskImage(image=image, partition=FLAGS.libvirt_**inject_partition,
>> use_cow=use_cow, mount_dir=container_dir)
>>
>> And it works!
>>
>
> Right. I'm not sure why LXC is treated differently in this regard,
> but I'm looking at improving config in this area.
> Note a global libvirt_inject_partition config option isn't
> appropriate for disparate images, so it seems like we could benefit
> from some image introspection, and/or image tagging in glance,
> to indicate which partition to use.
> Note if using libguestfs with libvirt_inject_partition=-1
> we already support inspection of the image to determine
> the best way to mount.
>
>
>  But I still have a little doubt about the lxc image.
>> It seems to me that many kvm images can not be used to create lxc while
>> another little few can.
>> Why does this happen?
>>
>
> I can only guess that a single partition within the image
> is not enough to use it. I'd need info about the images though
> and specific errors to deduce further.
>
> thanks,
> Pádraig.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121102/21f9a0be/attachment.html>


More information about the Openstack mailing list