Description of problem: Create a HVM guest with vif model=rtl8130 which is misspelled in vif specification, xm create command does not return any error, but in virt-viewer could see error message "TCP/IP error:VNC connection to hypervisor host got refused or disconnected!" and when execute "ps aux |grep qemu-dm" could notice "[qemu-dm] <defunct>". Version-Release number of selected component (if applicable): xen-3.0.3-115.el5 kernel-xen-2.6.18-212.el5 host:rhel5.5 x86_64 guest:rhel5.5 i386 How reproducible: Always Steps to Reproduce: 1.Create a HVM guest with vif model misspelled. 2.virt-viewer 3.#ps aux |grep qemu-dm 4.#xm list 5.#cat /var/log/xen/qemu-dem.4592.log 6.#tail /var/log/xen/xend.log Actual results: At step1: xm create command executed successfully without error. At step3: root 4592 0.0 0.0 0 0 ? Z 11:00 0:00 [qemu-dm] <defunct> root 4832 0.0 0.0 61196 748 pts/1 S+ 11:01 0:00 grep qemu At step4: Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 3296 2 r----- 34.5 rhel-5.5-32 1 511 1 ------ 0.0 At step5: domid: 1 qemu: the number of cpus is 1 Watching /local/domain/1/logdirty/next-active Watching /local/domain/0/device-model/1/command xs_read(): vncpasswd get error. /vm/11bf03f8-1cbf-1d39-131c-970e25881cb7/vncpasswd. qemu_map_cache_init nr_buckets = 10000 shared page at pfn 1ffff buffered io page at pfn 1fffd xs_read(/vm/11bf03f8-1cbf-1d39-131c-970e25881cb7/rtc/timeoffset): read error qemu: Unsupported NIC: rtl8130 At step6: (xend hangs here) [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:538) hotplugStatusCallback /local/domain/0/backend/vbd/1/768/hotplug-status. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:552) hotplugStatusCallback 1. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices irq. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices vkbd. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices vfb. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices pci. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices ioports. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices tap. [2010-08-23 11:00:23 xend 3541] DEBUG (DevController:160) Waiting for devices vtpm. [2010-08-23 11:00:23 xend 3541] INFO (XendDomain:386) Domain rhel-5.5-32 (1) unpaused. Expected results: Xend should check the vif model available or not before really create the HVM guest, if not available report an detailed error message to user or use the default model rtl8139 as a replacement, just like it change xvda to hda when the first disk specified with blktap driver which is actually not supported.
Created attachment 440285 [details] Full xend.log Please neglect the output at step 6, reattach the full xend.log.
Created attachment 440286 [details] xm dmesg info in the host
Well, unfortunately there's failure with error "Unsupported NIC" error in the code. We could either fallback to the some other default NIC (maybe hypervisor default which is rtl8139 for case Xen) or we could disable the network device entirely. Falling back to netfront is also the option but I don't know what's the best idea to solve this one. Michal
Created attachment 448672 [details] Check for emulated NIC model Hi, this is the patch to whitelist supported NIC models. This patch is checking the NIC model for ioemu (emulated) NIC devices only since according to my testing devices defined as netfront (PV drivers) are fine to be run with invalid model since this variable is not being used there. Prior to my patch the qemu-dm died saying that the NIC model is not supported into the qemu-dm log file and now it's failing with the error message that the NIC model is not supported. The patch has been tested on x86_64 RHEL-5 dom0 and it was working fine not to create the guest with invalid (unsupported) model of NIC device, i.e. not letting qemu-dm die immediately. Michal
Created attachment 448687 [details] Check for emulated NIC model v2 Differences between v1 and v2: - Check for 'ioemu' type (or None value for type) has been implement instead of checking against 'netfront' since only devices with type == 'ioemu' or None device should be treated like emulated devices (other values defines that the PV drivers are being used) - Check only HVM guest vif devices since for PV guests it doesn't fail according to my testing - Implement handling of None values for model and type - Allow None value of model, default 'rtl8139' will be used instead - Treat None value for type as type='ioemu', i.e. check model if type is None - Tested with model unspecified (None), unsupported model specified, supported model specified and also PV guests and everything was working fine Michal
Could reproduce the issue with: xen-3.0.3-115.el5 host:rhel5.5 x86_64 guest:rhel5.5 i386 With xen-3.0.3-119, when create hvm guest with type=ioemu or None and vif model misspelled, there report error message immediately, no qemu-dm process left: # xm cr rhel-5.5-32-hvm.conf Using config file "./rhel-5.5-32-hvm.conf". Error: NIC model rtl8130 is not supported According to the test result above, move to VERIFIED.
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/RHBA-2011-0031.html