Skip to content

Commit 777a5ff

Browse files
committed
Do a VM guest shut down if possible
Add info about `forcePowerOff` and `gracefulShutdownTimeoutSeconds`. Related to: harvester/harvester#7483 Signed-off-by: Volker Theile <[email protected]> (cherry picked from commit cf14b33) Signed-off-by: Volker Theile <[email protected]>
1 parent 94afd72 commit 777a5ff

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/advanced/addons/vmimport.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ spec:
140140
namespace: default
141141
kind: VmwareSource
142142
apiVersion: migration.harvesterhci.io/v1beta1
143+
forcePowerOff: false
144+
gracefulShutdownTimeoutSeconds: 30
143145
```
144146

145147
This will trigger the controller to export the VM named "alpine-export-test" on the VMware source cluster to be exported, processed and recreated into the Harvester cluster.
@@ -154,14 +156,19 @@ If a match is not found, each unmatched network interface is attached to the def
154156

155157
The `storageClass` field specifies the [StorageClass](../storageclass.md) to be used for images and provisioning persistent volumes during the import process. If not specified, the default StorageClass will be used.
156158

159+
By default, the vm-import-controller attempts to graceful shut down the guest operating system of the source virtual machine before starting the import process. If the virtual machine is not gracefully shut down within a specific period, a hard power off is forced. You can adjust this time period for the graceful shutdown by changing the value of the `gracefulShutdownTimeoutSeconds` field, which is set to `60` seconds by default. A hard power off without attempting a graceful shutdown can be forced by setting the `forcePowerOff` field to `true`.
160+
161+
:::note
162+
The vm-import-controller only supports the `forcePowerOff` and `gracefulShutdownTimeoutSeconds` fields for VMware because OpenStack automatically performs a combination of graceful shutdown and hard power off.
163+
:::
164+
157165
Once the virtual machine has been imported successfully, the object will reflect the status:
158166

159167
```shell
160168
$ kubectl get virtualmachineimport.migration
161169
NAME STATUS
162170
alpine-export-test virtualMachineRunning
163171
openstack-cirros-test virtualMachineRunning
164-
165172
```
166173

167174
Similarly, users can define a VirtualMachineImport for an OpenStack source as well:

0 commit comments

Comments
 (0)