Assigning Tag to a virtual machine fails with the error: Tag cannot be attached to the selected object(s)
search cancel

Assigning Tag to a virtual machine fails with the error: Tag cannot be attached to the selected object(s)

book

Article ID: 327983

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
  • Assigning Tag to a virtual machine from the vSphere Web Client fails with the error:

    Tag cannot be attached to the selected object(s)

  • In the vsphere_client_virgo.log file, you see entries similar to:

    [2016-08-25T13:17:17.611Z] [ERROR] http-bio-9090-exec-128 70007308 100106 200039 com.vmware.vsphere.client.tagging.impl.TagMutationProvider Tag cannot be attached to the selected object(s).
[2016-08-25T13:17:17.708Z] [INFO ] http-bio-9090-exec-128 70007332 100106 200039 org.springframework.flex.servlet.MessageBrokerHandlerAdapter Channel endpoint amf received request.
[2016-08-25T13:17:17.709Z] [ERROR] data-service-pool-52109 70007308 100106 200039 com.vmware.vise.search.transport.impl.QueryClientUtil [Server: http://localhost:10080/invsvc] Socket timed out. [milliseconds: 360102] java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Cause

This issue occurs when the Tag assigning operation take long time to fetch the Tags and fails after reaching the Web Client timeout. This happens when there are many Tags in the Category.

Resolution

This issue is resolved in VMware vCenter Server 6.0 Update 3, available at VMware Downloads.

To work around this issue, assign the Tag using the PowerCLI command:

Get-VM –Name virtual_machine_name | New-TagAssignment –Tag "Tag Name"


Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box..向虚拟机分配标记失败,显示错误:无法将标记附加到选定对象
仮想マシンに対するタグの割り当てが次のエラーで失敗する:選択したオブジェクトにタグを付けることはできません (Tag cannot be attached to the selected object(s))