• We did not send an email asking for donations - please read this post.

How to increase size of Linux Virtual machine?

hamid.sattar

New Member
Joined
Apr 14, 2021
Messages
10
Reaction score
0
Credits
98
Hello there!

I have a virtual machine installed on ESXI host. The storage capicity is 30GB. I want to increase the storage from 30GB to 50GB. The current partition is below.
1- /boot 1-GB
2./ 27GB
3./swap 2GB

I have powered off the machine and increase the size of harddrive but still the same space. Can someone explain this to me?
 


Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,472
Reaction score
1,195
Credits
10,700

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
633
Reaction score
443
Credits
4,623
It was once possible to do this in Virtulabox but not anymore.
sad0018.gif
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
7,321
Reaction score
6,315
Credits
59,315
You can do this in VirtualBox. Make the disk larger in VBox and then adjust the OS (with like GParted) to take up the new space.

I have no idea how to do this in ESXI - but it's probably a similar process.
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,552
Reaction score
1,170
Credits
9,863
I can't simply enlarge the disk space, there is a second step.
It depends also on whether you are using LVM, or regular file systems.
But you will have to increase the partition and the filesystem.
 
OP
H

hamid.sattar

New Member
Joined
Apr 14, 2021
Messages
10
Reaction score
0
Credits
98
I can't simply enlarge the disk space, there is a second step.
It depends also on whether you are using LVM, or regular file systems.
But you will have to increase the partition and the filesystem.
I guess its LVM. I had created manual partition with logical volume
 

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,552
Reaction score
1,170
Credits
9,863
What is output of vgdisplay ?
 
OP
H

hamid.sattar

New Member
Joined
Apr 14, 2021
Messages
10
Reaction score
0
Credits
98
This is the output of fdisk -l. VM is installed on ESXI host. I want to increase the size of sda7.

[email protected]:~# fdisk -l
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6cef9a30

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2046 209713151 209711106 100G 5 Extended
/dev/sda5 2048 6639615 6637568 3.2G 83 Linux
/dev/sda6 194091008 209713151 15622144 7.4G 82 Linux swap / Solaris
/dev/sda7 6641664 194088959 187447296 89.4G 83 Linux
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Staff online

Members online


Top