SOLVED BHYVE Windows VM step by step?

FreeNASftw

Contributor
Joined
Mar 1, 2015
Messages
124
Hello,

I need some hand holding to get Windows VM's running.
I've essentially followed these instructions https://people.freebsd.org/~grehan/bhyve_uefi/windows_iso_repack.txt
I'm using Ubuntu and I don't think the mkisofs version is correct as it throws the error "Invalid node - '0xEF'"
EDIT - removing some of the eltorito references allowed me to create the ISO but... I clearly don't know if those commands are essential or not.

However I still just get the black screen when I VNC into the VM - attempting Win7 install.
Is there a way to tell if the VM is actually running properly and it's just the AutoUnattend script getting stuck, or some other basic issue?
Are you using VNC to view the desktop once it is running or are you RDPing into it?


FreeNAS version FreeNAS-11-MASTER-201704250734

No huge urgency, I simply want to learn how to get this running.

Cheers
 

Allan Wilmath

Explorer
Joined
Nov 26, 2015
Messages
99
Leaving out entire commands when following a guide using Linux is almost never going to be successful. The point of that guide is to get a version of Windows with the virtualized device drivers preinstalled. That is a cool trick, and if you can manage it it will be nice if you have to reinstall. I think however you don't need to start that way. I think you can install Windows using the compatible but slower virtualized devices and then improve performance installing the virtual i/o devices in Windows using a windows installer.

Alternatively, there are some creative ways to follow the guide, install Virtualbox and then the same version of Fedora used in the guide. You can move data in to and out of the VM using an ftp client on a Windows machine or the scp command in Fedora to copy it directly to FreeNAS.

You could also use Fedora to pull the virt i/o drivers and use Microsoft's tools for building a customer iso, I've not done it, but I know they exist.

Another clever work around is to simply install Windows in virtual box, install the virtual i/o drivers. Likely the drivers from the Virtual box 'guest additions' will be the same anyway. Then shut the vm down, connect a linux cd to the virtual machine and then bring it back up booting the linux iso to a linux command prompt. You can create the windows vm on FreeNAS and instead of starting with the windows iso, start with a linux iso to get a command line. Then you can pull a real magic trick, you can nest a dd command with a ssh command! Pulling a byte for byte disk image clone across the network from the virtual box to the freenas box!

There are numerous examples of doing this on the internet. Be sure to up the block size or it will take a long time.

I don't know the file format for the virtual machine, you could see if the format for FreeNAS VMs is an option in virtual box and simply use that, create the vm and install the guest additions, then shutdown and copy the file over from Ubuntu to FreeNas.

Just some ideas.
 

FreeNASftw

Contributor
Joined
Mar 1, 2015
Messages
124
Ok, so I got rid of the crappy genisoimage software in Ubuntu and installed the correct CDRtools with mkisofs. Completed instructions to the letter and the ISO compiles properly... Funny about that :) ; However, if I select the UEFI+CSM booth method I just get a black screen, if I select UEFI only it boots to shell and that appears to be it.
With a Ubuntu VM I could simply exit the shell and boot grub manually and that worked. I'm not sure what I'm missing here. The only other instructions I can find are for FreeNAS 10 and none of the "vm" commands seem to work now.

I like the dd option, if I get time I'll give that a crack.
 
Last edited:

FreeNASftw

Contributor
Joined
Mar 1, 2015
Messages
124
Lol... It must be something funky with my Windows 7 ISO and non native UEFI support - changed to Win10 ISO and hey presto. Sorry guys!
I'll look into making a native UEFI Win7 ISO or just stick with 8.1 onwards!
 

EsTaF

Contributor
Joined
Sep 20, 2013
Messages
163
A good opinion, but this one is "vm". Or is this vm a some strange syper-hyper-fly in tetra qube?)
Vm can be used for a lot of moments.
 
Last edited:

Brainticket

Cadet
Joined
Aug 28, 2019
Messages
1
What is the difference to FreeNAS 11.2? I have now tried in vain to set up multiple VMs with WIN7.

I've tried several times to pull up a WIN7 VM, but it always crashes when booting the installation ISO? The VM starts and the WIN ISO is pulled. Then the VM shuts off? Always at the same point.

The CPU
root @ freenas [~] # grep POPCNT /var/run/dmesg.boot
Features2 = 0x802009 <SSE3, MON, CX16, POPCNT>
Features2 = 0x802009 <SSE3, MON, CX16, POPCNT>
root @ freenas [~] #

16TB HDD / 24GB RAM / CPU: AMD A6-3620 APU

I'm already loading win10, because it means that it should run with it. But I think I need a setup ISO with the Virtual Drivers or an installation file for unattended installation.
 
Top