Expanding the Virtual Drive
Some game applications occupy large drive space, and drive capacity expansion is required.
- Check the location of the virtual drive.
virsh dumpxml <domain>

- Adjust the virtual drive space.
qemu-img resize /home/VirtualMachine/Disks/oe22.03-lts-sp1-64cores.qcow2 600G
This command expands the virtual drive space to 600 GB.
- Log in to the VM and adjust the VM partition size.
- Check the partition where the root directory is located. This partition is to be expanded.
lsblk

- Select a drive and check its partition information.
parted /dev/sda print
After running the print command, select the Fix option.

- Expand partition 4.
resizepart 4 -1

- Check the partition where the root directory is located. This partition is to be expanded.
- Press to exit parted and adjust the file system size.
resize2fs /dev/sda4

Parent topic: VM Copying