{"id":2247,"date":"2011-08-29T19:12:28","date_gmt":"2011-08-29T23:12:28","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/?p=2247"},"modified":"2011-08-29T19:12:28","modified_gmt":"2011-08-29T23:12:28","slug":"how-to-resize-a-virtualbox-vdi-fixed-size-virtual-drive-on-mac","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/how-to-resize-a-virtualbox-vdi-fixed-size-virtual-drive-on-mac\/","title":{"rendered":"How to resize a VirtualBox fixed size virtual drive (.vdi) on Mac"},"content":{"rendered":"<p>So you created a disk for your Windows or Linux VirtualBox VM and you made the mistake of not creating the drive as a dynamically expanding storage drive, you chose fixed size.<\/p>\n<p>Now you&#8217;re running out of space and all your Google searches point you to stupid posts on the virtualbox.org forums that lead to nowhere, specially if you are a MacOSX user, look no further, you&#8217;ve found the solution to your problem on this post.<\/p>\n<p>VirtualBox for Mac comes with a tool called <strong>VBoxManage<\/strong>, this tool is all you need to resize your virtual disk.<\/p>\n<p>When you&#8217;re using the VBoxManage tool make sure your VM is not running, stop it completely to be safe.<\/p>\n<h2>Step 0. Backup your current drive (optional)<\/h2>\n<p>I recommend that before you do anything you clone your existing drive, just in case&#8230;<\/p>\n<p>You can clone your drive using guess what? yes, the VBoxManage tool. No need to download any external tools.<\/p>\n<p>[bash]$ VboxManage clonehd &lt;path to your original drive&gt; &lt;path of the copy&gt;[\/bash]<\/p>\n<p>in my computer it looked exactly like this:<\/p>\n<p>[bash]$ VBoxManage clonehd \/Users\/gubatron\/VirtualBox VMs\/windows7-64bit\/windows7-64bit.vdi \/Users\/gubatron\/windows7-64bit.cloned.vdi<br \/>\n0%&#8230;10%&#8230;20%&#8230;30%&#8230;40%&#8230;50%&#8230;60%&#8230;70%&#8230;80%&#8230;90%&#8230;100%[\/bash]<\/p>\n<p>If you don&#8217;t know where your .vdi file is, it&#8217;s very simple, right Click your VM > Settings > Storage, and mouse over the .vdi to see it&#8217;s physical location on your Mac hardrive.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_mouse_over_for_vdi_path.jpg?w=640\" class=\"aligncenter\"><br \/>\n<center><em>Mouse over your virtual drive if you don&#8217;t know its location<\/em><\/center><\/p>\n<h2>Step 1. Resize!<\/h2>\n<p>The command to resize is:<br \/>\n[bash]$ VBoxManage modifyhd &lt;path to your vdi&gt; &#8211;resize &lt;new size in megabytes&gt;[\/bash]<\/p>\n<p>In my case I had a 20GB drive that I wanted to double in size (40GB), a quick Google search for &#8220;<a href=\"http:\/\/www.google.com\/search?aq=f&#038;sourceid=chrome&#038;ie=UTF-8&#038;q=40GB+to+megabytes#sclient=psy&#038;hl=en&#038;safe=off&#038;source=hp&#038;q=40GB+to+megabytes&#038;pbx=1&#038;oq=40GB+to+megabytes&#038;aq=f&#038;aqi=&#038;aql=&#038;gs_sm=e&#038;gs_upl=9534l9579l1l9828l2l2l0l0l0l0l0l0ll0l0&#038;bav=on.2,or.r_gc.r_pw.r_cp.&#038;fp=30826624ae1de6f2&#038;biw=1402&#038;bih=889\" target=\"_blank\">40GB to megabytes<\/a>&#8221; yields the number 40960, so that&#8217;s what I put on my &#8211;resize parameter.<\/p>\n<p>This is how it looked for me:<br \/>\n[bash]$ VBoxManage modifyhd \/Users\/gubatron\/VirtualBox VMs\/windows7-64bit\/windows7-64bit.vdi &#8211;resize 40960<br \/>\n0%&#8230;10%&#8230;20%&#8230;30%&#8230;40%&#8230;50%&#8230;60%&#8230;70%&#8230;80%&#8230;90%&#8230;100%[\/bash]<\/p>\n<p>The &#8216;resizing&#8217; is almost immediate.<\/p>\n<h2>Step 2. (Re)Start VirtualBox<\/h2>\n<p>After you&#8217;ve physically resized your drive, both VirtualBox and your OS should know about the changes.<\/p>\n<p>At this point, clicking on your VM in the VirtualBox window will show that it still has the old size:<\/p>\n<p>Before: (Note the size of the drive at the bottom of the image)<br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_vdi_size_before.jpg?w=640\" class=\"aligncenter\"><\/p>\n<p>After doing the resize, shutdown completely your VirtualBox, and launch it again. When you see the information about the storage drives attached to your VM you should see the new disk size.<\/p>\n<p>After: (Note the size of the drive at the bottom of the image)<br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_vdi_size_after.jpg?w=640\" class=\"aligncenter\" title=\"Updated size of the .vdi after restarting VirtualBox\"><\/p>\n<h2>Step 3. Let your OS know the new logical size of the drive<\/h2>\n<p><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_windows_drive_size_before.jpg?w=640\" title=\"Your OS Still doesn't know about the new size\" class=\"aligncenter\"><\/center><br \/>\n<center><em>Your OS is still not aware of the changes, you need to let it know about them<\/em><\/center><\/p>\n<p>When you start your VM, it won&#8217;t know right away what the new size of the disk is, you&#8217;ll have let the operating system know that there is additional space it can use.<\/p>\n<p>If your VM is running Windows 7, the way to let the operating system know that it can use the additional space on your drive is very straight forward.<\/p>\n<p>Click on the Windows (Start) Icon on the Bar > Right Click on &#8220;Computer&#8221; > Manage (You&#8217;ll need to be an Administrator)<\/p>\n<p>The &#8220;Computer Management&#8221; window will open, in it go to:<\/p>\n<p>Storage > Disk Management > Right Click on the partition you want to extend.<\/p>\n<p><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_windows7_extend_partition.png?w=640\" title=\"Extend the partition in Windows\"  ><\/center><\/p>\n<p>Select the option that says &#8220;Extend&#8221;, a Wizard will open, just hit Next until it ends if you want to use the whole space.<\/p>\n<p>After you&#8217;re done, if you refresh your &#8220;Computer&#8221; on the File explorer the resized drive should show right away<\/p>\n<p><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_windows7_extended_partition.png?w=640\" ><\/center><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2011\/08\/virtualbox_windows_drive_size_after.jpg?w=640\" class=\"aligncenter\"><\/p>\n<p>That&#8217;s it, enjoy and let me know how it went.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you created a disk for your Windows or Linux VirtualBox VM and you made the mistake of not creating the drive as a dynamically expanding storage drive, you chose fixed size. Now you&#8217;re running out of space and all your Google searches point you to stupid posts on the virtualbox.org forums that lead to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30,36,45],"tags":[533,633,635,839,1059,1083],"class_list":["post-2247","post","type-post","status-publish","format-standard","hentry","category-geeklife","category-howto-2","category-mac-osx","tag-howto","tag-mac","tag-macosx","tag-resize","tag-vdi","tag-virtualbox"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-Af","jetpack-related-posts":[{"id":2499,"url":"https:\/\/www.gubatron.com\/blog\/solved-updated-to-ubuntu-11-10-on-virtualbox-and-now-you-get-a-blank-screen-when-you-reboot\/","url_meta":{"origin":2247,"position":0},"title":"[SOLVED] Updated to Ubuntu 11.10 on VirtualBox and now you get a blank screen when you reboot?","author":"gubatron","date":"October 20, 2011","format":false,"excerpt":"So you used the update manager to upgrade to the new Ubuntu 11.10 that came out a couple days ago and when you're finished with the process, next time it boots you get a blank screen. Do this: 1. Switch to a terminal. Press \"Ctrl+Alt+F1\" if you're on Windows. or\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.gubatron.com\/blog\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1946,"url":"https:\/\/www.gubatron.com\/blog\/reviewing-the-nokia-n900-user-and-developer-opinions\/","url_meta":{"origin":2247,"position":1},"title":"Reviewing the Nokia N900, User and Developer opinions.","author":"gubatron","date":"July 7, 2010","format":false,"excerpt":"Playing with it from the User Perspective - Virtual keyboard is deactivated by default, not good if you have one hand busy, however I can see why it's this way (the virtual keyboard sucks). When it comes out it covers the entire screen, and the experience with it is not\u2026","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/www.gubatron.com\/blog\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2684,"url":"https:\/\/www.gubatron.com\/blog\/how-to-reset-mac-usb\/","url_meta":{"origin":2247,"position":2},"title":"How to reset Mac USB","author":"gubatron","date":"March 14, 2012","format":false,"excerpt":"Your Mac won't recognize your USB device until you reset, what a pain in the ass right? Open Activity Monitor Search for \"usbmuxd\" Terminate Process (You will need an Adminstrator password) Re-Insert your USB device, it should be recognized now. Worked everytime for Bose USB Audio.","rel":"","context":"In \"audio\"","block_context":{"text":"audio","link":"https:\/\/www.gubatron.com\/blog\/tag\/audio\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3679,"url":"https:\/\/www.gubatron.com\/blog\/monero-development-installing-dependencies-on-mac\/","url_meta":{"origin":2247,"position":3},"title":"[Monero-Development] Installing dependencies on Mac","author":"gubatron","date":"March 12, 2017","format":false,"excerpt":"March 12th 2017. In order to build Monero on MacOSX with cmake, I had to install the following dependencies via homebrew brew install libunwind-headers --force brew link libunwind-headers --force brew install miniupnpc brew install ldns brew link ldns --force brew install expat brew link expat --force brew install doxygen","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3241,"url":"https:\/\/www.gubatron.com\/blog\/setting-up-eclipse-as-your-ide-for-bitcoin-c-development-on-macosx\/","url_meta":{"origin":2247,"position":4},"title":"Setting up Eclipse as your IDE for Bitcoin C++ development on MacOSX.","author":"gubatron","date":"February 9, 2014","format":false,"excerpt":"If you are a Java developer used to the productivity levels achieved by working with eclipse's code navigation, code completion and refactoring tools, it's worth your time staying in eclipse for any sort of C++ development. This post refers specifically to getting your eclipse environment to work with a particular\u2026","rel":"","context":"In &quot;BitCoin&quot;","block_context":{"text":"BitCoin","link":"https:\/\/www.gubatron.com\/blog\/category\/bitcoin-2\/"},"img":{"alt_text":"Screen Shot 2014-02-09 at 1.09.39 PM","src":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/02\/Screen-Shot-2014-02-09-at-1.09.39-PM.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/02\/Screen-Shot-2014-02-09-at-1.09.39-PM.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/02\/Screen-Shot-2014-02-09-at-1.09.39-PM.png?resize=525%2C300 1.5x"},"classes":[]},{"id":3370,"url":"https:\/\/www.gubatron.com\/blog\/how-to-resize-an-ebs-xfs-formatted-partition\/","url_meta":{"origin":2247,"position":5},"title":"How to resize an EBS (xfs formatted) partition","author":"gubatron","date":"December 20, 2014","format":false,"excerpt":"First of all, create a snapshot of your EBS volume. Then out of that snapshot you will be able to create your new volume. However, when you detach the old one from your instance and attach the new one, you will still see the old available space with df look\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/12\/Screen-Shot-2016-01-02-at-4.42.45-PM.png?fit=1200%2C420&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/12\/Screen-Shot-2016-01-02-at-4.42.45-PM.png?fit=1200%2C420&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/12\/Screen-Shot-2016-01-02-at-4.42.45-PM.png?fit=1200%2C420&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/12\/Screen-Shot-2016-01-02-at-4.42.45-PM.png?fit=1200%2C420&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2014\/12\/Screen-Shot-2016-01-02-at-4.42.45-PM.png?fit=1200%2C420&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/2247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=2247"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/2247\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=2247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=2247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=2247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}