Expand the centos hard disk size in virtualbox

Source: Internet
Author: User
Tags gparted

1. Clone an object I created centos 6.3 During the previous installation, but I didn't have enough space to reinstall centos. I thought about using the resize command because I had to configure many things, however, when running D: \ Program Files \ oracle \ virtualbox> vboxmanage.exe modifyhd "D: \ centos 6.3.vdi" -- resize 12288 in Win8, an error is always reported. The error is as follows: vboxmanage.exe: Error: resize hard disk operation for this format is not impleme nted yet! No way. You can see it on the Internet. First, create an empty and large VDI on the virtual machine, and then use the clonehd command to clone it. Run the following command:
After that, mount the new VDI image to virtualbox and start the new VDI file, Ii. Extended partitions Run DF-h to check whether the root directory is the same as the original one. Use LVM to expand the partition. LVM (logic volume manager) logical management volume
[[email protected] ~] # DF-H
filesystem size used avail use % mounted on
/dev/sda1 6.0g 5.5g 161 M 98%/
tmpfs 939 M 376 K 939 M 1%/dev/SHM
linux_share 202G 126G 77g 63%/mnt/share
/dev/sr0 1.2G 1.2G 0 100%/Media/centos_6.5_final
For more information about the extension method, see "extend. Very convenient. This is the partition before I expand
[[email protected] ~] # DF-h-t
filesystem type size used avail use % mounted on
/dev/sda1 ext4 6.0g 5.5g 162 m 98%/
tmpfs 939 M 228 K 939 M 1%/dev/SHM
linux_share vboxsf 202G 127g 76G 63%/mnt/share
/dev/sr0 UDF 193 m 193 M 0 100%/Media/gparted-live
This is the partition I extended after gparted-live-0.16.1-1-amd64.iso
[[Email protected] ~] # DF-h-t
Filesystem type size used avail use % mounted on
/Dev/sda1 ext4 12g 5.5g 5.3g 51%/
Tmpfs 939 M 76 K 939 M 1%/dev/SHM
Linux_share vboxsf 202G 127g 76G 63%/mnt/share
/Dev/sr0 UDF 193 m 193 M 0 100%/Media/gparted-live
[[Email protected] ~] #
You can also use the command fdisk-L to view

Expand the centos hard disk size in virtualbox

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.