Description of problem: When changing memory from e.g. 1.5 GB to 2.5 GB, it's quite inconvenient to always change KiB to MiB and then rewrite the longish number to 2560. It would be much more convenient if libvirt would have done this conversion (to greatest unit where memory size is still integer) right away. The same issue goes for current memory and video RAM. Version-Release number of selected component (if applicable): libvirt-0.10.2-14.el6.x86_64 How reproducible: always Steps to Reproduce: 1. have a VM with 1.5 GB memory 2. virsh edit VM 3. Actual results: memory element contains value in KiB Expected results: memory element should contain value in MiB Additional info:
While libvirt accepts different units when parsing domain XML, it has to always use KiB when giving the XML back for backward compatibility and we can't change that.
Rather than add this syntactic sugar for virsh edit (which already has a crazy impl), I suggest using a tool like virt-xml to a) change the memory in one shot, 2) use more sensible MB as its base