Thursday, 16 November 2017

Login in vCloud Director using REST API Client - POSTMAN

  • Nowadays most of the virtualization products support REST-API.  
  • I first learned to interact using rest-api is with RavelloSystems(a cloud platform by Oracle)
  • The best client I have come across for it is POSTMAN client available for windows, mac & Linux. I have installed it on my MacBook & windows 10 machine. 
  • So this time I wanted to interact with vCloud Director 8.2 & 9.0 using REST-API
  • After a long day meeting and looking for how to log in successfully in vCD using postman client, somehow I figured it late night
  • So the basic options that we use in it are GET, PUT, POST & DELETE.
  • So if you have worked on HTML it makes it easy to understand the output.
  • As VMware has already started in vCenter 6.5 - REST API explorer.

Steps to login in vCD using POSTMAN

  • URL for vCD i.e
    https://IP or FQDN/api/sessions
  • Authentication- Basic (As per snapshot no. 1)
        Username- administrator@system   :- If you are a system administrator.
        I found it difficult for the username which took me this much time. So this user can be a LDAP integrated user or Active Directory.
        Password-  As per your directory
  • Once authorized with Status:200 OK .  In the AUTHORIZATION tab as highlighted, we have HEADERS tab where we will recieve a x-vcloud-authorization: token.
  • Instead of using your credentials for authentication, we can use the custom header (As per snapshot no. 2 & 3).
  • Now we are ready to work on this REST-API for interaction using postman client.















Sunday, 29 October 2017

Virtual Machine - Edit Settings - (Disk) Part 3(i)


So after writing the series for CPU & Memory. This series will be dedicated to Settings related to vmdk i.e Virtual Machine Disk.


  • The first option is the size of the virtual machine which can be in MB, GB or TB.
  • Maximum Size is the size of the datastore up to which VM hard disk could expand.
VM Storage Policies in production environments is created for storage tiering if using traditional storage i.e Block-Level Storage, Virtual San or a Virtual Volume.

VM Storage policies can be created & managed from vSphere Web Client. I"ll be writing a series of post for different policies which can be created for Virtual SAN, Virtual Volume & Block level storage.




Sunday, 15 October 2017

vSAN Policies with PowerCLI(FTT=1,Stripe=3, Object Space Reservation = 50%)


New-SpbmStoragePolicy -Name OBS -AnyOfRuleSets (New-SpbmRuleSet (New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.hostfailuresToTolerate") -Value 1), (New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.stripeWidth") -Value 3),(New-SpbmRule -Capability (Get-SpbmCapability -Name VSAN.proportionalCapacity)-Value 50))



Output:-


vSAN Policies with PowerCLI(FTT=1, RAID5/6)


New-SpbmStoragePolicy -Name PowerCLI-RAID5  ` -AnyOfRuleSets ` (New-SpbmRuleSet ` (New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.hostFailuresToTolerate" ) -Value 1),(New-SpbmRule -Capability (Get-SpbmCapability -Name "VSAN.replicaPreference" ) -Value "RAID-5/6 (Erasure Coding) - Capacity"))



Output:-


vSAN Policies with PowerCLI(Striping=3)


New-SpbmStoragePolicy -Name Stripe=3 -RuleSet(New-SpbmRuleSet -Name "striping=3" -AllOfRules @((NewSpbmRule -Capability VSAN.stripewidth 3)))


Output:-


vSAN Policies with PowerCLI (No redundancy i.e FTT=0)


New-SpbmStoragePolicy -Name FTT=0 -RuleSet(New-SpbmRuleSet -Name "NoRedundancy" -AllOfRules @((New-SpbmRule -Capability VSAN.hostFailuresToTolerate 0)))



Output:-





Check IP for Management VMkernel


esxcli network ip interface ipv4 get

Output:-