A number of questions about VM in FreeNAS

GChuck

Dabbler
Joined
Jan 7, 2020
Messages
41
I apologize if these questions have been asked and answered, but I've searched high and low and could not find the any answers. So here goes.

I have a newish FreeNAS-11.3-U2.1 system which I built in April. It has an ASUS PC11-C/M server motherboard, Intel Xeon E-2236 processor (6 cores, hyper threaded), 2 x 16GB ECC memory and 4 x 4TB Seagate Ironwolf drives in a RAIDZ2 pool. I am using this system primarily as a file server.

But after running it for a while, I can see that for the most part it just sits idle and that is a waste. So I thought I would use it to run a couple of virtual machines. I have created both Linux and Windows 10 virtual machine and they both seem work fine. However ...

Neither machine would show anything other than a dual cpu configuration even thought when creating the VM I gave both 4 CPUs. So I did a little investigating and discover two "tuneables"; hw.vmm.topology.cores_per_package and hw.vmm.topology.threads_per_core. So my first question is what is the proper way of applying these tunables. I added them to System -> Tunables and that is not the issue. But as my CPU has 6 cores and it supports hyper threading, do I use those numbers as the values to enter? Do I set hw.vmm.topology.cores_per_package to 6 and then set hw.vmm.topology.threads_per_core to 2. Or do I just set some arbitrary numbers that I would like to see. I did set both tunables to the 6 and 2 numbers and now my VM's can both see 4 cores. I also increased the number of cores on the Window VM to 6 and it does see 6 CPUs. I think that is the correct way to apply them, but just not sure.

Also, I've set the tunables type field to Loader, but am not sure if I should have used Loader, rc.conf or sysctl. The way I read the docs is that using Loader will set the tunables boot time and sysctl is kind of like dynamic loading when needed. Not too sure of the rc.conf setting.

Next, however is much more puzzling. On my Windows VM when I bring up the task manager, I never see any network activity; it is always zero in and out. Why is this? In addition, the Windows VM cannot see the file shares on the server. I have a backup configured exactly the same, and the Windows VM can see the shares on this server without issue. It can also see the shares on my local workstation, but nothing on the server on which the VM is running.

Lastly, when start up the Linux VM I cannot get it to use a screen resolution of anything other thant 1024x768 or 1280x1024. Is there some special driver that needs to be loaded in Linux to get higher resolutions? By the way, my Linux VM is using Mint Mate 19.3. By the way, my network under Linux shows data being sent and received, but not under Windows 10.

Thanks for any and all help.

Greg ...
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
hw.vmm.topology.cores_per_package and hw.vmm.topology.threads_per_core.

This thread on the FreeBSD forum may help. You've correctly set these as loader tunables for your system: hw.vmm.topology.cores_per_package=6 and hw.vmm.topology.threads_per_core=2.

Next, however is much more puzzling. On my Windows VM when I bring up the task manager, I never see any network activity; it is always zero in and out. Why is this?

Did you define the NIC as VirtIO? On Linux, the VirtIO drivers are built-in, but on Windows, you'll need to install the VirtIO drivers from ISO. Alternatively, you could change the VM NIC to an Intel e82545, for which Windows has a built-in driver.

Lastly, when start up the Linux VM I cannot get it to use a screen resolution of anything other thant 1024x768 or 1280x1024.

Try changing the resolution of the VNC device in the Linux VM.
 

GChuck

Dabbler
Joined
Jan 7, 2020
Messages
41
Samuel, thanks for the response.

I’m glad I at least got those tunables right!

I tried using the VirtIO driver from the settings page of the VM, but of course, after setting this, I had no network at all! Didn’t try loading the Windows VirtIO driver. Will have to investigate how to do that. Also have not tried to change NIC to an e82545. Will try that first unless the VirtIO would be a better choice?

Finally, I have tried modifying the resolution on the VNC device for the Linux VM. That’s how I can get either 1024x768 or 1280x1024. But if I change the resolution to anything higher, then I get a garbled screen. This leads me to think that there is a Linux video driver required. As the Virtual Machine creation GUI does not give me the opportunity to specify a resolution, I tried creating the VM, loading Linux then after shutting the VM down, editing the settings to change both the resolution and to re-add the install CD-ROM (ISO), then rebooting in hopes that the re-install would pick up the new monitor resolution. No luck; still garbled. Linux must need some sort of driver!

Thanks again for your help.

Greg ...
 

kappclark

Explorer
Joined
Oct 16, 2019
Messages
99
vnc 800x600 - this solved some plms I was having with VMs in past...
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Will try that first unless the VirtIO would be a better choice?

VirtIO is higher performance than the emulated e82545.

Linux must need some sort of driver!

Actually, you have to make the corresponding resolution changes in the grub graphics mode and also the Linux VGA framebuffer.
 

GChuck

Dabbler
Joined
Jan 7, 2020
Messages
41
Samuel, sorry for the late reply. Been out and not able to work on this till today.

My original settings for my NIC in the Windows 10 VM was to use the e82545 and that was the NIC that showed no performance counters in task manager. So I downloaded the VirtIO driver file from Red Hat, changed the NIC type to VirtIO in the settings for the VM, rebooted the VM and then applied the new driver files. Hooray, task manager now shows NIC usage counters. Still cannot see my local FreeNAS server, but I think that has more to do with my DNS than the VM. Will work on that one.

I understand what you are saying about changing the resolution in grub, but not sure I know how to do that. Spent many years working on Unix systems (Digital Unix, Ultrix, AIX and FreeBSD) but am somewhat new to Linux. Will have to do some more reading.

Greg ...
 
Top