Increase disk space vmware linux

How to extend partition in Ubuntu Guest on Vmware

On my Windows 7 host, I am using VMware Player to use Ubuntu. I had initially allocated 20GB and now getting Disk space full errors. So I wanted to extend partition. By searching on forums I saw how to add more disk and used this command to make it 30G —

sudo lvextend -L30G /dev/sda1 

But still df command shows that max is 20GB. After more searching it seems that I need to extend partition using gparted. I tried using that but Resize button is disabled. I searched for that and they say that if the partition shows a key image then that partition is active and I cannot change it if it is live. Screenshot After some more search looks like this can also be fixed by using booting the OS from CD or using gparted boot from cd, boot using iso etc etc without giving any clear instructions. Can someone please guide or post any link which has clear instructions including screenshots for a linux layman as to how I can extend the partition.

3 Answers 3

Just did it in a Ubuntu 18.04 Server guest over a Windows 10 host.

The easiest way is, like you already suggested, to boot a live Ubuntu (the regular one, not server) and use GParted.

But first you need to «configure» the VMWare to increase the «virtual disk» size. Follow these steps:

  1. Shutdown the guest
  2. Click on «edit virtual machine settings» of that guest
  3. Click on «Hard disk» and «Expand. «
  4. A VMware window will let you modify the size, in GBs, of the device. Set the size you want and click on «Expand». After a while it will end.

At this point, the hard drive is bigger than before, but the partition is not. You must resize the partition also. To do so, download the ISO file of the regular Ubuntu distribution. Any other bootable device will also work, but this is the simplest way. Having the ISO downloaded do this:

  1. In the same configuration window as before, instead of configure the «Hard Disk» go to «CD/DVD» section.
  2. Make sure the option «Connect at power on» is set.
  3. Select «Use ISO image file:» and browse to the ISO file you downloaded.

After this, the guest is ready to be launched. Click in «Play virtual machine» and pay attention because you need to press the Esc key very quick to enter the boot menu, just before the VMWARE logo appears. As it were the BIOS of your physical computer.

Tip: After click on «Play. » click again over the VMWare window (black screen at this point) to make sure that the control of keyboard and mouse are in the guest, and not in the host. If you miss this step, you can simply reboot and try again.

Once you see the boot options:

  1. Press the down arrow key to highlight «CD-ROM Drive» and press enter.
  2. Ubuntu will start as live session.
  3. Select appropriate language and «Try Ubuntu».
  4. Wait until the desktop is loaded.
Читайте также:  Linux on embedded devices

Look for the GParted tool and launch it. You will see two main blocks, one with some color (yellow probably) and the other in gray. The colored block is your actual partition (probably called /sda/sda1). To resize it do:

  1. Right click on the yellow block and select «ummount» or «stop»
  2. Right click again and «resize».
  3. In the new window, drag the limit of the partition to wherever you want of the free space (gray).
  4. Click «Ok»
  5. Don’t forget to click in «Apply changes» in Gparted’s main window before closing, otherwise the operation is not performed.

Once it is finished, you have already a bigger partition, just reboot and you will be good to go. (Don’t forget to uncheck the CD/DVD Connect at power on if it is not needed).

Источник

Increase disk space vmware linux

You can add storage space to a virtual machine by expanding its virtual hard disk.

When you expand a virtual hard disk, the added space is not immediately available to the virtual machine. To make the added space available, you must use a disk management tool to increase the size of the existing partition on the virtual hard disk to match the expanded size.

The disk management tool that you use depends on the virtual machine guest operating system. Many operating systems, including Windows Vista, Windows 7, and Windows 8 and some versions of Linux, provide built-in disk management tools that can resize partitions. Third-party disk management tools are also available, such as EASEUS Partition Master, Acronis Disk Director, and the open-source tool GParted.

When you expand the size of a virtual hard disk, the sizes of partitions and file systems are not affected.

As an alternative to expanding a virtual hard disk, you can add a new virtual hard disk to the virtual machine. See Add a New Virtual Hard Disk to a Virtual Machine.

Prerequisites

  • Power off the virtual machine.
  • Verify that the virtual disk is not mapped or mounted. You cannot expand a virtual disk while it is mapped or mounted.
  • Verify that the virtual machine has no snapshots.

Procedure

  1. Select the virtual machine and select Virtual Machine > Virtual Machine Settings .
  2. On the Hardware tab, select the virtual hard disk to expand.
  3. Select Utilities > Expand .
  4. Set the new maximum size for the virtual disk.

What to do next

Use a disk management tool to increase the disk partition size to match the expanded virtual disk size.

Источник

How to Increase VM Virtual Disk Space on VirtualBox and VMware

Increase VM Virtual Disk Space

Using VMware or Virtual machines to run another operating system or server is very popular and convenient among Linux and Windows users. We might need to run an OS on our current system to test, check, or experience the OS in many cases. No matter what the reason is, you can set up and customize the configurations of the VM virtual machines. Using Oracle’s VirtualBox and VMware, you can increase VM virtual disk space, RAM, CPU core, and other parameters.

Prerequisite To Increase VM Virtual Disk Space

Installing the virtual machine or the VMware is a prerequisite for this post. I assume you have the virtual machine loaded and the hypervisor set up. If you do not know how to install the VMware or the Virtual machine on Linux, please go over this post to learn everything about Virtual machines.

Читайте также:  Linux find directory by name recursively

Increase VM Virtual Disk Space

Different VM Virtual tools offer features to users in different methods. In the race of operating system virtualization, Oracle’s Virtual Machine and VMware’s Workstation Player are the most used and utilized tools for Linux. VirtualBox and VMware are both famous in the section of virtualization; they all have their UI designed for better usability.

