No VNC connection with bhyve?

dave

Well-Known Member

Reaction score: 24
Messages: 421

Hello,

I am using vm-bhyve to try and run a Windows install. All seems good, but when I try to connect with VNC, I get no response.

The only thing I have done differently that the usual path is to use a manual switch, since I already have one configured using iohyve. I'm testing vm-bhyvve since it seems to have better support for Windows.

At this point, I can see that when I start the windows install, the host machine listens on port 5900, but a tcpdump shows that the host ACKs the connection but nothing else.

Note: tap2 is the interface in question. The other TAP devices are used by iohyve vms and are working fine. In the tcpdump listing, "enzo" is the host and "byte" is my workstation.

Any advice would helpful, thanks!

uname -a
Code:
FreeBSD freebsd 11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
sudo vm info
Code:
sudo vm info                                                                                                                                                            ◀ 10:55:10
Password:
------------------------
Virtual Machine: win10
------------------------
  state: running (2580)
  datastore: default
  loader: none
  uuid: 2e35a234-3084-11e9-905f-14dae90f753e
  uefi: yes
  cpu: 2
  memory: 2G
  memory-resident: 43442176 (41.429M)

  console-ports
    com1: /dev/nmdm-win10.1B
    vnc: 0.0.0.0:5900

  network-interface
    number: 0
    emulation: e1000
    virtual-switch: public
    fixed-mac-address: 58:9c:fc:04:8f:c9
    fixed-device: -
    active-device: tap2
    desc: vmnet-win10-0-public
    mtu: 1500
    bridge: -
    bytes-in: 0 (0.000B)
    bytes-out: 0 (0.000B)

  virtual-disk
    number: 0
    device-type: file
    emulation: ahci-hd
    options: -
    system-path: /tank/vm/win10/disk0.img
    bytes-size: 21474836480 (20.000G)
    bytes-used: 1024 (1.000K)
sudo vm switch info
Code:
------------------------
Virtual Switch: public
------------------------
  type: manual
  ident: bridge0
  vlan: -
  physical-ports: -
  bytes-in: 21396235 (20.405M)
  bytes-out: 3477388580 (3.238G)

  virtual-port
    device: tap2
    vm: win10

  virtual-port
    device: tap0
    vm: -

  virtual-port
    device: tap1
    vm: -

  virtual-port
    device: tap7
    vm: -

  virtual-port
    device: tap6
    vm: -
sockstat -l
Code:
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
[...snip...]
root     bhyve      2580  7  tcp4   *:5900
[...snip...]
sudo tcpdump "port 5900"
Code:
10:38:08.380319 IP byte..60996 > enzo.5900: Flags [F.], seq 1, ack 1, win 2058, options [nop,nop,TS val 693477167 ecr 2969841495], length 0
10:38:08.380354 IP enzo.5900 > byte..60996: Flags [.], ack 2, win 1026, options [nop,nop,TS val 2969871605 ecr 693477167], length 0
10:45:26.584036 IP byte..54886 > enzo.5900: UDP, length 1200
10:45:26.589411 IP byte..61040 > enzo.5900: Flags [SEW], seq 252585675, win 65535, options [mss 1460,nop,wscale 6,nop,nop,TS val 693913384 ecr 0,sackOK,eol], length 0
10:45:26.589429 IP enzo.5900 > byte..61040: Flags [S.E], seq 2344601980, ack 252585676, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 1189610090 ecr 693913384], length 0
10:45:26.594312 IP byte..61040 > enzo.5900: Flags [.], ack 1, win 2058, options [nop,nop,TS val 693913387 ecr 1189610090], length 0
10:45:26.594332 IP enzo.5900 > byte..61040: Flags [R], seq 2344601981, win 0, length 0
 
OP
OP
dave

dave

Well-Known Member

Reaction score: 24
Messages: 421

Thanks for your response. Here is the output you requested. This was taken while the sudo vm install win10 windows.iso is running.

Code:
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=82098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 14:da:e9:0f:75:3e
    hwaddr 14:da:e9:0f:75:3e
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=2098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
    ether 14:da:e9:0f:75:3e
    hwaddr 00:1b:21:62:32:0e
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo
lagg1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=2098<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
    ether 14:da:e9:0f:75:3e
    inet 192.168.X.X netmask 0xffffff00 broadcast 192.168.X.255
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: lagg
    laggproto lacp lagghash l2,l3,l4
    laggport: re0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
    laggport: em0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: iohyve-bridge-lagg1
    ether 02:19:83:0e:b3:00
    nd6 options=1<PERFORMNUD>
    groups: bridge
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: tap2 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 10 priority 128 path cost 2000000
    member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 9 priority 128 path cost 2000000
    member: tap1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 8 priority 128 path cost 2000000
    member: tap7 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 7 priority 128 path cost 2000000
    member: tap6 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 6 priority 128 path cost 2000000
    member: lagg1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 4 priority 128 path cost 2000000
tap6: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: iohyve-db1--
    options=80000<LINKSTATE>
    ether 00:bd:bd:43:f7:06
    hwaddr 00:bd:bd:43:f7:06
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: tap
    Opened by PID 1892
tap7: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: iohyve-pihole--
    options=80000<LINKSTATE>
    ether 00:bd:9f:46:f7:07
    hwaddr 00:bd:9f:46:f7:07
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: tap
    Opened by PID 1906
tap1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: iohyve-sq1--
    options=80000<LINKSTATE>
    ether 00:bd:26:48:f7:01
    hwaddr 00:bd:26:48:f7:01
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: tap
    Opened by PID 16918
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: iohyve-tor1--
    options=80000<LINKSTATE>
    ether 00:bd:fd:4a:f7:00
    hwaddr 00:bd:fd:4a:f7:00
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: tap
    Opened by PID 1920
tap2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: vmnet-win10-0-public
    options=80000<LINKSTATE>
    ether 00:bd:79:0a:6e:02
    hwaddr 00:bd:79:0a:6e:02
    inet6 fe80::2bd:79ff:fe0a:6e02%tap2 prefixlen 64 tentative scopeid 0xa
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: tap vm-port
    Opened by PID 51723
 
OP
OP
dave

dave

Well-Known Member

Reaction score: 24
Messages: 421

This worked finally. After a reboot of the host (not sure why that helped) I started getting sporadic connections, but it was very hit-and-miss. Eventually, I stumbled across a forum post in which the "picture quality" was changed in the VNC client. that worked for me and now I have reliable VNC access to Windows-based VMs.
 
Top