{"id":1098,"date":"2018-02-11T17:33:51","date_gmt":"2018-02-11T17:33:51","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1098"},"modified":"2018-02-11T17:37:47","modified_gmt":"2018-02-11T17:37:47","slug":"converting-qemu-qcow2-cloud-server-image-native-disk-img-putting-physical-disk","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2018\/02\/11\/converting-qemu-qcow2-cloud-server-image-native-disk-img-putting-physical-disk\/","title":{"rendered":"Converting a QEMU qcow2 cloud server image to an native disk img and putting on physical disk"},"content":{"rendered":"<p>Got this question at work a lot. Thought I&#8217;d finally get around to putting it down since it&#8217;s came up for me. I&#8217;ve got a virtual machine using virtio passthrough for my pcie, and I found actually that disk access via the qcow2 is pretty naff.<\/p>\n<pre><code>sudo apt-get install qemu-kvm\r\n\r\nqemu-img convert windows10cloudimage.qcow2 -O raw diskimage.img\r\n\r\ndd if=\/path\/to\/windos10cloudimage.qcow2 of=\/dev\/sdc2<\/code><\/pre>\n<p>Please note in my case the physical partition I&#8217;d made was sdc2. I&#8217;d actually resized another 5TB disk I have in my system using gparted. Just so I can attach a physical partition with libvirtd. Evidently though libvirtd-manager doesn&#8217;t allow this business so I have to edit the xlm file in \/etc\/qemu\/windows10.xml .<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@adam:\/etc\/libvirt\/qemu# virsh  define \/etc\/libvirt\/qemu\/win10-uefi.xml \r\nDomain win10-uefi defined from \/etc\/libvirt\/qemu\/win10-uefi.xml\r\nroot@adam:\/etc\/libvirt\/qemu# virt-manager\r\n<\/pre>\n<p>yeah baby!<\/p>\n<p><a href=\"http:\/\/www.haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1099\" src=\"http:\/\/www.haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30.png\" alt=\"\" width=\"837\" height=\"632\" srcset=\"https:\/\/haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30.png 837w, https:\/\/haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30-300x227.png 300w, https:\/\/haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30-768x580.png 768w, https:\/\/haxed.me.uk\/wp-content\/uploads\/2018\/02\/Screenshot-from-2018-02-11-17-29-30-397x300.png 397w\" sizes=\"auto, (max-width: 837px) 100vw, 837px\" \/><\/a><br \/>\nYou could alternatively do it all in one like below, though you may desire a copy of the img file as well as putting it to the disk.<\/p>\n<pre><code>qemu-img convert windows10.qcow2 -O raw \/dev\/sdc<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Got this question at work a lot. Thought I&#8217;d finally get around to putting it down since it&#8217;s came up for me. I&#8217;ve got a virtual machine using virtio passthrough for my pcie, and I found actually that disk access &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2018\/02\/11\/converting-qemu-qcow2-cloud-server-image-native-disk-img-putting-physical-disk\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,39,72,37,63,10,76,49,117,9,36,50,5,53],"tags":[],"class_list":["post-1098","post","type-post","status-publish","format-standard","hentry","category-cloud","category-cloud-backup","category-data-loss","category-disaster-recovery","category-disk-tools","category-filesystem","category-guest-utilities","category-kvm","category-libvirtd","category-linux","category-migration","category-windows","category-xen","category-xenserver"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1098"}],"version-history":[{"count":3,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1098\/revisions"}],"predecessor-version":[{"id":1102,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1098\/revisions\/1102"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}