virt-v2v-input-xen(1)

πŸ’– virt-v2v-input-xen πŸ’–

okay bestie, so this is the page about the virt-v2v-input-xen manual β€” it lives in section 1 (that's your general commands section, iykyk). We're talking Virtualization Support up in here, and it's all about yeeting guests off Xen and converting them. Let's go πŸ¦‹


✨ NAME ✨

virt-v2v-input-xen β€” using virt-v2v to convert guests from Xen


🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

This page is literally your step-by-step on how to use virt-v2v(1) to convert guests from RHEL 5 Xen, or from SLES and OpenSUSE Xen hosts. That's it, that's the vibe. πŸŽ€


πŸ‘‘ INPUT FROM XEN πŸ‘‘

πŸ” SSH authentication

You can do SSH password authentication β€” just hand over the name of a file that contains the password to the -ip option. ⚠️ Heads up though: this option does not take the password directly, it takes a filename. Rude, I know. You might also need to tweak /etc/ssh/sshd_config on the Xen server so it says PasswordAuthentication yes.

If password auth isn't your thing, the alternative is ssh-agent: add your ssh public key to /root/.ssh/authorized_keys (on the Xen host, bestie, not your machine). Then check that passwordless access actually works from the virt-v2v server over to the Xen host. Like so:

 $ ssh root@xen.example.com
 [ logs straight into the shell, no password is requested ]
🚨 Lowkey important: support for non-interactive authentication via the -ip option is incomplete. Some operations are still out here requiring the user to type the password in manually. So ssh-agent is recommended over the -ip option. See https://bugzilla.redhat.com/1854275.

With some modern ssh implementations, the legacy crypto algorithms you need to interoperate with RHEL 5 sshd are disabled. To turn them back on, you may need to add this Host stanza to your ~/.ssh/config:

 Host xen.example.com
   KexAlgorithms            +diffie-hellman-group14-sha1
   MACs                     +hmac-sha1
   HostKeyAlgorithms        +ssh-rsa
   PubkeyAcceptedKeyTypes   +ssh-rsa
   PubkeyAcceptedAlgorithms +ssh-rsa

(PubkeyAcceptedKeyTypes and PubkeyAcceptedAlgorithms have identical meaning β€” the former is the old option name, the latter is the new one. virt-v2v uses both libssh and ssh when converting a guest from Xen, and on some operating systems, libssh and ssh may not both accept the same option variant. Messy? Yes. Iconic? Also yes. πŸ’€)

When you're connecting to RHEL 5 sshd from RHEL 9, the SHA1 algorithm's use in signatures has to be re-enabled at the OpenSSL level on top of all that SSH config above. So make a file called $HOME/openssl-sha1.cnf with exactly this in it:

 .include /etc/ssl/openssl.cnf
 [openssl_init]
 alg_section = evp_properties
 [evp_properties]
 rh-allow-sha1-signatures = yes

and then export this variable into the environment of the virt-v2v process:

 OPENSSL_CONF=$HOME/openssl-sha1.cnf
🫢 Note that the OPENSSL_CONF environment variable will only take effect if the libvirt client library used by virt-v2v is at least version 8.6.0. No 8.6.0, no vibes.

🧚 Test libvirt connection to remote Xen host

Use the virsh(1) command to list the guests on the remote Xen host:

 $ virsh -c xen+ssh://root@xen.example.com list --all
  Id    Name                           State
 ----------------------------------------------------
  0     Domain-0                       running
  -     rhel49-x86_64-pv               shut off

You should also try dumping the metadata from any guest on your server, like this:

 $ virsh -c xen+ssh://root@xen.example.com dumpxml rhel49-x86_64-pv
 <domain type='xen'>
   <name>rhel49-x86_64-pv</name>
   [...]
 </domain>

If the above commands do not work, then virt-v2v is not going to work either. Fr fr. Fix your libvirt configuration or the remote server before continuing. πŸ›‘

If the guest disks are located on a host block device, then the conversion will fail. See "Xen or ssh conversions from block devices" below for a workaround. ⬇️


πŸ“ Importing a guest

To import a particular guest from a Xen server, do:

 $ virt-v2v -ic 'xen+ssh://root@xen.example.com' \
           rhel49-x86_64-pv \
           -o local -os /var/tmp

where rhel49-x86_64-pv is the name of the guest β€” and it must be shut down, okay? No sneaky running guests. πŸ™ˆ

In this case the output flags are set to write the converted guest to a temporary directory, because this is just an example. But bestie, you can also write to libvirt or any other supported target. Your call, main character. ✨


🌈 Xen or ssh conversions from block devices

Currently virt-v2v cannot directly access a Xen guest (or any guest located remotely over ssh) if that guest's disks are located on host block devices. That's just the situation right now. 😭

To tell if a Xen guest uses host block devices, look at the guest XML. You will see:

   <disk type='block' device='disk'>
     ...
     <source dev='/dev/VG/guest'/>

where type='block', source dev= and /dev/... are all indications that the disk is located on a host block device. Three red flags, three hints, one blocked conversion. πŸ’€

This happens because the qemu ssh block driver that we use to access remote disks uses the ssh sftp protocol, and this protocol cannot correctly detect the size of host block devices. Not its fault, it's just built different (wrongly).

The workaround is to:

  1. copy the block device from the remote Xen server to a regular local file,
  2. copy the libvirt guest XML,
  3. adjust the disk element to point to the local file,
  4. and use -i libvirtxml mode instead.

Boom, unlocked. πŸ—οΈ


πŸ’œ SEE ALSO πŸ’œ

virt-v2v(1).


⭐ AUTHOR ⭐

Richard W.M. Jones


Copyright (C) 2009-2025 Red Hat Inc.


🌟 LICENSE 🌟

okay so legally speaking, here's the whole thing, no skips:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


πŸ¦‹ BUGS πŸ¦‹

To get a list of bugs against libguestfs, use this link:

https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools

To report a new bug against libguestfs, use this link:

https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools

When reporting a bug, please supply:

  • The version of libguestfs.
  • Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
  • Describe the bug accurately and give a way to reproduce it.
  • Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.
🫢 Don't be shy with the details bestie, the more info the faster it gets fixed. Slay.

and that's the whole page!! ✨ this was virt-v2v-input-xen(1) from virt-v2v-2.12.0, dated 2026-07-10. go convert something gorgeous, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from