Recent changes to Bhyve have allowed for a VNC console to complete
guest installs. This example will install Windows 10 as a guest.
For this example FreeBSD 12-CURRENT was installed:
FreeBSD 12.0-CURRENT #0 r302526
Edit: /boot/loader.conf
Add the following lines:
Edit: /etc/rc.conf
Add the following lines
**Note -- change em0 to whatever your real network interface is
For simplicity -- this example -- all files are copied to a single directory
The MS Windows 10 install iso: win10.iso
The latest virtio iso file:
Then install the latest Bhyve UEFI:
You can read more here:
https://wiki.freebsd.org/bhyve/UEFI
The basic steps:
Create a temporary directory to store the branch.
Change into that directory.
Execute these commands:
Copy the new uefi file into our Bhye directory with the rest of our files:
Create the empty Bhyve Win10 image:
This will be the first boot to start the install:
The install waits for the vnc connection.
Connect with vnc client (I used tsclient) to the Windows install console:
Press Enter (on the vnc screen) to get the install started.
Let the installer copy all the files and do the first reboot
After the reboot. Bhyve exits normally.
Now create an empty install DVD. We no longer need the install iso, but
Bhyve tries to boot from a DVD.
Boot Win10 a second time and let it continue the installation.
Notice how we use the null_dvd.iso.
Again, connect to the Windows console using VNC
The install will continue and then reboot again.
The third boot of Windows use the same command line to continue the installation:
After you get the Windows desktop there will be no network.
Need to install the virtio network driver.
Shutdown Windows 10.
Boot this time with the virtio net drivers from the CD:
Login to Windows.
Look for the CD drive. Open this folder to install the network driver:
NetKVM\w10\amd64
Right-click "netkvm" and select install
Networking should start to install and configure.
That should be all needed for Windows guest install.
You can configure RDP or use VNC to connect.
Use this command to start the Windows guest:
guest installs. This example will install Windows 10 as a guest.
For this example FreeBSD 12-CURRENT was installed:
FreeBSD 12.0-CURRENT #0 r302526
Edit: /boot/loader.conf
Add the following lines:
Code:
vmm_load="YES"
nmdm_load="YES"
if_bridge_load="YES"
if_tap_load="YES"
Add the following lines
**Note -- change em0 to whatever your real network interface is
Code:
cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm em0 addm tap0"
For simplicity -- this example -- all files are copied to a single directory
The MS Windows 10 install iso: win10.iso
The latest virtio iso file:
fetch https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.118-2/virtio-win-0.1.118.iso
Then install the latest Bhyve UEFI:
You can read more here:
https://wiki.freebsd.org/bhyve/UEFI
The basic steps:
Create a temporary directory to store the branch.
Change into that directory.
Execute these commands:
Code:
# svnlite co http://svn.freebsd.org/base/projects/bhyve_graphics
# cd bhyve_graphics
# make BHYVE_SYSDIR=/usr/src/ -m /usr/src/share/mk
# cd /usr/ports/sysutils/uefi-edk2-bhyve
# make install
Copy the new uefi file into our Bhye directory with the rest of our files:
cp /usr/local/share/uefi-firmware/BHYVE_UEFI.fd the_directory_of_our Bhyve files
Create the empty Bhyve Win10 image:
truncate -s 70GB win_10.img
This will be the first boot to start the install:
bhyve -c 2 -s 0,hostbridge -s 3,ahci-cd,./win10.iso -s 4,ahci-hd,./win_10.img -s 10,virtio-net,tap0 -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 20,xhci,tablet -s 31,lpc -l bootrom,./BHYVE_UEFI_20160526.fd -m 2G -H -w win10
The install waits for the vnc connection.
Connect with vnc client (I used tsclient) to the Windows install console:
ip_address_of_bhyve_host:5900
Press Enter (on the vnc screen) to get the install started.
Let the installer copy all the files and do the first reboot
After the reboot. Bhyve exits normally.
Now create an empty install DVD. We no longer need the install iso, but
Bhyve tries to boot from a DVD.
touch null_dvd.iso
Boot Win10 a second time and let it continue the installation.
Notice how we use the null_dvd.iso.
Again, connect to the Windows console using VNC
bhyve -c 2 -s 0,hostbridge -s 3,ahci-cd,./null_dvd.iso -s 4,ahci-hd,./win_10.img -s 10,virtio-net,tap0 -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 20,xhci,tablet -s 31,lpc -l bootrom,./BHYVE_UEFI_20160526.fd -m 2G -H -w win10
The install will continue and then reboot again.
The third boot of Windows use the same command line to continue the installation:
bhyve -c 2 -s 0,hostbridge -s 3,ahci-cd,./null_dvd.iso -s 4,ahci-hd,./win_10.img -s 10,virtio-net,tap0 -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 20,xhci,tablet -s 31,lpc -l bootrom,./BHYVE_UEFI_20160526.fd -m 2G -H -w win10
After you get the Windows desktop there will be no network.
Need to install the virtio network driver.
Shutdown Windows 10.
Boot this time with the virtio net drivers from the CD:
bhyve -c 2 -s 0,hostbridge -s 3,ahci-cd,./virtio-win-0.1.118.iso -s 4,ahci-hd,./win_10.img -s 10,virtio-net,tap0 -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 20,xhci,tablet -s 31,lpc -l bootrom,./BHYVE_UEFI_20160526.fd -m 2G -H -w win10
Login to Windows.
Look for the CD drive. Open this folder to install the network driver:
NetKVM\w10\amd64
Right-click "netkvm" and select install
Networking should start to install and configure.
That should be all needed for Windows guest install.
You can configure RDP or use VNC to connect.
Use this command to start the Windows guest:
bhyve -c 2 -s 0,hostbridge -s 3,ahci-cd,./virtio-win-0.1.118.iso -s 4,ahci-hd,./win_10.img -s 10,virtio-net,tap0 -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 20,xhci,tablet -s 31,lpc -l bootrom,./BHYVE_UEFI_20160526.fd -m 2G -H -w win10