[libvirt-users] Fwd: Problems using virt-install to create KVM CentOS 5.6 guest

Emmanuel Noobadmin centos.admin at gmail.com
Fri May 13 04:25:40 UTC 2011

Let's try this again and see if it's gmail screwing up or am I just blacklisted.

---------- Forwarded message ----------
Date: Mon, 9 May 2011 15:13:08 +0800
Subject: Problems using virt-install to create KVM CentOS 5.6 guest
To: libvirt-users at redhat.com

I was having problems creating a KVM CentOS 5.6
Initially the host was CentOS 5.6 but I switched to Scientific Linux 6
during the process of trying to solve it. I was able to install a
working guest in the end by manually writing an XML and using virsh.

However, as it shouldn't be so complicated, Gleb over at the KVM list
asked me to share this with the libvirtd ML. I don't know it's an old
bug, since current libvirt seems to be several sub-versions ahead of
mine so decided to post to the user list first in case it's a known
bug. Hopefully somebody will be able to pinpoint what went wrong.

Host system: SL 6.0 with libvirtd (libvirt) 0.8.1
Network: 2 physical NICs, eth0 bridged to br0 for WAN connectivity,
eth1 is for internal use
Installation medium: CentOS 5.6 DVD ISO

Original problem
virt-install would simply not work, I get a blank console with nothing
happening and qemu-kvm will be 100% load on one core.

This was eventually traced to virt-install not being able to mount/use
the ISO. Mounting the ISO as loopback allowed the installation to

However, the guest was not able to see the installation "cdrom". With
httpd running off the host, and tested accessibly via Internet, a
network install did not work either.

After much frustration, I followed the documentation at libvirt
website to write my own XML file.

The result of this was the discovery that

1. permissions on initrd.img and vmlinux was not allowing virsh access
- copying these files to disk and adjusting the xml allowed
installation to proceed. virt-install appears to do this on the fly.

2. virt-install guest could not see any disk. The anaconda installer
could not find any CDROM or hard disk.
- Part of the problem seems to be that virt-install did not save the
source for the installation medium, the generated XML did not have the
source information under the <disk> element. I specified this in my
manual XML and the CentOS guest was able to see the "cdrom" and
install properly. As I did not have any problem with missing hard
disks with my manually written XML so I'm not sure what went wrong
with virt-install's

3. Can't install via network
- This was traced to networking not working at all. Even in my manual
XML, networking did not work although the guest could install from the
disk. Eventually, this was solved by adding the <model type='virtio'
/> to the device definition.

More information about the libvirt-users mailing list