Actually compare disk size with requested size

This commit is contained in:
Brian Cain 2020-04-13 14:35:54 -07:00
parent b6c99510c4
commit b79d6bdc27
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0

View File

@ -116,7 +116,7 @@ module VagrantPlugins
# Hyper-V returns disk size in bytes
requested_disk_size = disk_config.size
disk_actual = machine.provider.driver.get_disk(defined_disk["Path"])
defined_disk_size = disk_config.size
defined_disk_size = disk_actual["Size"]
if defined_disk_size > requested_disk_size
# TODO: Check if disk (maybe use file path) is of type `VHDX`. If not, the disk cannot be shrunk