crete-dev
crete-dev copied to clipboard
[vm-node] QEMU will fail if extra space in dispatch XML crete.vm.args
Consider dispatch.xml:
<crete>
<vm>
<args>-m 512 -nographic</args>
</vm>
</crete>
It may be difficult to see, but there are two spaces between 512 and -nographic.
The parser in vm-node will interpret this as an additional argument because it uses a simple string split. QEMU will fail, as it is unable to recognize an empty string as a valid argument.
Solution:
Use the parsing algorithm used in svm-node. It specifically handles this problem. It is more robust generally. Regex would be the most complete solution.