Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Jan 16, 2025
1 parent 015e490 commit 05b6295
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions images/virt-artifact/patches/032-hotplug-container-disk.patch
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,19 @@ index 0af25f8074..803c0ed4cd 100644
},
})
}
diff --git a/pkg/virt-api/webhooks/validating-webhook/admitters/vms-admitter.go b/pkg/virt-api/webhooks/validating-webhook/admitters/vms-admitter.go
index f7e4f92727..2b454ca23e 100644
--- a/pkg/virt-api/webhooks/validating-webhook/admitters/vms-admitter.go
+++ b/pkg/virt-api/webhooks/validating-webhook/admitters/vms-admitter.go
@@ -591,6 +591,8 @@ func (admitter *VMsAdmitter) validateVolumeRequests(vm *v1.VirtualMachine) ([]me
newVolume.VolumeSource.PersistentVolumeClaim = volumeRequest.AddVolumeOptions.VolumeSource.PersistentVolumeClaim
} else if volumeRequest.AddVolumeOptions.VolumeSource.DataVolume != nil {
newVolume.VolumeSource.DataVolume = volumeRequest.AddVolumeOptions.VolumeSource.DataVolume
+ } else if volumeRequest.AddVolumeOptions.VolumeSource.ContainerDisk != nil {
+ newVolume.VolumeSource.ContainerDisk = volumeRequest.AddVolumeOptions.VolumeSource.ContainerDisk
}

vmVolume, ok := vmVolumeMap[name]
diff --git a/pkg/virt-controller/services/template.go b/pkg/virt-controller/services/template.go
index 76ed7307ec..f607c24786 100644
--- a/pkg/virt-controller/services/template.go
Expand Down

0 comments on commit 05b6295

Please sign in to comment.