Virtio devices from libvirt

Bug #218574 reported by Soren Hansen on 2008-04-17
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager
Won't Fix
Medium
libvirt (Ubuntu)
Critical
Unassigned
Declined for Hardy by Dustin Kirkland 
virt-manager (Ubuntu)
High
Unassigned
Declined for Hardy by Dustin Kirkland 
virtinst (Ubuntu)
High
Jamie Strandboge
Declined for Hardy by Dustin Kirkland 

Bug Description

The current libvirt package in Ubuntu has no means for telling kvm to use virtio block and network devices. The 0.4.0-2ubuntu8 in the unapproved queue fixes this.

Furthermore, virt-manager and python-virtinst are missing the glue to get this done, too.

Related branches

Soren Hansen (soren) on 2008-04-17
Changed in libvirt:
importance: Undecided → Critical
status: New → Fix Committed
Changed in virtinst:
importance: Undecided → High
status: New → In Progress
Changed in virt-manager:
importance: Undecided → High
status: New → In Progress
Changed in libvirt:
milestone: none → ubuntu-8.04
Changed in virtinst:
milestone: none → ubuntu-8.04
Changed in virt-manager:
milestone: none → ubuntu-8.04
alex hardy (xstation108) wrote :

see luke's bug submitted at 17.03gmt 17-04-08 you may fix this

Jamie Strandboge (jdstrand) wrote :

Here is a patch for virtinst to use virtio when a Linux/Ubuntu Hardy guest is created.

Changed in virtinst:
assignee: nobody → jamie-strandboge
Changed in virt-manager:
assignee: nobody → jamie-strandboge
Jamie Strandboge (jdstrand) wrote :

Here is a patch for virt-manager to use virtio when a Linux/Ubuntu Hardy guest is created.

Jamie Strandboge (jdstrand) wrote :

These debdiffs were verified by:

1. creating a Generic/Generic vm-- no virtio
2. creating a Linux/non-Hardy vm -- no virtio
3. creating a Linux/Ubuntu Hardy vm with no acceleration -- no virtio
4. creating a Linux/Ubutnu Hardy vm with acceleration -- has virtio

These patches do not address changing an existing vm's configuration. They only cover adding new virtual machines.

Steve Langasek (vorlon) wrote :

The 0.4.0-2ubuntu8 version of libvirt has been accepted into hardy, so I believe the libvirt part of this is now fixed.

Changed in libvirt:
status: Fix Committed → Fix Released
Soren Hansen (soren) wrote :

Virtinst has been taught to enable this for os variants that support it. We've enabled virtio-net for ubuntu hardy.

Changed in virtinst:
status: In Progress → Fix Released
Soren Hansen (soren) wrote :

virt-manager has been taught to use the settings from virtinst.

Changed in virt-manager:
status: In Progress → Fix Released
Fastguy (erenoglu) wrote :

Hi,

I use Hardy 8.04 up-to-date system. However, I don't see any virtio option within the Virt-Manager GUI when creating a guest VM.

What should I do to have it? My guest is not Ubuntu, but I know that it has virtio modules built-in in its 2.6.24 kernel, just as Ubuntu.

Thanks,

Emre

Yves Glodt (yglodt) wrote :

Any news about this? Will it be available as an update in Hardy?

Richard Laager (rlaager) wrote :

The request here is for an option to change existing VMs to use virtio. This is useful in a number of cases. One non-Linux-guest example would be if you want install the paravirtual network drives on Windows. You need to tell KVM to use virtio, but that wouldn't be a sane default for Windows because it doesn't ship those drivers out of the box.

Changed in virt-manager:
status: Fix Released → Confirmed

In order to allow creating a guest with virtio devices, we need support in
virtinst such that the guest xml goes from e.g.

    <disk type='file' device='disk'>
      <source file='...'/>
      <target dev='hda'/>
    </disk>

    <interface type='bridge'>
      <source bridge='...'/>
      <mac address='...'/>
    </interface>

to:

    <disk type='file' device='disk'>
      <source file='...'/>
      <target dev='vda' bus='virtio'/>
    </disk>

    <interface type='bridge'>
      <source bridge='...'/>
      <mac address='...'/>
      <model type='virtio'/>
    </interface>

