Description of problem: To create VMExport object we need to specify the APIGroup of exported object Version-Release number of selected component (if applicable): 4.12 How reproducible: Always Steps to Reproduce: 1. Create a VM 2. Create a VMSnapshot 3. Create a VMExport for VMSnapshot without specifying the APIGroup $ cat vmexport-snapshot.yaml apiVersion: export.kubevirt.io/v1alpha1 kind: VirtualMachineExport metadata: name: export-vmsnapshot spec: source: kind: VirtualMachineSnapshot name: my-vmsnapshot tokenSecretRef: virt-export-token Actual results: The VMExport was created, but it is not Ready and doesn't show any error $ oc get virtualmachineexport NAME SOURCEKIND SOURCENAME PHASE export-vmsnapshot VirtualMachineSnapshot my-vmsnapshot Expected results: VMExport will fail to create saying APIGroup needs to be specified
Verified on CNV-v4.12.0-665 Create a VM and VMSnapshot, Create a token: $ cat token.yaml apiVersion: v1 kind: Secret metadata: name: virt-export-token data: token: bXl0b2tlbg== $ oc create -f token.yaml secret/virt-export-token created Create VMExport with no API Group: $ cat export-wrong-api-group.yaml apiVersion: export.kubevirt.io/v1alpha1 kind: VirtualMachineExport metadata: name: export-vmsnapshot spec: source: kind: VirtualMachineSnapshot name: my-vmsnapshot tokenSecretRef: virt-export-token $ oc create -f export-wrong-api-group.yaml The request is invalid: spec.source.APIGroup: VMSnapshot API group must be snapshot.kubevirt.io Create VMExport with the wrong API Group: $ cat export-wrong-api-group.yaml apiVersion: export.kubevirt.io/v1alpha1 kind: VirtualMachineExport metadata: name: export-vmsnapshot spec: source: apiGroup: "snapshot.kubevirt.io-hohoho" kind: VirtualMachineSnapshot name: my-vmsnapshot tokenSecretRef: virt-export-token $ oc create -f export-wrong-api-group.yaml The request is invalid: spec.source.APIGroup: VMSnapshot API group must be snapshot.kubevirt.io
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:0408