Rate This Document
Findability
Accuracy
Completeness
Readability

Expanding the Virtual Drive

Some game applications occupy large drive space, and drive capacity expansion is required.

  1. Check the location of the virtual drive.
    virsh dumpxml <domain>

  2. 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.

  3. Log in to the VM and adjust the VM partition size.
    1. Check the partition where the root directory is located. This partition is to be expanded.
      lsblk

    2. Select a drive and check its partition information.
      parted /dev/sda
      print

      After running the print command, select the Fix option.

    3. Expand partition 4.
      resizepart 4 -1

  4. Press Ctrl+C to exit parted and adjust the file system size.
    resize2fs /dev/sda4