The choice of device type shouldn't be exposed to the user - we should
auto-select the most appropriate choice based on the OS type / variant details.
eg, Fedora 10, or Ubuntu Hardy Heron shoudl automatically get given a virtio
network, FreeBSD can be given ne2k NIC (iirc it has problems with rtl8139) and
everything else can default to rtl8139.

See ubuntu's patches at:

  https://bugs.launchpad.net/ubuntu/+source/virtinst/+bug/218574

General idea is that OS_TYPES is modified so that for e.g. F9 and later we'd
know to use virtio

Okay I have this working at the moment, and hopefully a more general infrastructure for adding device defaults in the future.

Couple questions:
 1) F9 supports virtio? Both disk and net?
 2) At least on my F9 box, using virtio networking and pxe throws an error:
    "No valid PXE rom found for network device"
    Known limitation? Just trying to determine if I should put a special
    case in virtinst for this.

Thanks

(In reply to comment #3)
> Okay I have this working at the moment, and hopefully a more general
> infrastructure for adding device defaults in the future.
>
> Couple questions:
> 1) F9 supports virtio? Both disk and net?

Yep.

> 2) At least on my F9 box, using virtio networking and pxe throws an error:
> "No valid PXE rom found for network device"
> Known limitation? Just trying to determine if I should put a special
> case in virtinst for this.

Yeah, I think PXE support is a recent addition on the *host* side. Haven't tried it myself.

Just passing qemu-kvm a kernel/initrd on the command line works fine with virtio.

Okay, I've added this in upstream:

  f9 and f10 use virtio for disk and net devices
  ubuntu hardy uses it for just net (there's a note about
    lack disk virtio issues in their changelog)
  virtio is skipped for the first network device if using
    pxe. This is at least neccessary for f9, i'll test to
    see if virtio + pxe bombs on rawhide.

Couple related fixes as well:

  virt-install doesn't require both an os type and variant
    specified now, just a variant is sufficient. So to
    test this, only --os-variant fedora9 is needed.
  freebsd6/7 now defaults to using ne2k, as dan mentioned
  openbsd defaults to pcnet, which was mentioned on
    et-mgmt-tools a while back and some openbsd wiki
    pages I found.

Setting this to POST (or should I just close this since
Virtualization is for upstream bugs?)

I'm closing this since it is fixed upstream.

Changed in virt-manager:
status: Unknown → Invalid
Changed in virt-manager:
assignee: jdstrand → nobody
Changed in virt-manager:
status: Invalid → Fix Released
Dustin Kirkland  (kirkland) wrote :

This bug should be fixed in the kvm-84 package in hardy-backports. If this issue is still critical for you, you might try upgrading to that package.

:-Dustin

guyver.nkama (guyver-nkama) wrote :

root@ubuser:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.3 LTS
Release: 8.04
Codename: hardy

I try use virtio in bridge.

    <interface type='bridge'>
      <mac address='00:xx:xx:xx:xx:xx'/>
      <source bridge='br0'/>
      <model type='virtio'/>
    </interface>

But

 /etc/init.d/libvirt-bin start
 * Starting libvirt management daemon libvirtd libvir: QEMU error : QEMU quit during monitor startup
Shutting down VM 'win2k'Failed to autostart VM 'win2k': QEMU quit during monitor startup

guyver.nkama (guyver-nkama) wrote :

 cat win2k.log
/usr/bin/qemu -M pc -no-kqemu -m 500 -smp 1 -nographic -monitor pty -localtime -no-acpi -boot c -hda /home/win2k -net nic,macaddr=00:16:3e:28:84:97,vlan=0,model=virtio -net tap,fd=10,script=,vlan=0 -usb
char device redirected to /dev/pts/1
qemu: Unsupported NIC: virtio

Soren Hansen (soren) wrote :

This bug (making VM's use the virtio settings from virtinst) was fixed ages ago. If there are other issues, please file different bugs.

Changed in virt-manager (Ubuntu):
status: Confirmed → Fix Released

It appears that this bug has resurfaced.

ii kvm 1:84+dfsg-0ubuntu12.4~hardy1 Full virtualization on i386 and amd64 hardware
ii libvirt0 0.6.1-0ubuntu5.1~hardy1 library for interfacing with different virtualization systems

Nevermind...it appears to be wrong settings in xml file. Nothing set for kvm in the config.

Changed in virt-manager:
importance: Unknown → Medium
status: Fix Released → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.