How to resize a disk for a virtual machine with Ubuntu in XP

Source: Internet
Author: User
Tags gparted
Environment: host system: Windows XP sp2guest system: Ubuntu 8.04vm : Tools Required by VMware Workstation 6.0: The partition tool boot disk, gparted Ready 8 GB, should be enough for normal use. Ubuntu has been updated several times, during which some tools such as eclipse have been installed one after another, and the capacity has been greatly eaten. Until yesterday, because the project had to install the cross-compilation tool monavista, the ghost image compressed package was nearly 1.8 GB, and the installation was completed by 3.3 GB. Therefore, the virtual partition had to be resized to at least 12 GB. Run the shell command "DF-Hl" to view the disk capacity in Linux. 1. expand the capacity of the Virtual Disk: Shut down the Virtual Machine and use vmwareself-carried hard disk adjustment tool vmware-vdiskmanager.exe to change the size of the virtual disk. This tool can be found in the installation directory of VMware Workstation. The installation directory is E:/vmwareplayer. Run "cmd", CD to E:/vmwareplayer directory, and directly execute the command: vmware-vdiskmanager.exe can view help. There are also several examples in the help information, we can copy the ex 4: vmware-vdiskmanager.exe-x 36 GB mydisk. vmdk run the following command: vmware-vdiskmanager.exe-x 12 gb g:/ubuntu_image/ubuntu. in vmdk, G:/ubuntu_image/ubuntu. the vmdk is an existing 8 GB virtual disk configuration file. This command has changed the virtual disk from 8 GB to 12 GB, but is not allocated to the partition (this is the primary partition hda1 ). 2. Resize a virtual partition: the above changes only the size of the virtual hard disk capacity, but the partition size does not change. This can be seen from the results displayed by DF. The tool used here is: gparted-livecd. You can go to the gparted homepage to download livecd, Article . 2.1 load the ISO file in the vmwarevm drive, VMWare Workstation-> Settings-> hardware tab-> cd rom; 2.2 select connect at power on, use ISO image, and select the gparted-livecd-0.3.3-7.iso file directory. 2.3 start vmware workstation, click f2 to enter the BIOS settings of the VM to start from the optical drive, and select boot with the left key, use up/down to create the selected cd rom drive and press-/+ to pin it to the top. Press F10. save and exit. After restarting, you can select "gparted" To Go To The gparted software interface. The operation is very convenient. It is similar to PQ magic and will not be repeated. Note: before adjusting the partition size, delete the swap partition and extend partition. After the adjustment, create a new swap partition. After restarting, run the DF command to view the configuration results.

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.