← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1304107] Re: Libvirt error launching instance - Device 'virtio-net-pci' could not be initialized

 

Ok that log is interesting as it shows that Ubuntu have re-named the
QEMU machine types

 ...  -machine trusty,accel=tcg,usb=off ...

See 'trusty' is the machine type there instead of the more usual "pc-
i440fx-1.6"

This unfortunately breaks the ability of libvirt to figure out what type
of base board is used by the VM - it can't distinguish i440fx from q35.
I'm guessing Ubuntu was probably inspired by the fact that we did a
similar thing in RHEL-6, replacing 'pc' with 'rhel-6.1.0'.

The recommendation for distros who want to customize the machine types
without breaking libvirt is to *not* replace the entire machine type
name, but instead to just replace the upstream version number with a
distro specific suffix.

eg  change 'pc-i440fx-1.6' to be 'pc-i440fx-trusty'.  That way libvirt
can still see that this is an i440fx machine type and do the right thing
with PCI address validation.

As a reference point, RHEL7 does this correctly now too, using  'pc-
i440fx-rhel7.0.0' as machine type name.

Unfortunately there's nothing OpenStack Nova can do to workaround this.
Either Ubuntu have to change their QEMU machine type name as
illustrated, to maintain the right prefix, or they'll have to hack their
libvirt build to cope with the bare name 'trusty' :-(

** Also affects: qemu (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1304107

Title:
  Libvirt error launching instance - Device 'virtio-net-pci' could not
  be initialized

Status in OpenStack Compute (Nova):
  Invalid
Status in “qemu” package in Ubuntu:
  New

Bug description:
  I'm developing the installation guide for Icehouse. In this particular
  case, I'm installing and testing RC1 on Ubuntu 12.04 with nova
  networking. All nodes in this environment run as VMs and the nova-
  compute service uses QEMU due to hardware limitations with nested VMs.
  Attempting to launch an instance generates the following error (full
  traceback attached):

  2014-04-07 17:50:52.235 1220 TRACE nova.compute.manager [instance: 4574ce1a-e81f-4bfc-a079-b45c2a1f31ae] libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:50:c4:59,bus=pci.0,addr=0x1: PCI: slot 1 function 0 not available for virtio-net-pci, in use by PIIX3
  2014-04-07 17:50:52.235 1220 TRACE nova.compute.manager [instance: 4574ce1a-e81f-4bfc-a079-b45c2a1f31ae] qemu-system-x86_64: -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:50:c4:59,bus=pci.0,addr=0x1: Device initialization failed.
  2014-04-07 17:50:52.235 1220 TRACE nova.compute.manager [instance: 4574ce1a-e81f-4bfc-a079-b45c2a1f31ae] qemu-system-x86_64: -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:50:c4:59,bus=pci.0,addr=0x1: Device 'virtio-net-pci' could not be initialized

  Package version information:

  nova-compute: :2014.1~rc1-0ubuntu1~cloud0
  nova-network: :2014.1~rc1-0ubuntu1~cloud0
  libvirt-bin: 1.2.2-0ubuntu7~cloud0

  Command output:

  $ nova service-list
  +------------------+------------+----------+---------+-------+----------------------------+-----------------+
  | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
  +------------------+------------+----------+---------+-------+----------------------------+-----------------+
  | nova-cert        | hst-osctl5 | internal | enabled | up    | 2014-04-08T00:33:15.000000 | -               |
  | nova-consoleauth | hst-osctl5 | internal | enabled | up    | 2014-04-08T00:33:19.000000 | -               |
  | nova-scheduler   | hst-osctl5 | internal | enabled | up    | 2014-04-08T00:33:13.000000 | -               |
  | nova-conductor   | hst-osctl5 | internal | enabled | up    | 2014-04-08T00:33:16.000000 | -               |
  | nova-compute     | hst-oscpu5 | nova     | enabled | up    | 2014-04-08T00:33:15.000000 | -               |
  | nova-network     | hst-oscpu5 | internal | enabled | up    | 2014-04-08T00:33:13.000000 | -               |
  +------------------+------------+----------+---------+-------+----------------------------+-----------------+

  $ nova net-list
  +--------------------------------------+----------+------------------+
  | ID                                   | Label    | CIDR             |
  +--------------------------------------+----------+------------------+
  | 7f849be3-4494-495a-95a1-0f99ccb884c4 | demo-net | 172.24.246.24/29 |
  +--------------------------------------+----------+------------------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1304107/+subscriptions


References