1virt-v2v-input-xen(1)       Virtualization Support       virt-v2v-input-xen(1)
2
3
4

NAME

6       virt-v2v-input-xen - Using virt-v2v to convert guests from Xen
7

SYNOPSIS

9        virt-v2v -ic 'xen+ssh://root@xen.example.com'
10                 -ip passwordfile
11                 GUEST_NAME [-o* options]
12

DESCRIPTION

14       This page documents how to use virt-v2v(1) to convert guests from RHEL
15       5 Xen, or SLES and OpenSUSE Xen hosts.
16

INPUT FROM XEN

18   SSH authentication
19       You can use SSH password authentication, by supplying the name of a
20       file containing the password to the -ip option (note this option does
21       not take the password directly).  You may need to adjust
22       /etc/ssh/sshd_config on the Xen server to set "PasswordAuthentication
23       yes".
24
25       If you are not using password authentication, an alternative is to use
26       ssh-agent, and add your ssh public key to /root/.ssh/authorized_keys
27       (on the Xen host).  After doing this, you should check that
28       passwordless access works from the virt-v2v server to the Xen host.
29       For example:
30
31        $ ssh root@xen.example.com
32        [ logs straight into the shell, no password is requested ]
33
34       Note that support for non-interactive authentication via the -ip option
35       is incomplete.  Some operations remain that still require the user to
36       enter the password manually.  Therefore ssh-agent is recommended over
37       the -ip option.  See https://bugzilla.redhat.com/1854275.
38
39       With some modern ssh implementations, legacy crypto algorithms required
40       to interoperate with RHEL 5 sshd are disabled.  To enable them, you may
41       need to add the following "Host" stanza to your ~/.ssh/config:
42
43        Host xen.example.com
44          KexAlgorithms            +diffie-hellman-group14-sha1
45          MACs                     +hmac-sha1
46          HostKeyAlgorithms        +ssh-rsa
47          PubkeyAcceptedKeyTypes   +ssh-rsa
48          PubkeyAcceptedAlgorithms +ssh-rsa
49
50       ("PubkeyAcceptedKeyTypes" and "PubkeyAcceptedAlgorithms" have identical
51       meaning; the former is the old option name, the latter is the new one.
52       Virt-v2v uses both "libssh" and "ssh" when converting a guest from Xen,
53       and on some operating systems, "libssh" and "ssh" may not both accept
54       the same option variant.)
55
56       When connecting to RHEL 5 sshd from RHEL 9, the SHA1 algorithm's use in
57       signatures has to be re-enabled at the OpenSSL level, in addition to
58       the above SSH configuration.  Create a file called
59       $HOME/openssl-sha1.cnf with the following contents:
60
61        .include /etc/ssl/openssl.cnf
62        [openssl_init]
63        alg_section = evp_properties
64        [evp_properties]
65        rh-allow-sha1-signatures = yes
66
67       and export the following variable into the environment of the
68       "virt-v2v" process:
69
70        OPENSSL_CONF=$HOME/openssl-sha1.cnf
71
72       Note that the "OPENSSL_CONF" environment variable will only take effect
73       if the libvirt client library used by virt-v2v is at least version
74       8.6.0.
75
76   Test libvirt connection to remote Xen host
77       Use the virsh(1) command to list the guests on the remote Xen host:
78
79        $ virsh -c xen+ssh://root@xen.example.com list --all
80         Id    Name                           State
81        ----------------------------------------------------
82         0     Domain-0                       running
83         -     rhel49-x86_64-pv               shut off
84
85       You should also try dumping the metadata from any guest on your server,
86       like this:
87
88        $ virsh -c xen+ssh://root@xen.example.com dumpxml rhel49-x86_64-pv
89        <domain type='xen'>
90          <name>rhel49-x86_64-pv</name>
91          [...]
92        </domain>
93
94       If the above commands do not work, then virt-v2v is not going to work
95       either.  Fix your libvirt configuration or the remote server before
96       continuing.
97
98       If the guest disks are located on a host block device, then the
99       conversion will fail.  See "Xen or ssh conversions from block devices"
100       below for a workaround.
101
102   Importing a guest
103       To import a particular guest from a Xen server, do:
104
105        $ virt-v2v -ic 'xen+ssh://root@xen.example.com' \
106                  rhel49-x86_64-pv \
107                  -o local -os /var/tmp
108
109       where "rhel49-x86_64-pv" is the name of the guest (which must be shut
110       down).
111
112       In this case the output flags are set to write the converted guest to a
113       temporary directory as this is just an example, but you can also write
114       to libvirt or any other supported target.
115
116   Xen or ssh conversions from block devices
117       Currently virt-v2v cannot directly access a Xen guest (or any guest
118       located remotely over ssh) if that guest’s disks are located on host
119       block devices.
120
121       To tell if a Xen guest uses host block devices, look at the guest XML.
122       You will see:
123
124         <disk type='block' device='disk'>
125           ...
126           <source dev='/dev/VG/guest'/>
127
128       where "type='block'", "source dev=" and "/dev/..." are all indications
129       that the disk is located on a host block device.
130
131       This happens because the qemu ssh block driver that we use to access
132       remote disks uses the ssh sftp protocol, and this protocol cannot
133       correctly detect the size of host block devices.
134
135       The workaround is to copy the block device from the remote Xen server
136       to a regular local file, copy the libvirt guest XML, adjust the "disk"
137       element to point to the local file, and use "-i libvirtxml" mode
138       instead.
139

SEE ALSO

141       virt-v2v(1).
142

AUTHOR

144       Richard W.M. Jones
145
147       Copyright (C) 2009-2020 Red Hat Inc.
148

LICENSE

150       This program is free software; you can redistribute it and/or modify it
151       under the terms of the GNU General Public License as published by the
152       Free Software Foundation; either version 2 of the License, or (at your
153       option) any later version.
154
155       This program is distributed in the hope that it will be useful, but
156       WITHOUT ANY WARRANTY; without even the implied warranty of
157       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
158       General Public License for more details.
159
160       You should have received a copy of the GNU General Public License along
161       with this program; if not, write to the Free Software Foundation, Inc.,
162       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
163

BUGS

165       To get a list of bugs against libguestfs, use this link:
166       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
167
168       To report a new bug against libguestfs, use this link:
169       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
170
171       When reporting a bug, please supply:
172
173       •   The version of libguestfs.
174
175       •   Where you got libguestfs (eg. which Linux distro, compiled from
176           source, etc)
177
178       •   Describe the bug accurately and give a way to reproduce it.
179
180       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
181           into the bug report.
182
183
184
185virt-v2v-2.2.0                    2023-01-10             virt-v2v-input-xen(1)
Impressum