[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] virtio is enabled by default in libguestfs?



On Thu, Apr 22, 2010 at 11:07:17AM -0400, Yufang Zhang wrote:
> Could I ask if and from which version that virtio is enabled by
> default in libguestfs? It seems that it is enabled by default in
> fedora-12, on which the latest version of libguestfs is 1.0.85.

Assuming you mean virtio block devices (not network), then the default
was changed from ide to virtio in this commit:

http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=6c97a65ce768b357a1481cde0533d4cf0b8b931c

The first release containing this change was 1.0.84.

However, it's a little bit more complicated than that.  Packagers can
choose whether or not to enable virtio at configure time:

  ./configure --with-drive-if=(ide|virtio|scsi)

So it's possible that a particular RPM with version >= 1.0.84 might
still be using IDE.

In fact it's even a bit more complicated than that.  It's also
possible to override this *at runtime*.  I believe for some reason
virt-v2v does this, forcing the IDE driver always.

The only way to find out what block device is really being used is to
run verbose (LIBGUESTFS_DEBUG=1) and look at the parameters passed to
qemu, eg:

  [...]
  /usr/bin/qemu-kvm \
      -drive file=/tmp/test,cache=off,if=virtio \
  [...]

                                         ^^^^^^
                             means using virtio-blk

BTW it *should* make no difference which driver is being used,
although in reality different bugs in QEMU and the kernel can end up
biting you in different ways.

> But
> for fedora-11(the latest version of libguestfs is 1.0.72), I could
> enable virtio only when I set it explicitly via config command. Thus
> it is not enabled by default on fedora-11. So I'd like to know on
> which situation virtio will be enabled automatically by libguestfs?

Don't use Fedora 11 or libguestfs 1.0.72.  Those versions are ancient :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]