Interesting issue with creating CentOS7 KVM machines on the F29 OS

The interesting this is that is seems specific to the CentOS7 install media, and the issue is the intsaller cannot detect VIRTIO disks. My OS is Fedora 29 fully patched, the CentOS7 install media I was using is CentOS-7-x86_64-Everything-1503-01.iso

When creating a new KVM instance whether using virt-manager or the virt-install method the CentOS7 installer reports it cannot find the virtio disk. I tried both with a pre-created diskĀ  and letting virt-manager create the disk, both methods failed. After confirming that both methods failed I used pre-created qcow2 disks and virt-install for all further attempts.
I confirmed it was specific to the CentOS7 install media by altering the install media of a failed no-disk-found install using virt-manager to use an old Fedora-Server-DVD-x86_64-23.iso I had lying around and that installer found the disk OK, changed it back to the CentOS7 DVD iso and it could yet again not see the same disk (at no time was the disk altered, only the cdrom boot media).

One disclaimer, once using virt-install with a pre-created disk it did find and use the disk once, but that was once of over twenty attempts and I was trying to create two new KVM servers and eventually had to give up using either virt-manager or virt-install to achieve the creation of the second instance.

The working solution I found was

  • create the new KVM instance using either virt-manager or virt-install, it will not find the disk of course
  • use ‘virsh dumpxml’ to dump out the configuration of the new instance, ie: ‘virsh dumpxml newserver1 > newserver1.xml’
  • delete the failed install instance from virt-manager (do not delete the storage) or ‘virsh destroy’
  • use the dumped xml file to re-create the instance (ie: ‘virsh define newserver1.xml’)
  • use virt-manager to mount the CentOS7 install DVD image again and add the cdrom to the boot order, start the instance, the CentOS7 installer now finds the virtio disk and the install can be performed
  • and remove the cdrom from the boot order, not needed any more

I have not come across this issue before as all my KVM instances would have been build under F27/F28 or earlier where the CentOS-7-x86_64-Everything-1503-01.iso media had no problems with finding the disk during installs.

I was fairly certain the xml define method would work as I had just rebuild the server (after a HD crash) and had used the ‘virsh define’ method to recreate the KVM instances that were there origionally (yes, take backup xml files with each disk image backup) which worked fine for existing CentOS7 instances… before I decided to create another new two instances and hit the issue that I could not create them because new instances could not find the disk(s) assigned.

Frustrating, but I will not examine it further, as I seldom need CentOS images and have worked around the issue.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.