Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-30975

[2222978] VM Cloning does not verify if the target VM already exists

XMLWordPrintable

    • CNV Virtualization Sprint 243, CNV Virtualization Sprint 244, CNV Virtualization Sprint 245, CNV Virtualization Sprint 246, CNV Virtualization Sprint 247
    • Important
    • No

      Description of problem:
      Currently, vm cloning job does not verify if the target VM already exists on a cluster.

      > $ oc get vm
      > NAME AGE STATUS READY
      > vm-fedora 17m Running True
      > vm-fedora2 13m Running True

      VirtualMachineClone stuck in `VirtualMachineClone` phase:

      > $ oc get vmclone
      > NAME PHASE SOURCEVIRTUALMACHINE TARGETVIRTUALMACHINE
      > clone-to-existing-vm RestoreInProgress vm-fedora vm-fedora2

      > Normal SnapshotCreated 5m30s clone-controller created snapshot clone-clone-to-existing-vm-snapshot-vm-fedora-m2grh for clone clone-to-existing-vm
      > Normal SnapshotReady 5m28s clone-controller snapshot clone-clone-to-existing-vm-snapshot-vm-fedora-m2grh for clone clone-to-existing-vm is ready to use

      Also, it is possible to create cloning job with the same source/target VM:

      > $ oc get vmclone
      > NAME PHASE SOURCEVIRTUALMACHINE TARGETVIRTUALMACHINE
      > clone-to-itself RestoreInProgress vm-fedora vm-fedora

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

      How reproducible:
      100%

      Steps to Reproduce:
      1. create 2 VMs
      2. try to clone the first VM with the target pointed to second VM
      3.

      Actual results:
      VirtualMachineClone created and stuck in `VirtualMachineClone` phase

      Expected results:
      Seems, we need to have a validation and prevent creation of vmclone jobs if the target already exists

      Additional info:

              omisan@redhat.com Orel Misan
              dshchedr@redhat.com Denys Shchedrivyi
              Denys Shchedrivyi Denys Shchedrivyi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: