{"id":748,"date":"2016-04-30T07:30:39","date_gmt":"2016-04-30T07:30:39","guid":{"rendered":"http:\/\/www.tech-g.com\/?p=748"},"modified":"2025-03-27T16:31:09","modified_gmt":"2025-03-27T16:31:09","slug":"mounting-a-multipart-vmdk-disk-on-linux","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2016\/04\/30\/mounting-a-multipart-vmdk-disk-on-linux\/","title":{"rendered":"Mounting a multipart vmdk disk on Linux"},"content":{"rendered":"\n<p>There are many ways to do that, one of which is using the tools provided by vmware to combine the disks into one and then mounting it with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">kpartx -av mydisk.vmdk;<\/pre>\n\n\n\n<p>Then<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mount -o \/dev\/mapper\/loop0p1 \/hds\/disk<\/pre>\n\n\n\n<p>While another method, which is simpler<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install qemu-utils\nqemu-img convert disk-s001.vmdk s01.raw\n....\nqemu-img convert disk-s013.vmdk s13.raw\n....\nqemu-img convert disk-s032.vmdk s32.raw<\/pre>\n\n\n\n<p>The above will be sparse files, so you will not have disk usage as big as the file, a &#8220;df -h&#8221; should not result in any lost of disk space beyond the data that is used by files in the image<\/p>\n\n\n\n<p>following the above, we need to combine the RAW files like so<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cat s01.raw s02.raw s03.raw s04.raw s05.raw s06.raw s07.raw s08.raw s09.raw s10.raw s11.raw s12.raw s13.raw s14.raw s15.raw s16.raw s17.raw s18.raw s19.raw s20.raw s21.raw s22.raw s23.raw s24.raw s25.raw s26.raw s27.raw s28.raw s29.raw s30.raw s31.raw s32.raw &gt; combined.raw\n<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">losetup \/dev\/loop0 combined.raw<br>kpartx -a \/dev\/loop0<br>mount \/dev\/mapper\/loop0p1 \/hds\/img1<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">using <code>guestmount<\/code><\/h2>\n\n\n\n<p>And finally, using <code>guestmount<\/code> (apt install <code>libguestfs-tools<\/code>)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>guestmount -a xyz.vmdk -m \/dev\/sda3 --rw \/mnt\/vmdk<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">guestmount -a \/path\/to\/myvmdk -i --rw \/hds\/usb<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are many ways to do that, one of which is using the tools provided by vmware to combine the disks into one and then mounting it with kpartx -av mydisk.vmdk; Then mount -o \/dev\/mapper\/loop0p1 \/hds\/disk While another method, which is simpler apt-get install qemu-utils qemu-img convert disk-s001.vmdk s01.raw &#8230;. qemu-img convert disk-s013.vmdk s13.raw &#8230;. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,4,9,139],"tags":[],"class_list":["post-748","post","type-post","status-publish","format-standard","hentry","category-hard-disks","category-linux","category-pc-hardware","category-virtualization-linux"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":5,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"predecessor-version":[{"id":5178,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/748\/revisions\/5178"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}