diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs index 901b09b73cb..018962776f4 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs @@ -229,7 +229,10 @@ namespace HypervResource { VolumeObjectTO volume = disk.volumeObjectTO; PrimaryDataStoreTO primary = volume.primaryDataStore; - Utils.ConnectToRemote(primary.UncPath, primary.Domain, primary.User, primary.Password); + if (!primary.isLocal) + { + Utils.ConnectToRemote(primary.UncPath, primary.Domain, primary.User, primary.Password); + } string diskPath = Utils.NormalizePath(volume.FullFileName); wmiCallsV2.AttachDisk(vmName, diskPath, disk.diskSequence); result = true; @@ -1144,7 +1147,7 @@ namespace HypervResource VolumeObjectTO volume = VolumeObjectTO.ParseJson(cmd.data); PrimaryDataStoreTO primary = volume.primaryDataStore; ulong volumeSize = volume.size; - string volumeName = volume.name + ".vhdx"; + string volumeName = volume.name + ".vhd"; string volumePath = null; if (primary.isLocal) diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs index 06730e0d06b..6830fe338b7 100644 --- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs +++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs @@ -1553,7 +1553,7 @@ namespace HypervResource // Is there a template we can use to fill in the settings? var newVirtHDSettings = VirtualHardDiskSettingData.CreateInstance(); newVirtHDSettings.LateBoundObject["Type"] = 3; // Dynamic - newVirtHDSettings.LateBoundObject["Format"] = 3; // VHDX + newVirtHDSettings.LateBoundObject["Format"] = 2; // VHD newVirtHDSettings.LateBoundObject["Path"] = Path; newVirtHDSettings.LateBoundObject["MaxInternalSize"] = MaxInternalSize; newVirtHDSettings.LateBoundObject["BlockSize"] = 0; // Use defaults