Virtual machine Ram problem

vanzo115

Active Member
Feb 9, 2019
15
1
43
45
Hi, I have a new installation of proxmox version 6.1, on a new hp server with 32Gbyte of ram.
Installation all ok, I create a VM and install windows server 2019, if I assign more than 27Gbyte of ram to this VM, the machine starts and crashes, if I assign the maximum possible or 31.02G it does not start right.
The installation procedure of windows server 2019, was made following your guides by wire and by sign.
What could be the problem?
 
if I assign more than 27Gbyte of ram to this VM, the machine starts and crashes
What error exactly are you seeing? A bluescreen in Windows or an error on the host?

Anything in your logs on the host? (dmesg, journalctl)
 
no error, if I give the whole ram to the vm, when the launch does not start and stops immediately, if I go down with the amount of ram, it starts windows and then it shuts down badly, if I am at 27Gbyte it starts and works, I have zfs as a file sistem.
Log I have to see what's there
 
The host needs a certain amount of RAM too, you can't give *all* of it to the guest VM.

If you're using ZFS you need to factor in its cache too, so take another few GB off. 26 of 32 GB raw capacity doesn't sound too far off.
 
so I ask you is correct behavior that there is with zfs? because on the other installations of prxmox in lvm, to the VM I assign all the ram available on the host, whether it is single vm or multi vm, and I have never encountered this type of behavior;

the log from a long series of errors
 
log:
27.965253] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/qemu.slice/100.scope,task=kvm,pid=1945,uid=0
[ 27.965965] Out of memory: Killed process 1945 (kvm) total-vm:31566112kB, anon-rss:30761820kB, file-rss:1560kB, shmem-rss:4kB
[ 28.223821] oom_reaper: reaped process 1945 (kvm), now anon-rss:0kB, file-rss:132kB, shmem-rss:4kB
 
Hi,

... oranges are not like apples ;) By deafault zfs will eat 50% of the host RAM. So when you try to start yor VM it will not be able to allocate the desired RAM (see Out of memory message from logs).

So with this facts, you need to allocate less RAM for your VM using this maximum:
- max for all VM/CT = 50 % RAM - 1(or 2) GB

You could also reduce the 50% default zfs but at minimum I will use 4 GB and max 50% of RAM.


Good luck / Bafta
 
There is a difference between used space and cache space. ZFS does not need 50% but it will use as much free space as available (empty RAM is wasted RAM). 50% would mean 16gb RAM für ARC which is good but does not need to be this large, 4GB in total is perfectly acceptable for a machine that only has 32gb and is unable to run many VMs.
 
over time we will change color to oranges .....

I imagined it was zfs that used the ram to manage the file system, because on other installations with lvm this problem I had not found.
In fact there are about 4 G that it uses and I have 27 left for a single VM that I have to run.
I experimented with zfs to be able to add a node and create replicas that with lvm is not possible, it is correct or replicas can be made between nodes even with lvm.
Sorry I'm new the product I like and I'd like to learn how to use it.
Thank you
 
ZFS is not much different to mdraid/LVM in that case, as both are no cluster-optimized filesystems.
I would go with LVM if it's a RAID controller and ZFS if it's just an HBA.

ZFS has send/receive to clone data which is cool.
 
actually the server has a raid controller on board, so I could easily create arrays and use lvm.
Only one windows 2019 server should run on it.
The idea was then to recover the old server to cluster them, if the new one has problems. What do you recommend as a solution?
 
Is a huge different ....


Not entirly true!
What do you mean? I operate lots of ceph clusters, ZFS pools and LVMs.
I like ZFS a lot but if the owner runs a raid controller, ZFS actually is a very bad idea, as it is supposed to break on such setups.
 
actually the server has a raid controller on board, so I could easily create arrays and use lvm.
Only one windows 2019 server should run on it.
The idea was then to recover the old server to cluster them, if the new one has problems. What do you recommend as a solution?
But both in a proxmox cluster and add a third node (old pc also running proxmox, no vm's).
This way you get a fully working HA cluster and you can backup/recover/replicate between them very easy.
 
But both in a proxmox cluster and add a third node (old pc also running proxmox, no vm's).
This way you get a fully working HA cluster and you can backup/recover/replicate between them very easy.
with lvm on all 3 nodes?
 
What do you recommend as a solution?

I would recommend any time to use zfs. You will have many advantages over lvm. But in your case as a beginner you need to spent some time to read about zfs.

By the way what services/software do you run in this VM so you need so much RAM?
 
I would recommend any time to use zfs. You will have many advantages over lvm. But in your case as a beginner you need to spent some time to read about zfs.

By the way what services/software do you run in this VM so you need so much RAM?

I provide the server, the management software is provided by another company and they have requested these ram requirements. In my opinion excessive, but I certainly can not clash with them since we should live together
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!