Description of problem: when I create the guest with the following script: virt-install \ --connect qemu:///system \ --virt-type kvm \ --name demo \ --ram 500 \ --disk path=/home/hongqing/testscript/demo.img,size=10,sparse=true \ --accelerate \ --location ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/ \ --channel tcp host=127.0.0.1:6080 mode=connect target_type=virtio name=org.fedoraproject.anaconda.log.0 Version-Release number of selected component (if applicable): Compiled against library: libvir 0.8.3 Using library: libvir 0.8.3 Using API: QEMU 0.8.3 Running hypervisor: QEMU 0.13.0 How reproducible: Steps to Reproduce: 1. yum groupinstall virtualization 2. start the listening rsyslogd process on the host, using the analog script described below: eval `scripts/analog -p 6080 ./ -o rsyslogd.conf -s` 3.run the script Actual results: console output is below: Starting install... Retrieving file .treeinfo... | 2.0 kB 00:00 ... Retrieving file vmlinuz... | 7.2 MB 00:00 ... Retrieving file initrd.img... | 61 MB 00:01 ... ERROR internal error Process exited while reading console log output: char device redirected to /dev/pts/17 getaddrinfo(127.0.0.1,None): Servname not supported for ai_socktype chardev: opening backend "socket" failed virt-install.log is below: [Tue, 18 Jan 2011 18:38:59 virt-install 30672] DEBUG (cli:191) Launched with command line: /usr/bin/virt-install --connect qemu:///system --virt-type kvm --name demo2 --ram 500 --disk path=/home/hongqing/testscript/demo2.img,size=10,sparse=true --accelerate --location ftp://download.englab.nay.red hat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/ --channel tcp host=127.0.0.1:6080 mode=connect target_type=virtio name=org.fedoraproject.anaconda.log.0 [Tue, 18 Jan 2011 18:38:59 virt-install 30672] DEBUG (cli:216) Requesting libvirt URI qemu:///system [Tue, 18 Jan 2011 18:38:59 virt-install 30672] DEBUG (cli:218) Received libvirt URI qemu:///system [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (virt-install:550) Requesting virt method 'default', hv type 'kvm'. [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (virt-install:886) Received virt method 'hvm' [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (virt-install:887) Hypervisor name is 'kvm' [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (virt-install:407) parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/home/hongqing/testscript/demo2.img ', 'device': 'disk', 'volName': None, 'conn': <libvirt.virConnect instance at 0x1027a70>, 'size': 10.0, 'driverType': None, 'driverCache': None, 'shareable': False, 'driverName': None, 'sparse': True} [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (cli:754) DISPLAY is set: graphics defaulting to VNC. [Tue, 18 Jan 2011 18:39:00 virt-install 30672] DEBUG (DistroInstaller:111) DistroInstaller location is a network source. [Tue, 18 Jan 2011 18:39:10 virt-install 30672] DEBUG (OSDistro:65) Attempting to detect distro: [Tue, 18 Jan 2011 18:39:10 virt-install 30672] DEBUG (ImageFetcher:83) Fetching URI: ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/.treeinfo [Tue, 18 Jan 2011 18:39:11 virt-install 30672] DEBUG (ImageFetcher:94) Saved file to /var/lib/libvirt/boot/virtinst-.treeinfo.AqkHhh [Tue, 18 Jan 2011 18:39:11 virt-install 30672] DEBUG (ImageFetcher:83) Fetching URI: ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/images/pxeboot/vmlinuz [Tue, 18 Jan 2011 18:39:11 virt-install 30672] DEBUG (ImageFetcher:94) Saved file to /var/lib/libvirt/boot/virtinst-vmlinuz.xKa4C1 [Tue, 18 Jan 2011 18:39:11 virt-install 30672] DEBUG (ImageFetcher:83) Fetching URI: ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/images/pxeboot/initrd.img [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (ImageFetcher:94) Saved file to /var/lib/libvirt/boot/virtinst-initrd.img.kceh4a [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (DistroInstaller:249) Auto detected OS type as: linux [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (DistroInstaller:253) Auto detected OS variant as: fedora14 [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (Guest:1053) Generated install XML: <domain type='kvm'> <name>demo2</name> <currentMemory>512000</currentMemory> <memory>512000</memory> <uuid>bc633aee-e8a6-ccb8-99b7-1a3d5f78b095</uuid> <os> <type arch='x86_64'>hvm</type> <kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.xKa4C1</kernel> <initrd>/var/lib/libvirt/boot/virtinst-initrd.img.kceh4a</initrd> <cmdline>method=ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/</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/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu'/> <source file='/home/hongqing/testscript/demo2.img'/> <target dev='vda' bus='virtio'/> </disk> <interface type='network'> <source network='default'/> <mac address='52:54:00:f8:fe:fe'/> <model type='virtio'/> </interface> <input type='tablet' bus='usb'/> <graphics type='vnc' port='-1' keymap='en-us'/> <console type='pty'/> <channel type='tcp'> <source mode='bind' host='127.0.0.1' service='None'/> <protocol type='raw'/> </channel> <video> <model type='cirrus'/> </video> </devices> </domain> [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (Installer:310) Removing /var/lib/libvirt/boot/virtinst-vmlinuz.xKa4C1 [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (Installer:310) Removing /var/lib/libvirt/boot/virtinst-initrd.img.kceh4a [Tue, 18 Jan 2011 18:39:12 virt-install 30672] ERROR (cli:195) internal error Process exited while reading console log output: char device redirected to /dev/pts/18 getaddrinfo(127.0.0.1,None): Servname not supported for ai_socktype chardev: opening backend "socket" failed [Tue, 18 Jan 2011 18:39:12 virt-install 30672] DEBUG (_util:221) Traceback (most recent call last): File "/usr/bin/virt-install", line 1019, in main start_time, guest.start_install) File "/usr/bin/virt-install", line 1061, in do_install dom = install_func(conscb, progresscb, wait=(not wait)) File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1023, in start_install return self._do_install(consolecb, meter, removeOld, wait) File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1088, in _do_install "install") File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1059, in _create_guest dom = self.conn.createLinux(start_xml, 0) File "/usr/lib64/python2.7/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: char device redirected to /dev/pts/18 getaddrinfo(127.0.0.1,None): Servname not supported for ai_socktype chardev: opening backend "socket" failed (END) Expected results: <channel type='tcp'> <source mode='bind' host='127.0.0.1' service='None'/> <protocol type='raw'/> </channel> mode=bind should be *mode=connect* , service =6080 Additional info:
the port status is bleow: tcp 0 0 *:6080 *:* LISTEN 24547/rsyslogd tcp 0 0 *:6080 *:* LISTEN 24547/rsyslogd
I have figure it out: before the --channel option, the --serial option should be added first. virt-install \ --connect qemu:///system \ --virt-type kvm \ --name demo \ --ram 500 \ --disk path=/var/lib/libvirt/images/demo.img,size=10,sparse=true \ --accelerate \ --location ftp://download.englab.nay.redhat.com/pub/fedora/linux/releases/14/Fedora/x86_64/os/ \ --serial tcp,host=:6080 mode=connect --channel tcp host=:6080 mode=connect target_type=virtio, name=org.fedoraproject.anaconda.log.0