From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1OCP-0001vf-ES for qemu-devel@nongnu.org; Fri, 01 Feb 2013 16:34:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1OBL-0007xd-Cs for qemu-devel@nongnu.org; Fri, 01 Feb 2013 16:31:05 -0500 Received: from novprvoes0310.provo.novell.com ([137.65.248.74]:36854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1OBL-0007wG-3e for qemu-devel@nongnu.org; Fri, 01 Feb 2013 16:29:59 -0500 Message-Id: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> Date: Fri, 01 Feb 2013 14:29:52 -0700 From: "Bruce Rogers" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC6F696C0.0__=" Subject: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, jasowang@redhat.com --=__PartC6F696C0.0__= Content-Type: multipart/alternative; boundary="=__PartC6F696C0.1__=" --=__PartC6F696C0.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I get the following error message starting a linux guest via=20 libvirt with the latest qemu git head:=20 brogers2:/ # virsh start sles11=20 error: Failed to start domain sles11=20 error: internal error process exited while connecting to monitor: WARNING: = failed to find acpi-dsdt.aml=20 qemu-kvm: -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00= :59:31:da,bus=3Dpci.0,addr=3D0x3: Property 'virtio-net-pci.netdev' can't = find value 'hostnet0'=20 I bisected it to this commit:=20 brogers@brogers1:~/osr/git/qemu> git bisect good=20 264986e2c8f14a0f4a32ac6f1e083905833a5fc7 is the first bad commit=20 commit 264986e2c8f14a0f4a32ac6f1e083905833a5fc7=20 Author: Jason Wang =20 Date: Wed Jan 30 19:12:34 2013 +0800=20 tap: multiqueue support=20 I'm not sure if it's at all related to the windows networking problem = also=20 just reported.=20 Bruce=20 --=__PartC6F696C0.1__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML =0A =0A=0A =0A =0A

=0A I get the following error = message starting a linux guest via

=0A

=0A libvirt= with the latest qemu git head:

=0A
=0A

=0A brogers2:/ # virsh start sles11

=0A

=0A error: Failed to start domain sles11

=0A

=0A error: internal error process exited while connecting to = monitor: WARNING: failed to find acpi-dsdt.aml

=0A

=0A qemu-kvm: -device virtio-net-pci,netdev=hostnet0,id&= #61;net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3: = Property 'virtio-net-pci.netdev' can't find value 'hostnet0= '

=0A
=0A

=0A I bisected it = to this commit:

=0A
=0A

=0A brogers@brog= ers1:~/osr/git/qemu> git bisect good

=0A

=0A 264986e2c8f14a0f4a32ac6f1e083905833a5fc7 is the first bad = commit

=0A

=0A commit 264986e2c8f14a0f4a32ac6= f1e083905833a5fc7

=0A

=0A Author: Jason = Wang <jasowang@redhat.com>

=0A

=0A Date: =   Wed Jan 30 19:12:34 2013 +0800

=0A
= =0A

=0A     tap: multiqueue = support

=0A
=0A

=0A I'm not = sure if it's at all related to the windows networking problem = also

=0A

=0A = just reported.

=0A
= =0A

=0A Bruce

=0A

=0A  &nb= sp;  

=0A =0A=0A --=__PartC6F696C0.1__=-- --=__PartC6F696C0.0__=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1P5N-0002tc-Uc for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:31:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1P1m-0000UF-2C for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:27:53 -0500 Received: from ia-in-x0229.1e100.net ([2607:f8b0:4001:c02::229]:64283 helo=mail-ia0-x229.google.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1P1l-0000U2-TY for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:24:09 -0500 Received: by mail-ia0-f169.google.com with SMTP id j5so6017118iaf.14 for ; Fri, 01 Feb 2013 14:24:09 -0800 (PST) From: Anthony Liguori In-Reply-To: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> Date: Fri, 01 Feb 2013 16:16:22 -0600 Message-ID: <87ip6bznm1.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers , qemu-devel@nongnu.org, jasowang@redhat.com Bruce Rogers writes: > I get the following error message starting a linux guest via > libvirt with the latest qemu git head: > > brogers2:/ # virsh start sles11 > error: Failed to start domain sles11 > error: internal error process exited while connecting to monitor: WARNING: failed to find acpi-dsdt.aml > qemu-kvm: -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3: Property 'virtio-net-pci.netdev' can't find value 'hostnet0' > > I bisected it to this commit: Can you provide full details and logs? I cannot reproduce this with a simple invocation. The 'qemu-kvm:' suffix suggests that you aren't just using a straight qemu.git. Are you carrying any patches that may be affecting this? Regards, Anthony Liguori > > brogers@brogers1:~/osr/git/qemu> git bisect good > 264986e2c8f14a0f4a32ac6f1e083905833a5fc7 is the first bad commit > commit 264986e2c8f14a0f4a32ac6f1e083905833a5fc7 > Author: Jason Wang > Date: Wed Jan 30 19:12:34 2013 +0800 > > tap: multiqueue support > > I'm not sure if it's at all related to the windows networking problem also > just reported. > > Bruce > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1PJU-00075P-4k for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:43:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1PIQ-0000wn-2q for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:42:28 -0500 Received: from novprvoes0310.provo.novell.com ([137.65.248.74]:53189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1PIP-0000vw-QY for qemu-devel@nongnu.org; Fri, 01 Feb 2013 17:41:22 -0500 Message-Id: <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> Date: Fri, 01 Feb 2013 15:41:17 -0700 From: "Bruce Rogers" References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> <87ip6bznm1.fsf@codemonkey.ws> In-Reply-To: <87ip6bznm1.fsf@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org, jasowang@redhat.com >>> On 2/1/2013 at 03:16 PM, Anthony Liguori = wrote:=20 > Bruce Rogers writes: >=20 >> I get the following error message starting a linux guest via=20 >> libvirt with the latest qemu git head:=20 >> >> brogers2:/ # virsh start sles11=20 >> error: Failed to start domain sles11=20 >> error: internal error process exited while connecting to monitor: = WARNING:=20 > failed to find acpi-dsdt.aml=20 >> qemu-kvm: -device=20 > virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:59:31:da,bus=3D= pci.0,addr > =3D0x3: Property 'virtio-net-pci.netdev' can't find value 'hostnet0'=20 >> >> I bisected it to this commit:=20 >=20 > Can you provide full details and logs? I cannot reproduce this with a > simple invocation. >=20 > The 'qemu-kvm:' suffix suggests that you aren't just using a straight > qemu.git. Are you carrying any patches that may be affecting this? No patches are applied to qemu-system-x86_64 as tested. (I just renamed it to qemu-kvm and put it in /usr/bin for libvirt to find easily). Here is the invocation by libvirt, as recorded in /var/log/libvirt/qemu/: 2013-02-01 21:35:45.597+0000: starting up LC_ALL=3DC PATH=3D/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:= /usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/= lib/mit/sbin HOME=3D/root USER=3Droot LOGNAME=3Droot TMPDIR=3D/tmp = QEMU_AUDIO_DRV=3Dnone /usr/bin/qemu-kvm -name sles11 -S -M pc -cpu = core2duo,+lahf_lm,+pdcm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pbe,+tm= ,+ht,+ss,+acpi,+ds -enable-kvm -m 512 -smp 2,sockets=3D2,cores=3D1,threads= =3D1 -uuid 36975709-16ae-85e0-c90f-09eb4ec7dec3 -no-user-config -nodefaults= -chardev socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/sles11.monit= or,server,nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol = -rtc base=3Dutc -no-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,ad= dr=3D0x1.0x2 -drive file=3D/var/lib/kvm/images/sles11/disk0.raw,if=3Dnone,i= d=3Ddrive-virtio-disk0,format=3Draw -device virtio-blk-pci,scsi=3Doff,bus= =3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0,bootindex= =3D1 -drive if=3Dnone,id=3Ddrive-ide0-0-0,readonly=3Don,format=3Draw = -device ide-cd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0 = -netdev tap,fd=3D18,id=3Dhostnet0 -device virtio-net-pci,netdev=3Dhostnet0,= id=3Dnet0,mac=3D52:54:00:59:31:da,bus=3Dpci.0,addr=3D0x3 -vnc 127.0.0.1:0 = -vga cirrus -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x5= WARNING: failed to find acpi-dsdt.aml qemu-kvm: -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00= :59:31:da,bus=3Dpci.0,addr=3D0x3: Property 'virtio-net-pci.netdev' can't = find value 'hostnet0' 2013-02-01 21:35:46.491+0000: shutting down Bruce From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QYL-0007Hl-RE for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:01:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1QYJ-0005I9-98 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:01:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QYJ-0005Hu-1B for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:01:51 -0500 Message-ID: <510C57E5.2000108@redhat.com> Date: Sat, 02 Feb 2013 01:03:49 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> <87ip6bznm1.fsf@codemonkey.ws> <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> In-Reply-To: <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: jasowang@redhat.com, qemu-devel@nongnu.org, Anthony Liguori On 02/01/13 23:41, Bruce Rogers wrote: > Here is the invocation by libvirt, as recorded in /var/log/libvirt/qemu/: > 2013-02-01 21:35:45.597+0000: starting up > LC_ALL=C > PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin: > /bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin > HOME=/root USER=root LOGNAME=root TMPDIR=/tmp QEMU_AUDIO_DRV=none > /usr/bin/qemu-kvm -name sles11 -S -M pc -cpu > core2duo,+lahf_lm,+pdcm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds > -enable-kvm -m 512 -smp 2,sockets=2,cores=1,threads=1 -uuid > 36975709-16ae-85e0-c90f-09eb4ec7dec3 -no-user-config -nodefaults > -chardev > socket,id=charmonitor,path=/var/lib/libvirt/qemu/sles11.monitor,server,nowait > -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc > -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 > -drive > file=/var/lib/kvm/images/sles11/disk0.raw,if=none,id=drive-virtio-disk0,format=raw > -device > virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 > -drive if=none,id=drive-ide0-0-0,readonly=on,format=raw -device > ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev > tap,fd=18,id=hostnet0 -device > virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3 > -vnc 127.0.0.1:0 -vga cirrus -device > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 > WARNING: failed to find acpi-dsdt.aml > qemu-kvm: -device > virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3: > Property 'virtio-net-pci.netdev' can't find value 'hostnet0' > 2013-02-01 21:35:46.491+0000: shutting down (The "WARNING: failed to find acpi-dsdt.aml" message is fixed by commit 7e973bb2.) I think the following could be happening. -netdev tap,fd=18,id=hostnet0 is specified on the command line (generated by libvirt). Accordingly, the net_init_tap() function is entered with name="hostnet0". Looking at the tree at 264986e2^ (= e5dc0b4): - "tap->has_fd" is true, - fd / vnet_hdr / model are set up in that branch, - the net_init_tap() tail-calls net_init_tap_one(), with the configured local variables, including "name" (input param): return net_init_tap_one(tap, peer, model, name, ifname, script, downscript, tap->has_vhostfd ? tap->vhostfd : NULL, vnet_hdr, fd); Commit 264986e2, among other things, instantiates the net_init_tap_one() call for each branch of net_init_tap(), open-coding the parameters at each call site that originally used to be "buffered up" for the common final call. Unfortunately, there's a typo in the "tap->has_fd" branch: if (net_init_tap_one(tap, peer, "tap", NULL, NULL, script, downscript, vhostfdname, vnet_hdr, fd)) { return -1; } The "name" parameter, which would ultimately go to qemu_net_client_setup(), is lost, hence assign_name() is used instead. The rest of the arguments seems OK. Suggested patch: ----[cut here]---- diff --git a/net/tap.c b/net/tap.c index 1bf7609..48c254e 100644 --- a/net/tap.c +++ b/net/tap.c @@ -711,7 +711,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name, vnet_hdr = tap_probe_vnet_hdr(fd); - if (net_init_tap_one(tap, peer, "tap", NULL, NULL, + if (net_init_tap_one(tap, peer, "tap", name, NULL, script, downscript, vhostfdname, vnet_hdr, fd)) { return -1; ----[cut here]---- Laszlo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QbU-0008W7-O7 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1QbT-0006LY-Cf for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:05:08 -0500 Received: from novprvoes0310.provo.novell.com ([137.65.248.74]:37755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QbT-0006Kl-4X for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:05:07 -0500 Message-Id: <510BF5BF02000048000D4B55@novprvoes0310.provo.novell.com> Date: Fri, 01 Feb 2013 17:05:03 -0700 From: "Bruce Rogers" References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> <87ip6bznm1.fsf@codemonkey.ws> <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> <510C57E5.2000108@redhat.com> In-Reply-To: <510C57E5.2000108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: jasowang@redhat.com, qemu-devel@nongnu.org, Anthony Liguori >>> On 2/1/2013 at 05:03 PM, Laszlo Ersek wrote:=20 > On 02/01/13 23:41, Bruce Rogers wrote: >=20 >> Here is the invocation by libvirt, as recorded in=20 >/var/log/libvirt/qemu/: >> 2013-02-01 21:35:45.597+0000: starting up >> LC_ALL=3DC >> PATH=3D/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin= : >>=20 > /bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit= /sbi > n >> HOME=3D/root USER=3Droot LOGNAME=3Droot TMPDIR=3D/tmp QEMU_AUDIO_DRV=3Dn= one >> /usr/bin/qemu-kvm -name sles11 -S -M pc -cpu >>=20 > core2duo,+lahf_lm,+pdcm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pbe,+= tm,+ > ht,+ss,+acpi,+ds >> -enable-kvm -m 512 -smp 2,sockets=3D2,cores=3D1,threads=3D1 -uuid >> 36975709-16ae-85e0-c90f-09eb4ec7dec3 -no-user-config -nodefaults >> -chardev >>=20 > socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/sles11.monitor,serve= r,nowait >> -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc >> -no-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 >> -drive >>=20 > file=3D/var/lib/kvm/images/sles11/disk0.raw,if=3Dnone,id=3Ddrive-virtio-d= isk0,format=3D > raw >> -device >>=20 > virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-dis= k0,id=3Dvirtio-disk > 0,bootindex=3D1 >> -drive if=3Dnone,id=3Ddrive-ide0-0-0,readonly=3Don,format=3Draw -device >> ide-cd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0 = -netdev >> tap,fd=3D18,id=3Dhostnet0 -device >>=20 > virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:59:31:da,bus=3D= pci.0,addr=3D0x3 >=20 >> -vnc 127.0.0.1:0 -vga cirrus -device >> virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x5 >> WARNING: failed to find acpi-dsdt.aml >> qemu-kvm: -device >>=20 > virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:59:31:da,bus=3D= pci.0,addr=3D0x3 > : >> Property 'virtio-net-pci.netdev' can't find value 'hostnet0' >> 2013-02-01 21:35:46.491+0000: shutting down >=20 > (The "WARNING: failed to find acpi-dsdt.aml" message is fixed by = commit=20 > 7e973bb2.) >=20 > I think the following could be happening. >=20 > -netdev tap,fd=3D18,id=3Dhostnet0 >=20 > is specified on the command line (generated by libvirt). Accordingly, > the net_init_tap() function is entered with name=3D"hostnet0". >=20 > Looking at the tree at 264986e2^ (=3D e5dc0b4): > - "tap->has_fd" is true, > - fd / vnet_hdr / model are set up in that branch, > - the net_init_tap() tail-calls net_init_tap_one(), with the configured > local variables, including "name" (input param): >=20 > return net_init_tap_one(tap, peer, model, name, ifname, script, > downscript, tap->has_vhostfd ? tap->vhostfd : NULL, > vnet_hdr, fd); >=20 > Commit 264986e2, among other things, instantiates the net_init_tap_one() > call for each branch of net_init_tap(), open-coding the parameters at > each call site that originally used to be "buffered up" for the common > final call. Unfortunately, there's a typo in the "tap->has_fd" branch: >=20 > if (net_init_tap_one(tap, peer, "tap", NULL, NULL, > script, downscript, > vhostfdname, vnet_hdr, fd)) { > return -1; > } >=20 > The "name" parameter, which would ultimately go to > qemu_net_client_setup(), is lost, hence assign_name() is used instead. >=20 > The rest of the arguments seems OK. Suggested patch: >=20 > ----[cut here]---- > diff --git a/net/tap.c b/net/tap.c > index 1bf7609..48c254e 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -711,7 +711,7 @@ int net_init_tap(const NetClientOptions *opts, const = char=20 > *name, > =20 > vnet_hdr =3D tap_probe_vnet_hdr(fd); > =20 > - if (net_init_tap_one(tap, peer, "tap", NULL, NULL, > + if (net_init_tap_one(tap, peer, "tap", name, NULL, > script, downscript, > vhostfdname, vnet_hdr, fd)) { > return -1; > ----[cut here]---- >=20 > Laszlo Yes, that fixes it for me! Bruce From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QkK-0003RB-NU for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:14:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1QkJ-00009e-C2 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:14:16 -0500 Received: from mail-ia0-x22a.google.com ([2607:f8b0:4001:c02::22a]:58737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QkJ-00009Y-6X for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:14:15 -0500 Received: by mail-ia0-f170.google.com with SMTP id k20so6222144iak.29 for ; Fri, 01 Feb 2013 16:14:14 -0800 (PST) From: Anthony Liguori In-Reply-To: <510C57E5.2000108@redhat.com> References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> <87ip6bznm1.fsf@codemonkey.ws> <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> <510C57E5.2000108@redhat.com> Date: Fri, 01 Feb 2013 18:14:11 -0600 Message-ID: <87r4kzr2r0.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek , Bruce Rogers Cc: jasowang@redhat.com, qemu-devel@nongnu.org Laszlo Ersek writes: > On 02/01/13 23:41, Bruce Rogers wrote: > >> Here is the invocation by libvirt, as recorded in /var/log/libvirt/qemu/: >> 2013-02-01 21:35:45.597+0000: starting up >> LC_ALL=C >> PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin: >> /bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin >> HOME=/root USER=root LOGNAME=root TMPDIR=/tmp QEMU_AUDIO_DRV=none >> /usr/bin/qemu-kvm -name sles11 -S -M pc -cpu >> core2duo,+lahf_lm,+pdcm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds >> -enable-kvm -m 512 -smp 2,sockets=2,cores=1,threads=1 -uuid >> 36975709-16ae-85e0-c90f-09eb4ec7dec3 -no-user-config -nodefaults >> -chardev >> socket,id=charmonitor,path=/var/lib/libvirt/qemu/sles11.monitor,server,nowait >> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc >> -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 >> -drive >> file=/var/lib/kvm/images/sles11/disk0.raw,if=none,id=drive-virtio-disk0,format=raw >> -device >> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 >> -drive if=none,id=drive-ide0-0-0,readonly=on,format=raw -device >> ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev >> tap,fd=18,id=hostnet0 -device >> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3 >> -vnc 127.0.0.1:0 -vga cirrus -device >> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 >> WARNING: failed to find acpi-dsdt.aml >> qemu-kvm: -device >> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:59:31:da,bus=pci.0,addr=0x3: >> Property 'virtio-net-pci.netdev' can't find value 'hostnet0' >> 2013-02-01 21:35:46.491+0000: shutting down > > (The "WARNING: failed to find acpi-dsdt.aml" message is fixed by commit 7e973bb2.) > > I think the following could be happening. > > -netdev tap,fd=18,id=hostnet0 > > is specified on the command line (generated by libvirt). Accordingly, > the net_init_tap() function is entered with name="hostnet0". > > Looking at the tree at 264986e2^ (= e5dc0b4): > - "tap->has_fd" is true, > - fd / vnet_hdr / model are set up in that branch, > - the net_init_tap() tail-calls net_init_tap_one(), with the configured > local variables, including "name" (input param): > > return net_init_tap_one(tap, peer, model, name, ifname, script, > downscript, tap->has_vhostfd ? tap->vhostfd : NULL, > vnet_hdr, fd); > > Commit 264986e2, among other things, instantiates the net_init_tap_one() > call for each branch of net_init_tap(), open-coding the parameters at > each call site that originally used to be "buffered up" for the common > final call. Unfortunately, there's a typo in the "tap->has_fd" branch: > > if (net_init_tap_one(tap, peer, "tap", NULL, NULL, > script, downscript, > vhostfdname, vnet_hdr, fd)) { > return -1; > } > > The "name" parameter, which would ultimately go to > qemu_net_client_setup(), is lost, hence assign_name() is used instead. > > The rest of the arguments seems OK. Suggested patch: Indeed, looks like we came to the same conclusion here :-) Regards, Anthony Liguori > > ----[cut here]---- > diff --git a/net/tap.c b/net/tap.c > index 1bf7609..48c254e 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -711,7 +711,7 @@ int net_init_tap(const NetClientOptions *opts, const char *name, > > vnet_hdr = tap_probe_vnet_hdr(fd); > > - if (net_init_tap_one(tap, peer, "tap", NULL, NULL, > + if (net_init_tap_one(tap, peer, "tap", name, NULL, > script, downscript, > vhostfdname, vnet_hdr, fd)) { > return -1; > ----[cut here]---- > > Laszlo From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QnL-0004kN-N2 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1QnH-0000rA-6f for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:17:23 -0500 Received: from mail-ie0-x230.google.com ([2607:f8b0:4001:c03::230]:55469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1QnH-0000r0-24 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:17:19 -0500 Received: by mail-ie0-f176.google.com with SMTP id k13so2249014iea.35 for ; Fri, 01 Feb 2013 16:17:18 -0800 (PST) From: Anthony Liguori In-Reply-To: <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> References: <510BD16002000048000D4B30@novprvoes0310.provo.novell.com> <87ip6bznm1.fsf@codemonkey.ws> <510BE21D02000048000D4B45@novprvoes0310.provo.novell.com> Date: Fri, 01 Feb 2013 18:09:07 -0600 Message-ID: <87y5f7zie4.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] libvirt fails to start guest with latest code checkins List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers , qemu-devel@nongnu.org, jasowang@redhat.com Bruce Rogers writes: > >>> On 2/1/2013 at 03:16 PM, Anthony Liguori wro= te:=20 >> Bruce Rogers writes: >>=20 >>> I get the following error message starting a linux guest via=20 >>> libvirt with the latest qemu git head:=20 >>> >>> brogers2:/ # virsh start sles11=20 >>> error: Failed to start domain sles11=20 >>> error: internal error process exited while connecting to monitor: WARNI= NG:=20 >> failed to find acpi-dsdt.aml=20 >>> qemu-kvm: -device=20 >> virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:59:31:da,bus= =3Dpci.0,addr >> =3D0x3: Property 'virtio-net-pci.netdev' can't find value 'hostnet0'=20 >>> >>> I bisected it to this commit:=20 >>=20 >> Can you provide full details and logs? I cannot reproduce this with a >> simple invocation. >>=20 >> The 'qemu-kvm:' suffix suggests that you aren't just using a straight >> qemu.git. Are you carrying any patches that may be affecting this? > > No patches are applied to qemu-system-x86_64 as tested. (I just renamed > it to qemu-kvm and put it in /usr/bin for libvirt to find easily). Okay, I think I fixed this problem. Patch is coming through the tubes. I'll make sure to include it for -rc0. Thanks for the report! Regards, Anthony Liguori > > Here is the invocation by libvirt, as recorded in /var/log/libvirt/qemu/<= vmname>: > 2013-02-01 21:35:45.597+0000: starting up > LC_ALL=3DC PATH=3D/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bi= n:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/us= r/lib/mit/sbin HOME=3D/root USER=3Droot LOGNAME=3Droot TMPDIR=3D/tmp QEMU_A= UDIO_DRV=3Dnone /usr/bin/qemu-kvm -name sles11 -S -M pc -cpu core2duo,+lahf= _lm,+pdcm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pbe,+tm,+ht,+ss,+acpi= ,+ds -enable-kvm -m 512 -smp 2,sockets=3D2,cores=3D1,threads=3D1 -uuid 3697= 5709-16ae-85e0-c90f-09eb4ec7dec3 -no-user-config -nodefaults -chardev socke= t,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/sles11.monitor,server,nowai= t -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc -n= o-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -driv= e file=3D/var/lib/kvm/images/sles11/disk0.raw,if=3Dnone,id=3Ddrive-virtio-d= isk0,format=3Draw -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,= drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0,bootindex=3D1 -drive if=3Dnone= ,id=3Ddrive-ide0-0-0,readonly=3Don,format=3Draw -device ide-cd,bus=3Dide.0,= unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0 -netdev tap,fd=3D18,id=3Dhost= net0 -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:59:3= 1:da,bus=3Dpci.0,addr=3D0x3 -vnc 127.0.0.1:0 -vga cirrus -device virtio-bal= loon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x5 > WARNING: failed to find acpi-dsdt.aml > qemu-kvm: -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:= 00:59:31:da,bus=3Dpci.0,addr=3D0x3: Property 'virtio-net-pci.netdev' can't = find value 'hostnet0' > 2013-02-01 21:35:46.491+0000: shutting down > > Bruce