VMware expands hard disk space based on Linux virtual machines

Source: Internet
Author: User

VMware expands hard disk space based on Linux virtual machines. With the continuous application of Linux fake machines, VMware often encounters a problem where the hard disk space of pre-installed linux fake machines is too small, resulting in the failure to install many software, the re-installation is quite poor. As a result, I searched the internet for the vmware hard disk resizing operation. Summary: 1. the mount point must be a directory. 2. A partition is mounted to an existing Directory. The directory cannot be empty. However, after mounting, the contents in this directory will not be available in the early years. A: The first application of VMware equipment expansion distribution of hard disk space: 1, vmware provides a command line equipment, vmware-vdiskmanager.exe, located in the vmware installation directory, such as C: \ Program Files \ VMware Workstation \ vmware-vdiskmanager.exe. run cmd in windows, go to vmware installation directory vmware-vdiskmanager.exe can check sponsorship 2. to cope with resizing, enter the following command: vmware-vdiskmanager-x 50 Gb "D: \ VMware \ WinXP \ myLinux. vmdk "NOTE: the system to be resized cannot be running at this time. The parameter"-x "indicates that the disk space of the VM is to be expanded, the number that follows is the size of the disk to be expanded (in this example, it is expanded to 50 GB. This is the total number of disks. Disk capacity ). The last part is the specific file of the VM disk to be manipulated. If there is a space in the path name, it must be enclosed in double quotation marks. Press the Enter key to start implementation. After the implementation is complete, exit the command reminder window and restart VMware. The VM hard disk space will be changed to 50 GB. After the VM is restarted, the hard disk used to create the VM is changed to 50 GB. However, after entering the linux system, the hard disk space created by "df-ah" is still that large. Although the disk has been expanded, but since there is no top-down area, the specified file system cannot be identified as a linux operating system (it is really equal to your hard disk, although it is big, however, it is a principle that you do not partition it ). Next, we will hold the rewards and punishments for partition processing. Action 2: Use the VM graphic interface to close the VM, edit the VM settings, and resize the disk space. 3. partition: (switch to the Root user, and run sudo command in Ubuntu) fdisk command: fdisk-l: print the current disk partition table, at this time, we can see that the total number of disks is increased to 50 GB, but the partitions are only those original partitions in the early years. Enter the command: fdisk/dev/sda. "sda is the last-to-scale hard disk. It is a SCSI hard disk. The IDE instance hard disk corresponds to hda and is used to manipulate the hard disk." Type: m "list fdisk Sponsorship" here we are going to add a new partition, the part that will be expanded into a new partition, such a method is mounted by the operating system for identification. Type: n "Order n to add a new partition", fdisk will let you choose to add as a logical partition (number starting from 5) as the primary partition (Number 1 to 4 ). Select the primary partition, and then type p. Select logical partition and enter l. Select the primary partition, and enter p "select create primary partition". fdisk will let you select the ID of the primary partition. If you already have the primary partition sda1, sda2, select 3 as the number, that is, the partition to be created is sda3. at this time, fdisk will let you select the Start value of the partition. This is the start cylinder value of the partition ); press enter directly. If you enter a non-default number, it will waste space. At this time, enter: w "all your career and exit, partitions are completed separately. "We can't use this partition now. Because we don't have two technologies, we can see sda3 under dev if we need to restart the system. If we don't restart, we won't be able to perform the following operations. 4. technology: Enter mkfs-t ext3/dev/sda3 or mkfs. ext3/dev/sda3 Technology: The two specified partitions, and so on. Most of today's systems are e Xt3 technology, if you need the rest, you can check the sponsorship of mkfs. Now we can apply the new partition: 5. Mount the partition: manually mount, then type: sudo mount/dev/sda3/mnt/sda3: mount the new partition to the/mnt/sda3/directory (Note: Ubuntu is mounted to the/media directory by default, and the manually mounted information has registration information under the/etc/mtab file.) when the system is started and mounted, correct the/etc/fstab file and add a line to the file: /dev/sda3/mnt/sda3 ext3 defaults, 0 1 here you can apply this new partition. Manual mounting in the Redhat environment: 1. Create the/oracledir folder 2 mount/dev/sda3 // oracledir

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.