Focused on the recovery partition, windows cannot expand main partition because of recovery partition right after this. In order to expand, recovery partition needs to be removed.
Open the Computer Management Utility to identify the partition, in this case the recovery, using Disk Management tool.
User Search tool at Windows Start symbol and type
Diskpart
Right click and open as administrator.
To determine disk unit number:
list disk
To access disk with the number:
select disk <number>
T list partitions inside this disk:
list partition
To open the partition to be deleted:
select partition <number>
To permanently delete partition:
delete partition override
Open the Computer Management Utility and using Disk Management tool, right click on existing partition to be extended and select
Expand…
To add more capacity in a virtual machine disk, follow these instructions and get back to this guide