Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,19 @@ index cc09800afc..346eb883ae 100644
disk.Type = "file"
disk.Driver.Type = "qcow2"
disk.Driver.ErrorPolicy = v1.DiskErrorPolicyStop
diff --git a/pkg/virt-launcher/virtwrap/live-migration-source.go b/pkg/virt-launcher/virtwrap/live-migration-source.go
index f580d06e52..afbc2538d3 100644
--- a/pkg/virt-launcher/virtwrap/live-migration-source.go
+++ b/pkg/virt-launcher/virtwrap/live-migration-source.go
@@ -289,9 +289,9 @@ func classifyVolumesForMigration(vmi *v1.VirtualMachineInstance) *migrationDisks

case volSrc.ConfigMap != nil || volSrc.Secret != nil || volSrc.DownwardAPI != nil ||
volSrc.ServiceAccount != nil || volSrc.CloudInitNoCloud != nil ||
- volSrc.CloudInitConfigDrive != nil || (volSrc.ContainerDisk != nil && !volSrc.ContainerDisk.Hotpluggable):
+ volSrc.CloudInitConfigDrive != nil:
disks.generated[volume.Name] = true
- case volSrc.ContainerDisk != nil && volSrc.ContainerDisk.Hotpluggable:
+ case volSrc.ContainerDisk != nil:
disks.shared[volume.Name] = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ func (b *KVVM) SetDisk(name string, opts SetDiskOptions) error {
vs.Ephemeral = &virtv1.EphemeralVolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: *opts.PersistentVolumeClaim,
ReadOnly: true,
},
}

Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/testdata/vm-migration/cvi/cvi-cirros.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: virtualization.deckhouse.io/v1alpha2
kind: ClusterVirtualImage
metadata:
name: cvi-cirros
spec:
dataSource:
type: "HTTP"
http:
url: "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/cirros/cirros-0.5.1.qcow2"
4 changes: 4 additions & 0 deletions tests/e2e/testdata/vm-migration/cvi/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cvi-cirros.yaml
1 change: 1 addition & 0 deletions tests/e2e/testdata/vm-migration/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace: testcases
namePrefix: pr-number-or-commit-hash-
resources:
- vi
- cvi
- vm
- ns.yaml
configurations:
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/testdata/vm-migration/vm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ kind: Kustomization
resources:
- overlays/migration-bios
- overlays/migration-uefi
- overlays/with-cvi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
nameSuffix: -migration-with-cvi
resources:
- ../../base
patches:
- path: vd.image.patch.yaml
- path: vm.bootloader.patch.yaml
- patch: |-
- op: add
path: /spec/blockDeviceRefs/-
value: {
"kind": "ClusterVirtualImage",
"name": "cvi-cirros"
}
target:
kind: VirtualMachine
name: vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: virtualization.deckhouse.io/v1alpha2
kind: VirtualDisk
metadata:
name: vd-root
spec:
dataSource:
type: ObjectRef
objectRef:
kind: VirtualImage
name: vi-alpine-http-uefi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: virtualization.deckhouse.io/v1alpha2
kind: VirtualMachine
metadata:
name: vm
spec:
bootloader: EFI
2 changes: 1 addition & 1 deletion tests/e2e/vm_migration_cancel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
kc "github.com/deckhouse/virtualization/tests/e2e/kubectl"
)

var _ = Describe("Virtual machine migration cancel", SIGMigration(), ginkgoutil.CommonE2ETestDecorators(), func() {
var _ = Describe("Virtual machine cancel migration", SIGMigration(), ginkgoutil.CommonE2ETestDecorators(), func() {
testCaseLabel := map[string]string{"testcase": "vm-migration-cancel"}

BeforeEach(func() {
Expand Down
Loading