VMware Cloud Community
vmagician
Contributor
Contributor

After vCloud director upgrade from 1.0.1 to 1.5 not able to create new vAppss

After vCloud director upgrade from 1.0.1 to 1.5 we are not able to create new vApps or VMs. vApp creation wizard complains about VM name, see error below:

"Invalid computer name: Computer name can only contain alphanumeric characters, hyphens and underscores, and must not contain only digits."

The name of the VM is "vmtest1", there is nothing worng with VM name, I think it is a false error.


A workaround is to delete existing template and create a new one, the error will go away BUT I run into a different error, see below:

"Unknown name value for enum class com.vmware.vcloud.common.model.TaskOperation: VDC_UPDATE_RESOURCE_ENTITY"

Info: vSphere 4.1 VMware vCloud director 1.5 running on RedHat 5.6 64bit Oracle 10g running on RedHat 5.6 64bit So

Any ideas will be much appreciated.

Thanks

0 Kudos
7 Replies
boschb1
Contributor
Contributor

Same problem here with:

Unknown name value for enum class com.vmware.vcloud.common.model.TaskOperation: VDC_UPDATE_RESOURCE_ENTITY

This happens to me when i try to update a lease one of my vApps.  I am running ESXi 5.0 and vSphere 5.0 with vCloud 1.5.  This is the second issue i've found so far with 1.5...  And personally must say the new way the remote console feature is now embedded in the browser window way is WORSE than it was before where it was stand alone app, not to mention still no OSX support... surprise on that one.

0 Kudos
vmagician
Contributor
Contributor

I opened a case with VMware, it is a bug in 1.5, they provided SQL statements to manually fix the DB, issue is resolved now except I'm not able to modify/delete old templates (created before the upgrade). VM name in vCloud 1.5 does not accept special characters, so old vApps/Catalogs which are created before the upgrade with special characters will have issues.

Solution/workaround for this issues:

Make sure to backup the vCD database before beginning, just as a precaution, but these statements are all right to run live.

1) Run the following update statements  to fix the issue related to not being able to delete/edit existing vApp:

UPDATE last_jobs SET operation = 'VAPP_DEPLOY' WHERE operation = 'VAPP_POWER_ON' AND object_type = 'com.vmware.vcloud.entity.vapp';

UPDATE last_jobs SET operation = 'VDC_COPY_VAPP' WHERE operation = 'VDC_COPY_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapp';

UPDATE last_jobs SET operation = 'VDC_COPY_TEMPLATE' WHERE operation = 'VDC_COPY_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapptemplate';

UPDATE last_jobs SET operation = 'VDC_COPY_MEDIA' WHERE operation = 'VDC_COPY_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.media';

UPDATE last_jobs SET operation = 'VDC_UPDATE_VAPP' WHERE operation = 'VDC_UPDATE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapp';

UPDATE last_jobs SET operation = 'VDC_UPDATE_TEMPLATE' WHERE operation = 'VDC_UPDATE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapptemplate';

UPDATE last_jobs SET operation = 'VDC_UPDATE_MEDIA' WHERE operation = 'VDC_UPDATE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.media';

UPDATE last_jobs SET operation = 'VDC_DELETE_VAPP' WHERE operation = 'VDC_DELETE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapp';

UPDATE last_jobs SET operation = 'VDC_DELETE_TEMPLATE' WHERE operation = 'VDC_DELETE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.vapptemplate';

UPDATE last_jobs SET operation = 'VDC_DELETE_MEDIA' WHERE operation = 'VDC_DELETE_RESOURCE_ENTITY' AND object_type = 'com.vmware.vcloud.entity.media';

commit;

Note: Step 2 below will replace underscore in computer name with hyphen for all VMs. (Computer Name is the name of the computer after guest customization, this loosely adheres to DNS standards, Computer name has nothing to do with VM name) Changing computer name for running VMs may be undesirable for several reasons. If you don't want to change computer names for all of the VMs, please let me know. I will get a more specific solution. But going forward, underscores in computer name is not allowed in vCloud Director 1.5.


2) Run the following update statement to replace underscores in COMPUTER NAMES with hyphens
update VM set computer_name=TRANSLATE (computer_name, '_','-');

commit;

I got same error, hope this will help solve your issue

For the remote console feature, I agree, specially OSX is not supported, it should not be that difficult.

0 Kudos
pic
VMware Employee
VMware Employee

Can you please provide the bugID?

0 Kudos
JonT
Enthusiast
Enthusiast

So I have this issue as I am trying to remove some vApp templates from a catalog that I wish to retire. The response looks like it would fix my issue but I am trying to understand how to run these UPDATE statements into my Oracle database. Can anyone post the method for updating Oracle? Can SQLite3 be used to connect or does it need to be some other method?

Thanks!

0 Kudos
vmagician
Contributor
Contributor

I do not know the bug ID

0 Kudos
vmagician
Contributor
Contributor

login to Oracle DB server as Oracle, login to vCloud director DB as following

$ sqlplus <vCloud_USER>/<your_password>

Then copy/past command mentioned above one by one

Note: take a backup or snapshot (if a VM) of Oracle DB before running those commands, do not forget to delete snapshot once everything is working as expected.

0 Kudos
ben_c1
Enthusiast
Enthusiast

If you are getting this error--

"Unknown name value for enum class com.vmware.vcloud.common.model.TaskOperation: VDC_UPDATE_RESOURCE_ENTITY"

-- see http://kb.vmware.com/kb/2006704 for a script that can update the database to fix the issue.

-----------------------------------------------------

If you are getting this error--

"Invalid computer name: Computer name can only contain alphanumeric characters, hyphens and underscores,  and must not contain only digits."

--see http://kb.vmware.com/kb/2007019.

0 Kudos