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>
Daniel P. Berrange
2012-Jun-20 11:20 UTC
[libvirt-users] getting name or uuid of vm within guest OS
On Wed, Jun 20, 2012 at 01:15:12PM +0430, Behrooz wrote:> Hi, > > for tl;dr people: > how we can get uuid or name of a vm within a guest os?The name is not exposed, but you can see the guest UUID in the SMBIOS data. (see dmidecode command output) Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|