start qemu in non-blocking mode
In our experiments, we often need very large memory, such as 256G. When the resource demand is very large, qemu starts slowly. In some cases, it may take 1 to 2 minutes. If the startup timeout, starting qemu in a blocked manner will result in qemu residue, this is because killing qemu will be skipped due to process==nil, so it is recommended to change to non-blocking mode, so the process in QemuContext always has value, can avoid qemu residue
Thanks @jimoosciuc ! We do not preallocate guest memory when launching qemu. Are you sure it is the large guest memory that caused startup timeout in your case?
Also we handle qemu startup timeout when initializing the qmp handler. If it takes 1-2 minutes to start qemu, the qmp initializer should fail. So are you just trying to avoid qemu residue instead of making it work to launch large memory guests?
Yes, in the experiment, when we gradually increase the memory size, the qemu startup time will increase. Now we have set the timeout to 60s, but this works only under 120G memory. When using larger memory, Will cause qemu residue. In our practice, changing to a non-blocking start does solve this problem.