[libvirt-users] How to pass info to a guest?

Hello, I would love to be able to pass information to a Guest. For example: - I'd love to sync the root password with the VNC/Spice one - I'd like to be able to inject stuff to /root/.ssh/authorized_keys All of these at boot time. How would I do it? I'd make these files/strings available in the BIOS or something; maybe some kind of storage local to the host and guest as well. Then, I'd create a systemd script that checks these and syncs stuff @ reboot time. I don't know how to make this local storage available or if it is doable to insert this info into some BIOS string; obtainable with dmidecode or something. It would be awesome if this could be dynamic as well. Any feedback is appreciated! -- It's hard to be free... but I love to struggle. Love isn't asked for; it's just given. Respect isn't asked for; it's earned! Renich Bon Ciric http://www.woralelandia.com/ http://www.introbella.com/

On 09/20/2012 08:47 AM, Renich Bon Ciric wrote:
Hello,
I would love to be able to pass information to a Guest. For example:
- I'd love to sync the root password with the VNC/Spice one - I'd like to be able to inject stuff to /root/.ssh/authorized_keys
This is doable while the guest is offline, if you use libguestfs. It is also possible to set up a shared filesystem (where both host and guest see the same host files), if your guest is new enough to use plan9fs file systems. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

----- Original Message -----
From: "Eric Blake" <eblake@redhat.com> To: "Renich Bon Ciric" <renich@woralelandia.com> Cc: libvirt-users@redhat.com Sent: Thursday, September 20, 2012 11:10:52 AM Subject: Re: [libvirt-users] How to pass info to a guest?
On 09/20/2012 08:47 AM, Renich Bon Ciric wrote:
Hello,
I would love to be able to pass information to a Guest. For example:
- I'd love to sync the root password with the VNC/Spice one - I'd like to be able to inject stuff to /root/.ssh/authorized_keys
Have a look at the cloud-init package as well - which is designed for this use case.
This is doable while the guest is offline, if you use libguestfs. It is also possible to set up a shared filesystem (where both host and guest see the same host files), if your guest is new enough to use plan9fs file systems.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
participants (3)
-
Andrew Cathrow
-
Eric Blake
-
Renich Bon Ciric