
On Wed, 2013-08-21 at 13:18 +0400, Yuriy Demchenko wrote:
Although you've already got some answers with payload/cloudinit idea, I can point at another solution I've used myself: http://lists.ovirt.org/pipermail/users/2013-June/014907.html Use a vdsm-hook to write vmname into some bios field, then one-time init-script inside template to configure your vm as you need.
Thanks a lot, Yuriy. That's an interesting solution you came up with. Although I'm unsure if I like to use bios fields for this. Beside this "little bios hack" you're doing the same as with payloads except you're properly using dmidecode in your init-script to get the vm name instead of mounting a floppy and reading content of a file. Regards, René
Yuriy Demchenko
On 08/19/2013 06:17 PM, René Koch (ovido) wrote:
Another option would be to write a custom script which is started during boot and disables itself after successful run (in the same way as firstboot - I already have such a script for RHN Satellite/Spacewalk joins). The problem here is: How do I get the (oVirt) name of this vm (would need something like virt-whoami:) )? Is the (internal oVirt) ID of this vm stored somewhere in the filesystem of this vm? I don't think so....