Bug 221698 - emulators/open-vm-tools: FreeBSD 11 VM (pre hw version 14) are reported as "FreeBSD Pre-11"
Summary: emulators/open-vm-tools: FreeBSD 11 VM (pre hw version 14) are reported as "F...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on: 221194
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-21 19:17 UTC by John Wolfe
Modified: 2017-08-29 16:46 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (jpaetzel)


Attachments
patch for lib/misc/hostinfoPosix.c (2.01 KB, patch)
2017-08-21 19:17 UTC, John Wolfe
no flags Details | Diff
patch for lib/include/guest_os.h (448 bytes, patch)
2017-08-21 19:18 UTC, John Wolfe
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wolfe 2017-08-21 19:17:02 UTC
Created attachment 185647 [details]
patch for lib/misc/hostinfoPosix.c

VMware virtual HW version 14 added a distinction between FreeBSD 11 and later and FreeBSD 10 and earlier system.  FreeBSD VMs created prior to hw version 14 may be reported as a "FreeBSD Pre-11" guest based on the guestOS type selected when the VM was created.

The accompanying patches to open-vm-tools 10.1.10 will allow the FreeBSD release to be verified through the running open-vm-tools and reported correctly.

Before the patch:    vim-cmd vmsvc/get.guest <vm-id>  will report:

| - open-vm-tools 10.1.10 GA:
| (vim.vm.GuestInfo) {
| toolsStatus = "toolsOk",
| toolsVersionStatus = "guestToolsUnmanaged",
| toolsVersionStatus2 = "guestToolsUnmanaged",
| toolsRunningStatus = "guestToolsRunning",
| toolsVersion = "2147483647",
| toolsInstallType = "guestToolsTypeUnknown",
| toolsUpdateStatus = (vim.vm.GuestInfo.ToolsUpdateStatus) null,
| guestId = "freebsd64Guest",
| guestFamily = "otherGuestFamily",
| guestFullName = "FreeBSD Pre-11 versions (64-bit)",    <======= wrong

Following application of the two patches:

| (vim.vm.GuestInfo) {
| toolsStatus = "toolsOk",
| toolsVersionStatus = "guestToolsUnmanaged",
| toolsVersionStatus2 = "guestToolsUnmanaged",
| toolsRunningStatus = "guestToolsRunning",
| toolsVersion = "2147483647",
| toolsInstallType = "guestToolsTypeUnknown",
| toolsUpdateStatus = (vim.vm.GuestInfo.ToolsUpdateStatus) null,
| guestId = "freebsd11_64Guest",
| guestFamily = "otherGuestFamily",
| guestFullName = "FreeBSD 11 or later versions (64-bit)",


The patches were generated with "p4 diff -du" from common source trees.   The actual location in the open-vm-tools source release is in the patch file name.
Comment 1 John Wolfe 2017-08-21 19:18:20 UTC
Created attachment 185648 [details]
patch for lib/include/guest_os.h
Comment 2 Josh Paetzel freebsd_committer freebsd_triage 2017-08-25 20:03:35 UTC
--- hostinfoPosix.lo ---
hostinfoPosix.c:1097:34: error: use of undeclared identifier 'STR_OS_FREEBSD11'; did you mean 'GUEST_OS_FREEBSD11'?
         Str_Strcpy(distroShort, STR_OS_FREEBSD11, sizeof distroShort);
                                 ^~~~~~~~~~~~~~~~
                                 GUEST_OS_FREEBSD11
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-stable-10.1.10/open-vm-tools/lib/include/guest_os.h:46:1: note: 'GUEST_OS_FREEBSD11' declare
d here
GUEST_OS_TYPE_GEN
^
/wrkdirs/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-stable-10.1.10/open-vm-tools/lib/include/guest_os_tables.h:74:8: note: expanded from macro '
GUEST_OS_TYPE_GEN'
   GOT(GUEST_OS_FREEBSD11)                                                 \
       ^
1 error generated.
*** [hostinfoPosix.lo] Error code 1

I tried making the change suggested by clang but that just ended up with a pointer type mismatch later on.
Comment 3 Josh Paetzel freebsd_committer freebsd_triage 2017-08-25 20:05:09 UTC
oh, my bad, I didn't get the header change.
Comment 4 Josh Paetzel freebsd_committer freebsd_triage 2017-08-29 16:46:06 UTC
Fixed by r448929