No progress durign VM installation using a kickstarter file for Centos 7

hypersonics asked:

I am using a kick starter file to install a Centos 7 VM and the progress has nearly stalled without displaying any messages in the terminal. My kickstarter file is placed in /tmp/ks.cfg having the following contents:

lang en_GB.UTF-8
keyboard us
timezone Australia/Melbourne
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
eula --agreed
ignoredisk --only-use=sda

bootloader --location=mbr
clearpart --all --initlabel
part swap --asprimary --fstype="swap" --size=1024
part /boot --fstype xfs --size=200
part pv.01 --size=1 --grow
volgroup rootvg01 pv.01
logvol / --fstype xfs --name=lv01 --vgname=rootvg01 --size=1 --grow
rootpw --iscrypted password

%packages --nobase --ignoremissing

The command that I’m using is as follows:

virt-install --name=centOS --ram=1024 --vcpus=1 --os-variant=rhel7 --disk 
path=/tmp/centOS-VM.img,size=4 --location=/tmp/iso-images-VM/CentOS-7-
x86_64-Minimal-1708.iso --initrd-inject=/tmp/ks.cfg --extra-args 
"ks=file:/tmp/ks.cfg console=ttyS0"

Soon after issuing the above, I get this:

WARNING  Graphics requested but DISPLAY is not set. Not running virt-viewer.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
Retrieving file .treeinfo... |  354 B
Retrieving file vmlinuz...   | 5.6 MB
Retrieving file initrd.img...|  46 MB
Domain installation still in progress. Waiting for installation to complete.

Beyond this nothing happens. Any idea what could be happening here?

My answer:

Nothing appeared because you ran virt-install on a terminal which didn’t have X display information available, thus it could not start virt-viewer to show the console of the virtual machine.

Eventually the VM’s installation will finish and the VM will power off. At this point, virt-install will restart the VM and exit itself. You can also hit Ctrl+C to stop virt-install waiting. Since the VM is still running, the installation will continue, but the VM will remain powered off at the end, rather than rebooting into the newly installed system.

You can also use virt-manager on your local system to view the VM’s console during installation, if virt-manager has permission to manage the remote hypervisor.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.