1

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.log
service libvirtd start

virt-install ... --import
%end

But 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.

1 Answers1

1

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.

dyasny
  • 1,136
  • 6
  • 8