Uploaded image for project: 'Migration Toolkit for Virtualization'
  1. Migration Toolkit for Virtualization
  2. MTV-2344

Improve the pvc name for disks(shared/normal disks with same DiskIndex)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • Future Sustainability
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • 0% To Do, 0% In Progress, 100% Done

      Description of problem:

      Prepare 2 VMs:  t5 uses the shared data disk of st1, 
      migrate st1 to target cluster with migrateSharedDisks: true, then migrate st5 with migrateSharedDisks: false, use pvcNameTemplate below, there are two pvc with name: e-1j9njb, e-198bdj for VM st5:

      {{if eq .DiskIndex .RootDiskIndex}}c{{else if eq .DiskIndex 1}}e{{else if eq .DiskIndex 2}}f{{else if eq .DiskIndex 3}}g{{else}}data{{end}}-{{.DiskIndex}}

      I can separate them by add VmName to the pvcNameTemplate, the pvc names of VM st5 are:

      mtv-func-win2022-st1-e-1j9njb, mtv-func-win2022-st5-e-198bdj 

      As we need to keep the shared disk pvc name: mtv-func-win2022-st1-e-1j9njb (E in st5 and st1),

      the user expect the pvc name(later used in diskname) follow the disk name in VM, (when we start VM st5, the disk: mtv-func-win2022-st5-e-198bdj-2 is F in VM), so it's better to update the mtv-func-win2022-st5-e-198bdj to mtv-func-win2022-st5-f-198bdj

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

      MTV 2.8.0

      How reproducible:

      100%

      Steps to Reproduce:

      1) Prepare 2 VMs: st5 uses the shared data disk of st1

      mtv-func-win2022-st1: 
          Root: sata, C: 16G st1.vmkd 
          Data 1: sata, E: 2G st1_1.vmdk (shared) 
          Data 2: stata, F: 3G st1_2.vmdk (no sharing)
      mtv-func-win2022-st5:
          Root: sata, C: 16G st5.vmkd (no sharing)
          Data 1: sata, E: 2G st1_1.vmdk (shared - use mtv-func-win2022-st1 shared data 1)
          Data 2: sata, F: 3G st5_2.vmdk (no sharing)

      2)  Migrate st1 to target cluster with migrateSharedDisks: true, then migrate st5 with migrateSharedDisks: false with pvcNameTemplate: 

      {{.VmName}}-{{if eq .DiskIndex .RootDiskIndex}}c{{else if eq .DiskIndex 1}}e{{else if eq .DiskIndex 2}}f{{else if eq .DiskIndex 3}}g{{else}}data{{end}}-{{.DiskIndex}} 

      3) Check the pvc name, there are two e, I separate them by adding vm name to pvc name: st1-e, st5-e.

          The user expect the pvc name(later used in diskname) follow the disk name in VM, (when we start VM st5, the disk: mtv-func-win2022-st5-e-198bdj-2 is F in VM), so it's better to update the mtv-func-win2022-st5-e-198bdj to mtv-func-win2022-st5-f-198bdj

       

              rh-ee-joschrod Jochen Schroder
              chhu@redhat.com Chenli Hu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: