1virt-v2v-input-xen(1) Virtualization Support virt-v2v-input-xen(1)
2
3
4
6 virt-v2v-input-xen - Using virt-v2v to convert guests from Xen
7
9 export LIBGUESTFS_BACKEND=direct
10 virt-v2v -ic 'xen+ssh://root@xen.example.com' GUEST_NAME [-o* options]
11
13 This page documents how to use virt-v2v(1) to convert guests from RHEL
14 5 Xen, or SLES and OpenSUSE Xen hosts.
15
17 Set up ssh-agent access to Xen host
18 Currently you must enable passwordless SSH access to the remote Xen
19 host from the virt-v2v conversion server.
20
21 You must also use ssh-agent, and add your ssh public key to
22 /root/.ssh/authorized_keys (on the Xen host).
23
24 After doing this, you should check that passwordless access works from
25 the virt-v2v server to the Xen host. For example:
26
27 $ ssh root@xen.example.com
28 [ logs straight into the shell, no password is requested ]
29
30 Note that password-interactive and Kerberos access are not supported.
31 You have to set up ssh access using ssh-agent and authorized_keys.
32
33 With some modern ssh implementations, legacy crypto policies required
34 to interoperate with RHEL 5 sshd are disabled. To enable them you may
35 need to run this command on the conversion server (ie. ssh client), but
36 read update-crypto-policies(8) first:
37
38 # update-crypto-policies LEGACY
39
40 Test libvirt connection to remote Xen host
41 Use the virsh(1) command to list the guests on the remote Xen host:
42
43 $ virsh -c xen+ssh://root@xen.example.com list --all
44 Id Name State
45 ----------------------------------------------------
46 0 Domain-0 running
47 - rhel49-x86_64-pv shut off
48
49 You should also try dumping the metadata from any guest on your server,
50 like this:
51
52 $ virsh -c xen+ssh://root@xen.example.com dumpxml rhel49-x86_64-pv
53 <domain type='xen'>
54 <name>rhel49-x86_64-pv</name>
55 [...]
56 </domain>
57
58 If the above commands do not work, then virt-v2v is not going to work
59 either. Fix your libvirt configuration or the remote server before
60 continuing.
61
62 If the guest disks are located on a host block device, then the
63 conversion will fail. See "Xen or ssh conversions from block devices"
64 below for a workaround.
65
66 Importing a guest
67 To import a particular guest from a Xen server, do:
68
69 $ LIBGUESTFS_BACKEND=direct \
70 virt-v2v -ic 'xen+ssh://root@xen.example.com' \
71 rhel49-x86_64-pv \
72 -o local -os /var/tmp
73
74 where "rhel49-x86_64-pv" is the name of the guest (which must be shut
75 down).
76
77 In this case the output flags are set to write the converted guest to a
78 temporary directory as this is just an example, but you can also write
79 to libvirt or any other supported target.
80
81 Setting the backend to "direct" is a temporary workaround until libvirt
82 bug 1140166 is fixed.
83
84 Xen or ssh conversions from block devices
85 Currently virt-v2v cannot directly access a Xen guest (or any guest
86 located remotely over ssh) if that guest’s disks are located on host
87 block devices.
88
89 To tell if a Xen guest uses host block devices, look at the guest XML.
90 You will see:
91
92 <disk type='block' device='disk'>
93 ...
94 <source dev='/dev/VG/guest'/>
95
96 where "type='block'", "source dev=" and "/dev/..." are all indications
97 that the disk is located on a host block device.
98
99 This happens because the qemu ssh block driver that we use to access
100 remote disks uses the ssh sftp protocol, and this protocol cannot
101 correctly detect the size of host block devices.
102
103 The workaround is to copy the guest over to the conversion server,
104 using the separate virt-v2v-copy-to-local(1) tool, followed by running
105 virt-v2v. You will need sufficient space on the conversion server to
106 store a full copy of the guest.
107
108 virt-v2v-copy-to-local -ic xen+ssh://root@xen.example.com guest
109 virt-v2v -i libvirtxml guest.xml -o local -os /var/tmp
110 rm guest.xml guest-disk*
111
113 virt-v2v(1).
114
116 Richard W.M. Jones
117
119 Copyright (C) 2009-2019 Red Hat Inc.
120
122 This program is free software; you can redistribute it and/or modify it
123 under the terms of the GNU General Public License as published by the
124 Free Software Foundation; either version 2 of the License, or (at your
125 option) any later version.
126
127 This program is distributed in the hope that it will be useful, but
128 WITHOUT ANY WARRANTY; without even the implied warranty of
129 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
130 General Public License for more details.
131
132 You should have received a copy of the GNU General Public License along
133 with this program; if not, write to the Free Software Foundation, Inc.,
134 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
135
137 To get a list of bugs against libguestfs, use this link:
138 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
139
140 To report a new bug against libguestfs, use this link:
141 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
142
143 When reporting a bug, please supply:
144
145 · The version of libguestfs.
146
147 · Where you got libguestfs (eg. which Linux distro, compiled from
148 source, etc)
149
150 · Describe the bug accurately and give a way to reproduce it.
151
152 · Run libguestfs-test-tool(1) and paste the complete, unedited output
153 into the bug report.
154
155
156
157libguestfs-1.40.2 2019-02-07 virt-v2v-input-xen(1)