{"id":3157,"date":"2024-01-17T10:16:48","date_gmt":"2024-01-17T10:16:48","guid":{"rendered":"https:\/\/blog.designed79.co.uk\/?p=3157"},"modified":"2024-01-17T10:16:48","modified_gmt":"2024-01-17T10:16:48","slug":"migrate-a-linux-vm-from-vsphere-to-kvm","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=3157","title":{"rendered":"Migrate a Linux VM from vSphere to KVM"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"step-1---convert-vmdk-to-qcow2\"><a href=\"https:\/\/platform9.com\/docs\/openstack\/tutorials-migrate-vm-vmware-kvm#step-1---convert-vmdk-to-qcow2\">Step 1 &#8211; Convert VMDK to QCOW2<\/a><\/h3>\n\n\n\n<p>After powering off the VM, note the path of the boot disk by editing the settings of the VM and selecting the Virtual Disk. The boot disk will usually be the first disk listed, unless there is a bios.hddOrder value in the .vmx file for the VM.<\/p>\n\n\n\n<p>Copy the flat VMDK from the ESX host to the Image Library, or a machine with the qemu-img command available.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/image-archive.developerhub.io\/image\/upload\/-1\/n818cahfd0avgid7lepi\/1605293451.png\" alt=\"\" style=\"width:790px;height:auto\"\/><\/figure>\n\n\n\n<p>After copying, convert the VMDK to a QCOW2 image.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-small-font-size wp-elements-09de2995306be8345051dd19333b5ab0\">\n\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">qemu-img convert -O qcow2 &amp;lt;input vmdk file&gt; &amp;lt;ouput qcow2 file&gt;<\/div><\/div>\n\n<\/pre>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color has-small-font-size wp-elements-4a665bff7c1522e97a5dff1f8885ebea\">\n\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">qemu-img convert -O qcow2 centos6-vm-migration-flat.vmdk centos6-vm-migration.qcow2<\/div><\/div>\n\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2---upload-the-image-to-the-image-library-host\"><a href=\"https:\/\/platform9.com\/docs\/openstack\/tutorials-migrate-vm-vmware-kvm#step-2---upload-the-image-to-the-image-library-host\">Step 2 &#8211; Upload the Image to the Image Library Host<\/a><\/h3>\n\n\n\n<p>You can simply copy the converted qcow2 image to the Image library host&#8217;s image directory.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1 &#8211; Convert VMDK to QCOW2 After powering off the VM, note the path of the boot disk by editing the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3157","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3157"}],"version-history":[{"count":1,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3157\/revisions"}],"predecessor-version":[{"id":3158,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3157\/revisions\/3158"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}