Bug#898257 support handling images with libguestfs
http://libguestfs.org/ provides both utilities and libraries to manipulate image files containing various operating systems. It supports various image file formats and so will expand the formats and guest types supported by openstack. It does have extra overhead in that it starts a VM to access the image. This has both advantages and disadvantages. Also qemu-nbd is not supported on some systems like RHEL 6. * nova/virt/disk/api.py (img_handlers): Add guestfs to the default list of access methods to try, to act as a fallback. * nova/virt/disk/guestfs.py: A new plugin class to provide support for libguestfs mounting. Note we use the guestmount utility, as a non root user, so the user will need the ability to use fusermount, which is often provided by being a member of the 'fuser' group. In future we might use the guestfs python module to give greater granularity of control over the image. Change-Id: I2e22c9d149fff7a73cd8cebaa280d68d3fb9096c
This commit is contained in:

committed by
Pádraig Brady

parent
2035bc1dab
commit
bd1a68a505
@@ -44,6 +44,14 @@ filters = [
|
||||
# nova/virt/disk/loop.py: 'losetup', '--detach', device
|
||||
CommandFilter("/sbin/losetup", "root"),
|
||||
|
||||
# nova/virt/disk/guestfs.py: 'guestmount', '--rw', '-a', image, '-i'
|
||||
# nova/virt/disk/guestfs.py: 'guestmount', '--rw', '-a', image, '-m' dev
|
||||
Commandfilter("/usr/bin/guestmount", "root"),
|
||||
|
||||
# nova/virt/disk/guestfs.py: 'fusermount', 'u', mount_dir
|
||||
Commandfilter("/bin/fusermount", "root"),
|
||||
Commandfilter("/usr/bin/fusermount", "root"),
|
||||
|
||||
# nova/virt/disk/api.py: 'tee', metadata_path
|
||||
# nova/virt/disk/api.py: 'tee', '-a', keyfile
|
||||
# nova/virt/disk/api.py: 'tee', netfile
|
||||
|
Reference in New Issue
Block a user