fix: change hotplug pvc using isBlockPVC
when hotplug a PVC Block to a running VMI, here should be judged as isBlockPVC but not isBlockDV, otherwise here would be regarded as a disk.img
@@ -531,7 +531,7 @@ func Convert_v1_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c
// Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk converts a Hotplugged PVC to an api disk
func Convert_v1_Hotplug_PersistentVolumeClaim_To_api_Disk(name string, disk *api.Disk, c *ConverterContext) error {
- if c.IsBlockDV[name] {
+ if c.IsBlockPVC[name] {
return Convert_v1_Hotplug_BlockVolumeSource_To_api_Disk(name, disk, c.VolumesDiscardIgnore)
}
return Convert_v1_Hotplug_FilesystemVolumeSource_To_api_Disk(name, disk, c.VolumesDiscardIgnore)
