[CentOS-virt] injecting a key into the xen images
juergh at gmail.com
Mon Mar 31 09:58:19 UTC 2014
On Fri, Mar 28, 2014 at 2:51 PM, Karanbir Singh <mail-lists at karan.org>
> On 03/28/2014 01:13 PM, Nux! wrote:
> > On 28.03.2014 12:40, Karanbir Singh wrote:
> >> hi,
> >> As a part of the test suite for xen that I've started off - I needed a
> >> way to inject a ssh key into the image ; so have come up with this
> >> :
> >> ; its not pretty and it wont handle lots of use cases, but it does
> >> what
> >> is needed at hand.
> >> Comments ?
> > I would have first looked at libguestfs suite, virt-edit maybe. It has
> > tools specifically designed to interact with VM filesystems.
> I did, and I dont want to install 187 more rpms to get this
> functionality ( which is the size of that dep tree )
Why is that relevant for a test environment?
QEMU NBD has lots of potential issues:
- Security implications (the guest image can attack the host via symlinks)
- Needs root privileges
- Multiple files can be attached to the same NBD device
- Files can be detached even if the NBD device is still mounted
and possibly lots of others.
Nova used to use QEMU NBD exclusively and we ran into several of the above
issues. IMHO the clean way is to use libguestfs. Take a look at
the Nova implementation (as a potential starting point).
> Karanbir Singh
> +44-207-0999389 | http://www.karan.org/ | twitter.com/kbsingh
> GnuPG Key : http://www.karan.org/publickey.asc
> CentOS-virt mailing list
> CentOS-virt at centos.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS-virt