VMware Customer Connect CLI (VCC) telechargement (2024)

Il y a quelque temps (mois) maintenant, j’ai vu passer sur mon Twitter, un message de mon ami Timo concernant un nouvel outil permettant de récupérer les différents produits VMware (vCenter, NSX, VMware Tools, Tanzu…) directement en ligne de commande.

Great stuff from https://t.co/88kTZWefSA team.

Yesterday I provided some suggestions, and today we have already got a new release with a JSON formatter ! 🥳

Can now display the extended files information in JSON format for interaction with other tools.#VMware #DevOps #vExpert pic.twitter.com/SZbx76vOZg

— Timo Sugliani (@tsugliani) January 26, 2023

Mais quel est le but de ces commandes, me direz-vous  ?! Dans le cas de VMware Tanzu, cela peut être très intéressant car il est nécessaire de mettre en place une jumpbox (machine de rebond avec les différents outil Tanzu/K8S & co…). Potentiellement, cette jumpbox ne dispose pas d’interface graphique (un linux avec juste un accès SSH) ou encore directement depuis le shell ESXi…. (Pratique pour les MAJ !).

Il existe déjà des outils comme vmw-cli ou Romain Decker avait écrit un article mais l’outil est ecrit en nodejs avec tous ses dependances (et sa lourdeur!) …

Installation

L’outil est disponible directement sur le Github de VMware Labs sous licence Apache. il est écrit en Go (le langage de Google) et il est donc nativement portable sous Windows, Linux & MacOS (sauf MacOS Silicon/ARM car pas encore de builder Github Action pour faire une image…).

Pour l’installation, il suffit de récupérer l’outil via Github dans Release

Actuellement la version 1.1.6 est disponible.

J’utilise wget personnellement pour récupérer le fichier.

wget https://github.com/vmware-labs/vmware-customer-connect-cli/releases/download/v1.1.6/vcc-linux-v1.1.6[...]2023-09-11 16:23:07 (19.7 MB/s) - ‘vcc-linux-v1.1.6’ saved [11511177/11511177]

On bascule l’outil en exécutable mais ce n’est pas obligatoire. On peut le copier dans /usr/bin comme cela, il est toujours disponible (mais il faut être root/sudo).

chmod ugo+x vcc-linux-v1.1.6sudo install vcc-linux-v1.1.6 /usr/local/bin/vcc

L’outil est maintenant disponible :

vccvcc downloads binaries from customerconnect.vmware.comUsage: vcc [command]Examples: # Download the latest version of release 11 with a file matching the pattern # If using a * in the filename value, make sure to wrap the text in single quotes on linux/macos vcc download -p vmware_tools -s vmtools -v 11.* -f 'VMware-Tools-darwin-*.zip' --accepteula # Download files using a manifest file # Show an example manifest using 'vcc get manifestexample' vcc download -m manifest.yml --accepteula # List of available products vcc get products # List of available sub-products of product vmware_tools vcc get subproducts -p vmware_tools # List of available versions of sub-products vmtools of vmware_tools vcc get versions -p vmware_tools -s vmtools # List of available files of version 11.3.0 of vmware_tools vcc get files -p vmware_tools -s vmtools -v 11.3.0 # Display example manifest file vcc get manifestexampleAvailable Commands: completion Generate the autocompletion script for the specified shell download Download file from VMware get Display responses help Help about any command logout Remove all session cookiesFlags: -h, --help help for vcc --pass string Password used to authenticate [$VCC_PASS] --user string Username used to authenticate [$VCC_USER] -v, --version version for vccUse "vcc [command] --help" for more information about a command

Utilisation

Pour récupérer la liste des produits: vcc get products

Cela permet de télécharger la longue liste des produits VMware disponibles sur le portail :

vcc get productsPRODUCT CODE PRODUCT DESCRIPTIONadvanced_monitoring_for_vmware_horizon_by_controlup Advanced Monitoring for VMware Horizon by ControlUpapplication_transformer_for_vmware_tanzu Application Transformer for VMware Tanzunsx_network_detection_and_response NSX Network Detection and Responsevmware_nsx_intelligence VMWare NSX Intelligence[...]vmware_tanzu_advanced_edition VMware Tanzu Advanced Editionvmware_tanzu_basic_edition VMware Tanzu Basic Editionvmware_tanzu_cli VMware Tanzu CLIvmware_tanzu_kubernetes_grid VMware Tanzu Kubernetes Gridvmware_tanzu_kubernetes_grid_integrated_edition VMware Tanzu Kubernetes Grid Integrated Editionvmware_tanzu_mission_control_self_managed VMware Tanzu Mission Control (Self-Managed)vmware_tanzu_sql_with_mysql_for_kubernetes VMware Tanzu SQL with MySQL for Kubernetesvmware_tanzu_sql_with_postgres_for_kubernetes VMware Tanzu SQL with Postgres for Kubernetesvmware_tanzu_standard_edition VMware Tanzu Standard Editionvmware_tanzu_toolkit_for_kubernetes VMware Tanzu Toolkit for Kubernetes[..]

