From: John Wolfe Date: Fri, 11 Dec 2020 05:05:49 +0000 (-0800) Subject: Changes to common source files not applicable to open-vm-tools. X-Git-Tag: stable-11.2.5~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b51efe1a714738f727d549c1555e475ac71f72;p=thirdparty%2Fopen-vm-tools.git Changes to common source files not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/conf.h b/open-vm-tools/lib/include/conf.h index 8c9c636f2..b2596d0d7 100644 --- a/open-vm-tools/lib/include/conf.h +++ b/open-vm-tools/lib/include/conf.h @@ -51,6 +51,7 @@ #define CONFNAME_DISABLETOOLSVERSION "disable-tools-version" #define CONFNAME_HIDETOOLSVERSION "hide-tools-version" #define CONFNAME_DISABLEPMTIMERWARNING "disable-pmtimerwarning" +#define CONFGROUPNAME_VMTOOLS "vmtools" /* ****************************************************************************** @@ -127,14 +128,15 @@ */ /* -****************************************************************************** -* BEGIN GuestStore upgrader goodies. -*/ + ****************************************************************************** + * BEGIN GuestStore upgrader goodies. + ****************************************************************************** + */ /** * Defines the string used for the GuestStore upgrade config file group. */ -#define CONFGROUPNAME_GUESTSTOREUPGRADE "guestStoreUpgrade" +#define CONFGROUPNAME_GSUPGRADE "gueststoreupgrade" /** * Defines the value for GuestStore upgrade feature to be enabled or not. @@ -145,48 +147,62 @@ * @param string Set to "off" no tools upgrade from GuestStore. * Set to "manual" tools upgrade from GuestStore manual start. * Set to "immediate" tools upgrade from GuestStore start - * automatically checking on the poll-interval frequency. + * autoCONFNAME_GSUPGRADE_RESOURCEmatically checking on the poll-interval frequency. * Set to "powercycle" tools upgrade from GuestStore on system * power on. */ -#define CONFNAME_GUESTSTOREUPGRADE_POLICY "policy" +#define CONFNAME_GSUPGRADE_POLICY "policy" /** - * Define a custom GuestStore Upgrade poll interval (in seconds). + * Define a custom GuestStore check poll interval (in seconds). * * @note Illegal values result in a @c g_warning and fallback to the default * poll interval. * * @param int User-defined poll interval. Set to 0 to disable polling. */ -#define CONFNAME_GUESTSTOREUPGRADE_POLLINTERVAL "poll-interval" +#define CONFNAME_GSUPGRADE_POLLINTERVAL "poll-interval" /** - * Defines the value for GuestStore upgrade to upgrade or not. + * Define a custom GuestStore periodic Upgrade interval (in seconds). * * @note Illegal values result in a @c g_warning and fallback to the default - * value. + * upgrade interval. * - * @param boolean Set to TRUE to disable publishing. - * Set to FALSE to enable publishing. + * @param int User-defined upgrade interval. Set to 0 to disable polling. */ -#define CONFNAME_GUESTSTOREUPGRADE_ALLOW_UPGRADE "allow-upgrade" +#define CONFNAME_GSUPGRADE_UPGRADEINTERVAL "upgrade-interval" /** - * Defines the value for GuestStore upgrade to add or remove features or not. + * Define a custom GuestStore content path prefix. * * @note Illegal values result in a @c g_warning and fallback to the default - * value. + * resource path. * - * @param boolean Set to TRUE to disable publishing. - * Set to FALSE to enable publishing. + * @param string User-defined GuestStore resource path. */ -#define CONFNAME_GUESTSTOREUPGRADE_ALLOW_ADDREMOVE_FEATURE "allow-addremove-feature" +#define CONFNAME_GSUPGRADE_RESOURCE "resource" + +/** + * Define a custom GuestStore content vmtools key. + * + * @note Illegal values result in a @c g_warning and fallback to the default + * vmtools key. + * + * @param string User-defined GuestStore vmtools key. + * Set to "vmtools" for the latest version. + * Suggested examples for earlier versions are: + * Set to "vmtools-11.0.0" for "vmtools-11.0.0/" + * Set to "vmtools-11.1.0" for "vmtools-11.1.0/" + * Set to "vmtools-11.2.0" for "vmtools-11.2.0/" + * Set to "vmtools-11.3.0" for "vmtools-11.3.0/" + */ +#define CONFNAME_GSUPGRADE_VMTOOLS_VERSION "vmtools-version-key" /* -* END GuestStore upgrader goodies. -****************************************************************************** -*/ + * END GuestStore upgrader goodies. + ****************************************************************************** + */ /* diff --git a/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h b/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h index 11d35eeed..8a3ff8242 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/capabilities.h @@ -136,6 +136,11 @@ static GuestCapElem guestCapTable[] = { { GHI_CAP_SET_DISPLAY_SCALING, GHI_CAP_VMDB_PATH, "setDisplayScaling"}, { UNITY_CAP_DISABLE_MOUSE_BUTTON_SWAPPING, UNITY_CAP_VMDB_PATH, "mouseButtonSwapping" }, { UNITY_CAP_CARET_POSITION, UNITY_CAP_VMDB_PATH, "getCaretPosition" }, + /* + * GuestStoreUpgrade is available on ESXi only at this time. Therefore, we + * don't define VMDB schema for it and don't store it in VMDB. + */ + { CAP_GUESTSTORE_UPGRADE, NULL, NULL }, }; #endif // VM_NEED_VMDB_GUEST_CAP_MAPPING diff --git a/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h b/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h index 3a7e17038..919fa1ee5 100644 --- a/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h +++ b/open-vm-tools/lib/include/vmware/guestrpc/tclodefs.h @@ -74,12 +74,20 @@ * Auto-upgrade commands. */ -#define AUTOUPGRADE_AVAILABLE_CMD "vmx.capability.tools_is_upgradable" -#define AUTOUPGRADE_START_CMD "guest.initiateAutoUpgrade" +#define AUTOUPGRADE_AVAILABLE_CMD "vmx.capability.tools_is_upgradable" +#define AUTOUPGRADE_START_CMD "guest.initiateAutoUpgrade" +#define AUTOUPGRADE_POWERON_POLICY_CMD "vmx.autoupgrade.poweron_policy" /* More upgrader commands. */ #define GUEST_UPGRADER_SEND_CMD_LINE_ARGS "guest.upgrader_send_cmd_line_args" +/* + * GuestStore Upgrade commands. + */ + +#define GSUPGRADE_START_CMD "guestStoreUpgrade.start" +#define GSUPGRADE_CANCEL_CMD "guestStoreUpgrade.cancel" + /* * Shrink commands. */ diff --git a/open-vm-tools/tools.conf b/open-vm-tools/tools.conf index 0e6dfffb3..fe08ebe8e 100644 --- a/open-vm-tools/tools.conf +++ b/open-vm-tools/tools.conf @@ -351,3 +351,31 @@ # User-defined poll interval in seconds. Set to 0 to disable polling. #poll-interval=60 + +[gueststoreupgrade] + +# The guestStoreUpgrade plugin is only available for Windows. + +# The policy value is one of the settings listed below. +# off = no VMware Tools upgrade from GuestStore. Feature is +# disabled. +# manual = (Default) VMware Tools upgrade from GuestStore is +# manually started. +# powercycle = VMware Tools upgrade from GuestStore on system +# power on. + +#policy=manual + +# Time interval for periodically checking available VMware Tools package +# version in the GuestStore. +# User-defined poll interval in seconds. Set to 0 to disable polling. +# Minimum valid value is 900 seconds (15 minutes) +# Default value is 3600 seconds (60 minutes) +#poll-interval=3600 + +# VMware Tools package version metadata key to specify a VMware Tools +# package version in the GuestStore. +# User-defined key for VMware Tools package version. +# Default value is "vmtools" which points to the latest version of +# VMware Tools package in the GuestStore. +#vmtools-version-key=vmtools