OPNsense-Dashboard icon indicating copy to clipboard operation
OPNsense-Dashboard copied to clipboard

Default CPU type on Proxmox does not work with mongodb

Open mitchweaver opened this issue 1 year ago • 1 comments

Posting this in case any else runs into same issue.
Noticed I couldn't access graylog while following the tutorial with message "bad gateway".

Issue: My docker host was on Proxmox using cpu type kvm which then causes the mongodb container fail to start:

mongodb        |
mongodb        | WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
mongodb        |   see https://jira.mongodb.org/browse/SERVER-54407
mongodb        |   see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
mongodb        |   see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
mongodb        |
mongodb exited with code 132

Solution: change cpu type to "host" in Proxmox:

IMAGE

see: https://codehammer.io/proxmox-mongodb-5-0-requires-a-cpu-with-avx-support

mitchweaver avatar May 15 '23 00:05 mitchweaver

This is a workaround, not a solution imho.

You can set type to host. This has a downside though. If you want to do a live migration of VMs between different hosts, your VM might end up on a new system with a different CPU type. If the CPU flags passed to the guest are missing, the qemu process will stop. To remedy this QEMU has also its own CPU type kvm64, that Proxmox VE uses by defaults.

Live migration is an important feature of virtualisation so you can do maintenance on hardware without interrupting production.

ronaldotto avatar Jul 26 '23 10:07 ronaldotto