On va s’intéresser à maintenant à Tanzu Kubernetes Grid (TKGm). Pour cela, on télécharge la liste des « sous-produits » (NSX ALB ou Tanzu…) : vcc get subproducts -p vmware_tanzu_kubernetes_grid

vcc get subproducts -p vmware_tanzu_kubernetes_gridSUB-PRODUCT CODE DESCRIPTIONnsx-alb VMware NSX Advanced Load Balancertkg VMware Tanzu Kubernetes Grid

On récupère maintenant les versions disponibles du «sous produit» (tkg/tanzu) dans notre cas :

vcc get versions -p vmware_tanzu_kubernetes_grid -s tkg

 vcc get versions -p vmware_tanzu_kubernetes_grid -s tkg'2.2.0' '2.1.1' '2.1.0' '1.6.1' '1.6.0' '1.5.4' '1.5.3' '1.5.2' '1.5.1' '1.5.0' '1.4.3' '1.4.2' '1.4.1' '1.4.0' '1.3.1' '1.3.0' '1.2.1' '1.2.0' '1.1.3' '1.1.2' '1.1' '1.0'

Pour la prochaine étape, il faut disposer d’un compte chez VMware (c’est gratuit ! et cela marche même avec une adresse mail personnelle…) et suivant les produits, c’est en accès libre (ESXi, Tanzu…).

On specifie les variables d’environnement avec notre login et mot de passe (c’est possible aussi d’utiliser les arguments –user ou -pass) cf la doc. Attention si vous avez activé le MFA sur votre compte, ce n’est pas encore compatible pour le moment (Issue 6).

export VCC_USER='[emailprotected]'export VCC_PASS='MySuperSecureP@ssw0rdVMware1!'

sinon on obtient le message d’erreur assez clair :

Credentials not provided!
You must either provide the username and password as arguements
or you must export them as VCC_USER and VCC_PASS environment variables.

On récupère les fichiers disponibles pour la dernière version (2.2.0) : vcc get files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0

vcc get files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0Logging in...Getting DLG DetailsVersion: 2.2.0Eula Accepted: falseEligable to Download: trueFILENAME SIZE BUILD NUMBER DESCRIPTIONtanzu-cli-bundle-darwin-amd64.tar.gz 251.44 MB 21752685 VMware Tanzu CLI for Mactanzu-cli-bundle-linux-amd64.tar.gz 244.94 MB 21752685 VMware Tanzu CLI for Linuxtanzu-cli-bundle-windows-amd64.zip 248.96 MB 21752685 VMware Tanzu CLI for Windowsphoton-3-kube-v1.25.7+vmware.2-tkg.1-8795debf8031d8e671660af83b673daa.ova 1020.36 MB 21752685 Photon v3 Kubernetes v1.25.7 OVAphoton-3-kube-v1.24.11+vmware.1-tkg.1-23267fd741797cde1d2be365ea5df6b4.ova 1.03 GB 21752685 Photon v3 Kubernetes v1.24.11 OVAphoton-3-kube-v1.23.17+vmware.1-tkg.1-879196c3a566442fc5aeea6ac084766b.ova 1.01 GB 21752685 Photon v3 Kubernetes v1.23.17 OVAubuntu-2004-kube-v1.25.7+vmware.2-tkg.1-8a74b9f12e488c54605b3537acb683bc.ova 1.62 GB 21752685 Ubuntu 2004 Kubernetes v1.25.7 OVAubuntu-2004-kube-v1.24.11+vmware.1-tkg.1-2ccb2a001f8bd8f15f1bfbc811071830.ova 1.79 GB 21752685 Ubuntu 2004 Kubernetes v1.24.11 OVAubuntu-2004-kube-v1.23.17+vmware.1-tkg.1-ee4d95d5d08cd7f31da47d1480571754.ova 1.71 GB 21752685 Ubuntu 2004 Kubernetes v1.23.17 OVAkubectl-mac-v1.25.7+vmware.2.gz 14.75 MB 21752685 kubectl cli v1.25.7 for Mackubectl-linux-v1.25.7+vmware.2.gz 13.53 MB 21752685 kubectl cli v1.25.7 for Linuxkubectl-windows-v1.25.7+vmware.2.exe.gz 13.71 MB 21752685 kubectl cli v1.25.7 for Windowsphoton-4-harbor-v2.7.1+vmware.1-dfd94f1401c510c355438a02521e72ce5e8042b5.ova 1.23 GB Photon v4 Harbor v2.7.1 OVAcrashd-darwin-amd64-v0.3.7+vmware.5-4-g59b239d.tar.gz 9.08 MB 20430856 Crash Recovery and Diagnostics 0.3.7 for Mac for Tanzu Kubernetes Gridcrashd-linux-amd64-v0.3.7+vmware.5-4-g59b239d.tar.gz 8.26 MB 20430856 Crash Recovery and Diagnostics 0.3.7 for Linux for Tanzu Kubernetes Gridvelero-mac-v1.9.7+vmware.1.gz 30.03 MB 21618693 Velero 1.9.7 for Macvelero-linux-v1.9.7+vmware.1.gz 29.39 MB 21618693 Velero 1.9.7 for Linuxvelero-windows64-v1.9.7+vmware.1.gz 29.55 MB 21618693 Velero 1.9.7 for Windowsphoton-3-kube-v1.25.7+vmware.1-tiny.2-tkg.1-ac20b3.ova 600.46 MB Photon v3 Kubernetes v1.25.7 Tiny OVA(Technical Preview)ubuntu-2004-kube-v1.25.7+vmware.1-tiny.2-tkg.1-2319b3.ova 937.85 MB Ubuntu 2004 Kubernetes v1.25.7 Tiny OVA (Technical Preview)

