I have long suffered from the issue below, and it does not seems to be discussed ever since though it still exists on the latest system. Now I find out a quick workaround (in dom0):
opened 05:44AM - 10 Mar 23 UTC
T: bug
C: core
C: Xen
P: default
needs diagnosis
[How to file a helpful issue](https://www.qubes-os.org/doc/issue-tracking/)
#… ## Qubes OS release
R4.1
dom0 latest as of 2023.03.09, domu not latest (maybe 2022.07-ish?)
### Brief summary
I have 32000MB ram. My sys-net,sys-usb,sys-firewall are running (in total < 4000MB). In addition, a 2000-12000MB vmA and a 4000-20000MB vmB are running. They are both not short of memory - `free` shows that much of their memory are available.
I now attempt to start another 4000-20000MB vmC. However the system says that my memory is not enough.
```
$ sudo cat /var/log/libvirt/libxl/libxl-driver.log
2023-03-10 04:45:50.541+0000: xc: panic: xc_dom_boot.c:120: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
2023-03-10 04:45:50.541+0000: libxl: libxl_dom.c:593:libxl__build_dom: xc_dom_boot_mem_init failed: Operation not permitted
2023-03-10 04:45:50.579+0000: libxl: libxl_create.c:1654:domcreate_rebuild_done: Domain 8:cannot (re-)build domain: -3
```
Is it xen-balloon problem?
I suspect that the recent update is the culprit, but I have no evidence.
### Steps to reproduce
1. start VM that uses a lot of memory, until they fill up all the host RAM
2. attempt to start another VM that uses a lot of memory but can be run when other VM shrinks
### Expected behavior
The new VM starts
### Actual behavior
The new VM fails to start due to short of memory
Workaround is to do it manually. (in dom0, sudo)
virsh setmem --domain large_ram_appvm --size 8000M --current
This command exactly shrinks the ram of vm named “large_ram_appvm” into 8000M and recovers later. This command provides a time window to boot another VM.
Wish this will be helpful for someone.
2 Likes