{"id":213,"date":"2024-10-23T10:33:33","date_gmt":"2024-10-23T15:33:33","guid":{"rendered":"http:\/\/lab.rapternet.us\/?p=213"},"modified":"2024-09-14T20:16:01","modified_gmt":"2024-09-15T01:16:01","slug":"using-qemu-tools","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=213","title":{"rendered":"Using Qemu Tools"},"content":{"rendered":"\n<p>While moving virtual machines from my unraid NAS to my new proxmox node way back when, I ended up needing to use a few of the qemu-img tools. This is a toolset for handling virtual disks used by kvm\/qemu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conversions<\/h2>\n\n\n\n<p>Something I hadn&#8217;t realized while using unraid as my kvm host was that it wasn&#8217;t always using qcow2 format, which was my go to format, despite that the webui saying that the file format was qcow2. There were also a few virtual machines I made that ended up in different forms, so to handle these, I ended up having to convert the machines using the following commands.<\/p>\n\n\n\n<p>The first command is to convert from a raw image to a qcow2 file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">qemu-img convert -f raw - O qcow2 \/path\/to\/file.img<\/pre>\n\n\n\n<p>The second command is to convert from a qcow to a qcow2 file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">qemu-img convert -f qcow2 -O qcow2 \/path\/to\/img.qcow<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">File Information<\/h2>\n\n\n\n<p>The other command I made use of was the info command from the qemu-img tool. This gives out useful file information for the file input to the command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">qemu-img info<\/pre>\n\n\n\n<p>These are just some useful, small commands in the qemu toolbox that can help significantly when working with the VM disk files directly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While moving virtual machines from my unraid NAS to my new proxmox node way back when, I ended up needing to use a few of the qemu-img tools. This is a toolset for handling virtual disks used by kvm\/qemu. Conversions Something I hadn&#8217;t realized while using unraid as my kvm host was that it wasn&#8217;t &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lab.rapternet.us\/?p=213\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using Qemu Tools&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[26,14,93,15],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-proxmox","tag-quick-bites","tag-tools","tag-unraid"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213"}],"version-history":[{"count":5,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":4136,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions\/4136"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}