A dynamically expanding virtual hard disk is one in which the size of the .vhd file grows as data is written to the virtual hard disk. They generally start out quite small and grow to the maximum size you set. The reason you can't resize it with
gparted is it's dynamic and only grows when data is added to it and that size is curtailed by the maximum that you set. Since your image shows the lvm flag on your volume, I'm assuming you are using the Logical Volume Manager.
Create a new partition in the unallocated space you show in your image.
Then reboot your VM or issue the command
echo 1 > /sys/class/block/sda/device/rescan to tell the kernel to rescan the drive.
Determine the device name of your new partition. I will use the example of /dev/sda6. (change this to match your situation)
To add this to our LVM configuration first we create a physical volume using the device name we determined previously.
Next determine the name of your volume group by issuing the command
pvdisplay look for a line that looks something like this:
VG Name ubuntu-1604
I will use ubuntu-1604 in this example as the volume group name. Modify as necessary to match your conditions
Using this info obtained in the above process we will extend our volume group with the command
vgextend VG name device name for example:
vgextend ubuntu1604 /dev/sda6
Find the logical volume name with the command
It might be:
LV Name /dev/ubuntu-1604/root
Now, let's extend the logical volume to all free space available:
lvextend -l+100%FREE /dev/ubuntu-1604/root
Finally lets look to see how we did with
expand hard disk LVM