-
Notifications
You must be signed in to change notification settings - Fork 63
MTV-2707 | xcopy-popualtor: Pass the vmId to the populator #2002
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
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 #2002 +/- ##
=========================================
- Coverage 15.45% 9.31% -6.15%
=========================================
Files 112 360 +248
Lines 23377 48652 +25275
=========================================
+ Hits 3613 4530 +917
- Misses 19479 43757 +24278
- Partials 285 365 +80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -72,7 +72,7 @@ func (c *VSphereClient) RunEsxCommand(ctx context.Context, host *object.HostSyst | |||
return res.Values, nil | |||
} | |||
|
|||
func (c *VSphereClient) GetEsxByVm(ctx context.Context, vmName string) (*object.HostSystem, error) { | |||
func (c *VSphereClient) GetEsxByVm(ctx context.Context, vmId string) (*object.HostSystem, error) { | |||
finder := find.NewFinder(c.Client.Client, true) | |||
|
|||
//FIXME - need to trace the VM by the datastore, which we should have because |
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.
fix that already - maybe we donh't need to set a datacenter if we get the vm by id. anyhow, get rid of the datacednter part because there may be a case where there is no datacenger
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.
/hold need to change a small thing with the default DC (remove it)
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.
/hold cancel
This is ready and working
Motivation Up until now the populator was deducing the name of the VM from the path of the vmdk file. That approach breaks when 1. a VM is renamed 2. the disk is a shared disk 3. there are more vm's with same name on another DC. Probably more cases exists. Modification Forkflift will add the vmId to the VsphereXcopyVolumePopulator resource, which now have a new field, VmId. From there on that is passed all the way to the command line argument --source-vm-id and there its used to find the ESX by VM ID. Result The migration runs exactly the same, there are no visible changes, or UX changes, this is all transparent to the user. Renamed or imported VMs or any of the cases mentioned above will migrate without any problems. https://issues.redhat.com/browse/MTV-2707 Signed-off-by: Roy Golan <rgolan@redhat.com>
|
Motivation
Up until now the populator was deducing the name of the VM from the path
of the vmdk file. That approach breaks when 1. a VM is renamed 2. the
disk is a shared disk 3. there are more vm's with same name on another
DC. Probably more cases exists.
Modification
Forkflift will add the vmId to the VsphereXcopyVolumePopulator resource,
which now have a new field, VmId. From there on that is passed all the
way to the command line argument --source-vm-id and there its used to
find the ESX by VM ID.
Result
The migration runs exactly the same, there are no visible changes, or UX
changes, this is all transparent to the user.
Renamed or imported VMs or any of the cases mentioned above will migrate
without any problems.
https://issues.redhat.com/browse/MTV-2707
Signed-off-by: Roy Golan rgolan@redhat.com