Bug 1452454
Summary: | libvirt attach nvdimm device with invalid access type | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | chhu |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | chhu |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.4 | CC: | dyuan, lhuang, pkrempa, rbalakri, xuzhang, yalzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.2.0-6.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-02 01:34:35 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
chhu
2017-05-19 05:01:21 UTC
Fixed upstream: commit 85d62624c5d02c38e00a275dc2b2957584454908 Author: Peter Krempa <pkrempa> Date: Fri May 19 10:25:00 2017 +0200 conf: Don't assign value from ..TypeFromString directly to enum Enums are unsigned, so it's impossible to check whether the helper returned -1 for invalid conversions. Verified on packages: libvirt-3.2.0-9.el7.x86_64 qemu-img-rhev-2.9.0-9.el7.x86_64 kernel-3.10.0-679.el7.x86_64 Test steps: 1. Create nvdimm file on the host: # truncate -s 512M /tmp/nvdimm # truncate -s 256M /tmp/nvdimm2 2. Start a guest with one nvdimm device successfully. <maxMemory slots='16' unit='M'>2048</maxMemory> <memory unit='M'>1024</memory> <currentMemory unit='M'>512</currentMemory> <vcpu placement='static'>4</vcpu> ....... <cpu mode='host-model' check='partial'> <model fallback='allow'/> <topology sockets='2' cores='2' threads='1'/> <numa> <cell id='0' cpus='0-1' memory='512' unit='M'/> <cell id='1' cpus='2-3' memory='512' unit='M'/> </numa> </cpu> ...... <memory model='nvdimm' access='shared'> <source> <path>/tmp/nvdimm</path> </source> <target> <size unit='M'>512</size> <node>0</node> <label> <size unit='KiB'>256</size> </label> </target> <address type='dimm' slot='0'/> </memory> </devices> 3. Try to attach a nvdimm device with access='shar', failed with error message. # cat nvdimm.xml <memory model='nvdimm' access='shar'> <source> <path>/tmp/nvdimm2</path> </source> <target> <size unit='M'>256</size> <node>1</node> <label> <size unit='KiB'>128</size> </label> </target> <address type='dimm' slot='1'/> </memory> # virsh attach-device r7t nvdimm.xml error: Failed to attach device from nvdimm.xml error: XML error: invalid access mode 'shar' 4. Edit the access='shared', attach the nvdimm device to the guest. # virsh attach-device r7t nvdimm.xml Device attached successfully 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://access.redhat.com/errata/RHEA-2017:1846 |