Virtual Machines on TrueNAS

hpm65

Cadet
Joined
May 5, 2021
Messages
7
The thing is that I'm running an installation of TrueNAS on my VMware Workstation, I've already enable Intel VT-x (AMD-V) on VMware (Hyper-V is disabled cause can't run at the same time with Intel VT-x). I executed the command to verify if my CPU is compatible with bhyve (It is compatible). TrueNAS was installed on VMware without any problem, but at the moment of creating a new VM inside TrueNAS and connecting to it via VNC I'm able to connect it, but after a few seconds it disconnects and say "Failed to connect to the server"
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yup, your VM's are probably not starting. I am reasonably certain that Workstation does not enable nested virtualization by default, so you are probably missing some things needed within the virtual machine. You will have to check with VMware to see if that's a supported possibility with your platform.
 

olddog9

Dabbler
Joined
Apr 23, 2021
Messages
28
Hello hpm65,

I agree with jgreco ...
The probability is high that either:
(1) the nested virtualization won't work ..
-or-
(2) If the VM does run on BHYVE (which runs on top of VMware WS); the VM might not run as well as you expect or desire.

We can offer better help when you describe your hardware & software details; like version numbers of TrueNAS, VM Workstation,
and your hardware. This link to the VMware community website might be helpful. Lots of details and some solutions for some folks.

Good luck.

 

hpm65

Cadet
Joined
May 5, 2021
Messages
7
Host hardware:
- motherboard: MSI B450 Pro Carbon AC
- CPU: Ryzen 2600
- RAM: 16GB Ripjaws IV
TrueNAS versión: latest versión (TrueNAS CORE 12.0-U3.1)
VMware versión: latest versión (VMware Workstation 16 build 16.1.1)
VT-x already enabled when running the Virtual Machine
 

hpm65

Cadet
Joined
May 5, 2021
Messages
7
Yup, your VM's are probably not starting. I am reasonably certain that Workstation does not enable nested virtualization by default, so you are probably missing some things needed within the virtual machine. You will have to check with VMware to see if that's a supported possibility with your platform.
I tried it with Virtual Box and can't run VMs inside TrueNAS neitehr
 

olddog9

Dabbler
Joined
Apr 23, 2021
Messages
28
hpm65

This thread touched an old pain point, so I might have gotten carried away a bit.
(I don't ask for permission or forgiveness.). 7;<)

Please confirm these settings are enabled in the BIOS of your MSI B450 motherboard:

> AMD-V - the AMD Virtualization equivalent to Intel VT-x (this 'should' also enable Extended Page Tables (EPT).
> If EPT is NOT enabled by the AMD-V settings then search further in BIOS.
> Secure Virtual Machine (SVM) in BIOS. - Also, this might need to be enabled. I'm not familiar with that motherboard.


Some interesting posts specific to nested virtualization and AMD Ryzen. Please read. Lots of good info.






The next section might 'sound' preachy or condescending. I do not intend it as so.
Merely offering advice to better enjoy your journey.

RANDOM ACCESS MEMORY - YOU CAN DO MORE with MORE
If your situation allows, install AT LEAST another 16 GB more RAM for total of 32 GB on your system.
General virtualization NEEDS lots of memory, the more the better.

Also, I read stories of people running small amounts of RAM with ZFS (8 GB or 4 GB). Yes the OS and ZFS might run ok ... BUT ZFS will run better and enable you to use more of its features if more RAM is installed. In my opinion, fast RAM is more important than a fast processor. I've seen slow processors with ample RAM do more work than much faster processors with insuffcient RAM. Processors have ALWAYs been faster than RAM memory. Processors can eat more data faster than memory can feed. That is why we have CACHES ... level 1, level 2, level 3 in modern processors... built with the same silicon and on same chip. The processor is hungry and most of the time sits idling ... relaxed ... smoking a cigarette or eating bags full of Dorito bits.

If you're into lots of games ... GREAT ... a fast processor and graphics processor, help alot. However, when venturing away from gaming to do virtualization or enable great data integrity features of great filesystems (yes ZFS), fast RAM becomes king. So, if virtual machines and enterprise type filesystems appeal to you, then please add more memory to your current setup.

WHY NESTED VIRTUALIZATION ?
Why does nested virtualization appeal to you? Is there a specific goal to achieve or constraint to overcome?

Nested virtualization sounds cool and IS amazing that it works ... at all ... but for stable development, testing, evaluation, ... well maybe, but probably not. The word 'maybe' is being generous. For a production system that serves customers, the answer is emphatically, NO !
"Danger, Will Robinson !!"

NO CHANGE, NO PAIN, NO GAIN
Next, if you are open to change ... willing to reconfigure your system disk to gain performance, operational stability, and easier troubleshooting ... then consider two alternate suggestions for your personal setup:

(1) Dual Boot Windows & TrueNAS (a nicely tailored FreeBSD with bhyve virtualization)
Backup your system disk, backup your personal settings and all important data. Wipe system clean = erase ... everything.

Install a boot manager on the system disk and allocate space for each Windows & TrueNAS. In a past life, Microsoft OS installers often trashed existing partition tables of other previously installed OS types. To avoid that, install the Microsoft OS ...first. Finally, install TrueNAS. This setup will run faster, and safer, than the Microsoft OS + VMware WS + TrueNAS with bhyve + whatever virtualized OS combination (This is similar to a House of cards?). Then after some sweaty gaming, reboot system, select TrueNAS (FreeBSD in a nicely tailored dress shirt & trousers) + Bhyve to run cool virtual machines.

(2) Dual Boot Windows & VMware ESXi
This ALSO runs faster than the Microsoft OS + VMware WS + TrueNAS with bhyve + whatever virtualized OS ... house of cards.

On your hardware, MSI B450 motherboard, ESXi requires a third party network driver for network to function.
Here is an example: https://networkguy.de/installing-realtek-driver-on-esxi-6-7/

Why a third party driver? Because ESXi prefers Intel network devices and consequently will not work since the
MSI B450 motherboard has a RealTek 8111H GLAN.

Now via ESXi, install TrueNAS as a virtual machine. This nested virtualization just might work. I've not tested this combination, so I disclaim any guarantee. You might get lucky.


That is all.
Constructive criticism welcome.

olddog9
EOF
 
Top