WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / Exploring new VCSA VAMI API w/PowerCLI: Part 6

Exploring new VCSA VAMI API w/PowerCLI: Part 6

02.02.2017 by William Lam // Leave a Comment

In Part 6, we will take a look at how we can use the new VAMI APIs to easily associate the underlying VMDKs to their respective OS disk partitions for a VCSA or PSC node. In addition, the workflow of increasing the disk capacity for a specific partition has also been simplified further with the new VAMI APIs. After increasing the specific VMDK size, we can now also trigger the partition resize operation using the VAMI APIs, where as before this used to be a manual task that required SSH access. In vSphere 6.5, there have been a few minor changes to the VCSA's VMDK layout and sizes, for more details, please have a look at this blog post here.

VAMI UI Area of Focus

Unfortunately, there is not a page within the VAMI UI (https://[VCSA]:5480) that either lists or provides the actual mapping of the underlying VMDKs to their respective partition types. You can see the different VMDKs using the vSphere Web/C# Client, but historically the mapping of VMDK to partition type was done manually or you would refer to the table found in the blog post referenced above. Lets see if we can pull this information without needing to go to a UI 🙂

VAMI APIs Used

  • GET /appliance/system/storage
  • POST /appliance/system/storage/resize

PowerCLI Function

  • Get-VAMIDisks
  • Start-VAMIDiskResize

Sample Output

The first function is called Get-VAMIDisks which does exactly as it sounds. It lists all disks (VMDKs) and their associated partition function. You will notice that Disk 1 and Disks 2 does not provide a label (I have already filed a bug internally), but referring to my blog article linked above, we can tell what those map two map to.


An example workflow for increasing the disk capacity, say for example the "DB" partition would first involved the query above. Next, you would then increase the size of the 6th VMDK for your VCSA or PSC node which can be done online while the VM is running using either the vSphere Web/C# Client, PowerCLI or any other vSphere SDK. Finally, to make GuestOS and application aware of the new space increase, you will now run the Start-VAMIDiskResize function which will now make the storage usable. With these two functions, you can see how easy it would be to combine them into a higher level PowerCLI function that performs the workflow we had just described. I will leave this as an exercise for the reader for explore further.

  • Exploring new VCSA VAMI API w/PowerCLI: Part 1
  • Exploring new VCSA VAMI API w/PowerCLI: Part 2
  • Exploring new VCSA VAMI API w/PowerCLI: Part 3
  • Exploring new VCSA VAMI API w/PowerCLI: Part 4
  • Exploring new VCSA VAMI API w/PowerCLI: Part 5
  • Exploring new VCSA VAMI API w/PowerCLI: Part 6
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 10

More from my site

  • Exploring new VCSA VAMI API w/PowerCLI: Part 10
  • Exploring new VCSA VAMI API w/PowerCLI: Part 9
  • Exploring new VCSA VAMI API w/PowerCLI: Part 8
  • Exploring new VCSA VAMI API w/PowerCLI: Part 7
  • Exploring new VCSA VAMI API w/PowerCLI: Part 5

Categories // Automation, PowerCLI, vSphere 6.5 Tags // PowerCLI, vami, vcenter server appliance, VCSA 6.5, vSphere 6.5

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023
  • Is my vSphere Cluster managed by vSphere Lifecycle Manager (vLCM) as a Desired Image or Baseline? 03/10/2023
  • Interesting VMware Homelab Kits for 2023 03/08/2023

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 © 2023

 

Loading Comments...