Problem
Migration fails with error "Failed create instance" when VMware VM names contain special characters.
Examples that fail:
XDA_SA_Random_S.A.U._5283742 (dots)
España_VM (ñ character)
Test.VM.Name (dots)
Error:
TASK [os_migrate.vmware_migration_kit.import_workloads : Create instance]
fatal: [conversion_host]: FAILED! => {"msg": "Failed create instance: ..."}
Attached is a screenshot of the error and the AWX log.

[job_40193.txt](https://github.com/user-attachments/files/25212453/job_40193.txt)
Expected Behavior
Migration should handle any valid VMware VM name, regardless of special characters.
Actual Behavior
OpenStack Nova rejects the instance creation because the VM name contains invalid characters.
Notes
Your collection already has SafeVmName() function in plugins/module_utils/utils.go:74 that sanitizes names, but it's only used for log files, not for OpenStack resource creation.
The unsanitized VM name is passed directly to:
plugins/modules/src/migrate/migrate.go:226 (volume creation)
plugins/modules/src/create_server/create_server.go:156 (instance creation)
plugins/module_utils/openstack/openstack.go:491 (Nova API)
Reproduction
- Create VM in VMware with dots or accents in the name
- Run migration playbook
- Fails at instance creation step
Current Workaround
Manually rename VMs in VMware to use only [a-zA-Z0-9_] before migration. Not a option for us.
Thanks!
Problem
Migration fails with error "Failed create instance" when VMware VM names contain special characters.
Examples that fail:
XDA_SA_Random_S.A.U._5283742(dots)España_VM(ñ character)Test.VM.Name(dots)Error:
Attached is a screenshot of the error and the AWX log.
Expected Behavior
Migration should handle any valid VMware VM name, regardless of special characters.
Actual Behavior
OpenStack Nova rejects the instance creation because the VM name contains invalid characters.
Notes
Your collection already has
SafeVmName()function inplugins/module_utils/utils.go:74that sanitizes names, but it's only used for log files, not for OpenStack resource creation.The unsanitized VM name is passed directly to:
plugins/modules/src/migrate/migrate.go:226(volume creation)plugins/modules/src/create_server/create_server.go:156(instance creation)plugins/module_utils/openstack/openstack.go:491(Nova API)Reproduction
Current Workaround
Manually rename VMs in VMware to use only
[a-zA-Z0-9_]before migration. Not a option for us.Thanks!