VirtualEngine / Lability

Virtual Engine test lab deployment and configuration module
MIT License
282 stars 50 forks source link

Adding a new, empty virtual disk fails #393

Open Rokory opened 3 years ago

Rokory commented 3 years ago

I am trying to create and add a new, empty VHDX to a VM using this configuration data:

            Lability_HardDiskDrive = @(
                @{
                    Name = '10961C-SVR1-Allfiles.vhd'
                    Type = 'Dynamic'
                    MaximumSizeBytes = 127GB
                }
            )

However, when I try to run the configuration, it fails with error:

(Re)setting VHDX configuration '10961-LON-SVR1.vhdx'.
Remove-LabVirtualMachineHardDiskDrive
+ ...     $null = Remove-LabVirtualMachineHardDiskDrive @removeLabVirtualMa ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Remove-LabVirtualMachineHardDiskDrive], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull,Remove-LabVirtualMachineHardDiskDrive