Cant install Virtual Machine

LFH

Cadet
Joined
Jan 25, 2024
Messages
5
Hy there!!!

Im new on TrueNAS and recently I installed TrueNAS SCALE, in terms of a NAS system works perfectly, but recently I wanted to use a VM to run my Ubuntu game service server, I tryed to install Ubuntu Desktop, Server, Linux Mint, Debian or any Linux distro but in the live install boot it starts to run slower until it totally freezes, making impossible to do anything.

I searched on a lot of forums, watched tutorials, asked for help to professionals, nothing can fix it.
One of the most mentioned things is to use 2 cores 2 threads, i did it, nothing changes.
I also tryied to use VirtIO and emulated hardware options in the disk and the NIC, it still freezes.
The VM have 16GB of RAM assigned, so RAM is not the problem.
I also tryed to make the disk have 20 to 80GB of space, tryed even to pre create the disk, nothing works.
I tryed every thing possible and can't figure out whats the problem, here's my VM settings and NAS system specs, hope somebody can help me.

Motherboard: HP E93839
CPU: Intel Core i5-2400
RAM: DDR3 20GB 1600Mhz
Boot disk: Kingston SSD 120GB
VM Disk: Same Kingston SSD 120GB
Other Disks: 2 Seagate Barracuda 500GB 7200RPM
TrueNAS version: TrueNAS-SCALE-23.10.1.3
 

Attachments

  • imagen_2024-01-25_141246199.png
    imagen_2024-01-25_141246199.png
    29 KB · Views: 56
  • imagen_2024-01-25_141456639.png
    imagen_2024-01-25_141456639.png
    15.4 KB · Views: 48
  • imagen_2024-01-25_141437030.png
    imagen_2024-01-25_141437030.png
    21.8 KB · Views: 47
  • imagen_2024-01-25_141419593.png
    imagen_2024-01-25_141419593.png
    23 KB · Views: 44
  • imagen_2024-01-25_141402326.png
    imagen_2024-01-25_141402326.png
    18.1 KB · Views: 50
  • imagen_2024-01-25_141331482.png
    imagen_2024-01-25_141331482.png
    26.4 KB · Views: 45
  • imagen_2024-01-25_141309530.png
    imagen_2024-01-25_141309530.png
    29.6 KB · Views: 53

LFH

Cadet
Joined
Jan 25, 2024
Messages
5
Srry about my low-level english, im still learning
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
I'm not sure how capable a desktop environment is supposed to run on truenas with a i5 2400, I do not use anything with a graphicsl output. I tested win 10 shortly and it was a bit laggy. I could imagine the VMs may run a bit more sluggish compared to bare metal.

I never bothered with the optional CPU set:,.maybe leave that blank.

What I could imagine is you run out of RAM. Can you monitor the RAM usage in truenas please? Under reporting and then memory.

In my opinion you should not set s minimum amount of RAM. Just assign whatever RAM you want to assign and be done with it. You should not overcommit memory anyway, maybe the ballooning RAM isn't doing you any favors.
20 GB available RAM, that's 10 GB for caching, leaving you with 10 GB. From that 10 GB you would need to leave some overhead for the system itself. 16 GB assigned to your VM is way too much!
I would not assign more than 4-8 GB in your case to be honest. And 8Gb may be more than I'd be comfortable with.

I'm not sure if the buy is fixed yet, but in order to change your VM settings you would need to recreate the VM (for now).

To be clear: Boot disk: Kingston SSD 120GB
VM Disk: Same Kingston SSD 120GB

That means the same model right? not some partition on the same physical disc?
 

LFH

Cadet
Joined
Jan 25, 2024
Messages
5
I know it's an old CPU but I assure you it works pretty well.
In the past I have run two servers in this specific processor and it works fine with some optimization, in the future I want to upgrade my hardware, but right now I don't have enough money to buy some new stuff.

If I don't set the "CPU set" option it only uses one core of the host machine CPU and runs even more slower so I think I will leave it on 0-3.

About the disk, yes, I refer to the same model, the TrueNAS OS its located on a separate drive.

In therms of RAM i need the VM to have as much RAM as possible because the game server requires at least 10GB.

Anyways I unset the Minimum RAM option and lowered the RAM setting it to 8GB and it worked perfectly fine!!!

After having got it working i tryed to set 4 cores 1 thread per core (Same specs as the host machine CPU) and set 16GB RAM again, and it perfectly works!!! So I assume that the problem was "Minimum RAM" option, I feel quite dumb for not having tried to disable it before but it works fine and that's the most important thing.

I attached screenshots of memory report with the VM without any load, I think it assigns RAM dynamically and set it to 16 because after some search I find that TrueNAS SCALE only uses 1 to 2GB to run porpertly.

Anyway, I am attaching screenshots of the current configuration in case there is anything else I can do to optimize the VM.

Thank you very much for the help
 

