On Thu, Oct 27, 2022 at 11:02:06AM -0700, Mike Larkin wrote:
> On Wed, Oct 26, 2022 at 07:39:03PM +0200, Kalabic S. wrote:
> > Hello @misc,
> >
> > I do not see a reason not to update OS version that vmt (kernel level
> > implementation of VMware Tools) is advertising to VMware hypervisor from 32
> > bit FreeBSD to 64 bit version.
> >
> > If for nothing else, there's clock running forward issue that appeared in
> > 7.2 release and that is solved simply by manually specifying "FreeBSD
> > 64-bit" instead of "FreeBSD 32-bit" for "Guest OS Version".
> > - https://marc.info/?t=166674083700007&r=1&w=2
> > - https://marc.info/?t=166630469300002&r=1&w=2
> >
> > Attached is a simple patch that I tested and that changes string "FreeBSD"
> > to "FreeBSD-64" in a call to "SetGuestInfo" function on hypervisor and that
> > accomplishes the task.
> >
> > What could be a drawback? Is author David Gwynne still active and can he
> > give some feedback?
> 
> What versions of ESXi did you test this with?
> 
> Did you test both i386 OpenBSD VMs and amd64 ones on each version?

In my testing, this has no effect on the operation of the clock.  Only
the guest OS selected in the VM configuration does have an effect.
We should remove any suggestion that 32bit FreeBSD is the right thing to
select though, so changing the guest OS we report is still a good idea. 

Interestingly, it looks like if the guest OS is set to 'Other (64-bit)',
and vmt reports an unrecognised short guest OS name (such as 'OpenBSD'),
vcenter will display the full guest OS name, so you get something like
'OpenBSD 7.2 GENERIC.MP#31'.

I'm pretty sure this caused problems in the distant past, but it seems
fine now with esxi 6.7+, so I think we should change to saying we're
OpenBSD instead.


Index: vmt.c
===================================================================
RCS file: /cvs/src/sys/dev/pv/vmt.c,v
retrieving revision 1.26
diff -u -p -r1.26 vmt.c
--- vmt.c       8 Sep 2022 10:22:06 -0000       1.26
+++ vmt.c       28 Oct 2022 03:50:29 -0000
@@ -626,14 +626,8 @@ vmt_update_guest_info(struct vmt_softc *
                        sc->sc_rpc_error = 1;
                }
 
-               /*
-                * Host doesn't like it if we send an OS name it doesn't
-                * recognise, so use the closest match, which happens
-                * to be FreeBSD.
-                */
-
                if (vm_rpc_send_rpci_tx(sc, "SetGuestInfo  %d %s",
-                   VM_GUEST_INFO_OS_NAME, "FreeBSD") != 0) {
+                   VM_GUEST_INFO_OS_NAME, "OpenBSD") != 0) {
                        DPRINTF("%s: unable to set guest OS", DEVNAME(sc));
                        sc->sc_rpc_error = 1;
                }

Reply via email to