-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MTV-1966 | Allow to skip shared disks #1318
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1318 +/- ##
==========================================
- Coverage 15.45% 15.37% -0.09%
==========================================
Files 112 112
Lines 23377 23499 +122
==========================================
Hits 3613 3613
- Misses 19479 19601 +122
Partials 285 285
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -723,6 +828,10 @@ func (r *Builder) mapDisks(vm *model.VM, vmRef ref.Ref, persistentVolumeClaims [ | |||
}, | |||
}, | |||
} | |||
if disk.Shared { | |||
kubevirtDisk.Shareable = ptr.To(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not needed. it's only needed one one disk is attached multiple times to the same vm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, some nitpicks
8bd0ec4
to
6154d08
Compare
Issue: When migrating a VM with shared disks the virt-v2v transfers all disks that are attached to the VM, that includes the shared disks. But if we will transfer 2 VMs with the same shared disk the disk will be migrated twice. This takes a lot of additional resources. Fix: There are multiple solutions, which vary in complexity. I have chosen the simplest and fastest solution by adding a new Plan parameter migrateSharedDisks this determines if the shared disks should be migrated. By default, it's set to True as that's the default virt-v2v behaviour. If the toggle is turned off the plan will filter out the shared disks and use KubeVirt CDI for disk transfer and virt-v2v-in-place for the guest conversion. Ref: http://issues.redhat.com/browse/MTV-1442 Signed-off-by: Martin Necas <mnecas@redhat.com>
Signed-off-by: Martin Necas <mnecas@redhat.com>
|
Issue: When migrating a VM with shared disks the virt-v2v transfers all disks that are attached to the VM, that includes the shared disks. But if we will transfer 2 VMs with the same shared disk the disk will be migrated twice. This takes a lot of additional resources.
Fix: There are multiple solutions, which vary in complexity. I have chosen the simplest and fastest solution by adding a new Plan parameter migrateSharedDisks this determines if the shared disks should be migrated. By default, it's set to True as that's the default virt-v2v behaviour. If the toggle is turned off the plan will filter out the shared disks and use KubeVirt CDI for disk transfer and virt-v2v-in-place for the guest conversion.
Usage: The user will create 2 plans, one with only one VM and with the
migrateSharedDisks
enabled to transfer the shared disks, and another plan with the toggle disabled which will migrate the additional VMs. If the plans are in correct order (first transfer shared disk) the shared disks will get automatically attached to the new VMs.Ref: http://issues.redhat.com/browse/MTV-1442