We install physical machines using cobbler/kickstart.On theses physical machines we need to be sure that one specific VM is installed and will be running on startup, so we tried to install the vm during a kickstart %post section without success so far.Our first try was dead simple:%post --log=/root/virt.logservice libvirtd startvirt-install ... --import%endBut we had running in chroot ignoring request so we tried with --nochroot but still nothing.Any ideas? This is our client request, I'm not even sure this is really compliant with the cobbler way.
Can't virt-install during the kickstart of the hypervisor
kvm;qemu;kickstart;libvirt;cobbler
Probably not compliant, and quite probably will not work. I would have cobbler or  some other machine host a prepared disk image (with sys-unconfig applied) and a template domxml for libvirt. In the rc.local of the deployed machine, or via cloud-init, just drop in a command to download the image and the xml file, and run virsh define against them. 