Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| When creating a migration plan, you can use template variables to customize the names of persistent volume claims (PVCs) for migrated virtual machine disks. The template follows Go template syntax. | ||
|
|
||
| PVC names must be DNS-compliant: they must consist of lowercase alphanumeric characters or hyphens (`-`), start with an alphanumeric character, and not exceed 63 characters. {project-short} validates the `pvcNameTemplate` against the actual VM inventory when you create a migration plan. If the template syntax is invalid or if the resulting PVC names are not DNS-compliant, {project-short} adds an error to the plan conditions and prevents the migration from running. | ||
| // TODO: Check with SME - Confirm MTV validates PVC templates at plan creation time (unlike network/volume templates which aren't validated). |
There was a problem hiding this comment.
Does MTV validate PVC templates at plan creation time (unlike network/volume templates which aren't validated)?
There was a problem hiding this comment.
yes, it's validated when you create the plan
There was a problem hiding this comment.
we also validate the network and volum name templates at plan creation,
the fact that we do validation or not is an internal implementation for forklift internal use, a user must set valid templates, they should not assume we will validate templates for them
| * `.WinDriveLetter`: Windows drive letter in lowercase (for example, `c`, `d`). Only applicable to Windows guests. | ||
| + | ||
| This variable requires the QEMU Guest Agent (or {vmw} Tools) to be active and reachable on the source VM. It also requires a disk key mapping between the guest operating system and the hardware disk. This mapping may be missing for some disk configurations, particularly IDE disks. When the mapping is missing, {project-short} raises an information-level concern and the variable cannot be resolved in the PVC name template. | ||
| // TODO: Check with SME - Does .WinDriveLetter resolve to empty string when used on Linux VM or when mapping is missing? Original Jira mentioned "may resolve to an empty string or trigger a validation warning" |
There was a problem hiding this comment.
Does .WinDriveLetter resolve to empty string when used on Linux VM or when mapping is missing? Original Jira mentioned "may resolve to an empty string or trigger a validation warning"
There was a problem hiding this comment.
it will be empty in any case we can't parse a drive letter, for example on linux there are no drive letters, or on windows when win drive is not set explicitly, if user assume it's a letter exist, and create a template that become invalid in case it's not, they will get a validation error.
|
|
||
| == Available variables | ||
|
|
||
| The `pvcNameTemplate` field has access to the following variables: |
There was a problem hiding this comment.
@coderabbitai, can you validate the fields in this documentation match the fields defined in https://github.com/kubev2v/forklift/blob/main/pkg/apis/forklift/v1beta1/plan.go#L528 ?
can you check the network and volumen too ?
There was a problem hiding this comment.
https://github.com/kubev2v/forklift/blob/main/pkg/apis/forklift/v1beta1/plan.go#L528
type VSpherePVCNameTemplateData struct {
VmName string `json:"vmName"`
TargetVmName string `json:"targetVmName"`
PlanName string `json:"planName"`
DiskIndex int `json:"diskIndex"`
WinDriveLetter string `json:"winDriveLetter,omitempty"`
RootDiskIndex int `json:"rootDiskIndex"`
Shared bool `json:"shared,omitempty"`
FileName string `json:"fileName,omitempty"`
}
https://redhat.atlassian.net/browse/MTV-3092
Previews:
Planning guide
Configuring VMware migration plan settings: https://forklift-documentation-git-fork-je-d5dd33-yaacov-8047s-projects.vercel.app/documentation/doc-Planning_your_migration/master.html#proc_configuring-plan-settings-vmware_vmware
PVC name template variables (same topic is in the Planning guide and Migrating guide): https://forklift-documentation-git-fork-je-d5dd33-yaacov-8047s-projects.vercel.app/documentation/doc-Planning_your_migration/master.html#ref_pvc-name-template-variables-vmware_vmware
Migrating guide
Running a VMware vSphere migration from the command-line: https://forklift-documentation-git-fork-je-d5dd33-yaacov-8047s-projects.vercel.app/documentation/doc-Migrating_your_virtual_machines/master.html#proc_migrating-vms-cli-vmware_vmware
PVC name template variables (same topic is in the Planning guide and Migrating guide): https://forklift-documentation-git-fork-je-d5dd33-yaacov-8047s-projects.vercel.app/documentation/doc-Migrating_your_virtual_machines/master.html#ref_pvc-name-template-variables-vmware_vmware