On Wed, Aug 15, 2018 at 10:47:20AM +0200, Cobin Bluth wrote:
Hello Libvirt-Users!
I have a quick question about the qemu guest agent.
Is it possible to use the guest agent from inside the guest in order to
query the name of its own domain?
For example, I use a base-image.qcow2 with a baked-in hostname. I would
like to include a little tool in my guest image to change the hostname to
the name of the domain.
Is this sort of thing possible?
The name of the guest from libvirt's POV is not exposed to the guest
OS in any way.
The best thing todo would be to configure your host so that the IP it
assigns to the guest via DHCP has an associated DNS entry. That way your
guest will be able to configure a desired hostname automatically when
doing the DHCP request.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|