Which labels can I apply on a Virtual Machine restore definition in OpenShift Virtualization?
Environment
- Red Hat OpenShift Virtualization
Issue
- What are the functions of the following labels during a Virtual Machine restore?
velero.kubevirt.io/run-strategyvelero.kubevirt.io/clear-mac-addressvelero.kubevirt.io/generate-new-firmware-uuid
Resolution
-
velero.kubevirt.io/clear-mac-address: To restore a virtual machine with a new MAC address, use this label in the restore definition to clear the MAC address of the virtual machine. OpenShift Virtualization then assigns a new MAC address to the virtual machine.apiVersion: velero.io/v1 kind: Restore metadata: name: restore labels: velero.kubevirt.io/clear-mac-address: "true" spec: {} -
velero.kubevirt.io/run-strategy: You can change the final power state of the VM by using this label in the restore definition. The possible values for the label are the same as for the.spec.runStrategyparameter of the VirtualMachine resource.apiVersion: velero.io/v1 kind: Restore metadata: name: restore labels: velero.kubevirt.io/run-strategy: "Halted" spec: {} -
velero.kubevirt.io/generate-new-firmware-uuid: You can use this label in the restore definition to generate a new firmware UUID for the VMapiVersion: velero.io/v1 kind: Restore metadata: name: restore labels: velero.kubevirt.io/generate-new-firmware-uuid: "true" spec: {} -
When using the Velero CLI tool to restore a backup, you can use the --labels option to add the label to the restore definition.
-
Red Hat is aware that these features are undocumented. It is being tracked in Bug This content is not included.CNV-83751. For more information, please open a This content is not included.new support case with Red Hat Support and refer to this Solution.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.