Failed to expand to the maximum partition size
Since resizing the partition that is currently mounted for the operating system is impossible and the filesystem (FS) may be corrupted. One of the solutions is to use a live CD, especially GParted Live ISO which has installed many tools related to disk management such as partition.

However, GParted can check the integrity of the FS, but it is not able to resize the partition to the maximum size. Hence, parted, a command-line tool, is used. (Thanks for @klanomath 's hints.)

Step 1:  Find out which partition has to be expanded.

$ sudo parted /dev/sd[x]
(parted) unit s print free  # unit: sectors


Step 2:  Expand the selected partition to the designated sector.

(parted) resizepart &lt;partition&gt; &lt;end&gt;s


Step 3: Shutdown the Live system.

Step 4: Restart the macOS VM, and repair the disk.

$ sudo diskutil repairDisk disk[y]