Expand hard disk space of VMware Server

Source: Internet
Author: User
Tags what parameter vmware server

 

I am worried that the hard disk capacity of the created virtual machine will be too large to occupy the real hard disk space, and the hard disk capacity will be set to a small value. However, after installing the system for the virtual machine, I will install other software, hard disk capacity is insufficient. If you re-build a virtual machine and reinstall the operating system, it is very troublesome. in VMware, you cannot directly modify the hard disk capacity of the virtual machine. After consulting from many experts, I finally found a solution.
1. There is a vmware-vdiskmanager.exe program under the vmwareinstallation directory using the vmwaretool. It is a command line tool that can be used to modify the disk size of a virtual machine. The method is as follows:
1 ). enter cmd2 ). CD VMware installation directory (for example, my installation directory is c: \ Program Files \ VMware Server, 3 ). vmware-vdiskmanager.exe what parameter does not add directly press the Enter key, can display the description of this command.
4 ). vmware-vdiskmanager-x l6gb "D: \ VMware \ fedora. vmdk "parameter"-X "indicates the disk space of the virtual machine to be extended, followed by the number to be extended (in this example, it is extended to 16 GB, which is the total disk volume, including the original disk capacity ). Finally, the specific file of the Virtual Machine disk to be operated is specified. Because there is space in the path name, it must be enclosed in double quotation marks. Press the Enter key to start execution. After the execution is complete, exit the Command Prompt window and restart VMware. The virtual machine hard disk space has changed to 16 GB. You need to exit and shut down the VM. Otherwise, when the VM is locked, the 4 command will fail to be executed. If the original Virtual Machine hard disk has been divided into multiple partitions, after vmware-vdiskmanager.exe expands the hard disk space, it is necessary to install a third-party partition tool in the system to adjust the Virtual Machine partition. For more information, see: http://www.vmware.com/support/kb/enduser/std_adp.php? P_faqid = 1647

After restarting the virtual machine, the hard disk of the virtual machine is found to be 16 GB, but after entering the Linux system, use "DF-h" to check whether the hard disk space is as large as originally.

Although the disk has been expanded, the Linux operating system cannot be identified because the file system has not been partitioned.

[Root @ centos2 ~] # Fdisk-l

Disk/dev/SDA: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device boot start end blocks ID system
/Dev/sda1*1 13 104391 83 Linux
/Dev/sda2 14 1044 8281507 + 8e Linux LVM

We can see that it is 16 GB.

2. Partition formatting

1.) fdisk

Fdisk/dev/SDA

2) Input P in fdisk

3) Input extended partitions

4) Input W in fdisk, save and exit.

5). Restart the VM.

6) format the partition. Mkfs-T ext3 0C/dev/sda3

7). Mount. CD/mnt

Mkidr sda3

Mount/mnt/sda3/dev/sda3

 

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.