You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below are my starting points for creating these VMs.
NB! There is a calculation of the number of vcpus from the parameters of bhyve_extra_opts in which should match up. Thank you, Gyula Bibernáth, for bringing this up on the SmartOS mailing list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bhyve will wait until you connect with VNC to port 5900 of your global zone.
After you connect you have a few seconds to press any key to boot from CD.
Select the install now option and answer that you don't have a product key (license).
Pick the Windows version you want to create the image for (Windows 10 Pro).
When asked where to install it to, load the Virtio SCSI driver from this
location E:\amd64\w10\viostor.inf.
Whenever Windows wants to reboot the bhyve command terminates. Run the same
ommand again but don't press any key. These times we want to boot from the
hard disk.
Repeat this until Windows starts to ask you questions. Press Ctrl + Shift + F3
to reboot to audit mode (run the same bhyve command again). Audit mode logs
you automatically into the Administrator account. (This takes forever, twice,
to log you in. Just be patient.) Keep the window from sysprep open, do not
click OK as this will reboot out of audit mode.
Run E:\virtio-win-gt-x64.msi and install all the Virtio drivers - or at least
the networking one.
Click OK in the window from the sysprep tool and wait for the system to
automatically shut down.
Create the image
# zfs send zones/windows | tee /zones/windows.zvol | digest -a sha1
5989a20371dbb29ab7e04d32f124eccfe5749a4b
# zfs destroy zones/windows# /usr/sbin/bhyvectl --destroy --vm=windows# ls -l /zones/windows.zvol
-rw-r--r-- 1 root root 10891713416 Jan 16 14:25 /zones/windows.zvol
Generate a random GUID with uuidgen(1) and create the
windows.imgmanifest file.
We're done, you can now create virtual machines from this image.
Create a Windows 10 Pro VM
The vcpus option from bhyve creates that number of CPUs, not cores.
Unfortunately, Windows 10 Pro doesn't support more than 2 CPUs. That's
why we only define a single vcpus but add multiple cores and threads
with the bhyve_extra_opts option.
The nics options should be adjusted to match your needs. The example
works with an external DHCP server to automatically configure networking.
# vmadm create -f wintest.json
Successfully created VM 3f23f273-f4dc-4cab-bd8d-8aeac66fe79e
# vmadm start 3f23f273-f4dc-4cab-bd8d-8aeac66fe79e# vmadm info 3f23f273-f4dc-4cab-bd8d-8aeac66fe79e vnc
Connect with VNC and answer the questions.
Tip: When you create an offline account, don't set a password. You can
set the password after you log in the first time. That way you don't have
to answer the 3 idiotic recovery questions.
After you've set the password, enable the remote desktop and have fun.