Bug 1977277 - Migration of 'Migratable' VMs fails although live migration is enabled for the target environment
Summary: Migration of 'Migratable' VMs fails although live migration is enabled for th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: V2V
Version: 4.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.8.1
Assignee: Sam Lucidi
QA Contact: Daniel Gur
URL:
Whiteboard:
Depends On:
Blocks: 1979803 1979851
TreeView+ depends on / blocked
 
Reported: 2021-06-29 11:26 UTC by Amos Mastbaum
Modified: 2021-08-30 14:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1979803 (view as bug list)
Environment:
Last Closed: 2021-08-24 12:49:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmio controller log (241 bytes, text/plain)
2021-06-29 11:26 UTC, Amos Mastbaum
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt vm-import-operator pull 504 0 None None None 2021-08-09 08:50:37 UTC
Red Hat Product Errata RHSA-2021:3259 0 None None None 2021-08-24 12:49:30 UTC

Description Amos Mastbaum 2021-06-29 11:26:36 UTC
Created attachment 1795753 [details]
vmio controller log

Description of problem:

Any rhv vmio import is blocked:





Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:


vmimport:
--------- 
apiVersion: v2v.kubevirt.io/v1beta1
kind: VirtualMachineImport
metadata:
  generateName: vm-import-v2v-rhel8-vm-
  annotations:
    vmimport.v2v.kubevirt.io/propagate-annotations: >-
      {"description":"generated by virt-v2v
      1.40.2rhel=8,release=24.module+el8.2.1+7154+47ffd890,libvirt"}
  resourceVersion: '159154'
  name: vm-import-v2v-rhel8-vm-hw99j
  uid: fff1f590-1d6d-4fe3-90e5-22b9056834df
  creationTimestamp: '2021-06-29T10:53:31Z'
  generation: 1
  managedFields:
    - apiVersion: v2v.kubevirt.io/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:vmimport.v2v.kubevirt.io/propagate-annotations': {}
          'f:generateName': {}
        'f:spec':
          .: {}
          'f:providerCredentialsSecret':
            .: {}
            'f:name': {}
            'f:namespace': {}
          'f:source':
            .: {}
            'f:ovirt':
              .: {}
              'f:mappings':
                .: {}
                'f:diskMappings': {}
                'f:networkMappings': {}
              'f:vm':
                .: {}
                'f:id': {}
          'f:startVm': {}
          'f:targetVmName': {}
      manager: Mozilla
      operation: Update
      time: '2021-06-29T10:53:31Z'
    - apiVersion: v2v.kubevirt.io/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:finalizers':
            .: {}
            'v:"vmimport.v2v.kubevirt.io/cancelled-import"': {}
        'f:status':
          .: {}
          'f:conditions': {}
          'f:targetVmName': {}
          'f:warmImport':
            .: {}
            'f:consecutiveFailures': {}
            'f:failures': {}
            'f:successes': {}
      manager: vm-import-controller
      operation: Update
      time: '2021-06-29T10:53:31Z'
  namespace: default
  finalizers:
    - vmimport.v2v.kubevirt.io/cancelled-import
spec:
  providerCredentialsSecret:
    name: vm-import-v2v-rhel8-vm-rnhfx
    namespace: default
  source:
    ovirt:
      mappings:
        diskMappings:
          - source:
              id: 380dc04a-b9d5-4c37-9038-d3e9baf75ce9
            target:
              name: nfs
            volumeMode: Filesystem
        networkMappings:
          - source:
              id: 0000000a-000a-000a-000a-000000000398
            type: pod
      vm:
        id: 6261ea28-71f9-4355-bba4-d54ba386dac8
  startVm: false
  targetVmName: v2v-rhel8-vm
status:
  conditions:
    - lastHeartbeatTime: '2021-06-29T11:23:00Z'
      lastTransitionTime: '2021-06-29T10:53:31Z'
      message: Validation completed successfully
      reason: ValidationCompleted
      status: 'True'
      type: Valid
    - lastHeartbeatTime: '2021-06-29T11:23:00Z'
      lastTransitionTime: '2021-06-29T10:53:31Z'
      message: VM has placement policy affinity set to `migratable`
      reason: MappingRulesVerificationFailed
      status: 'False'
      type: MappingRulesVerified
  targetVmName: ''
  warmImport:
    consecutiveFailures: 0
    failures: 0
    successes: 0


From the controller's log:
-------------------------- 


{"level":"info","ts":1624965282.5556378,"logger":"controller_virtualmachineimport","msg":"Import blocked. VM has placement policy affinity set to


*Full log attached.

Comment 2 Amos Mastbaum 2021-06-29 11:40:24 UTC
Comment on attachment 1795753 [details]
vmio controller log

please ignore this one.use the other.

Comment 3 Daniel Gur 2021-06-29 12:46:00 UTC
Probably not a bug As there is a rule not to import:  	vm. placement_policy.affinity='migratable' and KubeVirt has Live Migration disabled



 https://github.com/kubevirt/vm-import-operator/blob/master/docs/rules.md

Checking it,

Comment 4 Ilanit Stein 2021-06-29 14:48:38 UTC
changed the source VM that was failing the import before from affinity:Migratable to affinity:pinned (non migratable):
<placement_policy>
<affinity>pinned</affinity>
and now VM import ends successfully, and the VM is statted OK after import.

Comment 5 Maayan Hadasi 2021-07-01 12:29:28 UTC
Reopen this issue as LiveMigration feature gate is enabled in KubeVirt's CR

oc get kubevirts -n openshift-cnv kubevirt-kubevirt-hyperconverged -oyaml
...
spec:
  certificateRotateStrategy:
    selfSigned:
      ca:
        duration: 48h0m0s
        renewBefore: 24h0m0s
      server:
        duration: 24h0m0s
        renewBefore: 12h0m0s
  configuration:
    developerConfiguration:
      featureGates:
      - DataVolumes
      - SRIOV
      - LiveMigration
...

Comment 10 Fabien Dupont 2021-08-10 12:30:59 UTC
Please verify with build v4.8.1-14 / iib:97257

Comment 11 kpunwatk 2021-08-11 09:25:04 UTC
Verified on CNV-4.8.1-14/MTV-2.1.0-44 version a RHV source VM that is set as Migratable, VM import ends successfully, and the VM also boots up successfully.

Comment 12 Ilanit Stein 2021-08-17 16:09:29 UTC
Answering the question in comment #6:
This bug is fixed & verified on CNV-4.8.1.

The behavior on CNV-4.8.1 is as described in comment #11,
plus now there is a validation warning besides the VM, listed in the create migration plan wizard:

"The VM has a placement policy affinity setting that requires live migration to be enabled in OpenShift Virtualization for compatibility. The target storage classes must also support RWX access mode."

but I am not sure if the validation warnings are documented at all on MTV-2.1, as this is still considered as "Tech preview"

Comment 17 errata-xmlrpc 2021-08-24 12:49:09 UTC
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 (Moderate: OpenShift Virtualization 4.8.1 Images security and bug fix 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-2021:3259


Note You need to log in before you can comment on or make changes to this bug.