[libvirt-users] getting name or uuid of vm within guest OS

Behrooz everplays at gmail.com
Wed Jun 20 08:45:12 UTC 2012


Hi,

for tl;dr people:
how we can get uuid or name of a vm within a guest os?

description:
We are trying to implement a guest-agent for Archipel* to let us
run simple commands on guest os**. in archipel each vm has its
own jid (jabber id), user will open a chat conversation to vm's
jid and send messages like "!exec ls", then we check that user
(jid) who sent !exec has permission to run commands on our
guest. if he/she had permission we will send a message to jid of
guest-agent with message "ls", guest-agent will run command
then will send result to vm's jid and we tunnel result to user.

now problem is that we don't know (in guest-agent) that what
xmpp server we should connect to and what jid is trusted to
recieve command from. xmpp server is running on hypervisor
and trusted jid is {uuid-of-jvm}@hypervisor.com.

right now we've used internal dhcp to set hostname of guest os
to something like "uuid-of-jvm.hypervisor.com" using this switch
(qemu):
      -net user,hostname=uuid-of-jvm.hypervisor.com
it works but it's not best solution as it only works with qemu
and we need a solution that works with other virtualization
platforms that libvirt supports.

* https://github.com/ArchipelProject/
** yes, we know about vnc / ssh / ... but by implementing such
thing we can add cool stuff in archipel like status of services
that are running on guest os.

-- 
regards,
behrooz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120620/2dc4e67f/attachment.htm>


More information about the libvirt-users mailing list