Expand the drive of a newly provisioned Red Hat Linux server on VMware vSphere 8

Expand the drive of a newly provisioned Red Hat Linux server on VMware vSphere 8
Photo by Yasin Arıbuğa / Unsplash

This is a continuation of a blog about provisioning a Red Hat Enterprise Linux Server on a VMware vSphere 8 environment. The RHEL virtual machine will be used as the Apache CloudStack management server.

This blog post can also be used as a reference for expanding a boot drive of a newly provisioned Red Hat Enterprise Linux 8 server built from a VM template.

Task Duration Estimate - 10 minutes

Step 1
Power up the virtual machine. On the selected virtual machine, press the green Play button.

Power up virtual machine

Step 2
Logon to the Linux virtual machine using the following credentials,
login - packer
password - VMw@re123!
NOTE: This is VM is for a home lab build. Make sure to change these passwords.

Launch Web Console
Red Hat login prompt

Step 3
Change the server hostname and time zone.

Change host name and time zone.

Step 4
Check the disk space allocation using the lsblk command.
Use the vgdisplay command to show available free space.
NOTE: The size of useable space is shown in disk partition sda3.

lsblk command output
vgdisplay shows no available space

Step 5
Run the pvresize /dev/sda3 command.
Run the vgs command to confirm the change in available space on the volume group.

pvresize command
vgs command output

Step 6
Run the lvextend and xfs_growfs command to allocate free space to the root logical volume.
Run the df -h command to confirm the change in size.

lvextend, xfs_growfs, df -h command output

Read more