[libvirt] [PATCH] qemu: check actual netdev type rather than config netdev type during init
Eric Blake
eblake at redhat.com
Thu Oct 3 14:31:47 UTC 2013
On 10/03/2013 05:24 AM, Laine Stump wrote:
> This resolves:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1012834
>
> Note that a similar problem was reported in:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=827519
>
> but the fix only worked for <interface type='hostdev'>, *not* for
> <interface type='network'> where the network itself was a pool of
> hostdevs.
>
> The symptom in both cases was this error message:
>
> internal error: Unable to determine device index for network device
>
> ---
> src/qemu/qemu_command.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index ba102f4..e976466 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -817,7 +817,8 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx)
> for (i = 0; i < def->nnets; i++) {
> int thisidx;
>
> - if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
> + if (virDomainNetGetActualType(def->nets[i])
> + == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131003/f9feaec8/attachment-0001.sig>
More information about the libvir-list
mailing list