Sorry, I didn't see this email yesterday.
On Sun, Dec 11, 2016 at 11:25:12AM +0200, Shahar Havivi wrote:
Hey,
I am getting this error after using virt-v2v-copy-to-local and trying to
run:
$ virt-v2v -i libvirtxml rhel7.xml -o local -os /var/tmp -of raw
I try to set:
export LIBGUESTFS_BACKEND_SETTINGS=virbr0=ovirtmgmt
The syntax is wrong, it should be:
export LIBGUESTFS_BACKEND_SETTINGS=network_bridge=ovirtmgmt
or whatever bridge you want to use, and you do have to enable it in
/etc/qemu/bridge.conf so that we can use qemu-bridge-helper.
with no success and the file /etc/qemu/bridge.conf contains:
allow virbr0
it only worked after creating the bridge, is there other way to import
without creating the bridge?
The larger question is why does virt-v2v need a bridge. That's
because it calls guestfs_set_network (g, 1):
http://libguestfs.org/guestfs.3.html#guestfs_set_network
and that causes the libvirt driver to add a network interface to the
guest:
https://github.com/libguestfs/libguestfs/blob/master/src/launch-libvirt.c...
So you can get around this using LIBGUESTFS_BACKEND=direct which uses
an entirely different form of networking (SLIRP / qemu user net).
But why does virt-v2v call set_network? One reason is that old
virt-v2v called it. Old virt-v2v tried to download and install
kernels, but new virt-v2v doesn't do that. Does new virt-v2v really
need to call set_network? I'm actually not at all sure it does.
Maybe the following patch should be added?
Rich.
From 0f23f89c3f67af91c9f7c96a0ea4f1539037419e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones(a)redhat.com>
Date: Mon, 12 Dec 2016 19:28:35 +0000
Subject: [PATCH] v2v: Don't enable the network.
This was required by old virt-v2v, but probably not by new virt-v2v.
Thanks: Shahar Havivi.
---
v2v/v2v.ml | 1 -
1 file changed, 1 deletion(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index d94a704..55c32ed 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -76,7 +76,6 @@ let rec main () =
let g = open_guestfs ~identifier:"v2v" () in
g#set_memsize (g#get_memsize () * 8 / 5);
- g#set_network true;
(match conversion_mode with
| Copying (overlays, _) -> populate_overlays g overlays
| In_place -> populate_disks g source.s_disks
--
2.10.2
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v