Description of problem: Installing a guest adding the --nographics switch using virt-install causes libvirtError and does not allow a guest to be installed [root@ibm-dx360m2-02 ~]# virt-install --connect qemu:///system --hvm --name rhel555 --nographics --ram 1024 --vcpus=1 --location http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os --disk path=/var/lib/libvirt/images/rhel555.img.raw,size=5,device=disk,bus=virtio --debug --os-variant=virtio26 --accelerate --extra-args "console=tty0 console=ttyS0,115200" Tue, 07 Dec 2010 17:13:36 DEBUG Requesting libvirt URI qemu:///system Tue, 07 Dec 2010 17:13:36 DEBUG Received libvirt URI 'qemu:///system' Tue, 07 Dec 2010 17:13:36 DEBUG Requesting virt method 'hvm' Tue, 07 Dec 2010 17:13:36 DEBUG Received virt method 'hvm' Tue, 07 Dec 2010 17:13:36 DEBUG Hypervisor name is 'kvm' Tue, 07 Dec 2010 17:13:36 DEBUG parse_disk: returning ('/var/lib/libvirt/images/rhel555.img.raw', None, None, 'disk', 'virtio', False, False, 5.0, True, None) Tue, 07 Dec 2010 17:13:36 DEBUG Detected storage as type 'file' Tue, 07 Dec 2010 17:13:36 DEBUG Setting os type to 'linux' for variant 'virtio26' Tue, 07 Dec 2010 17:13:36 DEBUG DistroInstaller location is a network source. Starting install... Tue, 07 Dec 2010 17:13:36 DEBUG Attempting to detect distro: Tue, 07 Dec 2010 17:13:36 DEBUG Fetching URI: http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os/.treeinfo Tue, 07 Dec 2010 17:13:36 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-.treeinfo.EP3NNc Retrieving file .treeinfo... | 442 B 00:00 Tue, 07 Dec 2010 17:13:36 DEBUG Fetching URI: http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os/images/pxeboot/vmlinuz Tue, 07 Dec 2010 17:13:36 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-vmlinuz.tzQXnF Retrieving file vmlinuz... | 1.9 MB 00:00 Tue, 07 Dec 2010 17:13:36 DEBUG Fetching URI: http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os/images/pxeboot/initrd.img Tue, 07 Dec 2010 17:13:37 DEBUG Saved file to /var/lib/libvirt/boot/virtinst-initrd.img.o6mU_e Retrieving file initrd.img... | 7.7 MB 00:00 Tue, 07 Dec 2010 17:13:37 DEBUG Creating guest from: <domain type='kvm'> <name>rhel555</name> <currentMemory>1048576</currentMemory> <memory>1048576</memory> <uuid>33bfbbca-d54f-5ea7-9c24-61ea5ba311ec</uuid> <os> <type arch='x86_64'>hvm</type> <kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.tzQXnF</kernel> <initrd>/var/lib/libvirt/boot/virtinst-initrd.img.o6mU_e</initrd> <cmdline>method=http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os console=tty0 console=ttyS0,115200</cmdline> </os> <features> <acpi/><apic/><pae/> </features> <clock offset="utc"/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> <vcpu>1</vcpu> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <console type='pty'/> <disk type='file' device='disk'> <driver name='qemu' cache='none'/> <source file='/var/lib/libvirt/images/rhel555.img.raw'/> <target dev='vda' bus='virtio'/> </disk> <interface type='network'> <source network='default'/> <mac address='54:52:00:3b:e4:e2'/> <model type='virtio'/> </interface> <input type='mouse' bus='ps2'/> </devices> </domain> Tue, 07 Dec 2010 17:13:37 DEBUG Removing /var/lib/libvirt/boot/virtinst-vmlinuz.tzQXnF Tue, 07 Dec 2010 17:13:37 DEBUG Removing /var/lib/libvirt/boot/virtinst-initrd.img.o6mU_e Tue, 07 Dec 2010 17:13:37 ERROR internal error Process exited while reading console log output: Unknown vga type: none Domain installation may not have been successful. If it was, you can restart your domain by running 'virsh start rhel555'; otherwise, please restart your installation. Tue, 07 Dec 2010 17:13:37 ERROR internal error Process exited while reading console log output: Unknown vga type: none Traceback (most recent call last): File "/usr/sbin/virt-install", line 892, in ? main() File "/usr/sbin/virt-install", line 754, in main start_time, guest.start_install) File "/usr/sbin/virt-install", line 816, in do_install dom = install_func(conscb, progresscb, wait=(not wait)) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 541, in start_install return self._do_install(consolecb, meter, removeOld, wait) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 633, in _do_install self.domain = self.conn.createLinux(install_xml, 0) File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1277, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error Process exited while reading console log output: Unknown vga type: none Version-Release number of selected component (if applicable): ]# rpm -qa | grep libvirt libvirt-python-0.8.2-13.el5 libvirt-0.8.2-13.el5 How reproducible: 100% on the systems I tried Steps to Reproduce: 1. install rhel 5.6 with virtulaization 2. run the virt-install command with the --nographics switch 3. Actual results: libvirtError Expected results: guest should install without error Additional info: [root@ibm-dx360m2-02 ~]# virsh uri qemu:///system [root@ibm-dx360m2-02 ~]# virsh hostname ibm-dx360m2-02.rhts.eng.bos.redhat.com [root@ibm-dx360m2-02 ~]# virsh nodeinfo CPU model: x86_64 CPU(s): 16 CPU frequency: 1596 MHz CPU socket(s): 1 Core(s) per socket: 4 Thread(s) per core: 2 NUMA cell(s): 2 Memory size: 16476120 kB
adjusting the virt-install command to remove the --nographics switch or replacing it to install in vnc mode works fine.
[root@ibm-dx360m2-02 qemu]# cat /var/log/libvirt/qemu/rhel555.log LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/libexec/qemu-kvm -S -M rhel5.4.0 -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name rhel555 -uuid 68ddd305-dd42-8ac5-bff2-44fd89349830 -nographic -monitor unix:/var/lib/libvirt/qemu/rhel555.monitor,server,nowait -no-kvm-pit-reinjection -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.dG2yr_ -initrd /var/lib/libvirt/boot/virtinst-initrd.img.dyQ6bZ -append method=http://download.lab.bos.redhat.com/redhat/released/RHEL-5-Server/U5/x86_64/os console=tty0 console=ttyS0,115200 -drive file=/var/lib/libvirt/images/rhel555.img.raw,if=virtio,boot=on,format=raw,cache=none -net nic,macaddr=54:52:00:31:c6:7e,vlan=0,model=virtio -net tap,fd=16,vlan=0 -serial pty -parallel none -usb -vga none -balloon virtio Unknown vga type: none
Upgraded and restarted libvirtd to version # rpm -qa | grep libvirt libvirt-python-0.8.2-14.el5 libvirt-0.8.2-14.el5 libvirt-0.8.2-14.el5 I see the same symptoms
Likely need to revert this commit: commit febc591683cf51e4551f8bcf3ce279a776056e1c Author: Daniel P. Berrange <berrange> Date: Mon Dec 21 22:38:05 2009 +0000 Pass -vga none if no video card specified QEMU always configures a VGA card. If no video card is included in the libvirt XML, it is neccessary to explicitly turn off the default using -vga none * src/qemu/qemu_conf.c: Pass -vga none if no video card is configured * tests/qemuargv2xmltest.c, tests/qemuxml2argvtest.c: Test for handling -vga none. * tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.args, tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml: Test data files
A proper patch for this issue was sent upstream: https://www.redhat.com/archives/libvir-list/2010-December/msg00387.html
Fix built into libvirt-0.8.2-15.el5
Verified by upgrading to the fix in package libvirt-0.8.2-15.el5 and restarting libvirt. I am now able to install vm with the --nographics option.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0060.html