{"id":309,"date":"2026-09-05T19:15:39","date_gmt":"2026-09-05T22:15:39","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2026\/09\/ova2xva\/"},"modified":"2026-09-08T11:40:31","modified_gmt":"2026-09-08T14:40:31","slug":"ova2xva","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/ova2xva\/","title":{"rendered":"ova2xva: migrate VMs from VMware\/VirtualBox to XCP-ng with one command"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro convertendo um pacote OVA em XVA para importar no XCP-ng\" src=\"\/wp-content\/uploads\/2026\/09\/ova2xva-v4.webp\" width=\"1486\" height=\"856\" \/><\/p>\n<p>Moving a VM from <a href=\"\/en\/2026\/09\/a-historia-do-virtualbox\/\">VirtualBox<\/a> or VMware to <a href=\"\/en\/2026\/09\/a-historia-do-xcp\/\">XCP-ng<\/a> (or <a href=\"\/en\/2026\/09\/a-historia-do-xenserver\/\">XenServer<\/a>) usually turns into a ritual: export OVA, convert the disk manually, wrestle with <code data-no-translation=\"\">xe<\/code>. The <strong>ova2xva<\/strong> is a CLI in <strong>Go<\/strong> (MIT) that handles both directions in a single binary \u2014 it converts OVA or a standalone disk to XVA, validates it, imports it via XAPI and, if needed, returns a portable OVA. Without the <code data-no-translation=\"\">xe<\/code> binary in the process.<\/p>\n<p>The code and releases are at <a href=\"https:\/\/github.com\/jniltinho\/ova2xva\">github.com\/jniltinho\/ova2xva<\/a>. The current version of the official binaries is <strong>v0.4.0<\/strong> (August 1\u00ba, 2026).<\/p>\n<h2>What it does<\/h2>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Function<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code data-no-translation=\"\">convert<\/code><\/td>\n<td>OVA or standalone disk (<code data-no-translation=\"\">.vmdk<\/code>, <code data-no-translation=\"\">.qcow2<\/code>, <code data-no-translation=\"\">.vhdx<\/code>\u2026) \u2192 <code data-no-translation=\"\">.xva<\/code> (compression <code data-no-translation=\"\">zstd<\/code> by default)<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">to-ova<\/code><\/td>\n<td>The reverse: <code data-no-translation=\"\">.xva<\/code> or disk \u2192 <code data-no-translation=\"\">.ova<\/code> (OVF 1.0 + stream-optimized VMDK + SHA-256 manifest). Requires <code data-no-translation=\"\">qemu-img<\/code><\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">validate<\/code><\/td>\n<td>Checks the structure and SHA1 of <code data-no-translation=\"\">.xva<\/code><\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">import<\/code><\/td>\n<td>Uploads to XCP-ng\/XenServer with <code data-no-translation=\"\">HTTP PUT \/import<\/code> (XAPI) \u2014 without <code data-no-translation=\"\">xe<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>VMDK, QCOW2, and VHDX decoding is <strong>native in Go<\/strong>. The <code data-no-translation=\"\">qemu-img<\/code> is used as a fallback and is <strong>required<\/strong> in <code data-no-translation=\"\">to-ova<\/code> (it generates the VMDK). Classic VHD and VDI also go exclusively through <code data-no-translation=\"\">qemu-img<\/code>; <code data-no-translation=\"\">.raw<\/code>\/<code data-no-translation=\"\">.img<\/code> use direct copying.<\/p>\n<h2>In practice<\/h2>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\"># OVA do VirtualBox\/VMware \u2192 XVA\nova2xva convert -o app.xva --name \"App Server\" app.ova\n\n# Disco solto, sem OVA\nova2xva convert -o app.xva --name \"App Server\" --memory 4096 --vcpus 2 disk.vmdk\n\n# Validar (opcional)\nova2xva validate app.xva\n\n# Importar no XCP-ng e j\u00e1 ligar a VM\nexport OVA2XVA_HOST=xcp.example.com OVA2XVA_USER=root OVA2XVA_PASSWORD='...'\nova2xva import --start app.xva\n\n# O caminho contr\u00e1rio: sair do Xen com um OVA port\u00e1til\nova2xva to-ova -o app.ova app.xva<\/code><\/pre>\n<p>Two details the README makes explicit that save you from surprises:<\/p>\n<ul>\n<li class=\"translation-block\">the output extension of <code>convert<\/code> is <strong>always<\/strong> <code>.xva<\/code> \u2014 <code>-o foo.xva.zst<\/code> becomes <code>foo.xva<\/code>;<\/li>\n<li>the guest disk is expanded to <strong>raw at its virtual size<\/strong> in the working directory. A 5 GB OVA with a 100 GB disk needs ~100 GB of temporary space plus the final XVA.<\/li>\n<\/ul>\n<h2>Installing<\/h2>\n<p>Using the release binary (Linux amd64):<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">curl -LO https:\/\/github.com\/jniltinho\/ova2xva\/releases\/download\/v0.4.0\/ova2xva_0.4.0_linux_amd64.tar.gz\ntar -xzf ova2xva_0.4.0_linux_amd64.tar.gz\nsudo install -m 755 ova2xva \/usr\/local\/bin\/ova2xva\nova2xva version<\/code><\/pre>\n<p>Or building from source \u2014 Go 1.22+ and <code data-no-translation=\"\">qemu-utils<\/code> (the Debian\/Ubuntu package that provides <code data-no-translation=\"\">qemu-img<\/code>):<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt install golang-go qemu-utils\ngit clone https:\/\/github.com\/jniltinho\/ova2xva\ncd ova2xva &amp;&amp; make build    # \u2192 dist\/ova2xva<\/code><\/pre>\n<h2>When to use<\/h2>\n<ul>\n<li><strong>Moving to Xen<\/strong> from a VirtualBox\/VMware OVA or a standalone disk without building a pipeline of <code data-no-translation=\"\">qemu-img<\/code> + <code data-no-translation=\"\">xe vm-import<\/code>;<\/li>\n<li><strong>Moving away from Xen<\/strong> with <code data-no-translation=\"\">to-ova<\/code> for portable backups or to move the VM to another hypervisor;<\/li>\n<li><strong>Importing from any Linux machine<\/strong> with network access to the host \u2014 <code data-no-translation=\"\">import<\/code> speaks XAPI and does not need <code data-no-translation=\"\">xe<\/code> installed on the workstation.<\/li>\n<\/ul>\n<p>It is not a replacement for an orchestration tool like Xen Orchestra. It is a file converter + importer. The broader history of the hypervisor is in <a href=\"\/en\/2026\/09\/a-historia-do-xen\/\">The history of Xen<\/a> and, for KVM on the desktop, in <a href=\"\/en\/2026\/09\/a-historia-do-proxmox\/\">The history of Proxmox<\/a>.<\/p>\n<h2>Bugs and PRs<\/h2>\n<p>The project is MIT-licensed, by <a href=\"https:\/\/github.com\/jniltinho\">Nilton Oliveira<\/a>. Test it with real VMs, open an issue for an edge case and, if you find it useful, leave a star: <a href=\"https:\/\/github.com\/jniltinho\/ova2xva\">github.com\/jniltinho\/ova2xva<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Moving a VM from VirtualBox or VMware to XCP-ng (or XenServer) usually becomes a ritual: export OVA, convert the disk by hand, and wrestle with xe. ova2xva is a Go CLI (MIT) that handles the trip in both directions in a single binary \u2014 converting an OVA or standalone disk \u2026 <a title=\"ova2xva: migrate VMs from VMware\/VirtualBox to XCP-ng with one command\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/ova2xva\/\" aria-label=\"Read more about ova2xva: migre VMs do VMware\/VirtualBox para XCP-ng com um comando\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,2,120],"tags":[8,31,140,138,139,136,137],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-infra","category-linux","category-servidores","tag-cli","tag-golang","tag-virtualbox","tag-virtualizacao","tag-vmware","tag-xcp-ng","tag-xenserver"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":1422,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/309\/revisions\/1422"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}