Index | Thread | Search

From:
Jonathan Matthew <jonathan@d14n.org>
Subject:
improve os names used in vmt(4)
To:
tech@openbsd.org
Date:
Fri, 6 Nov 2026 17:32:45 +1000

Download raw body.

Thread
Forever ago, we started reporting some guest OS details to vmware.
At the time, some of their hypervisor products didn't like getting an
unknown guest OS name, so we pretended to be FreeBSD.  That doesn't seem
to be the case any more, at least in the esx/vsphere product line.
I don't have fusion or workstation, so it'd be great if someone could
test there.

While I was looking at this, I realised osversion should probably be
removed.  'GENERIC.MP#110' or similar is not really meaningful so
I think it'd be better to just report 'OpenBSD 8.0'.

Index: vmt.c
===================================================================
RCS file: /cvs/src/sys/dev/pv/vmt.c,v
diff -u -p -r1.32 vmt.c
--- vmt.c	24 May 2024 10:05:55 -0000	1.32
+++ vmt.c	6 Nov 2026 05:46:36 -0000
@@ -647,21 +647,15 @@ vmt_update_guest_info(struct vmt_softc *
 	}
 
 	if (sc->sc_set_guest_os == 0) {
-		if (vm_rpc_send_rpci_tx(sc, "SetGuestInfo  %d %s %s %s",
+		if (vm_rpc_send_rpci_tx(sc, "SetGuestInfo  %d %s %s",
 		    VM_GUEST_INFO_OS_NAME_FULL,
-		    ostype, osrelease, osversion) != 0) {
+		    ostype, osrelease) != 0) {
 			DPRINTF("%s: unable to set full guest OS", DEVNAME(sc));
 			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, ostype) != 0) {
 			DPRINTF("%s: unable to set guest OS", DEVNAME(sc));
 			sc->sc_rpc_error = 1;
 		}