esdc-ce icon indicating copy to clipboard operation
esdc-ce copied to clipboard

Inform user about KVM machine hitting memory limits

Open marcheschi opened this issue 7 years ago • 3 comments

Hi I had some issues in creating virtual machine with n. cpu=6 and RAM=20GB the machine (certified linux 16.04 or 17.10) where deployed but I was not able to connect via console, after changing the cpu=4 and ram=16 the VM was ok. If this is the reason I think that You have to put a constraint on the vcpu/ram combination. Because there was no error on the danubecloud log . with vmadm info I got : Unable to get VM info for VM 58fdc9f7-eb51-4988-a028-9afd02a6e115: Unable to get info from vmadmd, query returned 500. Thank you Paolo

marcheschi avatar Dec 12 '17 14:12 marcheschi

Hi Paolo, There is an artificial (user-defined) constraint defined by the node cpu/ram coefficient and node attachment strategy in virtual datacenters. The real limits depend on many things, e.g. using zones vs. KVM. Also you should keep in mind that the hypervisor needs memory too (OS, virtualization overhead, ZFS/ARC, ...)

We'll need more information about your actual problem. Did the VM start (achieved running status)? You can also check /zones/<uuid>/root/tmp/vm.log file while the VM is starting. You may observe messages like this: qemu_mlock: have only locked ... bytes; still trying..., which can take a long time if your are tight on memory.

dn0 avatar Dec 12 '17 17:12 dn0

Yes you are right

[root@hyper2 (CloudPisa) /zones/58fdc9f7-eb51-4988-a028-9afd02a6e115/root/tmp]# tail -f vm.log tablet -k en-us -chardev socket,path=/tmp/vm.qga,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 === OUTPUT (2017-12-14T08:49:49Z) === qemu_mlock: have only locked 19489320960 of 21474836480 bytes; still trying... qemu_mlock: have only locked 19489320960 of 21474836480 bytes; still trying... qemu_mlock: have only locked 19489320960 of 21474836480 bytes; still trying... ...

Maybe, is useful to have these errors emerge on the web interface.

Thank you Paolo

marcheschi avatar Dec 14 '17 08:12 marcheschi

It is a good idea to inform the user about hitting the memory limits. I think that this should be done in vmadm. I'll keep this issue open and change the title.

My idea is that vmadm start could timeout sooner and look into the vm.log file before it fails so that user gets the right information from vmadm.

dn0 avatar Dec 15 '17 07:12 dn0