Skip to content

Conversation

@votdev
Copy link
Member

@votdev votdev commented Jan 15, 2026

The versions 1.6 and 1.7 have been updated because they are currently considered relevant. All older versions that support the VM Importer plugin are also affected, but are no longer supported anyway.

Problem:

Solution:

Related Issue(s):

harvester/harvester#9849

Test plan:

Additional documentation or context

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds documentation for a known issue with imported virtual machines where the eviction strategy field is not configured during import, which prevents live migration. The documentation provides both individual VM fixes and a bulk update command for affected VMs.

Changes:

  • Added a new "Eviction strategy is not set" section to the Known Issues documentation
  • Provided kubectl commands to fix individual VMs and bulk update all affected VMs
  • Updated documentation for versions 1.6 and 1.7

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
versioned_docs/version-v1.7/advanced/addons/vmimport.md Added eviction strategy known issue and remediation commands for v1.7
versioned_docs/version-v1.6/advanced/addons/vmimport.md Added eviction strategy known issue and remediation commands for v1.6

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +306 to +312
To configure all incorrectly configured virtual machines at once, please use the following command:

```shell
for vm in $(kubectl get VirtualMachine -A -o json | jq -r '.items[] | select(.spec.template.spec.evictionStrategy == null) | "\(.metadata.namespace):\(.metadata.name)"'); do \
kubectl patch VirtualMachine ${vm#*:} -n ${vm%:*} --type=merge -p '{"spec":{"template":{"spec":{"evictionStrategy":"LiveMigrateIfPossible"}}}}'; \
done
```
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation should clarify the prerequisites for running the bulk update command. The command requires jq to be installed, which may not be immediately obvious to all users. Consider adding a note that jq is required for the second command, or provide an alternative approach for users who don't have jq installed.

Copilot uses AI. Check for mistakes.
Comment on lines +264 to +270
To configure all incorrectly configured virtual machines at once, please use the following command:

```shell
for vm in $(kubectl get VirtualMachine -A -o json | jq -r '.items[] | select(.spec.template.spec.evictionStrategy == null) | "\(.metadata.namespace):\(.metadata.name)"'); do \
kubectl patch VirtualMachine ${vm#*:} -n ${vm%:*} --type=merge -p '{"spec":{"template":{"spec":{"evictionStrategy":"LiveMigrateIfPossible"}}}}'; \
done
```
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation should clarify the prerequisites for running the bulk update command. The command requires jq to be installed, which may not be immediately obvious to all users. Consider adding a note that jq is required for the second command, or provide an alternative approach for users who don't have jq installed.

Copilot uses AI. Check for mistakes.
}'
```

To configure all incorrectly configured virtual machines at once, please use the following command:
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrasing "To configure all incorrectly configured virtual machines" is redundant. Consider simplifying to "To configure all affected virtual machines at once" or "To update all virtual machines missing the eviction strategy" for better clarity and conciseness.

Suggested change
To configure all incorrectly configured virtual machines at once, please use the following command:
To update all virtual machines missing the eviction strategy, run the following command:

Copilot uses AI. Check for mistakes.
}'
```

To configure all incorrectly configured virtual machines at once, please use the following command:
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrasing "To configure all incorrectly configured virtual machines" is redundant. Consider simplifying to "To configure all affected virtual machines at once" or "To update all virtual machines missing the eviction strategy" for better clarity and conciseness.

Suggested change
To configure all incorrectly configured virtual machines at once, please use the following command:
To update all virtual machines missing the eviction strategy at once, use the following command:

Copilot uses AI. Check for mistakes.
- In the `VirtualMachineImport` CRD spec, set the `forcePowerOff` field to `true`.
- Install VMware Tools or [open-vm-tools](https://knowledge.broadcom.com/external/article?legacyId=2073803).

##### Eviction strategy is not set
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading capitalization is inconsistent with other headings in the same section. Other headings like "Source Virtual Machine Name Is Not RFC1123-Compliant" and "VMware-Based Virtual Machine Without VMware Tools Is Not Migrated" use title case with major words capitalized. This heading should be "Eviction Strategy Is Not Set" for consistency.

Suggested change
##### Eviction strategy is not set
##### Eviction Strategy Is Not Set

Copilot uses AI. Check for mistakes.
- In the `VirtualMachineImport` CRD spec, set the `forcePowerOff` field to `true`.
- Install VMware Tools or [open-vm-tools](https://knowledge.broadcom.com/external/article?legacyId=2073803).

##### Eviction strategy is not set
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading capitalization is inconsistent with other headings in the same section. Other headings like "Source Virtual Machine Name Is Not RFC1123-Compliant" and "VMware-Based Virtual Machine Without VMware Tools Is Not Migrated" use title case with major words capitalized. This heading should be "Eviction Strategy Is Not Set" for consistency.

Suggested change
##### Eviction strategy is not set
##### Eviction Strategy Is Not Set

Copilot uses AI. Check for mistakes.
Comment on lines +291 to +292
When importing virtual machines, the eviction strategy field is not configured, which subsequently prevents live migration of the virtual machine.
To fix this, please run the following command:
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "To fix this, please run the following command:" could be more consistent with the documentation style used in the previous known issue. Consider using a more formal and consistent phrasing such as "To address the issue, run the following command:" which matches the style of "To address the issue, perform one of the following workarounds:" used in the VMware Tools issue above.

Copilot uses AI. Check for mistakes.
Comment on lines +249 to +250
When importing virtual machines, the eviction strategy field is not configured, which subsequently prevents live migration of the virtual machine.
To fix this, please run the following command:
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "To fix this, please run the following command:" could be more consistent with the documentation style used in the previous known issue. Consider using a more formal and consistent phrasing such as "To address the issue, run the following command:" which matches the style of "To address the issue, perform one of the following workarounds:" used in the VMware Tools issue above.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jan 15, 2026

Name Link
🔨 Latest commit 111caee
😎 Deploy Preview https://6969f78981607a70521f5d97--harvester-preview.netlify.app

The versions 1.6 and 1.7 have been updated because they are currently considered relevant. All older versions that support the VM Importer plugin are also affected, but are no longer supported anyway.

Related to: harvester/harvester#9849

Signed-off-by: Volker Theile <vtheile@suse.com>
@votdev votdev force-pushed the issue_9849_eviction_strategy branch from 568b15f to 111caee Compare January 16, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant