Re: How to resize primary partition with unallocated space
You won't be able to resize a running partition. So if the primary partition you want to resize has your booted up ubuntu on it you can't do it. You will have to boot from a Parted Magic CD or similar that has gparted on it in order to reallocate free space.
As you are working with a VM, you can download a partedmagic iso and simply attach it to the VM and run it.
Once gparted is up and running, select the partition you want to extend, right click on it and choose resize/move, then drag the arrows at either end to where you want them, then click on the resize/move button bottom right. This sets up the action but doesn't implement it. When ready, click on the "Apply All Operations" button on the icon menu, and wait. If all goes well, your partition should be resized.
The best things in life are free, so what are we paying for?