Cannot compose a vApp or add a virtual machine to a vApp after upgrading from vCloud Director 1.x to 1.5 (2007019)
- Unable to compose vApps from a template
- Composing vApps fails
- You see the error:
Invalid computer name: Computer name can only contain alphanumeric characters, hyphens and underscores, and must not contain only digits.
- In the vCloud Director logs, you see the error:
com.vmware.vcloud.api.presentation.service.BadRequestException: Invalid computer name: Computer name can only contain alphanumeric characters, hyphens and underscores, and must not contain only digits.
- Unable to add a new virtual machine to the vApp
- Adding a new virtual machine to a vApp using the template which contains virtual machine computer name with underscores or dots fails
NOTE: This issue is resolved in vCloud Director 1.5.1.
To workaround this issue, change the computer names of the virtual machines that cause this issue and remove the underscores and dots from the name.
For example, to replace underscores or dots with hyphens in all virtual machines in vApp templates, use an update statement similar to:
update VM set computer_name=TRANSLATE (computer_name,'_.','--') where id in (select id from VM where SG_ID in (select SG_ID from VM_CONTAINER where SG_TYPE=2));
- Identify the vApp template which has the virtual machine with computer name containing underscores and dots.
- Right click the vApp template and click Add to My Cloud....
- Open the vApp and select the virtual machine.
- Right-click the virtual machine and click Properties.
- In the General tab, change the computer name to a name that does not include underscores or dots.
- Repeat Steps 3-5 for other virtual machines in the vApp.
- Click vApps in the left pane of the window to view all vApps.
- Right-click the modified vApp and and click Add to Catalog....