Two ways of thinking:
1. the vdsm hook could be very easy to write so as to make what you
desire (ovirtsdk4 is presinstalled on ovirt node):
# Get the vm name from xml definition:
# Find the virtual machine:
vm= vms_service.list(search= vm_name)
# Find the service that manages the virtual machine:
# Start the virtual machine enabling cloud-init and providing the
# password for the `root` user and the hostname:
host_name= vm_name+ 'example.com'
# Close the connection to the server:
Then place it as executable in
/usr/libexec/vdsm/hooks/before_vm_start on each host that should be
able to run the pool vms.
2. As the web UI already auto fills the VM hostname cloud-init field
with the vm name (or fqdn), the VM Hostname should do the same with
vm pool, but it doesn't. You could open a RFE for this, it shouldn't
be very complicated to patch it.
Le 17/01/2022 à 12:34, Luca Contessa a écrit :
> I thought that:- you know the name of the future VM
I will try to clarify: I'm trying to obtain from the oVirt engine the name of the VM
created inside the pool.
For example if the VM in pool LinuxPool is called LinuxMachine-1 I want the cloud-init to
know that the VM is called LinuxMachine-1 and with this info add the suffix using the
method you described.
Again, thank you a lot for the response.
Users mailing list -- users(a)ovirt.org
To unsubscribe send an email to users-leave(a)ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5
Tél. 33 (0)4 67 54 84 55
Fax 33 (0)4 67 54 84 14