John Wolfe [Mon, 5 Apr 2021 16:01:42 +0000 (09:01 -0700)]
lib/file/file.c: File_UnlinkIfExists()
Revised File_UnlinkIfExists() to return 0 for success and an errno for
failure. Previously, a failure was indicated by a -1 and the caller had
to retrieve the errno.
John Wolfe [Mon, 5 Apr 2021 16:01:41 +0000 (09:01 -0700)]
lib/file/file.c: File_Unlink()
Revised File_Unlink() to return 0 for success and an errno for failure.
Previously, a failure was indicated by a -1 and the caller had to retrieve
the errno.
John Wolfe [Mon, 5 Apr 2021 16:01:41 +0000 (09:01 -0700)]
Common source file change not directly applicable to open-vm-tools.
lib/file/file.c:
Revised File_UnlinkRetry() and File_UnlinkNoFollow() to return 0 for
success and an errno for failure. Previously, a failure was indicated
by a -1 and the caller had to retrieve the errno.
John Wolfe [Fri, 26 Mar 2021 03:21:17 +0000 (20:21 -0700)]
Linux guest identification: Support multiple architectures.
Allow machine architecture information to be present in the
"short string" and the guestOS string. This is done via a prefix,
"<arch>-" (e.g. arm-ubuntu-64, riscv-debian11-64, arm-windows10-64)
with the X86 architecture being implied (no explicit "<arch>-").
Add the recognition of the Arm machine architecture to the Linux
guest identification code.
John Wolfe [Fri, 26 Mar 2021 03:21:17 +0000 (20:21 -0700)]
Add machine architecture information to os.detailed.data.
The detailed data now include information about the guest's running
machine architecture. A later change will deal with the guest
"short name" (a.k.a. the guestOS string).
John Wolfe [Fri, 26 Mar 2021 03:21:17 +0000 (20:21 -0700)]
Implement log redirection for the deployPkg plugin.
On Linux, /var/log/vmware-imc/toolsDeployPkg.log is the default deployPkgs
log file. This change allows users to redirect that log to the vmware.log
on the host or to another file located on the guest VM. Redirection is
controlled by settings in the "logging" section of the tools.conf file.
See the examples in the sample tools.conf file provided in the distribution.
John Wolfe [Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)]
Configuring OVT with the --without-pam option will implicitly disable vgauth.
When no vgauth option is given alongside -–without-pam, a warning
is displayed with a message “Building without PAM; vgauth will be
disabled.”.
When -–disable-vgauth is supplied alongside –-without-pam, no
warning or error message is displayed.
When -–enable-vgauth is supplied alongside -–without-pam, an
error will be thrown and the configure stage will be aborted with an
error message “Cannot enable vgauth without PAM. Please configure
without --without-pam or without --enable-vgauth.”
John Wolfe [Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)]
tools/vmwgfxctrl: Add a command line tool for controlling vmwgfx.
vmwgfxctrl is a small command line tool used to control various
aspects of the vmwgfx kernel driver. Currently it can both
display and set current topology of the vmwgfx kernel driver.
It should be distributed alongside other open-vm-tools binaries.
It's incredibly useful when trying to set custom resolution on any
recent distro (that includes multi-monitor setups).
John Wolfe [Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)]
PowerOps plugin logging of diagnostic messages on the host.
To assist with diagnosis of VM power operations, have the powerOps plugin
log messages about guest OS reboot, shutdown, power-on/power-off,
script execution, and exit status to the VM's guest.log file on the host.
John Wolfe [Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)]
Reduce or eliminate Linux dependency on the "net-tools" package.
The "ifconfig" and "netstat" commands are deprecated in more recent
releases of Linux. Update the Linux vm-support script to use the "ip"
and "ss" commands when available.
If Available: Fallback:
ip ifconfig
ip route route
ss netstat
John Wolfe [Mon, 22 Feb 2021 17:37:00 +0000 (09:37 -0800)]
Adding FreeBSD on ARM64 support to open-vm-tools.
Updating the FreeBSD specific sections of open-vm-tools to adjust
where necessary for ARM64. The FreeBSD vmballoon driver (vmmemctl.ko)
will use the backdoorGcc64_arm64.c when built for ARM64.
John Wolfe [Mon, 22 Feb 2021 17:36:59 +0000 (09:36 -0800)]
[open-vm-tools part] Support raw cloud-init data in VM customization.
To support this feature, open-vm-tools needs to check whether cloud-init
can support raw cloud-init data; then copy the data to the cloud-init
cfg directory.
John Wolfe [Mon, 22 Feb 2021 17:36:59 +0000 (09:36 -0800)]
Added 2 error codes for supporting raw cloud-init data in VM customization.
Header file updated with errors detected when using raw cloud-init data
in guest customization.
- cloud-init version is too old to support raw cloud-init data.
- cloud-init meta data format is invalid.
John Wolfe [Thu, 4 Feb 2021 17:57:03 +0000 (09:57 -0800)]
resolution: Fix kms autodetection
Currently, the elf binary of the xorg driver is loaded to check for a
string that was put in the .modinfo section in the driver. Unfortunately
there are two problems with this approach:
1) Distros now ship without xorg, so the xorg .so doesn't exist and
there's nothing to check.
2) Distros (e.g. Fedora) do heavy optimizations and remove the .modinfo
section from the .so, so the string cannot be found even though the
driver exists.
To fix both, stop depending on being able to parse the elf binary of the
xorg driver. Instead, let the plugin check for the existence of the drm
driver with a sufficiently high version, and if it exists, use kms.
This removes the dependency on X for kms. Also increase the version of
vmwgfx required to ensure atomic mode-setting plus relevant bug fixes (in
the kernel since 2017) are available.
John Wolfe [Thu, 4 Feb 2021 17:57:03 +0000 (09:57 -0800)]
Add a switch to the vm-support script to transfer the support bundle to the hypervisor
The vm-support script unconditionally transferred the support bundle to
to the VMware hypervisor, thereby filling vmware.log.
This fix changes the default behavior of the Linux and Windows scripts
to *not* transfer the logs to the host.
Added an option '-x' to both scripts to let the user elect to
transfer the guest support bundle to the host.
John Wolfe [Thu, 4 Feb 2021 17:57:03 +0000 (09:57 -0800)]
Add NVMe capability for vmbackup.
The vmx/vmbackup logic checks if tools/vmbackup can support NVMe. If it
is supported, vmx/vmbackup can further go through the app quiesce process.
Otherwise, vmx/vmbackup requests the filesystem quiesce process.
John Wolfe [Fri, 22 Jan 2021 20:25:41 +0000 (12:25 -0800)]
Fix an issue where CustomizationUnknownFailure is generated multiple times
on Linux.
For Linux, sysimage sends a failure status to VMX when the deploy pkg
failed. The tools plugin then sends the failure notice again. Changing the
plugin to only send the failure notice for Windows guests where the
failure has yet to be logged.
John Wolfe [Fri, 22 Jan 2021 20:25:41 +0000 (12:25 -0800)]
Customization: Set log level to info, not error, for failed /sbin/telinit command
The error message of a failed /sbin/telinit command is confusing for
customers who might think customization failed. On some Guest OSes,
the repeatedly executing /sbin/telinit command can fail while a reboot
is happening and the init daemon has been killed.
This change sets log level to info, not error, for failed /sbin/telinit
command.
Note: The first /sbin/telinit commmand failure will fail customization
with error 127; this is unchanged.