WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

Automating Horizon View deployments using VCT & cURL

03.11.2014 by William Lam // 1 Comment

Last week I spent a couple of days playing around with the new Horizon View Configuration Tool (VCT) Fling and as part of my "exploration" of VCT, I needed to re-run the deployment. Going through the guided wizard the first time was fine, but if you needed to do that 5-10 times, then it was not very fun. Since VCT was a simple web application, I decided to fire up one of my favorite tool, Firebug to do some poking around.

automating-vct-0
It turns out the payload request was actually very simple and it contains all the variables for each of the parameters that a user would specify through the UI and a single HTTP POST request is then sent to the web application for deployment. I took all the variables and created a simple shell script that a user can easily edit without having to worry about fat-fingering on the UI as there is no form validation at the moment and then send the POST request using my other favorite tool cURL.

Disclaimer:  These scripts are provided for informational and educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

You can download the script here called automateVCT.sh

Before running the script, you will need to edit the variables for your environment and if you have an existing Active Directory server, then there are some variables that you can leave off. Towards the bottom of the script, there is an infinite loop that will run to continuously to check the current status which is then printed on the screen every 10 seconds. For practical use, you will probably want to change the timing to something a bit longer like every 5 minutes for a status.

Here is an example of executing the script:
automating-vct-1
As you can see from the screenshot, once the request has been accepted by VCT, the status will be printed on the screen which is the same status shown in the UI. If everything was successful, you should eventually see the status display the IP Address of your Horizon View environment like the following:

automating-vct-2
This script really came in handy for testing VCT and I thought it would be great to share it with the community so you can automate the deployment of your Horizon View environment using VCT!

Categories // Horizon View, Uncategorized, vSphere 5.5 Tags // curl, fling, horizon composer, horizon view, VCT, vSphere 5.5

Useful Links - Installing Mac OS X in a VM & P2V'ing Mac OS X

03.10.2014 by William Lam // 1 Comment

A couple of weeks back I received an interesting email regarding a couple of topics related to Apple Mac OS X and vSphere. The first one was related to the steps required for installing Mac OS X in a Virtual Machine. Though the process for installing Mac OS X in a Virtual Machine is pretty straight forward, there is an additional step that you must preform before you can get started. This was actually something I ran into when I first tried to install Mac OS X in a Virtual Machine. I found this handy online resource by VMware called Guest Operating System Installation Guide that provides the exact steps required and you will find a link for each of the supported Mac OS X systems as shown in the list below.

  • Mac OS X 10.9 (Mavericks)
  • Mac OS X 10.8 (Mountain Lion)
  • Mac OS X 10.7 (Lion)
  • Mac OS X Server 10.6 (Snow Leopard)
  • Mac OS X Server 10.5 (Leopard)

[Read more...]

Categories // Apple, vSphere, vSphere 5.5 Tags // apple, osx, p2v

Exploring VSAN APIs Part 4 – VSAN Disk Mappings

03.10.2014 by William Lam // Leave a Comment

A useful feature that is provided in the vSphere Web Client for VSAN is the ability to visualize the VSAN disk mappings for each ESXi host contributing to the VSAN cluster. This information will come in handy for troubleshooting as well as checking or servicing a disk failure.

vsan-host-disk-status-2
You can easily retrieve the VSAN Disk Groups for each ESXi host and their respective SSD and HDD within that disk group by looking at the following property vsanSystem->config->storageInfo->diskMapping. There is a variety of information for each device such as the name, capacity, state, health, etc. of each disk. To demonstrate the above operation, I have created a vSphere SDK for Perl sample script called vsanHostTrafficTypeMgmt.pl

Disclaimer:  These scripts are provided for informational and educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

To show the disk mappings, you will need to specify a vSphere Cluster running VSAN using the following command:

./vsanHostDiskMapping.pl --server vcenter55-1.primp-industries.co --username root --cluster VSAN-Cluster

vsan-host-disk-status-0
In the above output, you will see the VSAN Disk Groups for each ESXi host along with their respective device name and capacity. Here is another screenshot for a VSAN environment that contains multiple VSAN Disk Groups:

vsan-host-disk-status-1
This is just a very tiny sub-set of the available properties for a disk, for more information take a look at the scsiLun definition within the vSphere API Reference.

  1. Exploring VSAN APIs Part 1 – Enable VSAN Cluster
  2. Exploring VSAN APIs Part 2 – Query available SSDs
  3. Exploring VSAN APIs Part 3 – Enable VSAN Traffic Type
  4. Exploring VSAN APIs Part 4 – VSAN Disk Mappings
  5. Exploring VSAN APIs Part 5 – VSAN Host Status
  6. Exploring VSAN APIs Part 6 – Modifying Virtual Machine VM Storage Policy
  7. Exploring VSAN APIs Part 7 – VSAN Datastore Folder Management
  8. Exploring VSAN APIs Part 8 – Maintenance Mode
  9. Exploring VSAN APIs Part 9 – VSAN Component count
  10. Exploring VSAN APIs Part 10 – VSAN Disk Health

Categories // VSAN, vSphere, vSphere 5.5 Tags // VSAN, vSphere 5.5, vSphere API

  • « Previous Page
  • 1
  • …
  • 415
  • 416
  • 417
  • 418
  • 419
  • …
  • 560
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...