Bug 1161461
Summary: | forbid to set memory to ZERO | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jincheng Miao <jmiao> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, honzhang, lhuang, mzhan, rbalakri, rmohr |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.14-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:55:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jincheng Miao
2014-11-07 07:58:11 UTC
Fixed upstream as a part of: commit 4bca6192f20802773012d935145811fb4ba4a4d4 Author: Peter Krempa <pkrempa> Date: Wed Mar 4 11:04:27 2015 +0100 conf: Make specifying <memory> optional Now that the size of guest's memory can be inferred from the NUMA configuration (if present) make it optional to specify <memory> explicitly. To make sure that memory is specified add a check that some form of memory size was specified. One side effect of this change is that it is no longer possible to specify 0KiB as memory size for the VM, but I don't think it would be any useful to do so. (I can imagine embedded systems without memory, just registers, but that's far from what libvirt is usually doing). Forbidding 0 memory for guests also fixes a few corner cases where 0 was not interpreted correctly and caused failures. (Arguments for numad when using automatic placement, size of the balloon). This fixes problems described in https://bugzilla.redhat.com/show_bug.cgi?id=1161461 Test case changes are added to verify that the schema change and code behave correctly. Verify this bug with libvirt-1.2.17-1.el7.x86_64: 1. edit a guest and set memory is 0: <memory unit='KiB'>0</memory> <currentMemory unit='KiB'>11111110</currentMemory> # virsh edit test4 error: XML error: Memory size must be specified via <memory> or in the <numa> configuration Failed. Try again? [y,n,i,f,?]: 2. edit a guest and set current memory is 0: <memory unit='KiB'>10240000</memory> <currentMemory unit='KiB'>0</currentMemory> # virsh edit test4 Domain test4 XML configuration edited. # virsh dumpxml test4 <memory unit='KiB'>10240000</memory> <currentMemory unit='KiB'>10240000</currentMemory> 3. edit a guest and set memory is 0 and with numa settings: <memory unit='KiB'>0</memory> <currentMemory unit='KiB'>0</currentMemory> <vcpu placement='static'>4</vcpu> <cpu> <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB' memAccess='shared'/> </numa> </cpu> # virsh edit test4 Domain test4 XML configuration edited. # virsh dumpxml test4 ... <memory unit='KiB'>1024000</memory> <currentMemory unit='KiB'>1024000</currentMemory> <vcpu placement='auto'>4</vcpu> ... <cpu> <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB' memAccess='shared'/> </numa> </cpu> ... Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |