[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"Cannot allocate memory" when boots a VM > 1TB memory
From: |
Harry Lee |
Subject: |
"Cannot allocate memory" when boots a VM > 1TB memory |
Date: |
Wed, 13 Apr 2022 17:14:46 +0800 |
Hi,
I can't boot a VM with a memory > 1TB:
root@debian11:~# qemu-system-x86_64 -m 1027G -accel kvm -vnc :1
qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION
failed, slot=1, start=0x100000000, size=0x10000000000: Cannot allocate memory
kvm_set_phys_mem: error registering slot: Cannot allocate memory
Aborted
The qemu version is:
QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-11+deb11u1)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
I had set `vm.overcommit_memory=1`, so the host's memory does not matter. (I
have 128GB memory, and I had successfully boot a 1024G VM)
I also check the CPU:
Address sizes: 46 bits physical, 48 bits virtual
It should support memory > 1TB.
So I don't know why it shown `Cannot allocate memory`.
I also tried to compile the latest `qemu-6.2.0` and use it, but it also shows
the same error.
root@debian11:/home/vmtest/qemu-6.2.0/build# ./qemu-system-x86_64 --version
QEMU emulator version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
root@debian11:/home/vmtest/qemu-6.2.0/build# ./qemu-system-x86_64 -m 1027G
-accel kvm -vnc :1
qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION
failed, slot=1, start=0x100000000, size=0x10000000000: Cannot allocate memory
kvm_set_phys_mem: error registering slot: Cannot allocate memory
Aborted
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- "Cannot allocate memory" when boots a VM > 1TB memory,
Harry Lee <=