network installation on KVM fails to parse the kickstart profile
I'm trying to perform network installation to automate the deployment of KVM guests.
I'm able to use the following command line to install RHEL 7 guests without any problem. However, the same command line fails to parse the ks.cfg file when trying to install a RHEL 6 guest
virt-install \
-n myRHELVM1 \
--os-type=Linux \
--os-variant=rhel6 \
--ram=2048 \
--vcpus=2 \
--disk path=/var/lib/libvirt/images/disk1.qcow2 \
--graphics none \
--l http://x.x.x.x/rhel/6 \
--network bridge:br0
--extra-args "inst.ks=http://server/vm.ks.cfg"
In this case, the VM boots from the network but fails to proceed with the kickstart profile. Could someone help pls?
Responses
I will need time to confirm this, but I am not certain that RHEL 6 accepts the inst.* options.
In case this is the right answer (and in hopes of quickly getting you moving forward), try just using ks=http://\<IP>/ks-cfg.ks.
Please see (Sec 26.6)
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Installation_Guide/index.html#ch-parmfiles-Kickstart_parameters
I just happen to have a bit of experience with this specific type of functionality (I use it on my laptop to build my lab environment) - so, I'm glad to help ;-)
This is what I typically use:
virt-install --name ${GUESTNAME} --hvm --connect qemu:///system \
--description "${GUESTNAME}" --virt-type=kvm \
--network=default --vcpus=${NUMCPUS} --ram=${MEM} \
--disk /var/lib/libvirt/images/${GUESTNAME}/${GUESTNAME}-0.img,device=disk,bus=virtio,format=qcow2 \
--os-type=linux --os-variant=${OSVARIANT} \
--location="http://${WEBSERVER}/OS/${OSDIR}" \
-x "ks=http://${WEBSERVER}/${GUESTNAME}.ks"
Obviously, there are other parts to this which set all those variables and I also "pre-create" the Virtual Disk.
qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/${GUESTNAME}/${GUESTNAME}-0.img ${HDDA}G
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
