vApp Failed to Delete with “Invalid white space character” Error

Recently we had an issue when deleting one of vApp template from the vCloud Director Organization:

  • The vApp is failing with the below error message,

          [ 45d05096-8886-4bbc-9036-2f09ccb20fb4 ] validation error on field ‘name’: String             value has invalid format

      vapp-delete-error-beginning

  • The vApp had only the vApp networks and an external network.

   vapp-delete-error-beginning2

  • In vcloud director task and events, we had seen the below  error message,

  [ 56a72984-7230-43ae-9bbf-e99821b9f28a ] com.vmware.vim.vmomi.core.exception.MarshallException: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)

 – com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)

 – Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)

 – Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)

vapp-delete-error

  • So we have decided to check in the vcloud director database about the state of the vApp using,
  • select * from vm_container where name like ‘vApp-name’
  • select * from vapp_vm where vapp_id = uuid of the vApp

sql-query-result-1

From the results we see that the vApp has a empty space in it and this is not allowing us to remove the vApp from the vcloud director UI.

  • So now we need update the vApp name without the empty space by using the following query,

        update vm_container

        set name = ‘vapp-name’

         where sg_id = 0xUUID of the vApp

  • After updating the vApp name, go to the vcloud UI and delete the vApp and now you should be able to see that the vApp is getting deleted.

What happens when you click “Download vSphere Client for Windows”

Have you ever wonder how the vSphere Client for Windows is getting downloaded when you click  “Download vSphere Client for Windows” ?

vsphere-client

  • Inside ESXi host there is an XML file called “clients.xml” which is located at /usr/lib/vmware/hostd/docroot/client .
  • This file is having the download link for the vsphere client, http://vsphereclient.vmware.com/vsphereclient/VMware-viclient-all-6.0.0.exe.
  • When you click on the hyperlink for the download, this file is being called for downloading the client

    root@test-ESXi:/usr/lib/vmware/hostd/docroot/client] cat clients.xml

    ConfigRoot>

    <clientConnection id=”0000″>

    <authdPort>902</authdPort>

    <version>6</version>

    <exactVersion>6.0.0</exactVersion>

    <patchVersion>1.0.0</patchVersion>

    <apiVersion>dev</apiVersion>

    <downloadUrl>http://vsphereclient.vmware.com/vsphereclient/VMware-viclient-all-6.0.0.exe</downloadUrl&gt;

    <flexClientVersion>6.0.0</flexClientVersion>

    </clientConnection>

    </ConfigRoot>

  • This is not going to help us in any way . ( This is just a fun activity )

Disk Utilization of VCSA 6 is 80%

There are scenarios where the VCSA partitions will become highly utilized time to time,

The current scenario is  /dev/sda3 11G 8.3G 1.9G 82%  reached 82 % . This will not cause any issue until the complete space is used on the partition.  To avoid the failure of the vcenter server in the future I fixed the issue as below,

  • At very first I was planning to extend the disk size of the vcsa by following the KB2126276
  • But later checked the partition and found that the audit logs consuming the considerable amount of storage on the /dev/sda3 ,

             test-vc1:var/log # du -Sh * | sort -rh | head -n 15 2.6G audit

  • I have rotated the audit log on the vcsa 6.0

test-vc1:/var/log # cd /etc/logrotate.d/
test-vc1:/etc/logrotate.d # logrotate audit

  • After rotating audit logs the usage had come down to 59%

vcsa-df-h

 

This is one of the solutions for fixing the issue.