Related
Jira: MTV-5047
Problem
Copy-offload tests require a pre-existing VM template (xcopy-template-test) in vSphere with cloud-init configured. Users must manually create this template, which is the biggest onboarding friction for first-time users.
Solution
The test suite auto-provisions the xcopy-template-test template VM in vSphere if it doesn't exist. When users supply their own template via default_vm_name in providers.json, auto-provisioning is skipped.
Deliverables
Design
- Image: CentOS Stream 9 GenericCloud (XFS, free, RHEL-compatible)
- Credentials: cloud-user / atomic (hardcoded in bundled userdata)
- Cloud-init delivery: VMware GuestInfo datasource (no CD-ROM)
- Cloud-init completion:
cloud-init status --wait via SSH
- Template name:
xcopy-template-test
- User-supplied template: If
default_vm_name is set, skip auto-provisioning; fail with clear error if VM not found
- After cloud-init: Mark VM as vSphere template via
MarkAsTemplate()
Related
Jira: MTV-5047
Problem
Copy-offload tests require a pre-existing VM template (
xcopy-template-test) in vSphere with cloud-init configured. Users must manually create this template, which is the biggest onboarding friction for first-time users.Solution
The test suite auto-provisions the
xcopy-template-testtemplate VM in vSphere if it doesn't exist. When users supply their own template viadefault_vm_namein providers.json, auto-provisioning is skipped.Deliverables
utilities/vmware_template_provision.py— download CentOS Stream 9 qcow2 → convert to VMDK → upload to datastore → create VM with GuestInfo cloud-init → mark as templateresources/cloud-init/user-data.yaml— bundled cloud-init (cloud-user/atomic, SSH, open-vm-tools, 50% disk fill)exceptions/exceptions.pycopyoffload_template_vmfixture totests/copyoffload/conftest.pywait_for_cloud_init()to usecloud-init status --waitinstead of polling for/cloud-init.finishqemu-imgto DockerfileDesign
cloud-init status --waitvia SSHxcopy-template-testdefault_vm_nameis set, skip auto-provisioning; fail with clear error if VM not foundMarkAsTemplate()