Attachments

  • imagen_2024-01-25_171226092.png
    imagen_2024-01-25_171226092.png
    95.9 KB · Views: 44
  • imagen_2024-01-25_171504379.png
    imagen_2024-01-25_171504379.png
    29 KB · Views: 40
  • imagen_2024-01-25_171522424.png
    imagen_2024-01-25_171522424.png
    29.1 KB · Views: 39
  • imagen_2024-01-25_171539092.png
    imagen_2024-01-25_171539092.png
    25.2 KB · Views: 43

LFH

Cadet
Joined
Jan 25, 2024
Messages
5
Ok, I have started the installation and I can confirm that 16GB is too much.

As soon as the installation is finished I will lower the RAM, now I don't want to cancel it, I know it can by so problematic.
 

Attachments

  • imagen_2024-01-25_174131687.png
    imagen_2024-01-25_174131687.png
    32.3 KB · Views: 51

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
If I don't set the "CPU set" option it only uses one core of the host machine CPU and runs even more slower so I think I will leave it on 0-3.
I can't imagine honestly, never had problems without cpu set.

In therms of RAM i need the VM to have as much RAM as possible because the game server requires at least 10GB.
Then you need more RAM unfortunately.

After having got it working i tryed to set 4 cores 1 thread per core (Same specs as the host machine CPU)
I didn't google your CPU before. Yes it was a mistake to set 2 cores with 2 threads, the only correct configuration for you is 1 thread and X number of cores you want to use (up to 4).

When you have hyperthreading, then you can go for 2 threads per core.

I attached screenshots of memory report with the VM without any load, I think it assigns RAM dynamically and set it to 16 because after some search I find that TrueNAS SCALE only uses 1 to 2GB to run porpertly.
yes the RAM is used when needed, but nonetheless you should not overcommit. Again, truenas scale uses half your memory as cache. This only leaves 10 Gb for the system and your VMs. Even if SCALE only uses 2 GB (I would leave more headroom) you cannot assign 16 Gb out of 20 Gb for your VM. This will inevitably lead to stability issues when the VM actually needs the 16 Gb.

Motherboard: HP E93839 - I had trouble finding information on that. What kind of PC do you have? What I read it supports max. 32 Gb but I could be wrong. I hope you already have 2x8Gb (and maybe 1 4 Gb stick?). 16 Gb should run you about 30 Eur. Maybe worth upgrading to 32 Gb.

As soon as the installation is finished I will lower the RAM, now I don't want to cancel it, I know it can by so problematic.
Not sure if this is fixed yet, didn't check. Someone posted a workaround in either that thread or another one. You could destroy the VM (do not destroy the zvol with it though) and the recreate the VM and use your existing zvol to avoid a reinstall.
 

LFH

Cadet
Joined
Jan 25, 2024
Messages
5
I can't imagine honestly, never had problems without cpu set.
I also thought that leaving it blank would not give me problems, but it seems that yes, at least the option exists and is functional, otherwise I would not be able to use the VMs

Then you need more RAM unfortunately.
Yep, now its running perfectly fine with 10GB and 2GB Free, so if it needs some more i will simply change it to 12

I didn't google your CPU before. Yes it was a mistake to set 2 cores with 2 threads, the only correct configuration for you is 1 thread and X number of cores you want to use (up to 4).

When you have hyperthreading, then you can go for 2 threads per core.
I know, but I didn't read propertly the option description and set 2 thinking its total, not per-core

yes the RAM is used when needed, but nonetheless you should not overcommit. Again, truenas scale uses half your memory as cache. This only leaves 10 Gb for the system and your VMs. Even if SCALE only uses 2 GB (I would leave more headroom) you cannot assign 16 Gb out of 20 Gb for your VM. This will inevitably lead to stability issues when the VM actually needs the 16 Gb.

Motherboard: HP E93839 - I had trouble finding information on that. What kind of PC do you have? What I read it supports max. 32 Gb but I could be wrong. I hope you already have 2x8Gb (and maybe 1 4 Gb stick?). 16 Gb should run you about 30 Eur. Maybe worth upgrading to 32 Gb.
I see..., right now I have 3x4GB sticks and one 8GB, it actually runs pretty well but I know that in the future I will need to upgrade RAM, im thinking to buy an entire MB and Xeon system with enough RAM for all I want, but meanwhile y will continue with this hardware.

The main idea of this project was to build a NAS with junk hardware that was becoming obsolete in my workshop, however as time went by the project became larger and more complicated, I've used Ubuntu server, Openmediavault, APACHE, TrueNAS Core and lot of OS...
The proyect started as a simple NAS and scaled to a entire server that works as NAS, Home Automation system, Game server, Service provider, Backup system, and lot more ideas that i will be implementing in the future.

I hope i can do all of this with TrueNAS and some new hardware, im tyred of changing OS beacuse incompatibility problems and TrueNAS seem like a capable OS for all of my ideas.

Not sure if this is fixed yet, didn't check. Someone posted a workaround in either that thread or another one. You could destroy the VM (do not destroy the zvol with it though) and the recreate the VM and use your existing zvol to avoid a reinstall.
Nope, it is not fixed, it is quite annoying, but at the moment it works even though it is more complicated to configure.
 
Top