On 05/25/2013 04:01 AM, Itamar Heim wrote:
On 05/25/2013 02:07 AM, Jonathan Daugherty wrote:
> Hi,
>
> I'm interested to know whether it is possible to obtain a VM's name from
> within a VM. In particular I'd like to obtain VM names from within
> Linux guests for the purpose of setting up dynamic DNS based on the VM
> name. I don't see the VM name in the output of dmidecode and there
> doesn't appear to be an entry in the ovirt guest API to obtain it. (In
> any case I can't run the ovirt guest agent on my VMs, so I'd like some
> other way to get it.)
>
> Thanks!
>
greg is working on cloud-init support[1] which should take care of both
passing this info to linux guests (and maybe solve the ddns issue as well
while at it - greg?)
I'm not aware of any DDNS support in cloud-init, just basic DNS setup.
Cloud-init provides methods to run custom scripts (not sure we'll do that
in first out but you can set it up in the image), so I'm sure you could
use that or some other method to run scripts for the DDNS update once
you've got the vm name propagated.
Thanks,
Greg
in the meantime, you could try and do this manually by passing it via the
vm payload field, which is mounted to the guest as a block device.
[1]
http://gerrit.ovirt.org/#/q/status:open+project:ovirt-engine+branch:maste...