Skip to content

vBlog.nl

All about technology

Menu
  • Home
  • VMware Cloud Director
  • vSphere
  • Automation
    • PowerCLI
    • PowerShell
    • Terraform
  • NSX
  • Horizon DaaS
  • About Us
Menu

Developer Center Code Capture

Posted on January 7, 2020

In the latest release of vCenter (6.7U2 and higher) you will find a feature called Developer Center Code Capture.

If you are familiar with VMware flings you might know about the Onyx fling which was a similar project.

The idea of a developer center was first released in the VMware on AWS Cloud console. As the tool is highly popular VMware decided to add it to the vSphere client as well.

With code capture we get the possibility to record our actions in the vSphere client and output those actions as code.

You can use this code for instance to reproduce these actions for automating tasks and making your live as an administrator or developer easier.

The code that is being recorded and outputted is in a form of PowerCLI called “low-level PowerCLI”. Instead of the familiar high-level cmdlets like  Get-CIVAPP or Get-VM the output is .Net based and can be used directly to interact with the vSphere API.

In this blog I will show you what you can do with the Developer Center Code Capture feature.

Table of Contents

  • Enable code capture
  • Recording code
  • Proof that the captured code works
Enable code capture

As a first step I need to enable the code capture feature in the vSphere client.

Developer center location  Code Capture enable button

Once I have enabled the code center I can start recording actions in vCenter.

Recording code

For this demo I will clone a demo VM and record the code output to see what we get. Therefore I have created a VM called ‘vblog-arjen’ before hand.

To start recording I need to click the record button that has appeared since I enabled the Code capture feature. (The button can be found in the top right corner of the vSphere client)

record button

The next step for me is to actually perform the action of cloning a VM  and see what happens.

Once I am done with the clone operation I pressed the record button again to stop recording.

As soon as I hit stop I am taken back to the Developer center and the code is presented to me.

code output

As you can see I have the option to clear and start another action or to copy and or download the code.

Proof that the captured code works

For the purpose of this blog post I have copied the code and I will now try to redo my clone action using PowerCLI.

But first things first, I have to delete the cloned VM.

Now I can run the code and see what happens.

proof that it works

And there we have it succes. I hope you enjoyed reading this post and found it useful.

Other interesting automation related articles:

  • vCloud automation tools
  • Deploy a vApp using PowerCLI
  • The basics of vcd-cli
  • vCloud PowerCLI/PowerShell basics

I was inspired to write this blog post after reading about vSphere Client Developer Center on https://blogs.vmware.com/ 

 2,305 total views,  5 views today

Share on Social Media
twitter facebook linkedin reddit emailwhatsapptelegram

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent articles

  • VMware Cloud on AWS with FSx for NetApp ONTAP December 28, 2022
  • Workspace ONE Access – Change certificate December 22, 2022
  • UI themes for VMware Cloud Director 10.4.1 and later December 16, 2022
  • VMware Tanzu Kubernetes Grid December 15, 2022
  • Workspace One Access – Not logged in to server FQDN. Please invoke Save before Sync December 12, 2022
  • NSX Edge configuration has failed. 1G hugepage support required. December 7, 2022
  • Horizon DaaS – Unable to connect to Desktop November 24, 2022
  • How to: Request and Install a Lets Encrypt Wildcard SSL on VMware Cloud Director 10.4 October 17, 2022
  • New and improved vSAN 8 explained September 24, 2022
  • How to update a stand alone ESXi host September 13, 2022

Tags

Automation bootstrapping Container Service Extension Credential Manager Desktone.log ESXi EUC EXi GPU Horizon DaaS Instant-Clone Logging NSX nsx-t PowerCLI PowerShell Putty Raspberry PI SSL Tanzu Terraform update vcd-cli vCenter vCloud vCloud Availability vCloud Director VDI vGPU VMware VMworld vSAN vSphere vVols workspace one Zerto

VMware Cloud Provider Blog

  • NSX ALB Licensing with VMware Cloud Director
    by Jaikishan Tayal on March 27, 2023 at 10:33 am

    History of NSX ALB and VCD Licensing: From version 10.2, VMware Cloud Director began supporting NSX-T Advanced Load Balancer (AVI Load Balancer). This integration has become crucial for Cloud Services Providers, allowing them to provide their customers with a range of Load Balancing services (LBaaS) for Virtual Data Center workloads and Tanzu containers. Before the … Continued The post NSX ALB Licensing with VMware Cloud Director appeared first on VMware Cloud Provider Blog.

  • VMware vSAN 8 Update 1 for Cloud Services Providers
    by Christopher Wong on March 24, 2023 at 3:00 pm

    Recently, VMware announced the upcoming release of vSAN 8 Update 1. This latest update enhances vSAN’s capabilities and functionality with additional improvements for performance, data durability, and integration. Cloud Services Providers who are leveraging the capabilities of vSAN 8 can expect to see additional benefits in these areas as they deploy this upcoming release into … Continued The post VMware vSAN 8 Update 1 for Cloud Services Providers appeared first on VMware Cloud Provider Blog.

  • Terraform VMware Cloud Director Provider 3.9.0 – Beta early access build
    by Guy Bartram on March 24, 2023 at 11:06 am

    The release time for version 3.9.0 of Terraform VMware Cloud Director Provider is approaching,and for the first time, we’re releasing a beta, so users can try the new features and give helpful feedback that will improve the final release. What is a “beta” build? A beta build is a preliminary release of an intended new … Continued The post Terraform VMware Cloud Director Provider 3.9.0 – Beta early access build appeared first on VMware Cloud Provider Blog.

  • VMware Cloud Director Object Storage Extension 2.2.1
    by Astha Sharma on March 16, 2023 at 5:45 pm

    Object Storage Extension 2.1.1 The post VMware Cloud Director Object Storage Extension 2.2.1 appeared first on VMware Cloud Provider Blog.

  • Architecting VMware Cloud Director Availability Solution in a Multi-Cloud Environment
    by Nikolay Patrikov on March 15, 2023 at 1:09 pm

    Building a cloud based on VMware Cloud Director or Cloud Director service requires a considerable amount of deployment decisions for Cloud Providers concerning the infrastructure behind their services. They can operate fully on-premises within their data centers or combine them with any of the hyperscalers in a hybrid way. These design decisions affect the DRaaS … Continued The post Architecting VMware Cloud Director Availability Solution in a Multi-Cloud Environment appeared first on VMware Cloud Provider Blog.

©2023 vBlog.nl | Design: Newspaperly WordPress Theme