On 12/24/2012 04:01 AM, Timon Wang wrote:
If a vm join AD domain, the name is registered in the AD server, when
I
copy a VM, the name will conflict with the source VM.
I wanna to know if I can change the VM computer name automaticly.
When I (automatically) create my test VM's, I give them hard coded MAC
addresses. Then in the anaconda kickstart %post section, I enable a
service I called 'transmogrify' that looks at the MAC address, and then
bind-mounts the appropriate config files into /etc/ (such as
/etc/sysconfig/network containing the hostname). This happens before the
network starts. So then I copy this disk image into multiple COW images
and boot all test machines from 1 disk image, and they boot and get
their individual identities based of the MAC of the VM, which I hardcode
in the XML files I use with "virsh define" command.
Though this solution obviously is based on running Linux in the VM guests.
Paul