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'
11 -ip passwordfile
12 GUEST_NAME [-o* options]
13
15 This page documents how to use virt-v2v(1) to convert guests from RHEL
16 5 Xen, or SLES and OpenSUSE Xen hosts.
17
19 SSH authentication
20 You can use SSH password authentication, by supplying the name of a
21 file containing the password to the -ip option (note this option does
22 not take the password directly).
23
24 If you are not using password authentication, an alternative is to use
25 ssh-agent, and add your ssh public key to /root/.ssh/authorized_keys
26 (on the Xen host). After doing this, you should check that
27 passwordless access works from the virt-v2v server to the Xen host.
28 For example:
29
30 $ ssh root@xen.example.com
31 [ logs straight into the shell, no password is requested ]
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 --set 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
104 virt-v2v(1).
105
107 Richard W.M. Jones
108
110 Copyright (C) 2009-2020 Red Hat Inc.
111
113 This program is free software; you can redistribute it and/or modify it
114 under the terms of the GNU General Public License as published by the
115 Free Software Foundation; either version 2 of the License, or (at your
116 option) any later version.
117
118 This program is distributed in the hope that it will be useful, but
119 WITHOUT ANY WARRANTY; without even the implied warranty of
120 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
121 General Public License for more details.
122
123 You should have received a copy of the GNU General Public License along
124 with this program; if not, write to the Free Software Foundation, Inc.,
125 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
126
128 To get a list of bugs against libguestfs, use this link:
129 https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
130
131 To report a new bug against libguestfs, use this link:
132 https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
133
134 When reporting a bug, please supply:
135
136 • The version of libguestfs.
137
138 • Where you got libguestfs (eg. which Linux distro, compiled from
139 source, etc)
140
141 • Describe the bug accurately and give a way to reproduce it.
142
143 • Run libguestfs-test-tool(1) and paste the complete, unedited output
144 into the bug report.
145
146
147
148virt-v2v-1.45.91 2021-11-23 virt-v2v-input-xen(1)