When we install the VM tools on our system, we can go with the default settings and configurations to start the hypervisors. Later, we can increase the system parameters. This post will see GUI and CLI methods to increase VM virtual disk space.

1. Increase Disk Space of VirtualBox

To increase the disk space of a VirtualBox in Linux, we will now use the graphical user interface method. Conventionally when we install the VirtualBox and run an operating system, it offers you to create a 10 GB or higher volume of disk space automatically on the system.

Most people go with the default settings, as it works fine. But, if you need to increase the disk space, what to do? Here we will see the step-by-step process.

Method 1: GUI Method To Increase Disk Space of VirtualBox

Here, we will see the graphical user-interface method to increase VM virtual disk space on VirtualBox. Later, we will see the CLI method as well.

Step 1: Open Virtual Media Manager

The virtual media manager is the main center from which section you can manage and increase the disk space, RAM size, and CPU cores. On the very beginning page of the VirtualBox, you will find the Virtual Media Manager setting under the File section.

virtual media manager to Increase VM Virtual Disk Space

Step 2: Select the Hypervisor and Resize Disk Space

If you’ve more than one virtual machine installed on the VirtualBox, you might need to select the desired hypervisor from the VM’s menu. Here, as you can see, I have only one hypervisor, so the default OS is selected already.

select the current OS Increase VM Virtual Disk Space

Step 3: Finalize the Disk Space

In this step, we will need to put the new value of the disk size to increase VM virtual disk space. You can either put the value on the box as shown in the below-mentioned image; or drag the value from the size bar. Finally, click on the Apply button to increase the disk space on the VM virtual machine.

use the disk space manage slider tool

Finally, in the below image, you can see that the disk space is now increased from 10Gb to 12GB.

disk space got increased

Method 2: Increase VirtualBox Disk Space Using the Linux Command Line

If you face any issues while increasing the VM virtual disk space via the GUI method, here is a CLI-based method that you can apply to your Linux machine. In Linux, you can execute the below-mentioned command on the shell with sudo privileges to increase the VM disk space.

VBoxManage modifymedium "/path_to_vdi_file" --resize VBoxManage modifymedium "/media/ubuntupit/26AAD233AAD1FF6D/Linux VM/UbuntuPIT OS.vdi" --resize 12800

In the above command, we have used the name of the VM hypervisor and the path where it is located. If you do not put the VM name and the path correctly, you might face errors.

To see the actual name of the VDI file, please go to the SATA Port details from the home page of the VirtualBox.

VDI VB name

If you don’t know where the VDI file is located for your VM VirtualBox, you can check it on the VirtualBox tool. Open the VirtualBox and go to the General setting tab under the File section. You can now get the path address of the VirtualBox DVI from the Default Machine Folder section.

Читайте также:  Посмотреть размер файла линукс

vm location

2. Increase VM Virtual Disk Space on VMware

Here, we will see how to increase the disk space on the Vmware pro workstation on Linux. Using VMware is easier than VirtualBox because it provides you with a ready-to-go hypervisor. If you do not have VMware installed on your Linux system, please visit the official website of VMware and download the bundle package on your system.

To install the VMware tool, you can now execute the below-mentioned command on your Linux terminal shell.

chmod a+x VMware-Player-Full-16.2.3-19376536.x86_64.bundle sudo ./VMware-Player-Full-16.2.3-19376536.x86_64.bundle

installing VMware on Linux

Step 1: Open Vmware To Increase Disk Space on VMware

If you’re using VMware, the methods of increasing the disk space are a bit different than the VirtualBox. You will need to have the VMware installed and the hypervisor created on the Linux system. Here we will see the graphical user-interface method of expanding the disk size on a VMware on Linux.

After installing the VMware, we will now directly open the VMware. Let’s assume that we have the hypervisor already configured. You can run the below-mentioned command on the shell to check the disk lists.

check the disk space on CLI

After opening the VMware virtual machine, right-click on the hypervisor’s name and go to Hardware properties. Now, you will find the allocated disk size under the Hard Disk section.

Step 2: Increase Disk Size on VMware

Finally, to increase the disk space, click on the Expand Disk from the bottom of the hardware section.

expand disk on VMware

Then put the desired value you want to put and click on the Expand button. That’s it! You’re all done; your VM disk space is now expanded.

set to 20GB on VMware

3. Resize Disk Size with GParted

No doubt, the GParted is one of the greatest tools for partitioning disks in Linux. If you have the GParted tool on your VM Virtual machine, you can use this tool for resizing the disk space. In that case, you will need to have some free or unallocated disk space to increase VM virtual disk space.

If you do not have the GParted installed on your system, use the below-mentioned command to get it on the system.

install gparted on Linux

Now, open the GParted tool and right-click on your VMware disk. Then click on the Resize/Move button. Now, drag the bar to add more space to your VM machine’s disk. You can also put the disk size on the New Size box.

resize via gparted to increase VM virtual disk space

Finally, click on the Resize button and proceed with the root password. It will take a while to load the disks and apply the changes.

increase VM virtual disk space

Insights

It is highly recommended to take the backup of your necessary files from the VM before you start to Increase VM virtual disk space. In the entire post, we have seen how you can get started with the virtual machine and how to increase the disk space on both VirtualBox and VMware on Linux.

If you’re an expert Linux user, you can also increase the disk space without the LVM. The GParted disk tool allows you to resize the disk as well.

If you find this article has been useful for you, please do not forget to share this post with your friends and the Linux community. We also encourage you to write down your opinions in the comment section regarding this article.

Источник

Оцените статью
Adblock
detector