As a seasoned IT professional, I have been working with VMware vCenter for quite some time now. Recently, one of our customers requested us to change the swap location to a different datastore, as the current datastore was about to be removed in the near future. However, what we encountered was a small HTML5 UI-bug in vCenter 7.0 Update 2 that prevented us from selecting a datastore. In this blog post, I will share the workarounds we used to overcome this issue and apply the change via PowerShell/PowerCLI.
The Issue: Swap File Location Not Selectable
—————————————–
When we tried to change the swap file location in vCenter 7.0 U2, we noticed that the whole mask was simply disabled, as shown below:

This was quite frustrating, as it prevented us from selecting a different datastore for the swap location. However, after some research, we found that this issue is already addressed and will be fixed in vCenter 7.0 U3.
Workaround: Apply Change via PowerShell/PowerCLI
———————————————
Since the issue is only present in the HTML5 UI client, we can use PowerShell/PowerCLI to apply the change on all hosts in a specific cluster or on a specific host. Here are the steps to apply the change via PowerShell/PowerCLI:
### Apply Change on All Hosts in a Specific Cluster
To apply the change on all hosts in a specific cluster, follow these steps:
1. Open PowerCLI and connect to your vCenter server.
2. Run the following command to set the swap file location to a different datastore:
“`powershell
Set-VMHost -Name
“`
Replace `
### Apply Change on a Specific Host
To apply the change on a specific host, follow these steps:
1. Open PowerCLI and connect to your vCenter server.
2. Run the following command to set the swap file location to a different datastore:
“`powershell
Get-VMHost -Name
“`
Replace `
Conclusion
———-
In this blog post, we discussed a small HTML5 UI-bug in vCenter 7.0 U2 that prevents the user from selecting a datastore for the swap location. However, we also provided two workarounds to overcome this issue and apply the change via PowerShell/PowerCLI. These workarounds can be used on all hosts in a specific cluster or on a specific host. We hope this helps you in your day-to-day tasks and saves you some time and effort.
About the Author
——————
My name is Patrik Kernstock, and I am a 25-year-old perfectionist born in Austria and living in Ireland, Cork. I am a tech and security enthusiast with an interest in Linux, container-stuff, and many software solutions by Microsoft, Veeam, and VMware. You can follow me on my blog [blog@kernstock.net](mailto:blog@kernstock.net) for more updates and insights on IT and technology-related topics.