VMware Cloud Community
Pat72
Contributor
Contributor

software-packages

Author : Chris Bedford

URL : http:////docs.vmware.com/en/VMware-vSphere/6.0/com.vmware.vsphere.upgrade.doc/GUID-5FCA78EC-8637-43A...

Topic Name : Install vCenter Server Appliance Patches

Publication Name : vSphere Upgrade

Product/Version : VMware vSphere/6.0

Question :

how to download the software-packages utility

18 Replies
Vijay2027
Expert
Expert

Software-packages  utility is embedded with vCSA. You don't have to download any utility.

https://www.vladan.fr/patch-vmware-vcenter-server-vcsa/

Putty into appliance shell and you will be able to patch using vCSA

Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered

Reply
0 Kudos
PGinhoux
Enthusiast
Enthusiast

Well, when I want to check which patches will gets actually installed, the command is not found :

VMware vCenter Server Appliance 6.5.0.15000

Type: vCenter Server with an embedded Platform Services Controller

root@pcoe-vcsa.pcoe.fr's password:
Last login: Thu Aug 16 07:02:44 2018 from xxx.xxx.xxx.xxx
root@PCOE-VCSA [ ~ ]# software-packages list –staged
-bash: software-packages: command not found

So where is the problem?

Reply
0 Kudos
Vijay2027
Expert
Expert

You will have to run software-packages from the below shell

pastedImage_0.png

Vijay2027
Expert
Expert

Putty into vCSA and run the below command:

chsh -s /bin/appliancesh root

Close and re-launch putty to vCSA.

PGinhoux
Enthusiast
Enthusiast

Thanks,

I can now run the help command

Command> software-packages -h
usage: software-packages [-h] {stage,unstage,validate,install,list} ...

optional arguments:
  -h, --help            show this help message and exit

sub-commands:
  {stage,unstage,validate,install,list}
    stage               Stage software update packages
    unstage             Purge staged software update packages
    validate            Validate software update packages
    install             Install software update packages
    list                List details of software update packages

but the one as documented on the site still fails (with double '--' or a single '-') :

Command> software-packages list --staged

usage: software-packages [-h] {stage,unstage,validate,install,list} ...

software-packages: error: unrecognized arguments: –-staged

Command>

Command> software-packages list -staged

usage: software-packages [-h] {stage,unstage,validate,install,list} ...

software-packages: error: unrecognized arguments: –staged

Reply
0 Kudos
Vijay2027
Expert
Expert

command looks good to me.

software-packages list --staged

pastedImage_0.png

Reply
0 Kudos
Vijay2027
Expert
Expert

Alos, can you login to bash shell and run the below command to verify disk utilization.

df -Th

pastedImage_0.png

Reply
0 Kudos
PGinhoux
Enthusiast
Enthusiast

Well, my problem was probably a typo as I initially copy and paste the command from the site.

but it not so evident to see:

pastedImage_0.png

So retyping manually 'list --staged' returns a good result.

Thanks for the help.

Reply
0 Kudos
Vijay2027
Expert
Expert

Glad I could help!

software-packages install –iso –accepteulas --> To patch vCSA.

PGinhoux
Enthusiast
Enthusiast

I mark this as 'helpful' only because I don't see it possible to be marked as 'solved' also.

vFouad
Leadership
Leadership

In summary of the options:

Pick one of the following:

  • software-packages stage --iso --acceptEulas     stages software packages from ISO and accepts EULA.
  • software-packages stage --url --acceptEulas     stages software packages from the default VMware online repository and accepts EULA.

Verify that it downloaded correctly:

  • software-packages list --staged      lists the details of the staged software package.

Install the updates:

  • software-packages install --staged   installs the staged software package.

Apply the changes:

  • reboot  reboots the VCSA

Also if like me you had a PSC where the software-packages command was missing try this instead:

# python /usr/lib/applmgmt/support/scripts/software-packages.py <Then add options>

Reply
0 Kudos
uday_singh
Contributor
Contributor

Can we do something like this:

/bin/appliancesh --username root software-packages list on bash shell?

How does ansible run on appliancesh?

Reply
0 Kudos
vFouad
Leadership
Leadership

Hi Uday,

The above commands work from the appliance login session when your prompt reads Command>

pastedImage_0.png

As soon as you type shell, you are dropped into an appliancesh session.

Usually denoted by a:

root@hostname [ ~ ]#

from the appliance shell you can get results for software packages by running:

python /usr/lib/applmgmt/support/scripts/software-packages.py

Followed by the same command structure; for example:

pastedImage_1.png

I have obscured part of the hostname.

Could you please clarify what you are attempting to do with ansible?

Reply
0 Kudos
mopa90001
Contributor
Contributor

Publication Name : vSphere Upgrade Product/Version : VMware vSphere/6.0 Question : how to download the software-packages utility

Reply
0 Kudos
uday_singh
Contributor
Contributor

Thanks for reply,

This will help.

Actually we are writing code to automate the deployment of VMWare vCloud NFV 3.1 with VIO 5.1. We are using pyVmomi sdk and Ansible. Our main focus would be to use Ansible VMware cloud modules. It seems Ansible do not have complete features w.r.t VMware automation. Only vSphere automation is supported as of now and that too only 95%. hence I decided to use pyVmomi wherever Ansible lags.

We also have to take care of updates and patches and I found this command "software-packages install –iso " but Ansible does not work on "appliancesh".  For other activities I have changed default shell to bash. For command "software-packages install" I wanted to run from bash shell and you helped.

BR//uday

Reply
0 Kudos
JemG
Contributor
Contributor

Hello,

I had the same issue where software-packages was an unknown command and this made the trick. So the thread should be marked as answer.

Thanks a lot Vijay2027

Jeremy

Reply
0 Kudos
dave_utility
Contributor
Contributor

Thank you for the post for how to get into Appliance Shell.

After patch is completed, is there a way to change back to regular shell?

Reply
0 Kudos
greghampton
Contributor
Contributor

Sorry for the late reply but for anyone digging this thread up, to change back: From Appliance Shell, type shell. Once in Bash, type chsh -s /bin/bash.

Reply
0 Kudos