Expand the centos hard disk size in VirtualBox, virtualboxcentos

Source: Internet
Author: User
Tags gparted

Expand the centos hard disk size in VirtualBox, virtualboxcentos
1. Clone an objectI 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 partitionsRun 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

[Root @ centos ~] # 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
[Root @ centos ~] # 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
[Root @ centos ~] # 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
[Root @ centos ~] #
You can also use the command fdisk-l to view

How can I change the disk space of a virtual machine in virtualbox?

Sun Virtualbox's simple way to increase the space of a virtual disk has recently encountered a problem. At the beginning of the creation of a virtual machine, we only allocated 10 Gb of C disk to install xp, which is not enough now. Virtualbox does not have the function of modifying the Virtual Disk size. Therefore, you have figured out the following steps: 1. Create a new virtual disk file, which is the size you need. For example, I create a new 30 GB 2. Set up the xp Virtual Machine in Virtualbox, And then mount a virtual disk image (my new 30 GB ). 3. Start the VM from the CD or iso, and use a winpe or a boot disk with the ghost tool. I used pe4. start ghost in pe and select disk to disk. During the cloning process, the new hard disk (30 GB) is smaller than the previous hard disk (10 Gb. Wait until the ghost is complete. 5. Remove the 10 Gb virtual disk from the xp Virtual setting, and keep the 30 GB one and set it as the first ide main channel.

How can I change the disk space of a virtual machine in virtualbox?

A Simple Method for Sun Virtualbox to increase virtual disk space
Recently, when I first set up a virtual machine, I only allocated 10 Gb of C disk to install xp, which is not enough. Virtualbox does not have the function of modifying the Virtual Disk size. So I tried the following steps:
1. Create a new virtual disk file, which is the size you need. For example, if I create a 30G
2. Set the xp Virtual Machine in Virtualbox and mount a virtual disk image (my new 30 GB ).
3. Start the VM from the CD or iso, and use a winpe or a boot disk with the ghost tool. I use pe.
4. Start ghost in pe and select disk to disk. During the cloning process, the new hard disk (30 GB) is smaller than the previous hard disk (10 Gb. Wait until the ghost is complete.
5. Remove the 10 Gb virtual disk from the xp Virtual setting, and keep the 30 GB one and set it as the first ide main channel.

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.