Windows 10 on vm-bhyve
Figure 1. Windows 10 on vm-bhyve

Install and Configure vm-bhyve

Read previous doc 001 Install vm-bhyve.

Get a Windows 10 Operating System ISO File

Get a windows 10 operating system iso file

Create Windows 10 vm-bhyve Guest

Create win10 guest.

# vm create -s 25G -t windows win10

Find your vm switch name (the virtual inet card name).

# vm switch list
NAME   TYPE      IFACE     ADDRESS  PRIVATE  MTU  VLAN  PORTS
bhnet  standard  vm-bhnet  -        no       -    -     wlan0

So my vm switch name is "bhnet" and my switch iface is "vm-bhnet" for example.

Now set the switch to bhnet.

# vm config win10   #--- Update network switch from public to bhnet

Install Windows 10 Guest

Install

# vm install win10 path/to/win10.iso

Watch which vnc port the win10 guest binds

# vm list
NAME       DATASTORE  LOADER  CPU  MEMORY  VNC           AUTOSTART  STATE
freebsd01  default    uefi    2    2G      -             No         Stopped
win10      default    uefi    2    2G      0.0.0.0:5900  No         Running (33939)

So the win10 is bound to vnc port 5900 for example.

Open vncviewer to begin operates

# exit
$ vncviewer

After opening the vncviewer window, fill in 0.0.0.0:5900 and continue.

Boot win10 next time

# vm start win10

Setup Internect Connection for Windows 10

First, read how to setup vm-bhyve network from previous doc: 001 Install vm-bhyve.

Then, set static IP for win10.

Operation Steps:

Open "Settings" ⇒ Network & Internet ⇒ Ethernet ⇒ Change Adapter Options ⇒ Double Click "Ethernet" ⇒ Properties ⇒ Click "Internet Protocol Version 4(TCP/IPv4)" and Click "Properties"

⇒ Choose "Use the following IP address:"

Fill in the blanks:

IP address:        2.2.2.3
Subnet mask:       255.255.255.0
Default gateway:   2.2.2.1

⇒ Choose "Use the following DNS server addresses:"

Fill in the blanks:

Preferred DNS server:     8.8.8.8
Alternate DNS server:     8.8.4.4

Click "OK" now.

Verify Your Connection

1 - Use ping

Open a cmd window, and ping:

C:\ > ping www.freebsd.org
Reply from 96.47.72.84

If you ping www.freebsd.org, you should get a reply from 96.47.72.84 .

2 - Open an network required app to visit Internet.

Can not connect Internet?

Do not doubt it too quickly, just try:

1 - Wait for some seconds and try again.

2 - Restart your guest OS.

Still can not connect?

Check all configurations and try again.

COPYING

Copyright (c) 2021 Fas Xmut (fasxmut at protonmail dot com)

Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)