Problems installing with virt-install on centos 6 host

I know CentOS 6 is EOL and not supported; what I’m trying to do is automate the deployment of Rocky8 on this machine and migrate functions from the host to a VM to make it easier to upgrade the host with minimal impact.

The problem I’m hitting is easily shown…

virt-install --noreboot -n test8 -r 3073 '--vcpus=1' '--os-variant=rhel7' --accelerate -v '--network=bridge=br0,target=v-test8' --disk path=/dev/Raid10/vm.test8 --location /OS_ISO_images/Rocky-8.4-x86_64-minimal.iso --nographics --initrd-inject=/RedHat/kickstart/rocky8.cfg --extra-args "inst.ks=file:/rocky8.cfg console=tty0 console=ttyS0,115200n8"

I’ve used the minimal.iso and the full dvd1.iso. And the build aborts before it even starts

Starting install...
Retrieving file .treeinfo...                             | 2.9 kB     00:00 ...
ERROR    No option 'boot.iso' in section: 'images-x86_64'
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start test8
otherwise, please restart your installation.

I get the same results if I extract the ISO contents to a tree that’s served via http.

And, to be fair, this is true! There is no boot.iso in the .treeinfo file (there is on CentOS 8).

I can do manual installs of Rocky 8 on this machine via virt-manager and interactive configuration, but I really want to automate this with kickstart and virt-install to match all my other OS deployments.

This is likely due to the old version of virt-intall on CentOS 6 but it’s what I have to work with.

Any ideas how I can work around this issue?

FWIW, I borrowed the boot.iso from Index of /centos/8/BaseOS/x86_64/os/images/ and added the relevant entries to .treeinfo and the installer worked.

So I think all that Rocky needs to do is support boot.iso and historical versions of virt-install will work.

1 Like

I’m also trying to install Rocky (8.5) on a Centos 6 xen host using virt-install and have run into a different issue. First, in order to have virt-install recognise Rocky’s ISO, all occurrences of CentOS in /usr/lib/python2.6/site-packages/virtinst/OSDistro.py were changed to Rocky. Then with Rocky-8.5-x86_64-minimal.iso mounted as /mnt/cdrom the following was run:

virt-install  \
   --hvm  \
   --name cloud \
   --ram 4096 --vcpus=4 \
   --disk /dev/vg_ssd/cloud-xvda \
   --disk /dev/vg_ssd/cloud-xvdb \
   --network bridge=wan,mac=00:16:3E:DE:ED:07   \
   --network bridge=dmz,mac=00:16:3E:DE:EE:07   \
   --os-variant rhel7 \
   --location /mnt/cdrom \
   --debug  \
   --console pty,target_type=serial \
   --nographics --extra-args="plymouth.enable=0 text console=ttyS0,115200n8 serial"

Lo and behold, the boot starts! However it times out when Starting dracut initqueue hook... with:

[  146.447846] dracut-initqueue[925]: Warning: dracut-initqueue timeout - starting timeout scripts
[  147.025468] dracut-initqueue[925]: Warning: dracut-initqueue timeout - starting timeout scripts
    .
    .
[  213.555994] dracut-initqueue[925]: Warning: dracut-initqueue timeout - starting timeout scripts
[  213.562465] dracut-initqueue[925]: Warning: Could not boot.
         Starting Setup Virtual Console...
[  OK  ] Started Setup Virtual Console.
         Starting Dracut Emergency Shell...
Warning: /dev/root does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

dracut:/#

Exiting the shell with ^D tries to clean up and fails with:

    .
    .
[  OK  ] Reached target Switch Root.
         Starting Switch Root...
[  OK  ] Closed Open-iSCSI iscsiuio Socket.
[FAILED] Failed to start Switch Root.
See 'systemctl status initrd-switch-root.service' for details.

with systemctl status initrd-switch-root.service reporting:

● initrd-switch-root.service - Switch Root
   Loaded: loaded (/usr/lib/systemd/system/initrd-switch-root.service; static; >
   Active: failed (Result: exit-code) since Mon 2021-11-22 07:06:30 UTC; 26s ago
  Process: 8057 ExecStart=/usr/bin/systemctl --no-block switch-root /sysroot (c>
 Main PID: 8057 (code=exited, status=1/FAILURE)

Nov 22 07:06:30 localhost systemd[1]: Starting Switch Root...
Nov 22 07:06:30 localhost systemctl[8057]: Failed to switch root: Specified swi>
Nov 22 07:06:30 localhost systemd[1]: initrd-switch-root.service: Main process >
Nov 22 07:06:30 localhost systemd[1]: initrd-switch-root.service: Failed with r>
Nov 22 07:06:30 localhost systemd[1]: Failed to start Switch Root.
Nov 22 07:06:30 localhost systemd[1]: initrd-switch-root.service: Triggering On>

I was hoping to see an installation menu in order to do a manual install.

Is there any something simple that has been overlooked?

All suggestions and clues would be appreciated.

Thanks!!