Uploaded image for project: 'OpenShift Migration Toolkit for Containers'
  1. OpenShift Migration Toolkit for Containers
  2. MIG-1869

When the VM has its Disks configured as direct PVCs (without a DV), unable to storage live migrate from Filesystem to Storage.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • MTC 1.8.12
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ToDo
    • Low

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

      CNV 4.19.15 + MTC 1.8.12
      CNV 4.20.3  + MTC 1.8.12

      How reproducible:

      Always

      Steps to Reproduce:

      1. Create a PVC via the console manually (not a DataVolume for a VM)
      
      2. Create VM with a single disk, setup like this, referring to that PVC
      
      spec:
        template:
          spec:
            volumes:
              - name: disk-yellow-chipmunk-18
                persistentVolumeClaim:
                  claimName: disk-1
      
      2. PVC/disk-1 is Filesystem
      
      3. Use Storage Live Migration to move it to Block
      

      Actual results:

      Fails in MTC before the VM migration is triggered
      
      {"level":"info","ts":1771723691.2272615,"logger":"directvolume","msg":"Phase execution failed.","phase":"CreateRsyncTransferPods","phaseDescription":"Creating Rsync daemon pods on the target cluster","error":"source and destination must be the same type of volume"}

      Additional info:

      • Switching the VM to use a DV makes it all work.
      func isBlockOrVMDisk(pvc *v1.PersistentVolumeClaim) bool {
      	if pvc == nil {
      		return false
      	}
      	isBlock := pvc.Spec.VolumeMode != nil && *pvc.Spec.VolumeMode == v1.PersistentVolumeBlock
      	if !isBlock {
      		if v, ok := pvc.GetAnnotations()[kubeVirtAnnKey]; !ok || v != kubevirtContentType {  <---- manual PVC disks don't have this annotation
      			return false
      		}
      		isBlock = true
      	}
      	return isBlock
      }

      A manually created/attached PVC disk to a VM will not have the cdi.kubevirt.io/storage.contentType annotation. Only disks created with DataVolumes will have that. But DataVolumes are not mandatory.

              rhn-engineering-dymurray Dylan Murray
              rhn-support-gveitmic Germano Veit Michel
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: