diff --git a/test/e2e/blockdevice/importer_network_policy.go b/test/e2e/blockdevice/importer_network_policy.go index 8b4feee4d7..d29f074be8 100644 --- a/test/e2e/blockdevice/importer_network_policy.go +++ b/test/e2e/blockdevice/importer_network_policy.go @@ -46,7 +46,7 @@ var _ = Describe("ImporterNetworkPolicy", func() { util.UntilObjectState("Deployed", framework.ShortTimeout, project) By("Create virtual image") - vi := object.NewGeneratedHTTPVIUbuntu("vi-", project.Name) + vi := object.NewGeneratedHTTPVIAlpineBIOS("vi-", project.Name) err = f.CreateWithDeferredDeletion(context.Background(), vi) Expect(err).NotTo(HaveOccurred()) @@ -62,7 +62,7 @@ var _ = Describe("ImporterNetworkPolicy", func() { util.UntilObjectState("Deployed", framework.ShortTimeout, project) By("Create virtual disk") - vd := object.NewGeneratedHTTPVDUbuntu("vd-", project.Name) + vd := object.NewHTTPVDAlpineBIOS("vd-", project.Name) err = f.CreateWithDeferredDeletion(context.Background(), vd) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/blockdevice/virtual_disk_provisioning.go b/test/e2e/blockdevice/virtual_disk_provisioning.go index 0ea3cf9930..487190d308 100644 --- a/test/e2e/blockdevice/virtual_disk_provisioning.go +++ b/test/e2e/blockdevice/virtual_disk_provisioning.go @@ -54,7 +54,7 @@ var _ = Describe("VirtualDiskProvisioning", func() { vi = vibuilder.New( vibuilder.WithName("vi"), vibuilder.WithNamespace(f.Namespace().Name), - vibuilder.WithDataSourceHTTP(object.ImageURLAlpineUEFIPerf, nil, nil), + vibuilder.WithDataSourceHTTP(object.ImageURLAlpineUEFI, nil, nil), vibuilder.WithStorage(v1alpha2.StoragePersistentVolumeClaim), ) diff --git a/test/e2e/blockdevice/virtual_image_creation.go b/test/e2e/blockdevice/virtual_image_creation.go index 59359c712d..93bc034a0f 100644 --- a/test/e2e/blockdevice/virtual_image_creation.go +++ b/test/e2e/blockdevice/virtual_image_creation.go @@ -64,7 +64,7 @@ var _ = Describe("VirtualImageCreation", func() { vdbuilder.WithSize(ptr.To(resource.MustParse("350Mi"))), vdbuilder.WithDataSourceHTTP( &v1alpha2.DataSourceHTTP{ - URL: object.ImageURLAlpineUEFIPerf, + URL: object.ImageURLAlpineUEFI, }, ), ) @@ -98,9 +98,7 @@ var _ = Describe("VirtualImageCreation", func() { baseCvis = append(baseCvis, cvibuilder.New( cvibuilder.WithGenerateName(fmt.Sprintf("%s-cvi-http-", cviPrefix)), cvibuilder.WithDataSourceHTTP( - object.ImageURLAlpineUEFIPerf, - nil, - nil, + object.ImageURLAlpineUEFI, nil, nil, ), )) baseCvis = append(baseCvis, cvibuilder.New( @@ -120,9 +118,7 @@ var _ = Describe("VirtualImageCreation", func() { vibuilder.WithNamespace(f.Namespace().Name), vibuilder.WithStorage(v1alpha2.StorageContainerRegistry), vibuilder.WithDataSourceHTTP( - object.ImageURLAlpineUEFIPerf, - nil, - nil, + object.ImageURLAlpineUEFI, nil, nil, ), )) baseVis = append(baseVis, vibuilder.New( @@ -146,9 +142,7 @@ var _ = Describe("VirtualImageCreation", func() { vibuilder.WithNamespace(f.Namespace().Name), vibuilder.WithStorage(v1alpha2.StoragePersistentVolumeClaim), vibuilder.WithDataSourceHTTP( - object.ImageURLAlpineUEFIPerf, - nil, - nil, + object.ImageURLAlpineUEFI, nil, nil, ), )) baseVis = append(baseVis, vibuilder.New( diff --git a/test/e2e/internal/object/const.go b/test/e2e/internal/object/const.go index 5cadeb268f..c276537a29 100644 --- a/test/e2e/internal/object/const.go +++ b/test/e2e/internal/object/const.go @@ -17,14 +17,16 @@ limitations under the License. package object const ( - ImageURLAlpineUEFIPerf = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/alpine/alpine-3-23-3-uefi-base.qcow2" - ImageURLAlpineBIOS = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/alpine/alpine-3-23-3-bios-base.qcow2" - ImageURLUbuntu = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/ubuntu/ubuntu-24.04-minimal-cloudimg-amd64.qcow2" - ImageURLContainerImage = "cr.yandex/crpvs5j3nh1mi2tpithr/e2e/alpine/alpine-image:latest" - ImageURLMinimalQCOW = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/test/test.qcow2" - ImageURLMinimalISO = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/test/test.iso" - Mi256 = 256 * 1024 * 1024 - DefaultVMClass = "generic" + ImageURLAlpineUEFI = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/alpine/alpine-3-23-3-uefi-base.qcow2" + ImageURLAlpineBIOS = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/alpine/alpine-3-23-3-bios-base.qcow2" + ImagesURLAlpineUEFIPerf = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/alpine/alpine-3-21-uefi-perf.qcow2" + ImageURLUbuntu = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/ubuntu/ubuntu-24.04-minimal-cloudimg-amd64.qcow2" + ImageURLContainerImage = "cr.yandex/crpvs5j3nh1mi2tpithr/e2e/alpine/alpine-image:latest" + // No bootable + ImageTestDataQCOW = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/test/test.qcow2" + ImageTestDataISO = "https://89d64382-20df-4581-8cc7-80df331f67fa.selstorage.ru/test/test.iso" + Mi256 = 256 * 1024 * 1024 + DefaultVMClass = "generic" cloudInitBase = `#cloud-config package_update: true diff --git a/test/e2e/internal/object/cvi.go b/test/e2e/internal/object/cvi.go index 698664a2eb..a81d0fe341 100644 --- a/test/e2e/internal/object/cvi.go +++ b/test/e2e/internal/object/cvi.go @@ -25,9 +25,7 @@ func NewHTTPCVIUbuntu(name string, opts ...cvi.Option) *v1alpha2.ClusterVirtualI baseOpts := []cvi.Option{ cvi.WithName(name), cvi.WithDataSourceHTTP( - ImageURLAlpineBIOS, - nil, - nil, + ImageURLUbuntu, nil, nil, ), } baseOpts = append(baseOpts, opts...) @@ -38,9 +36,7 @@ func NewGenerateHTTPCVIUbuntu(prefix string, opts ...cvi.Option) *v1alpha2.Clust baseOpts := []cvi.Option{ cvi.WithGenerateName(prefix), cvi.WithDataSourceHTTP( - ImageURLAlpineBIOS, - nil, - nil, + ImageURLUbuntu, nil, nil, ), } baseOpts = append(baseOpts, opts...) diff --git a/test/e2e/internal/object/vd.go b/test/e2e/internal/object/vd.go index b3bf427d5d..13b76d2b3a 100644 --- a/test/e2e/internal/object/vd.go +++ b/test/e2e/internal/object/vd.go @@ -78,7 +78,7 @@ func NewGeneratedHTTPVDUbuntu(prefix, namespace string, opts ...vd.Option) *v1al vd.WithGenerateName(prefix), vd.WithNamespace(namespace), vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ - URL: ImageURLAlpineBIOS, + URL: ImageURLUbuntu, }), } baseOpts = append(baseOpts, opts...) @@ -96,3 +96,27 @@ func NewHTTPVDAlpineBIOS(name, namespace string, opts ...vd.Option) *v1alpha2.Vi baseOpts = append(baseOpts, opts...) return vd.New(baseOpts...) } + +func NewHTTPVDAlpineUEFI(name, namespace string, opts ...vd.Option) *v1alpha2.VirtualDisk { + baseOpts := []vd.Option{ + vd.WithName(name), + vd.WithNamespace(namespace), + vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ + URL: ImageURLAlpineUEFI, + }), + } + baseOpts = append(baseOpts, opts...) + return vd.New(baseOpts...) +} + +func NewHTTPVDAlpineUEFIPerf(name, namespace string, opts ...vd.Option) *v1alpha2.VirtualDisk { + baseOpts := []vd.Option{ + vd.WithName(name), + vd.WithNamespace(namespace), + vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ + URL: ImagesURLAlpineUEFIPerf, + }), + } + baseOpts = append(baseOpts, opts...) + return vd.New(baseOpts...) +} diff --git a/test/e2e/internal/object/vi.go b/test/e2e/internal/object/vi.go index dbfe55f484..7b70b3597d 100644 --- a/test/e2e/internal/object/vi.go +++ b/test/e2e/internal/object/vi.go @@ -27,9 +27,35 @@ func NewHTTPVIUbuntu(name, namespace string, opts ...vi.Option) *v1alpha2.Virtua vi.WithStorage(v1alpha2.StorageContainerRegistry), vi.WithNamespace(namespace), vi.WithDataSourceHTTP( - ImageURLAlpineBIOS, - nil, - nil, + ImageURLUbuntu, nil, nil, + ), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + } + baseOpts = append(baseOpts, opts...) + return vi.New(baseOpts...) +} + +func NewHTTPVIAlpineBIOS(name, namespace string, opts ...vi.Option) *v1alpha2.VirtualImage { + baseOpts := []vi.Option{ + vi.WithName(name), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + vi.WithNamespace(namespace), + vi.WithDataSourceHTTP( + ImageURLAlpineBIOS, nil, nil, + ), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + } + baseOpts = append(baseOpts, opts...) + return vi.New(baseOpts...) +} + +func NewHTTPVIAlpineUEFI(name, namespace string, opts ...vi.Option) *v1alpha2.VirtualImage { + baseOpts := []vi.Option{ + vi.WithName(name), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + vi.WithNamespace(namespace), + vi.WithDataSourceHTTP( + ImageURLAlpineUEFI, nil, nil, ), vi.WithStorage(v1alpha2.StorageContainerRegistry), } @@ -42,9 +68,33 @@ func NewGeneratedHTTPVIUbuntu(prefix, namespace string, opts ...vi.Option) *v1al vi.WithGenerateName(prefix), vi.WithNamespace(namespace), vi.WithDataSourceHTTP( - ImageURLAlpineBIOS, - nil, - nil, + ImageURLUbuntu, nil, nil, + ), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + } + baseOpts = append(baseOpts, opts...) + return vi.New(baseOpts...) +} + +func NewGeneratedHTTPVIAlpineBIOS(prefix, namespace string, opts ...vi.Option) *v1alpha2.VirtualImage { + baseOpts := []vi.Option{ + vi.WithGenerateName(prefix), + vi.WithNamespace(namespace), + vi.WithDataSourceHTTP( + ImageURLAlpineBIOS, nil, nil, + ), + vi.WithStorage(v1alpha2.StorageContainerRegistry), + } + baseOpts = append(baseOpts, opts...) + return vi.New(baseOpts...) +} + +func NewGeneratedHTTPVIAlpineUEFI(prefix, namespace string, opts ...vi.Option) *v1alpha2.VirtualImage { + baseOpts := []vi.Option{ + vi.WithGenerateName(prefix), + vi.WithNamespace(namespace), + vi.WithDataSourceHTTP( + ImageURLAlpineUEFI, nil, nil, ), vi.WithStorage(v1alpha2.StorageContainerRegistry), } diff --git a/test/e2e/internal/util/sdn.go b/test/e2e/internal/util/sdn.go index 74dbd39f24..ecd2566326 100644 --- a/test/e2e/internal/util/sdn.go +++ b/test/e2e/internal/util/sdn.go @@ -29,13 +29,13 @@ import ( ) const ( - ClusterNetworkName = "cn-1003-for-e2e-test" - ClusterNetworkVLANID = 1003 + ClusterNetworkName = "cn-4006-for-e2e-test" + ClusterNetworkVLANID = 4006 ClusterNetworkCreateCommand = `kubectl apply -f - < % in output @@ -244,14 +229,14 @@ func checkConnectivityBetweenVMs(f *framework.Framework, vmFoo, vmBar *v1alpha2. } const ( - Interval = 5 * time.Second + Interval = 1 * time.Second Timeout = 90 * time.Second ) func checkResultSSHCommand(f *framework.Framework, vmName, vmNamespace, cmd, equal string) { GinkgoHelper() Eventually(func() (string, error) { - res, err := f.SSHCommand(vmName, vmNamespace, cmd) + res, err := f.SSHCommand(vmName, vmNamespace, cmd, framework.WithSSHTimeout(5*time.Second)) if err != nil { return "", fmt.Errorf("cmd: %s\nstderr: %w", cmd, err) } diff --git a/test/e2e/vm/live_migration_tcp_session.go b/test/e2e/vm/live_migration_tcp_session.go index a0cc6b312e..92ad45e721 100644 --- a/test/e2e/vm/live_migration_tcp_session.go +++ b/test/e2e/vm/live_migration_tcp_session.go @@ -76,7 +76,7 @@ var _ = Describe("VirtualMachineLiveMigrationTCPSession", func() { vd.WithSize(ptr.To(resource.MustParse("400Mi"))), vd.WithStorageClass(&storageClass.Name), vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ - URL: object.ImageURLAlpineUEFIPerf, + URL: object.ImageURLAlpineUEFI, }), ) @@ -86,7 +86,7 @@ var _ = Describe("VirtualMachineLiveMigrationTCPSession", func() { vd.WithSize(ptr.To(resource.MustParse("500Mi"))), vd.WithStorageClass(&storageClass.Name), vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ - URL: object.ImageURLAlpineUEFIPerf, + URL: object.ImageURLAlpineUEFI, }), ) diff --git a/test/e2e/vm/migration.go b/test/e2e/vm/migration.go index 33ec61bbaf..b6baf7f062 100644 --- a/test/e2e/vm/migration.go +++ b/test/e2e/vm/migration.go @@ -93,7 +93,7 @@ var _ = Describe("VirtualMachineMigration", func() { vd.WithNamespace(f.Namespace().Name), vd.WithSize(ptr.To(resource.MustParse("10Gi"))), vd.WithDataSourceHTTP(&v1alpha2.DataSourceHTTP{ - URL: object.ImageURLAlpineUEFIPerf, + URL: object.ImageURLAlpineUEFI, }), ) vdBlankUEFI = vd.New( @@ -149,23 +149,23 @@ var _ = Describe("VirtualMachineMigration", func() { viHotplugBIOS = vi.New( vi.WithName("vi-hotplug-bios"), vi.WithNamespace(f.Namespace().Name), - vi.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + vi.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), vi.WithStorage(v1alpha2.StorageContainerRegistry), ) viHotplugUEFI = vi.New( vi.WithName("vi-hotplug-uefi"), vi.WithNamespace(f.Namespace().Name), - vi.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + vi.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), vi.WithStorage(v1alpha2.StorageContainerRegistry), ) cviHotplugBIOS = cvi.New( cvi.WithName("cvi-hotplug-bios"), - cvi.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + cvi.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), ) cviHotplugUEFI = cvi.New( cvi.WithName("cvi-hotplug-uefi"), - cvi.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + cvi.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), ) vmbdaVdBIOS := vmbda.New( diff --git a/test/e2e/vm/power_state.go b/test/e2e/vm/power_state.go index 6240b27b07..78e5a12ad4 100644 --- a/test/e2e/vm/power_state.go +++ b/test/e2e/vm/power_state.go @@ -212,13 +212,13 @@ func newPowerStateTest(f *framework.Framework) *powerStateTest { func (t *powerStateTest) GenerateResources(runPolicy v1alpha2.RunPolicy) { t.CVI = cvibuilder.New( cvibuilder.WithName(fmt.Sprintf("%s-cvi", t.Framework.Namespace().Name)), - cvibuilder.WithDataSourceHTTP(object.ImageURLMinimalISO, nil, nil), + cvibuilder.WithDataSourceHTTP(object.ImageTestDataISO, nil, nil), ) t.VI = vibuilder.New( vibuilder.WithName("vi"), vibuilder.WithNamespace(t.Framework.Namespace().Name), - vibuilder.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + vibuilder.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), vibuilder.WithStorage(v1alpha2.StorageContainerRegistry), ) diff --git a/test/e2e/vm/volume_migration_local_disks.go b/test/e2e/vm/volume_migration_local_disks.go index 023bcae917..859db3edff 100644 --- a/test/e2e/vm/volume_migration_local_disks.go +++ b/test/e2e/vm/volume_migration_local_disks.go @@ -70,7 +70,7 @@ var _ = Describe("LocalVirtualDiskMigration", decoratorsForVolumeMigrations(), f DeferCleanup(f.After) - newVI := object.NewGeneratedHTTPVIUbuntu("volume-migration-local-disks-", f.Namespace().Name) + newVI := object.NewGeneratedHTTPVIAlpineBIOS("volume-migration-local-disks-", f.Namespace().Name) newVI, err := f.VirtClient().VirtualImages(f.Namespace().Name).Create(context.Background(), newVI, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) f.DeferDelete(newVI) @@ -78,8 +78,8 @@ var _ = Describe("LocalVirtualDiskMigration", decoratorsForVolumeMigrations(), f }) const ( - vdRootName = "vd-ubuntu-root-disk" - vdAdditionalName = "vd-ubuntu-additional-disk" + vdRootName = "vd-alpine-root-disk" + vdAdditionalName = "vd-alpine-additional-disk" ) localMigrationRootOnlyBuild := func() (*v1alpha2.VirtualMachine, []*v1alpha2.VirtualDisk) { diff --git a/test/e2e/vm/volume_migration_storage_class_changed.go b/test/e2e/vm/volume_migration_storage_class_changed.go index 6c1f686407..8ccbb88bba 100644 --- a/test/e2e/vm/volume_migration_storage_class_changed.go +++ b/test/e2e/vm/volume_migration_storage_class_changed.go @@ -68,7 +68,7 @@ var _ = Describe("StorageClassMigration", decoratorsForVolumeMigrations(), func( DeferCleanup(f.After) - newVI := object.NewGeneratedHTTPVIUbuntu("volume-migration-storage-class-changed-", f.Namespace().Name) + newVI := object.NewGeneratedHTTPVIAlpineBIOS("volume-migration-storage-class-changed-", f.Namespace().Name) newVI, err = f.VirtClient().VirtualImages(f.Namespace().Name).Create(context.Background(), newVI, metav1.CreateOptions{}) Expect(err).NotTo(HaveOccurred()) f.DeferDelete(newVI) @@ -76,8 +76,8 @@ var _ = Describe("StorageClassMigration", decoratorsForVolumeMigrations(), func( }) const ( - vdRootName = "vd-ubuntu-root-disk" - vdAdditionalName = "vd-ubuntu-additional-disk" + vdRootName = "vd-alpine-root-disk" + vdAdditionalName = "vd-alpine-additional-disk" ) storageClassMigrationRootOnlyBuild := func() (*v1alpha2.VirtualMachine, []*v1alpha2.VirtualDisk) { diff --git a/test/e2e/vmop/restore.go b/test/e2e/vmop/restore.go index 6b3616a567..36d39fccd3 100644 --- a/test/e2e/vmop/restore.go +++ b/test/e2e/vmop/restore.go @@ -266,13 +266,13 @@ func newRestoreTest(f *framework.Framework) *restoreModeTest { func (t *restoreModeTest) GenerateResources(restoreMode v1alpha2.SnapshotOperationMode, restartApprovalMode v1alpha2.RestartApprovalMode, runPolicy v1alpha2.RunPolicy) { t.CVI = cvibuilder.New( cvibuilder.WithName(fmt.Sprintf("%s-cvi", t.Framework.Namespace().Name)), - cvibuilder.WithDataSourceHTTP(object.ImageURLMinimalISO, nil, nil), + cvibuilder.WithDataSourceHTTP(object.ImageTestDataISO, nil, nil), ) t.VI = vibuilder.New( vibuilder.WithName("vi"), vibuilder.WithNamespace(t.Framework.Namespace().Name), - vibuilder.WithDataSourceHTTP(object.ImageURLMinimalQCOW, nil, nil), + vibuilder.WithDataSourceHTTP(object.ImageTestDataQCOW, nil, nil), vibuilder.WithStorage(v1alpha2.StorageContainerRegistry), )