Virtualbox Virtual Disk resizing

Source: Internet
Author: User
Tags gparted

1. Run in cmd

Vboxmanage modifyhd D: \ My database \ Documents \ virtualbox VMS \ Ubuntu \ ubuntu. VDI -- resize 61440

Error syntax error: Invalid parameter 'vms \ Ubuntu \ ubuntu. vdi'

It turns out that the path cannot contain spaces, so the folder virtualbox VMS is changed to virtualboxvms

Run the preceding command again.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

OK. Change the folder name back.

2. After starting the virtual machine, you also need to use the gparted-gnome partition Editor tool to initialize the New Extended partitions. Otherwise, the system will not recognize the new extended space.
You can install sudo apt-Get install gparted In ubuntu. The tool is a graphical interface. Easy to use. After setting, click "edit"> "apply all operations" to initialize the extended disk.

Write down the partition name/dev/sda3

3. Sudo-I enables the root user to run

 lvm pvcreate/dev/sda3

4. Run vgextend xubuntu-VG/dev/sda3 to add/dev/sda3 to the volume group xubuntu-VG (volume group view command vgdisplay)

vgextend xubuntu-vg  /dev/sda3

5. Run lvresize-L + 100% free/dev/mapper/xubuntu -- VG-root to expand the root volume group under the volume group xubuntu-VG.

lvresize -l+100%FREE /dev/mapper/xubuntu--vg-root

6. Execute resize2fs/dev/mapper/xubuntu -- VG-root to reset the file system.

resize2fs /dev/mapper/xubuntu--vg-root

7. Run DF-h-t to verify the disk capacity expansion.

df -h -T

 

Virtualbox Virtual Disk resizing

Related Article

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.