kubevirt / vm-import-operator

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

Shutdown VMs instead of powering them off #443

Closed ghost closed 3 years ago

ghost commented 3 years ago

Currently, during the VMware import, the VM is powered off: https://github.com/kubevirt/vm-import-operator/blob/master/pkg/providers/vmware/client/client.go#L180-L198. And it can impact the filesystem as this function acts as pulling the power cord.

Instead, the VM should be shutdown: https://github.com/vmware/govmomi/blob/master/govc/host/shutdown.go. And, if the VM is not off after 15 minutes, the import should fail to avoid any issue with the fielsystems.

mansam commented 3 years ago

@fdupont-redhat the oVirt provider has a 5 minute timeout for shutting down. What do you think about aligning the vSphere provider with that instead of 15 minutes?

ghost commented 3 years ago

@mansam I'm fine with 5 minutes.