Proxmox 4 Pb to allocate memory to Windows VM

Kan

Well-Known Member
Dec 21, 2016
86
5
48
54
Hello,

I have 128GB on host and created 2 VM with Windows Server 2012 (nothing running on the 2 Windows, just fresh install). When I fill 4096/102400 to auto allocation for each VM, I can start the first VM but fail for the second because there's not enough free RAM on host.

Balloon drivers are correctly installed on each Windows.

root@prox11:/# free -m
total used free shared buffers cached
Mem: 128924 97644 31280 68 3 144
-/+ buffers/cache: 97495 31428
Swap: 8191 439 7752

The first VM really uses less than 5GB RAM (Task Manager).

What should I do to make host not to reserve RAM like this ?


kvm: cannot set up guest memory 'pc.ram': Cannot allocate memory
TASK ERROR: start failed: command '/usr/bin/kvm -id 101 -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -pidfile /var/run/qemu-server/101.pid -daemonize -smbios 'type=1,uuid=91f82c9d-f41e-4862-b2c7-3d2fb7b885be' -name testwin2 -smp '2,sockets=1,cores=2,maxcpus=2' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vga std -vnc unix:/var/run/qemu-server/101.vnc,x509,password -no-hpet -cpu 'kvm64,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce' -m 102400 -k fr -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:7596b3e7dda' -drive 'file=/mnt/Nas01/template/iso/virtio-win-0.1.126-2.iso,if=none,id=drive-ide1,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.0,unit=1,drive=drive-ide1,id=ide1,bootindex=200' -drive 'file=/mnt/Nas01/template/iso/SW_DVD5_Win_Svr_Std_and_DataCtr_2012_64Bit_French_Core_MLF_X18-27604.ISO,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=201' -drive 'file=/rpool/data2/images/101/vm-101-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=3A:87:8B:10:F9:33,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -rtc 'driftfix=slew,base=localtime' -global 'kvm-pit.lost_tick_policy=discard'' failed: exit code 1
 
When I set Share = 0 in allocated memory range, the memory used on host is OK (no more than memory min) but memory used in Task Manager (on Windows server) abnormally grows to 95%.

Please help.
 
Last edited:
Hi,

This is a normal Windows behavior.
Windows takes always all Ram what is available.
This is the reason why ballooning do not work with Windows.
 
I'm surprised by your answer. I don't understand what's the point of filling min and max value for RAM allocation if the max is always taken on host...

Do you mean RAM min/max allocation does not work only with Windows VM but should work with other kind of VM ?
 
With Linux and BSD it works fine.
The problem are only Windows machines.
 

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!