kubevirt / vm-import-operator

Operator for importing VMs from RHV to KubeVirt
Apache License 2.0
16 stars 23 forks source link

Gracefully shutdown vSphere VMs #445

Closed mansam closed 3 years ago

mansam commented 3 years ago

Fixes the VMWare client's StopVM to use ShutdownGuest instead of PowerOff. This will require the VMWare Tools to be installed on the guest.

This uses the same polling mechanism as the oVirt provider to wait for the shutdown to complete, which can block for up to 5 minutes. I assume that since that's what the oVirt provider is doing that it's acceptable, but if not I have also worked on an alternative approach which involves setting a new condition and re-queuing the reconcile until the source VM powers off or times out.

Fixes https://github.com/kubevirt/vm-import-operator/issues/443

Signed-off-by: Sam Lucidi slucidi@redhat.com

kubevirt-bot commented 3 years ago

@mansam: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
kubevirt-bot commented 3 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fdupont-redhat, mansam, pkliczewski To complete the pull request process, please assign You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubevirt/vm-import-operator/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment