I need advise on what would be best way of creating particular set of VMs.
This is a strange scenario so it might take a while explain. I have a feeling solution is probably simple one line command that I cannot seem to be able to get.
I have 44 hosts. Eeach of those host will be running ubuntu server with KVM and single VM inside. That VM will be running Fedora 10.
44 hosts are automatically build using PXE boot kickstart script (that already taken care of).
Once they are build i need to create a VM, that VM once started will go to and PXE boot itself and install Fedora 10. (PXE boot script for VM is ready and working.)
I have test VM set and it's seems to be doing what I want.
I am trying to figure out how on the first boot of each host
create VM with empty drive of the size I need (pretty much raw image) with particular networking setup (2 network cards on each VM mapping to appropriate bridge.) and start it up.
I know how to create this particular VM in virt-manager but so far was not successful in generating it in command line, so I am wondering if cloning it or copying some sample machine and scripting edit of xml file to change mac addresses might be safer way.
Sadly I cannot clone existing disks, I have to generate each VM using PXE.
Here is test vm xml file
<type arch='x86_64' machine='pc-1.0'>hvm</type>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
<target type='serial' port='0'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
<model type='vga' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>