WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Patching VMware Virtual Appliances Using vamicli

Patching VMware Virtual Appliances Using vamicli

05.20.2013 by William Lam // 5 Comments

Last week I wrote an article about creating offline update repository for VMware virtual appliances and demonstrating the use of the VAMI web interface for updating and upgrading a VMware virtual appliance. However, from an automation perspective, the web interface is probably not the right tool for the job and this where the vamcli can help.

Usage: vamicli [options]
may be:
network          Network Configuration
update           Update Management
version          Version Information
service          Service Management

Use vamicli to see a list of options.

The vamicli is a command-line tool that is available on all virtual appliances built using VMware Studio and it provides a subset of the functionality of the VAMI web interface. Using the "update" operation, you can check for available updates as well as performing the installation of an update.

To check for the latest update just like you would using the VAMI web interface, you would run the following command:

vamicli update --check

To install the latest update, you would run the following command:

vamicli update --install latest --accepteula

Here is a screenshot example of going through both of these commands on a VIN 1.2 virtual appliance and then upgrading to VIN 2.0:

As you can see the process is pretty straight forward and this allows you to easily automate the updates of your virtual appliances without having to resort to the VAMI web interface.

For those of you who read my previous article and wish to configure a custom update repository without using the VAMI web interface, you can add the following configuration to /opt/vmware/var/lib/vami/update/provider/provider-runtime.xml where value specifies the HTTP address to your update repository as you would configure using the VAMI web interface.

If you would like to configure additional authentication properties such as username and password, then the /opt/vmware/var/lib/vami/update/provider/provider-runtime.xml should look like the following: The password value is encoded using base64, so to generate the encoding you can use the following python snippet (where password is the password you wish to encode:

python -c "import base64; print base64.b64encode('password')"

Note: The configuration changes above go into effect immediately and you can then use vamicli to perform both check and install operations.

More from my site

  • How To Create Offline Update Repository For VMware Virtual Appliances
  • Quick Tip - Configuring HTTP proxy for VAMI via CLI
  • Google Chat space notification for failed vCenter Server Appliance (VCSA) backups using VEBA
  • Quick Tip - Verifying vCenter Server Appliance (VCSA) Backup Status
  • Quick Tip - Easily identify Virtual Appliances using vSphere API

Categories // Uncategorized Tags // update repository, vami, vamicli, virtual appliance

Comments

  1. *protectedMarco says

    06/06/2014 at 8:37 am

    That VAMI web interface hung on searching update for the VCSA. The command line (as always) worked like a charm and resolved the situation XD

    virtuallyGhetto rules, thanks for sharing your experience!
    Greetings from Italy!!!!

    Reply
  2. *protectedNavin says

    07/28/2015 at 7:38 am

    Hi All, its a wonderful article. But, in my case am facing an issue at updating the vCenter with /opt/vmware/bin/vamicli update --check after setting the LocalRepository to my own in provider-runtime.xml. After changing the Repository in XML file, executing the vamicli update is showing the message like "ERROR:Please contact your vendor.......". So how can i resolve my issue, please help me. Thanks in advance.

    --navin

    Reply
  3. *protectedgummalln says

    07/31/2015 at 2:23 pm

    Hi,

    I want to update the vCenter server through Command Line Interface. Here i don't want to use VMware vCenter server appliance web interface. So for this update i want to change repository from default repository to my own specified repository. For this change, in command line i have specified my repository url in provider-runtime.xml. Where provider-runtime.xml is located in "/opt/vmware/var/lib/vami/update/provider/" location of my vcenter. So after editing this provider-runtime.xml file, am going for checking updates for vcenter which are available in my repository. For that am giving "/opt/vmware/vmware/vamicli update --check" as command in vcenter CLI, but it's giving an Error saying "Failure. Error downloading manifest.please contact your vendor". Before this, for confirming the change in repository i opened Web interface, there the change is reflected to my own repository. After that if i press "save settings" button and run the update command in CLI , then its showing about the avaialable updates. So in that XML file, the save settings is not doing. So for enabling save settings what i need to do in the XML file? please provide me the solution.

    Thanks in advance...

    Reply
  4. *protectedTejas says

    11/27/2017 at 1:04 pm

    Hi,
    I tried to update my appliance using the auto scheduling mechanism of VAMI through the commandline. The steps I had to follow are as follows :
    1. sudo /etc/init.d/vami-sfcb stop
    2. modify /opt/vmware/var/lib/vami/update/provider/provider-runtime.xml
    3. modify /opt/vmware/var/lib/vami/core/provider/provider-runtime.xml
    change the 'RunStartInterval' value to desired auto update time
    4. sudo /etc/init.d/vami-sfcb start

    This will schedule the appliance auto update. The update process will be started by VAMI automatically at the specified time.

    Reply

Trackbacks

  1. vCenter Server 6.0 Tidbits Part 5: New method of patching the VCSA/PSC | virtuallyGhetto says:
    09/04/2015 at 7:13 pm

    […] as the VAMI interface which provided both a UI as well as a command-line which I have blogged about here. The simplest and easiest method was of course using the UI which just required opening a browser […]

    Reply

Thanks for the comment!Cancel reply

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

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