Skip to content

Instantly share code, notes, and snippets.

@churchers
Last active July 22, 2016 08:22
Show Gist options
  • Save churchers/38dbe253cf649cc3b9865599a464a67e to your computer and use it in GitHub Desktop.
Save churchers/38dbe253cf649cc3b9865599a464a67e to your computer and use it in GitHub Desktop.
Diff for replacing "bhyve" with the VM name in VNC connection
# diff /usr/src/usr.sbin/bhyve/rfb.c rfb.c
52a53
> #include "bhyverun.h"
196c197
< sinfo.namelen = htonl(strlen("bhyve"));
---
> sinfo.namelen = htonl(strlen(vmname));
198c199
< (void)stream_write(cfd, "bhyve", strlen("bhyve"));
---
> (void)stream_write(cfd, vmname, strlen(vmname));
@churchers
Copy link
Author

churchers commented Jul 22, 2016

I'm not sure if adding a reference to bhyverun.h in this file can cause any side effects, but this seems to work ok for me. After mentioning this on Twitter the bhyve devs discussed changing the official codebase, so hopefully we'll see a properly developed version in FreeBSD head soon.

I copied the entire usr.sbin/bhyve directory to a new location, then built it using the same instructions as given for the bhyve_graphics project.

make BHYVE_SYSDIR=/usr/src -m /usr/src/share/mk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment