2011/3/15 Chuck Short <email address hidden>:
>> What's mapped_device? I'm not really sure what the assumptions here are. In
>> what format are you expecting these LXC images to be distributed?
>
> Ok well spotted. The assumption is that they are using a regular UEC image. LXC container support has already been added in the latest imgaes.
So only raw disk images are supported? Ok.
>>> + raise exception.Error(_('Failed to mount filesystem: %s')
>>> + % err)
>>> + _unlink_device(device, nbd)
>>> +
>>> +def destroy_container(target, instance, nbd=False):
>>> + """Destroy the container once it terminates"""
>>> + try:
>>> + container_dir = '%s/rootfs' % target
>>> + utils.execute('sudo', 'umount', container_dir)
>>> + finally:
>>> + image = os.path.join(FLAGS.instances_path, instance['name'], '' +
>> 'disk')
>>> + out, err = utils.execute('sudo', 'losetup', '--find', '--show',
>> image)
>> I still think this will create another loopback device..
> It wont, its getting the information associated with the associated image
2011/3/15 Chuck Short <email address hidden>:
>> What's mapped_device? I'm not really sure what the assumptions here are. In
>> what format are you expecting these LXC images to be distributed?
>
> Ok well spotted. The assumption is that they are using a regular UEC image. LXC container support has already been added in the latest imgaes.
So only raw disk images are supported? Ok.
>>> + raise exception. Error(_ ('Failed to mount filesystem: %s') device( device, nbd) container( target, instance, nbd=False): 'sudo', 'umount', container_dir) join(FLAGS. instances_ path, instance['name'], '' + 'sudo', 'losetup', '--find', '--show',
>>> + % err)
>>> + _unlink_
>>> +
>>> +def destroy_
>>> + """Destroy the container once it terminates"""
>>> + try:
>>> + container_dir = '%s/rootfs' % target
>>> + utils.execute(
>>> + finally:
>>> + image = os.path.
>> 'disk')
>>> + out, err = utils.execute(
>> image)
>> I still think this will create another loopback device..
> It wont, its getting the information associated with the associated image