Installing VM on CentOS 6.6 with virt-install hangs

castis asked:

I’m trying to install a Centos 6.6 VM on a CentOS 6.6 host with the following command.

virt-install \
--name vm-queue \
--description "Queue Server" \
--ram 2048 \
--disk path=/var/kvm/images/vm-queue.img,size=30 \
--vcpus 2 \
--os-type linux \
--os-variant rhel6 \
--network bridge=br0 \
--graphics none \
--console pty,target_type=serial \
--cdrom /var/iso/CentOS-6.6-x86_64-minimal.iso

I’m given a boot screen letting me choose an install option.

enter image description here

As soon as I press enter, I’m given

Loading vmlinuz......
Loading initrd.img....................................ready.
Probing EDD (edd=off to disable)... ok

I then get a cursor in the bottom left hand corner, and about 3-4 seconds later I am presented with .

enter image description here

I’ve let it sit for as long as an hour and nothing happens.

As far as I know, everything in that install line is cool. The machine has 2 4-core processors, 96G of ram, the bridge is working.

/var/log/libvirt/libvirtd.log doesn’t get anything during the install. However, when I end up having to Enter + ~ + . to terminate the session I’m given

14232: error : daemonStreamHandleAbort:609 : stream aborted at client request
14232: error : virNetSocketReadWire:1194 : End of file while reading data: Input/output error

and then when I kill the process.

14232: error : qemuMonitorIO:615 : internal error End of file from monitor

Anyone know whats up with the random character I get while trying to install?

In case anyone needs it, heres the XML file that is created by libvirt

<domain type='kvm'>
  <description>Queue Server</description>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>2</vcpu>
    <type arch='x86_64' machine='rhel6.6.0'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/kvm/images/vm-queue.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <interface type='bridge'>
      <mac address='52:54:00:bd:ac:6e'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <serial type='pty'>
      <target port='0'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <input type='tablet' bus='usb'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

My answer:

You appear to be attempting to install using a serial console, rather than a normal console. Not sure why you’re doing that, but…

By default the installer tries to display either text or graphics on the Linux console. To divert output to the serial console you need to hit Tab at the boot screen, and ensure that you add the following options to the boot command line:

text console=ttyS0

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.