Installing VMs on TrueNas Core

Scorpionhunt

Cadet
Joined
Sep 16, 2022
Messages
4
Hello there,

First of all, I have to admit that I am a complete newbie regarding True Nas.

I am currently trying to set up a few VMs. They should all run different programs, for example, nextcloud, Jellyfin, Pi-Hole, and Nginx proxy manager. Since I do not have much experience and hours of research have not helped, I would be glad if someone could help.

My configuration consists of a 6-core CPU, 32 GB of RAM, 2x 500GB m.2 SSD, and 32 TB of HDD.

I would prefer to install all programs in different jails, but since this does not work, I decided to use VM (with Ubuntu Server) instead.

Regarding setting up the VMs, I read many articles. Many articles state that if I allocate too many CPU cores, it could result in crashing True Nas since there are not enough processing units remaining. For example, three cores to nextcloud, three cores to Jellyfin (since they do more intensive work), and one CPU core to Pi-Hole and to Nginx proxy manager (since they do less intensive work). Is this still the case? Or has True Nas implemented security measures (since those articles are now a few years old) preventing the VMs from using more processing units than are available? Or does this not matter since a single VM does not use all six cores at once.

In addition, should I consider switching to TrueNas Scale instead?

Many thanks for your help!
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
I run a single Ubuntu VM on Core.
It's very easy to set up, you choose the core and thread number you want to allocate to that VM, as well as RAM and disk space.
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
TrueNAS is a NAS, not a virtualisation platform. As far as I know the advice still holds: Do not allocate more total cores to the VMs than the actual number of cores.
TrueNAS SCALE is also not a virtualisation platform. But it is a platform for containers. If you can find all of your applications in the TrueCharts repository, or if you're confortable creating your own Helm charts, you may well go this route. If something is missing from TrueCharts, or if you want to make and/or manage your own docker containers, you may end up frustrated because SCALE does not offer plain Docker. The solution is then to set up a VM with docker and run all your containers in there.
Which brings us back to @Davvo's advice: If you're familiar with Docker and run your apps as containers, you may as well set up a single Ubuntu VM on TrueNAS Core with docker + Portainer or docker-compose and run all your apps in this single VM.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I would prefer to install all programs in different jails, but since this does not work
Other than Pi-Hole (which would need to run in a Linux VM if you're using CORE), which of those "do not work" in a jail? Nextcloud works well in a jail. Plex and Emby both do; I haven't tried Jellyfin, but I'd be surprised if it didn't. I'd be surprised if Nginx Proxy Manager doesn't, though I've used Caddy for such purposes.
Many articles state that if I allocate too many CPU cores, it could result in crashing True Nas since there are not enough processing units remaining. For example, three cores to nextcloud, three cores to Jellyfin
You don't assign cores to applications; you assign them to VMs. I guess you could create a separate VM for each application, but that seems frankly foolish, not to mention wasteful of every relevant resource. But it's correct that you shouldn't overprovision your CPU cores.
TrueNAS is a NAS, not a virtualisation platform.
It's both/and, not either/or. I don't think it's a particularly good virtualization platform--it's serviceable, but it misses a number of features, which is why I use a Proxmox cluster for virtualization--but both CORE and SCALE are quite capable of running basic (and probably more than basic, really) VMs; my parents' NAS (running CORE) runs Pi-Hole on a small Ubuntu VM. SCALE is intended to expand on this capability; if it lives up to what's been promised, it will be a strong competitor to a Proxmox or xcp-ng cluster--but today is not that day, and tomorrow isn't looking good either.

@Scorpionhunt, the simplest way to accomplish what you're looking for is just to use SCALE. Nextcloud, Jellyfin, and Pi-Hole are available as point-and-click apps. Nginx Proxy Manager isn't, but Traefik is, and between it and the "external service" app, you should be able to accomplish the same thing. Or, if you must have NPM specifically, install the Docker-compose app and use that to install NPM. Or you can, of course, run a VM (on CORE or SCALE) and handle all the container stuff there--but that adds another layer of complexity and is bound to affect performance.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Yeah, I wasn't too confident about dockers and jails so I decided to go with a VM, knowing that if I messed up I could have just recreated it.
 
Last edited:

Scorpionhunt

Cadet
Joined
Sep 16, 2022
Messages
4
Firstly, @Davvo @Etorix @danb35 thank you very much for your fast response and tips. They are great, and I will implement them while setting up my machine.

Regarding my problems when installing programs in jails:
When I try to install Nextcloud via the official plugin, I always get the error message "writing new private key failed." Then I tried to follow Samuel Dowling's instructions, as is recommended by many people in this forum. At some point, I get the error message: "Wget error version FBSD_1.7 required". Then I tried to install it in an Ubuntu VM, which worked great, and Nextcloud is now up and running.
Instead of running Jellyfin, I installed Plex via the official plugin, which worked great too.
Nginx Proxy Manager and Pi-Hole are running great in a single VM.

Obviously, using every program in a separate VM will consume unnecessary resources.
Since I am new and it is easy to mess something up, my idea was to create separate VMs, since I just have to set up a single one again when something breaks.

I will definitely inform myself about Proxmox and switch to SCALE soon. But first, I will do some research about docker and co.

Again, thank you very much for your help.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
via the official plugin
There's your problem--the plugins are crap. Don't use them. There are other ways of installing Nextcloud in a jail, and no doubt I'm biased, but I think my script is about the best there is:
 

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
I will definitely inform myself about Proxmox and switch to SCALE soon. But first, I will do some research about docker and co.
If you have to "do some research on docker", avoid the rabbit hole and go for TrueCharts on SCALE.
 

gar

Dabbler
Joined
Jan 1, 2014
Messages
14
If you have ESXi, just run TrueNas as a VM and directly pass the drives controller to it.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If you have ESXi, just run TrueNas as a VM and directly pass the drives to it.
No, do not pass the drives through to TrueNAS. Pass the controller through instead. See:

Never mind that nobody said anything about ESXi until you revived this dead thread.
 
  • Like
Reactions: gar

gar

Dabbler
Joined
Jan 1, 2014
Messages
14
No, do not pass the drives through to TrueNAS. Pass the controller through instead. See:

Never mind that nobody said anything about ESXi until you revived this dead thread.
Missed how old this was, just a better way to run VMs IMO.
You are correct about the controller, modified my post.
 
Top