Disk Image Resize
How to manually resize an APFS container or HFS volume
Intel Nodes Only
This guide is applicable to VMs deployed on Intel nodes only. Read more about Apple ARM-based Support (Beta) to see which commands and options are supported for VMs deployed on Apple ARM-based nodes.
Quick navigation
Jump to: Overview | Determine Filesystem Type | Resizing APFS Containers | Resizing HFS Volumes
Overview
When resizing a disk image using the command orka image resize
, you have two options:
- Automatic Resize: Provide SSH credentials for the VM along with the new image size. In this scenario, the Orka API will resize the virtual disk image as well as growing the disk partition to fill the available space.
- Manual Resize: Provide only the new image size. If you choose not to provide SSH credentials (or SSH is not enabled in the VM) then you will need to manually resize the disk partition using the instructions below.
Determine Filesystem Type
In order to manually resize the disk partition, you must first determine the filesystem type used by macOS. Establish an SSH connection to the VM or connect via VNC and open Applications -> Utilities -> Terminal
. Run the command diskutil list
to determine the filesystem type.
For APFS filesystems (Mojave and later) you should see output similar to the following:

Output of diskutil list on APFS filesystem
For HFS filesystems (High Sierra and earlier) you should see output similar to the following:

Output of diskutil list on HFS filesystem
IMPORTANT
Note the identifier for the container (APFS) or volume (HFS) in the output seen from
diskutil list
. In the example above, the APFS container is located ondisk1
with identifierdisk1s2
and the HFS volume is located ondisk1
with identifierdisk1s2
. The disk and identifier will be needed in the next step.
Resizing APFS Containers
In order to resize an APFS container, run the following commands using the appropriate disk name and identifier from the previous step:
diskutil repairDisk disk1
diskutil apfs resizeContainer disk1s2 0
If the resize was successful, you should see the tail of the output similar to what is shown below:

Successful resize on APFS container
Resizing HFS Volumes
In order to resize an HFS volume, run the following commands using the appropriate disk name and identifier from the previous step:
diskutil repairDisk disk1
diskutil resizeVolume disk1s2 R
If the resize was successful, you should see the tail of the output similar to what is shown below:

Successful resize on HFS volume
Updated over 1 year ago