Bug 893933 - use greatest possible memory units that cleanly divide actual memory for 'virsh edit' temporary domain xmls
Summary: use greatest possible memory units that cleanly divide actual memory for 'vir...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-10 09:52 UTC by David Jaša
Modified: 2016-03-24 00:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-24 00:29:38 UTC
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2013-01-10 09:52:54 UTC
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:

Comment 2 Jiri Denemark 2013-01-10 11:07:59 UTC
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.

Comment 3 Cole Robinson 2016-03-24 00:29:38 UTC
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


Note You need to log in before you can comment on or make changes to this bug.