Téléchargement

Pour lancer le téléchargement d’un fichier (le bundle tanzucli , on utilise la commande suivants : vcc download files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0 -f ‘tanzu-cli-bundle-darwin-amd64.tar.gz’

vcc download files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0 -f ‘tanzu-cli-bundle-darwin-amd64.tar.gz’

No output directory set. Downloading to /home/vcc/vcc-downloads
Logging in…
Collecting download payload
Eula has not been accepted for this sub-product


Il faut penser à activer le flag —accepteula sinon pas de téléchargement :vcc download files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0 -f ‘tanzu-cli-bundle-darwin-amd64.tar.gz’ –accepteula

vcc download files -p vmware_tanzu_kubernetes_grid -s tkg -v 2.2.0 -f 'tanzu-cli-bundle-darwin-amd64.tar.gz' --accepteulaNo output directory set. Downloading to /home/vcc/vcc-downloadsLogging in...Collecting download payloadDownload started to /home/vcc/tanzu-cli-bundle-darwin-amd64.tar.gzDownloading... 264 MB completeDownload finished

Ce n’est pas très pratique pour téléchargement mais il est possible d’utiliser un fichier yaml qui contient les différents fichiers à télécharger avec leur version. Pour obtenir le yaml d’exemple : vcc get manifestexample

vcc get manifestexample---# This section will download the latest version of vmware_tools# Each glob pattern will download a single file eachproduct: vmware_toolssubproduct: vmtoolsversion: "*"filename_globs: - "VMware-Tools-darwin-*.tar.gz" - "VMware-Tools-darwin-*.zip"---# This section will download the latest minor release from major version 10# The single glob pattern will download 2 filesproduct: vmware_toolssubproduct: vmtoolsversion: "10.*"filename_globs: - "VMware-Tools-other-*"---

On remplit notre petit fichier yaml (vcc_tanzu.yaml) pour Tanzu qui permet de récupèrer :

  • le bundle Tanzu Linux,
  • kubectl pour linux
  • les 2 dernières images ova (Ubuntu) (et aussi la Tiny…)
---product: vmware_tanzu_kubernetes_gridsubproduct: tkgversion: "2.2.0"filename_globs: - "tanzu-cli-bundle-linux-amd64.tar.gz" - "kubectl-linux-*.gz" - "ubuntu-2004-kube-v1.25.*.ova" - "ubuntu-2004-kube-v1.24.*.ova"---

Puis on lance le téléchargement (cela prends plus ou moins de temps suivant votre connexion internet !) : vcc download -m tanzu_vcc.yaml

vcc download -m tanzu_vcc.yaml/home/vcc/vcc-downloads does not exist. Creating...No output directory set. Downloading to /home/vcc/vcc-downloadsLogging in...Opening manifest file: vcc_tanzu.yaml/home/vccCollecting download payload for [vmware_tanzu_kubernetes_grid] [tkg] [2.2.0] [tanzu-cli-bundle-linux-amd64.tar.gz]Collecting download payload for [vmware_tanzu_kubernetes_grid] [tkg] [2.2.0] [kubectl-linux-*.gz]Collecting download payload for [vmware_tanzu_kubernetes_grid] [tkg] [2.2.0] [ubuntu-2004-kube-v1.25.*.ova]Collecting download payload for [vmware_tanzu_kubernetes_grid] [tkg] [2.2.0] [ubuntu-2004-kube-v1.24.*.ova]Download started to /home/vcc/vcc-downloads/tanzu-cli-bundle-linux-amd64.tar.gzDownloading... 257 MB completeDownload finishedDownload started to /home/vcc/vcc-downloads/kubectl-linux-v1.25.7+vmware.2.gzDownloading... 14 MB completeDownload finishedDownload started to /home/vcc/vcc-downloads/ubuntu-2004-kube-v1.25.7+vmware.2-tkg.1-8a74b9f12e488c54605b3537acb683bc.ovaDownloading... 1.7 GB completeDownload finishedDownload started to /home/vcc/vcc-downloads/ubuntu-2004-kube-v1.25.7+vmware.1-tiny.2-tkg.1-2319b3.ovaDownloading... 983 MB completeDownload finishedDownload started to /home/vcc/vcc-downloads/ubuntu-2004-kube-v1.24.11+vmware.1-tkg.1-2ccb2a001f8bd8f15f1bfbc811071830.ovaDownloading... 1.9 GB completeDownload finished

On est prêt à installer Tanzu ! (cf la doc).

Déploiement d’OVA via GOVC

Une dernière astuce, il faut maintenant déployer les OVA pour faire un template dans votre vCenter et pour cela il existe aussi un outil indispensable dans sa boite à outil : govc (de govmoni)

Si vous n’avez pas encore govc, on l’installe en suivant la documentation (attention, pour le tar, il faut être root ou sudo).

curl -L -o - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -C /usr/local/bin -xvzf - govc

On définit les variables suivantes pour se connecter :

export GOVC_URL=vcenter.example.comexport [emailprotected]export GOVC_PASSWORD=MySecurePasswordVMware1!export GOVC_INSECURE=true

On vérifie le bon fonctionnement avec govc ls :

govc ls/DC-TNZ/vm/DC-TNZ/network/DC-TNZ/host/DC-TNZ/datastore

Au besoin, on va créer un dossier pour mettre nos images, on peut lister la liste des dossiers :

govc find / -type f/DC-TNZ/vm/DC-TNZ/host/DC-TNZ/datastore/DC-TNZ/network/DC-TNZ/vm/AviSeFolder/DC-TNZ/vm/Discovered virtual machine/DC-TNZ/vm/ESX Agents/DC-TNZ/vm/VCF/DC-TNZ/vm/packer/DC-TNZ/vm/VSAN/DC-TNZ/vm/NSX-T/DC-TNZ/vm/vCLS/DC-TNZ/vm/NSX-T/Edge/DC-TNZ/vm/NSX-T/Manager/DC-TNZ/vm/NSX-T/MGR

on cree notre dossier : govc folder.create /DNC-TNZ-/vm/TNZ

On liste au besoin la partie Datastore (c’est plus simple quand on as du vSAN !) : govc datastore.info

govc datastore.infoName: datastore1 Path: /DC-TNZ/datastore/datastore1 Type: VMFS URL: ds:///vmfs/volumes/620f759e-c73c18fc-c38c-e4434bed0c50/ Capacity: 95.2 GB Free: 59.3 GBName: datastore1 (1) Path: /DC-TNZ/datastore/datastore1 (1) Type: VMFS URL: ds:///vmfs/volumes/620f751a-008c52f6-437f-e4434bed0c60/ Capacity: 95.2 GB Free: 93.8 GBName: vsanDatastore Path: /DC-TNZ/datastore/vsanDatastore Type: vsan URL: ds:///vmfs/volumes/vsan:52ce24c17aa2b37f-560c971b64143cfc/ Capacity: 7153.9 GB Free: 4367.1 GB

On lance l’import de l’ova avec la commande govc import.ova … en précisant le dossier, le datastore (ds), l’image ova a importé et pour terminer les options !

govc import.ova -folder=/DC-TNZ/vm/TKGM -ds=vsanDatastore -options - vcc-downloads/ubuntu-2004-kube-v1.25.7+vmware.2-tkg.1-8a74b9f12e488c54605b3537acb683bc.ova <<EOF{"DiskProvisioning":"thin","MarkAsTemplate":true}EOF

Si vous obtenez le message d’erreur suivant : govc: default resource pool resolves to multiple instances, please specify

Il faut spécifier le resource pool à utiliser. On peut obtenir la liste des ressources avec la commande suivante : govc ls -l ‘host/*’ govc pool.info | grep ResourcePool

govc ls -l 'host/*' govc pool.info | grep ResourcePool/DC-TNZ/host/witness.example.com/Resources (ResourcePool)/DC-TNZ/host/Cluster-TNZ/Resources (ResourcePool)

On recommence avec le paramètre pour spécifier le ressource pool (-pool) :

govc import.ova -folder=/DC-TNZ/vm/TKGM -ds=vsanDatastore -pool=/DC-TNZ/host/Cluster-TNZ/Resources -options - vcc-downloads/ubuntu-2004-kube-v1.25.7+vmware.2-tkg.1-8a74b9f12e488c54605b3537acb683bc.ova <<EOF{"DiskProvisioning":"thin","MarkAsTemplate":true}EOF[31-07-23 15:57:06] Warning: Line 103: Invalid value 'nic0' for element 'Connection'.[31-07-23 15:58:15] Uploading ubuntu-2004-efi-kube-v1.25.7+vmware.2-disk1.vmdk... OK[31-07-23 15:58:15] Marking VM as template...

Et voilà! l’ova est copié sur le vCenter en presque 1 minute sans passer par l’interface graphique du vCenter, il reste plus que à lancer l’installation de Tanzu !

Conclusion

Et vous, comment faites-vous pour déployer VMware Tanzu sur votre Jumpbox ?

VMware Customer Connect CLI (VCC) telechargement (2024)

FAQs

What is VMware customer connect? ›

VMware Customer Connect™ is a rebranding and update of My VMware designed to unify and simplify our customers' digital experience.

How to register VMware customer connect? ›

Register
  1. Verify email address.
  2. Password. Use at least 8 and at most 20 characters, including at least one of each of the following: special character (@%+\/'!#$ ^?:,(){}[]~-_.), lowercase, uppercase and number.
  3. Verify password.

What is the password for VMware customer Connect? ›

Enter the email address you used when you registered for Customer Connect and we'll send an authentication code to reset your password. This will update the password for both Customer Connect and My Workspace ONE account logins.

How do I Connect my device to VMware? ›

Plug the external USB hard drive into the USB port of your physical machine. Launch VMware Workstation. Start your virtual machine. Click VM > Removable device > external_hard_drive_name, then click Connect.

Can I use VMware for free? ›

VMware Workstation Free? VMware Workstation has multiple licensing options depending on your use case. Workstation Player is available free for personal, non-commercial use, but requires a license for commercial use. A valid Commercial license will remove the 'Non-commercial use only' banner placed within the product.

How to register VM from ESXi CLI? ›

To register a virtual machine from a command line in an ESXi host:
  1. Log in as root to the ESXi host with an SSH client. For more information about enabling SSH on an ESXi host, see Using ESXi Shell in ESXi 5.x, 6.x and 7.x.
  2. Run the command: # vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx.
Aug 10, 2021

How do I Connect to a VMware virtual machine? ›

Open the virtual machine settings window from within your installation of VMware Workstation, VMware Server, or VMware Player by clicking VM > Settings. In the hardware tab, highlight the network adapter and ensure that the bridged network connection checkbox is selected.

How do I delete my VMware customer connect account? ›

In the Login Accounts: Users table, locate the user name. In the far left column next to the user name, click the Delete icon. Respond to the confirmation prompt.

Do I need VMware support? ›

Support and Subscription is mandatory on ESXi licenses when purchased as part of VMware vSphere Essentials, Standard, Advanced, Enterprise, Enterprise Plus and Enterprise Plus with Cisco Nexus 1000V editions. Subscription is required. Customer may purchase Technical Support on a Per Incident basis.

What is VMware and how does it work? ›

VMware Workstation is the first product ever released by the software company. It enables users to create and run VMs directly on a single Windows or Linux desktop or laptop. Those VMs run simultaneously with the physical machine. Each VM runs its own OS such as Windows or Linux.

Top Articles
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6368

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.