VMware Communities
Centimane
Contributor
Contributor
Jump to solution

Silent Installation on a Linux Host?

Similar to this question:Silent install on a Linux host?

I am looking to perform a silent VMware Workstation 11 installation. I am looking for a method/reference to provide answers to each of the questions presented during a console installation to fully automate installation. I'm working from a closed network, so I'm also looking to disable settings that would try to communicate over the internet if possible.

I'm looking for command line options that allow me to specify non-default answers to the following prompts:

--------------------------------------------------

Would you like to check for product updates on startup? [yes]:

Would you like to help make VMware software better by sending anonymous data and usage statistics to VMware? [yes]:

Please enter the user that will initially connect to Workstation Server.... [root]:

Please choose a directory for your shared virtual machines. [/var/lib/vmware/Shared VMs]:

Please enter the port to use for https access to Workstation Server. (HTTPS port:) [443]:

Enter license key. (optional) You can set this information later:

The product is ready to be installed. Press Enter to begin Installation or Ctrl-C to cancel.     (want to not need to press enter)

0 Kudos
1 Solution

Accepted Solutions
Centimane
Contributor
Contributor
Jump to solution

So I've found the answer to my own question, and figure I'll post it for the sake of others and my future self.

The settings used by the bundle installer's "-s" "-g" and "-d" options are stored in a database (not sure the format) packaged with VMware. This database can be dumped using

./vmware-installer.bundle --dumpDB ${PATH_TO_OUTPUT_XML}

This will create a new XML file at ${PATH_TO_OUTPUT_XML}. You can read the XML directly, but I found it much more manageable to use xmllint to parse it a bit. The table of interest is called "settings"

xmllint <(xmllint ${PATH_TO_OUTPUT_XML} | grep "<table>settings") --shell

This will drop into an xmllint shell with only the settings table read in

/ > cat table/row

[OUTPUT]

/ > exit

The [OUTPUT] should contain every setting used by the installer, including the component name, so I discovered the relevant settings to automate installation:

Component NameKeyValue
vmware-player-appsoftwareUpdateEnabled[yes/no]
vmware-player-appdataCollectionEnabled[yes/no]
vmware-workstation-serverhostdUser[a username]
vmware-workstation-serverdatastore[a path on disk]
vmware-workstation-serverhttpsPort[a port number]
vmware-workstationserialNumber[your license key]

Setting each of these with "./vmware-installer.bundle -s ${COMPONENT_NAME} ${KEY} ${VALUE} ... --eulas-agreed" was almost enough on its own, except the installer will still prompt:

For a license key, but the default value is now what was set using the "serialNumber" setting.

Press enter to begin installation

To get around this I piped yes '' (that's two single quotes for a blank string) to the installer, the final command looks like:

yes '' | ./vmware-installer.bundle -s vmware-player-app softwareUpdateEnabled no -s vmware-player-app dataCollectionEnabled no -s vmware-workstation-server hostdUser ${USERNAME} -s vmware-workstation-server datastore ${PATH} -s vmware-workstation-server httpsPort 443 -s vmware-workstation serialNumber ${LICENSE_KEY}

This command performed a fully automated installation, there was still some output to the screen, but I can live with that and can always redirect it to /dev/null if need be.

View solution in original post

0 Kudos
1 Reply
Centimane
Contributor
Contributor
Jump to solution

So I've found the answer to my own question, and figure I'll post it for the sake of others and my future self.

The settings used by the bundle installer's "-s" "-g" and "-d" options are stored in a database (not sure the format) packaged with VMware. This database can be dumped using

./vmware-installer.bundle --dumpDB ${PATH_TO_OUTPUT_XML}

This will create a new XML file at ${PATH_TO_OUTPUT_XML}. You can read the XML directly, but I found it much more manageable to use xmllint to parse it a bit. The table of interest is called "settings"

xmllint <(xmllint ${PATH_TO_OUTPUT_XML} | grep "<table>settings") --shell

This will drop into an xmllint shell with only the settings table read in

/ > cat table/row

[OUTPUT]

/ > exit

The [OUTPUT] should contain every setting used by the installer, including the component name, so I discovered the relevant settings to automate installation:

Component NameKeyValue
vmware-player-appsoftwareUpdateEnabled[yes/no]
vmware-player-appdataCollectionEnabled[yes/no]
vmware-workstation-serverhostdUser[a username]
vmware-workstation-serverdatastore[a path on disk]
vmware-workstation-serverhttpsPort[a port number]
vmware-workstationserialNumber[your license key]

Setting each of these with "./vmware-installer.bundle -s ${COMPONENT_NAME} ${KEY} ${VALUE} ... --eulas-agreed" was almost enough on its own, except the installer will still prompt:

For a license key, but the default value is now what was set using the "serialNumber" setting.

Press enter to begin installation

To get around this I piped yes '' (that's two single quotes for a blank string) to the installer, the final command looks like:

yes '' | ./vmware-installer.bundle -s vmware-player-app softwareUpdateEnabled no -s vmware-player-app dataCollectionEnabled no -s vmware-workstation-server hostdUser ${USERNAME} -s vmware-workstation-server datastore ${PATH} -s vmware-workstation-server httpsPort 443 -s vmware-workstation serialNumber ${LICENSE_KEY}

This command performed a fully automated installation, there was still some output to the screen, but I can live with that and can always redirect it to /dev/null if need be.

0 Kudos