View Issue Details

IDProjectCategoryView StatusLast Update
0016175CentOS-7libvirtpublic2019-06-12 02:12
Reporterpengwei 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Platformarm64OSCentOSOS Version7.6
Product Version7.6.1810 
Target VersionFixed in Version 
Summary0016175: Create lxc VM always failed
Descriptioni use virsh command to start a lxc VM, the result is "Domain lxc_test is started", as follow:
[root@localhost lxc]# virsh -c lxc:/// start lxc_test
Domain lxc_test started

but use the virsh list command to check , there is no lxc_test VM,as follow:
[root@localhost lxc]# virsh -c lxc:/// list
 Id Name State
----------------------------------------------------

i checked the libvirt log, as follow:
2019-06-12 01:51:26.571+0000: 33807: info : virEventPollDispatchHandles:506 : EVENT_POLL_DISPATCH_HANDLE: watch=13 events=9
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientIncomingEvent:1980 : client=0xffff7c0035f0 wantclose=0
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientIncomingEvent:1988 : Event fired 0xffff7c004bc0 9
2019-06-12 01:51:26.571+0000: 33807: error : virNetSocketReadWire:1806 : End of file while reading data: Input/output error
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientMarkClose:773 : client=0xffff7c0035f0, reason=1
2019-06-12 01:51:26.571+0000: 33807: info : virEventPollRemoveHandle:186 : EVENT_POLL_REMOVE_HANDLE: watch=13
2019-06-12 01:51:26.571+0000: 33807: debug : virEventPollRemoveHandle:199 : mark delete 11 27
2019-06-12 01:51:26.571+0000: 33807: debug : virEventPollInterruptLocked:722 : Skip interrupt, 1 281473138025680
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientIncomingEvent:2007 : VIR_EVENT_HANDLE_HANGUP or VIR_EVENT_HANDLE_ERROR encountered
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientMarkClose:773 : client=0xffff7c0035f0, reason=1
2019-06-12 01:51:26.571+0000: 33807: debug : virNetSocketRemoveIOCallback:2221 : Watch not registered on socket 0xffff7c004bc0
2019-06-12 01:51:26.571+0000: 33807: debug : virNetClientCloseLocked:793 : client=0xffff7c0035f0, sock=0xffff7c004bc0, reason=1
2019-06-12 01:51:26.571+0000: 33807: info : virObjectUnref:344 : OBJECT_UNREF: obj=0xffff7c004bc0
2019-06-12 01:51:26.571+0000: 33807: info : virObjectRef:382 : OBJECT_REF: obj=0xffff7c0035f0
2019-06-12 01:51:26.571+0000: 33807: debug : virLXCMonitorEOFNotify:119 : EOF notify mon=0xffff7c0009e0
2019-06-12 01:51:26.571+0000: 33807: debug : virLXCMonitorEOFNotify:126 : EOF callback mon=0xffff7c0009e0 vm=0xffff3c1e5900
2019-06-12 01:51:26.571+0000: 33807: debug : virLXCProcessMonitorEOFNotify:657 : mon=0xffff7c0009e0 vm=0xffff3c1e5900
2019-06-12 01:51:26.571+0000: 33807: debug : virLXCProcessStop:833 : Stopping VM name=lxc_test pid=33961 reason=1

from the log, i think due to the error "error : virNetSocketReadWire:1806 : End of file while reading data: Input/output error" , so the vm lxc_test stopping.
Steps To ReproduceMy VM configuration file is as follow:

[root@localhost lxc]# cat lxc.xml
<domain type='lxc'>
    <name>lxc_test</name>
    <memory>190000</memory>
    <vcpu>2</vcpu>
    <cputune>
        <shares>1000</shares>
    </cputune>

    <os>
      <type>exe</type>
      <init>/bash</init>
    </os>

    <devices>
        <console type='pty'/>

        <filesystem type='mount'>
           <source dir='/home/pengwei/testlxc'/>
           <target dir='/'/>
        </filesystem>
        <interface type = 'bridge'>
            <source bridge = 'br0'/>
        </interface>
    </devices>
</domain>

The directory : "/home/pengwei/testlxc" is as follow:
[root@localhost testlxc]# pwd
/home/pengwei/testlxc
[root@localhost testlxc]# ll
total 952
-rwxr-xr-x. 1 root root 971752 6月 12 09:45 bash

Note: the "bash" file is from /bin/bash.

Use the following command to create VM:
[root@localhost lxc]# virsh -c lxc:/// define lxc.xml
Domain lxc_test defined from lxc.xml

[root@localhost lxc]# virsh -c lxc:/// start lxc_test
Domain lxc_test started

[root@localhost lxc]# virsh -c lxc:/// list
 Id Name State
----------------------------------------------------






Additional Informationi modify lxc.xml to test again and again, and i find the error should be related with the following configuration:
<filesystem type='mount'>
           <source dir='/home/pengwei/testlxc'/>
           <target dir='/'/>
 </filesystem>

i think on centos the libvirt has bug for add filesystem configuration.
And the libvirt version is 4.5.0 , is from CentOS iso.
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-06-12 02:12 pengwei New Issue