Extend hard disk space to Ubuntu virtual machines on VirtualBox

Source: Internet
Author: User

Originally installed on the VirtualBox ubantu virtual machine, partition recommendation 8g then I gave a forthright to 25G, thought must be enough! Never thought, I still want to start tossing the virtual machine to expand the hard disk space!
Step in the total of two steps!
(i) Add virtual hard disk
Vitualbox 4.0, adding a virtual hard disk is very simple, you can do it directly with the Vboxmanage command, under Windows CMD, enter the following command line:

VBoxManage modifyhd "C:\Users\yuxin\VirtualBox VMs\Dalvik\Dalvik.vdi" –resize 40960

One of the things to note is 1. This time the space is bigger than the last time to 40960>25600 (previously allocated 25G) 2.c:\users\yuxin\virtualbox Vms\dalvik\dalvik.vdi Everyone's location is different!
(ii) Extended Ubantu file system size

    1. First come to VirtualBox, you want to expand the virtual machine machine, select the VM you want to extend to the settings > Storage interface!

      Then select the Controller, the first icon choose to add an optical drive, the ISO file you installed Ubantu to load in, the right to assign the optical drive Select "First IDE Controller master-slave", tick "demo disc", Remember Point "Confirm!" ”
    2. Come to Settings > system, the "optical drive" in the boot sequence to the first
    3. Start the virtual machine and it will boot from the CD! , select "Try Ubantu" and go to the default unity interface! Select the search icon on the launcher (the top one), enter GParted, and open Disk Manager.

    4. Most of the time, your new drive is not next to the hard disk that needs to be expanded, this time need to make some adjustments, I need to move the swap space, the unallocated space to the front, first select the disk block in the middle, select "Turn Off swap space"

      (This figure is not saved to, steal the picture), then check it again to delete it!
      After deletion, if that's the case

      There are two partitions sda1 and sda2, then you need to check sda2 again to delete them!
      Know the appearance of this picture!

      Select SDA1 (the partition you want to extend) right-click, "Move/or resize" and you can manually drag to the size of the space you want to expand! Note: Each operation is to select the above execution! Do not forcibly merge when there is an error message! Baidu error is the best policy!
      Then you can shut down, the original in the settings to add the CD-ROM drive to remove and start the order to adjust back to the normal start Ubantu, under the terminal to perform "df-h" can see whether the expansion succeeded!

Extend hard disk space to Ubuntu virtual machines on VirtualBox

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.