LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-05-2018, 01:43 PM   #1
blooblabb24
LQ Newbie
 
Registered: May 2018
Posts: 3

Rep: Reputation: Disabled
I need help expanding the disk space on my Ubuntu VM


I initially assigned 4GB to my Ubuntu VM in VMware but that seemed to fill up instantly now i can't do anything without getting an error message saying that i need to expand the disk. But when i go to the VM hard disk settings and expand it, nothing changes. A tutorial said i need to use a "Gparted" ISO but i don't know how to run disk's in Ubuntu. When i click on it, it just opens up a bunch of files. Sorry, i am clearly a newbie and i need to get this sorted ASAP.
 
Old 05-05-2018, 01:56 PM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,476

Rep: Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447
probably this helps: https://www.unixmen.com/increase-dis...tual-machines/
 
Old 05-05-2018, 11:27 PM   #3
blooblabb24
LQ Newbie
 
Registered: May 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
my god that is confusing. is it possible to delete the ubuntu vm and re-install it with higher capacity?
 
Old 05-06-2018, 04:59 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,476

Rep: Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447Reputation: 3447
yes, sure. But you don't need to delete, just create a new one (if you wish).

(and also if that page is confusing for you just ask)
 
Old 05-07-2018, 09:34 AM   #5
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 65

Rep: Reputation: 11
Expanding Disk in VM

Remember, there are two parts to expanding disk in a VM.

First, the VM manager (or hypervisor or whatever it's called in your world -- for me on CentOS I talk to QEMU using virsh).
Here you assign more disk to VM in question.

Second, the VM has to be made aware there is more disk space, and then do whatever it has to do to incorporate it into one (or several) of the disk systems within.

Step ONE is a piece of cake -- and sounds like you've already discovered how to do that.

Step TWO depends on lots of things.
If the VM is Windows, there is a power-shell code you must run to adjust the disk.
If the VM is Linux, there is some shell scripting that needs to be done. Since I have LVM both in my main machine and within my CentOS VM, it's handled nicely and almost transparently.
If your main machine is OS/X, the parallels hypervisor gives you a slider bar and it does both sides quickly and painlessly.
I don't know if VMWare (that's what you're using, righ?) gives you the tools to do both from the one setting, like OS/X's Parallels, or a two-step process like QEMU & CentOS (my case).

A little google'ing will get you the procedure you need to run on the VM side.

Good luck!

Let us know how you make out.
 
Old 05-07-2018, 06:02 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,552

Rep: Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778
Almost hard to believe you ever had Ubuntu installed on 4Gb virtual hard drive. Guess cli could be on maybe 1.5G


Just delete the thing if this is simply a test. Delete the vm machine and remove files. Start over with at least a 32Gb virtual hard drive. Most VM's will create a very small file to start. It won't be 32Gb unless you really do fill it up next time.

Last edited by jefro; 05-07-2018 at 08:11 PM.
 
1 members found this post helpful.
Old 05-08-2018, 03:21 PM   #7
LQParsons
Member
 
Registered: Feb 2010
Location: North of Boston, Mass (North Shore/Cape Ann)
Distribution: CentOS 7.0 (and kvm/qemu)
Posts: 65

Rep: Reputation: 11
increase disk space

Hi:
Agree with the others to just build one anew.
However, don't delete the old.
I had to create a new Win and a new Linux (my old one had a major blow up during a YUM update that was huge).
For linux, I used
Code:
scp
to copy anything I needed from the old to the new.
And some stuff I had to re-install but forgot a setting or two, I could bounce back and forth.
When I thought that I was done, I just left the old one to NOT start automatically -- why throw it away until you have to. In the game of GO, even dead stones have usefulness.

BUT, I'd try some of the suggestions about how to grow it, just for the learning experience.
(Depending on your time availability, you could do this AFTER you made something anew.
 
Old 05-08-2018, 08:27 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,552

Rep: Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778
I guess if you really did want to save the exact data then I'd do this.

Make a new virtual hard drive much larger and attach to the original machine.
Boot to a clonezilla iso.
Clone the smaller drive to the larger drive.
Power down vm and remove original small drive and make the second one in it's place.
Remove the clonezilla iso
Reboot. May have to run filecheck once in a while. Fstab in some cases may be off or grub off.
 
1 members found this post helpful.
Old 05-17-2018, 06:54 PM   #9
DVOM
Member
 
Registered: Nov 2010
Posts: 223

Rep: Reputation: 48
Quote:
Originally Posted by blooblabb24 View Post
A tutorial said i need to use a "Gparted" ISO but i don't know how to run disk's in Ubuntu.
First, you're not running Gparted in Ubuntu, you're running it in VMware. So download an ISO of Gparted. Shut down your vm. Attach the gparted ISO to your VM. Fire up the VM.

























.
 
Old 06-12-2018, 08:32 PM   #10
WFV
Member
 
Registered: Apr 2012
Location: CA
Distribution: Arch
Posts: 151

Rep: Reputation: Disabled
Code:
$ VBoxManage modifymedium /home/you/VirtualBox\ VMs/GUEST/guest.vdi --resize NNNNN
This will grow it, whereas NNNNN (or NNNNNN) is the size in MB you want to grow it, e.g. 80000 = 80GB. Once its grown, launch the guest and use its GParted to grow the partition, if it won't launch, boot the guest as others mentioned with a bootable GParted iso, and grow it into the empty space.
 
1 members found this post helpful.
Old 06-13-2018, 04:35 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,552

Rep: Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778Reputation: 2778
That is a new one on me. Might have been there forever too.

"The --resize x option (where x is the desired new total space in megabytes) allows you to change the capacity of an existing image; this adjusts the logical size of a virtual disk without affecting the physical size much.[39] This currently works only for VDI and VHD formats, and only for the dynamically allocated variants, and can only be used to expand (not shrink) the capacity. For example, if you originally created a 10G disk which is now full, you can use the --resize 15360 command to change the capacity to 15G (15,360MB) without having to create a new image and copy all data from within a virtual machine. Note however that this only changes the drive capacity; you will typically next need to use a partition management tool inside the guest to adjust the main partition to fill the drive."

https://www.virtualbox.org/manual/ch...nage-modifyvdi

"need to use a partition management tool inside the guest to adjust the main partition to fill the drive"
So may have more hoops to go through depending on disk state as in format, partitioning, boot, and advanced features like lvm or other raid.

Last edited by jefro; 06-13-2018 at 04:37 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Expanding disk Ubuntu VM on Hyper V WillAC85 Linux - Newbie 1 03-02-2018 02:56 AM
Expanding Disk Space RH Server 6 Rusty Shackleford Linux - Hardware 1 04-14-2014 10:42 PM
[SOLVED] Expanding disk space linux69 Linux - General 11 08-04-2010 03:11 AM
Disk space after expanding volume Corrado Linux - General 1 05-07-2007 03:16 PM
expanding file systems and disk space jmickens Linux - Enterprise 4 10-13-2005 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration