{"id":498,"date":"2019-01-10T13:12:06","date_gmt":"2019-01-10T19:12:06","guid":{"rendered":"http:\/\/zewwy.ca\/?p=498"},"modified":"2019-01-10T13:12:06","modified_gmt":"2019-01-10T19:12:06","slug":"how-to-shrink-a-vmdk","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2019\/01\/10\/how-to-shrink-a-vmdk\/","title":{"rendered":"How to Shrink a VMDK"},"content":{"rendered":"<p>Hey all,<\/p>\n<p>Not often you have to shrink a VMDK file, expanding one is super easy, even on a live Virtual Machine. Shrinking one however, isn&#8217;t as straight forward.<\/p>\n<p><a href=\"https:\/\/www.experts-exchange.com\/articles\/12938\/HOW-TO-Shrink-a-VMware-Virtual-Machine-Disk-VMDK-in-15-minutes.html\">This guy<\/a> does a decent job giving a step by step tutorial, but you can soon realize you can do it even faster, and without cloning&#8230;<\/p>\n<p>1)  Use his math to get the disk size you need to edit inside the vmdk:<\/p>\n<p>&#8221;<\/p>\n<p>The number highlighted above, under the heading #Extent description, after the letters RW, defines the size of the VMware virtual disk (VMDK).<\/p>\n<p>this number &#8211; 83886080, and it&#8217;s calculated as follows:<\/p>\n<p>40 GB = 40 * 1024 * 1024 * 1024 \/ 512 = 83886080<\/p>\n<p>&#8221;<\/p>\n<p>2) Only shrink VMDKs in which you know the end of the disk contains allocated blocks, do this in a test only, make sure you have backups.<\/p>\n<p>Now instead of cloning, simply remove the disk from the vm, and re-attach it. watch it&#8217;s reattached size be smaller, and it matches, much like the source guys post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey all, Not often you have to shrink a VMDK file, expanding one is super easy, even on a live Virtual Machine. Shrinking one however, isn&#8217;t as straight forward. This guy does a decent job giving a step by step tutorial, but you can soon realize you can do it even faster, and without cloning&#8230; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2019\/01\/10\/how-to-shrink-a-vmdk\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Shrink a VMDK&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[5,8],"tags":[136,137,88],"class_list":["post-498","post","type-post","status-publish","format-standard","hentry","category-hypervisors","category-server-administration","tag-shrink-vmdk","tag-vmdk","tag-vmware"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":1,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/498\/revisions"}],"predecessor-version":[{"id":499,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/498\/revisions\/499"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}