[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Problems with <filesystem type='block'>



On Fri, Mar 22, 2013 at 12:27 PM, Daniel P. Berrange
<berrange redhat com> wrote:
> On Fri, Mar 22, 2013 at 11:59:56AM +0000, Daniel P. Berrange wrote:
>> On Thu, Mar 21, 2013 at 11:50:40PM -0500, Doug Goldstein wrote:
>> > So still trying to figure out what I'm doing wrong with LXC because I
>> > just can't get any joy. So I'll go one issue at a time.
>> >
>> > The following VM definition:
>> > <domain type='lxc'>
>> >   <name>testdeb</name>
>> >   <uuid>df03b2ce-725a-42e2-39e4-d646be8facb3</uuid>
>> >   <memory unit='KiB'>332768</memory>
>> >   <currentMemory unit='KiB'>332768</currentMemory>
>> >   <vcpu placement='static'>1</vcpu>
>> >   <os>
>> >     <type arch='x86_64'>exe</type>
>> >     <init>/sbin/init</init>
>> >   </os>
>> >   <clock offset='utc'/>
>> >   <on_poweroff>destroy</on_poweroff>
>> >   <on_reboot>restart</on_reboot>
>> >   <on_crash>destroy</on_crash>
>> >   <devices>
>> >     <emulator>/usr/libexec/libvirt_lxc</emulator>
>> >     <filesystem type='block' accessmode='passthrough'>
>> >       <source dev='/dev/mapper/vms-testdeb'/>
>> >       <target dir='/'/>
>> >     </filesystem>
>>
>> So, it seems I only tested 'type=block with non-/ filesystem
>> mounts. I can confirm it is broken for <target dir="/"/>.
>>
>> The fix is not exactly trivial, so might take me a while
>
> Ok, I've pushed 5 changes which fix this setup for me, so hopefully it
> will work for you too.
>
>
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

Daniel,

So I've given the changes a shot with both filesystem types, block and
mount and I'm running c9c87376f2b2197ad774533ad6a6dd2f631ca105. Both
ways I get the following error:

error: Failed to start domain testdeb
error: internal error guest failed to start: PATH=/bin:/sbin
TERM=linux container=lxc-libvirt
container_uuid=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_UUID=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_NAME=testdeb /sbin/init
error receiving signal from container: Input/output error

The error message after the internal error guest failed to start",
changes between runs. The following mount is left behind, one for each
time I've tried to start the domain:

libvirt on /run/libvirt/lxc/testdeb.fuse type fuse (rw,nosuid,nodev)

And lastly the following is left behind:
ls -l /var/run/libvirt/lxc/
total 0
drwxr-xr-x 2 root root 40 Mar 23 23:26 testdeb.devpts
drwxr-xr-x 2 root root 40 Mar 23 23:26 testdeb.fuse
srwx------ 1 root root  0 Mar 23 23:31 testdeb.sock

# LIBVIRT_DEBUG=4 LIBVIRT_LOG_FILTERS=1:lxc
LIBVIRT_LOG_OUTPUTS=1:stderr /usr/sbin/libvirtd | tee -a libvirtd.log
2013-03-23 21:32:38.863+0000: 22063: info : libvirt version: 1.0.3
2013-03-23 21:32:38.863+0000: 22063: debug :
lxcContainerAvailable:2490 : container support is enabled
2013-03-23 21:32:38.889+0000: 22063: debug :
lxcContainerAvailable:2490 : container support is enabled
2013-03-23 21:32:38.890+0000: 22063: info : lxcSecurityInit:1395 :
lxcSecurityInit (null)
2013-03-23 21:32:38.890+0000: 22063: debug : lxcCapsInit:143 :
Initialized caps for security driver "none" with DOI "0"
2013-03-23 21:32:38.892+0000: 22063: debug :
virLXCProcessAutoDestroyRun:122 : conn=0x7f4efc0fb190
2013-03-23 21:32:46.294+0000: 22057: debug : virLXCProcessStart:1060 :
Setting current domain def as transient
2013-03-23 21:32:46.295+0000: 22057: debug : virLXCProcessStart:1082 :
Preparing host devices
2013-03-23 21:32:46.295+0000: 22057: debug : virLXCProcessStart:1100 :
Generating domain security label (if required)
2013-03-23 21:32:46.295+0000: 22057: debug : virLXCProcessStart:1111 :
Setting domain security labels
2013-03-23 21:32:46.295+0000: 22057: debug :
virLXCProcessSetupInterfaceBridged:316 : calling vethCreate()
2013-03-23 21:32:46.297+0000: 22057: debug :
virLXCProcessSetupInterfaceBridged:320 : parentVeth: veth1,
containerVeth: veth2
2013-03-23 21:32:46.479+0000: 22051: error : virNetSocketReadWire:1362
: Cannot recv data: Connection reset by peer
2013-03-23 21:32:46.479+0000: 22051: debug :
virLXCMonitorEOFNotify:120 : EOF notify mon=0x7f4ef0004a00
2013-03-23 21:32:46.479+0000: 22051: debug :
virLXCMonitorEOFNotify:127 : EOF callback mon=0x7f4ef0004a00
vm=0x7f4efc0d0a00
2013-03-23 21:32:46.479+0000: 22051: debug :
virLXCProcessMonitorEOFNotify:561 : mon=0x7f4ef0004a00
vm=0x7f4efc0d0a00
2013-03-23 21:32:46.579+0000: 22057: error : virLXCProcessStart:1248 :
internal error guest failed to start: PATH=/bin:/sbin TERM=linux
container=lxc-libvirt
container_uuid=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_UUID=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_NAME=testdeb /sbin/init
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerIdentifyCGroup
2013-03-23 21:32:46.579+0000: 22057: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=22180 reason=6
2013-03-23 21:32:46.579+0000: 22057: debug : virLXCProcessCleanup:228
: Stopping VM name=testdeb pid=22180 reason=6
2013-03-23 21:32:46.579+0000: 22057: debug :
virLXCProcessAutoDestroyRemove:148 : vm=testdeb
uuid=df03b2ce-725a-42e2-39e4-d646be8facb3
2013-03-23 21:32:46.579+0000: 22057: debug : virLXCMonitorClose:209 :
mon=0x7f4ef0004a00
2013-03-23 21:32:46.579+0000: 22057: debug : virLXCMonitorClose:215 :
Clear EOF callback mon=0x7f4ef0004a00
2013-03-23 21:32:46.581+0000: 22057: error : virNetDevSetOnline:536 :
Cannot get interface flags on 'veth1': No such device
2013-03-23 21:32:46.587+0000: 22057: error : virCommandWait:2315 :
internal error Child process (ip link del veth1) unexpected exit
status 1: Cannot find device "veth1"

2013-03-23 21:32:46.601+0000: 22057: error : virCommandWait:2315 :
internal error Child process (ip link del veth2) unexpected exit
status 1: Cannot find device "veth2"

2013-03-23 21:32:46.601+0000: 22051: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=-1 reason=1
2013-03-23 21:32:46.601+0000: 22051: debug : virLXCProcessStop:751 :
VM 'testdeb' not active
2013-03-23 21:32:46.601+0000: 22051: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=-1 reason=1
2013-03-23 21:32:46.601+0000: 22051: debug : virLXCProcessStop:751 :
VM 'testdeb' not active
2013-03-23 21:32:46.601+0000: 22051: debug : virLXCMonitorDispose:200
: mon=0x7f4ef0004a00
2013-03-23 21:32:46.602+0000: 22051: debug :
virLXCProcessAutoDestroyRun:122 : conn=0x7f4ef8000ae0

# tail -n 16 /var/log/libvirt/lxc/testdeb.log
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerPivotRoot:464 :
Pivot via /mnt/testdeb
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:583
: Mounting basic filesystems pivotRoot=1
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing proc -> /proc
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount proc on /proc type=proc flags=e, opts=(null)
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing /proc/sys -> /proc/sys
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount /proc/sys on /proc/sys type=(null) flags=1000, opts=(null)
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing /proc/sys -> /proc/sys
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount /proc/sys on /proc/sys type=(null) flags=1021, opts=(null)
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing sysfs -> /sys
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount sysfs on /sys type=sysfs flags=e, opts=(null)
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing sysfs -> /sys
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount sysfs on /sys type=sysfs flags=1021, opts=(null)
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:630
: Mount devfs on /dev type=tmpfs flags=2, opts=mode=755,size=65536
2013-03-23 21:32:46.432+0000: 1: debug : lxcContainerMountBasicFS:642 : rc=0
2013-03-23 21:32:46.432+0000: 1: error : lxcContainerMountProcFuse:664
: Failed to mount /.oldroot//var/run/libvirt/lxc/testdeb.fuse/meminfo
on /proc/meminfo: No such file or directory
2013-03-23 21:32:46.432+0000: 22180: error : virLXCControllerRun:1475
: error receiving signal from container: Input/output error
error receiving signal from container: Input/output error

If I compile with --without-fuse, it gets a bit farther...

# LIBVIRT_DEBUG=4 LIBVIRT_LOG_FILTERS=1:lxc
LIBVIRT_LOG_OUTPUTS=1:stderr ./daemon/libvirtd 2>&1 | tee libvirtd.new
2013-03-24 04:58:10.095+0000: 13373: info : libvirt version: 1.0.3
2013-03-24 04:58:10.095+0000: 13373: debug :
lxcContainerAvailable:2490 : container support is enabled
2013-03-24 04:58:10.104+0000: 13373: debug :
lxcContainerAvailable:2490 : container support is enabled
2013-03-24 04:58:10.104+0000: 13373: info : lxcSecurityInit:1395 :
lxcSecurityInit (null)
2013-03-24 04:58:10.104+0000: 13373: debug : lxcCapsInit:143 :
Initialized caps for security driver "none" with DOI "0"
2013-03-24 04:58:10.106+0000: 13373: debug :
virLXCProcessAutoDestroyRun:122 : conn=0x7f39a00f4bb0
2013-03-24 04:58:38.641+0000: 13367: debug : virLXCProcessStart:1060 :
Setting current domain def as transient
2013-03-24 04:58:38.641+0000: 13367: debug : virLXCProcessStart:1082 :
Preparing host devices
2013-03-24 04:58:38.641+0000: 13367: debug : virLXCProcessStart:1100 :
Generating domain security label (if required)
2013-03-24 04:58:38.641+0000: 13367: debug : virLXCProcessStart:1111 :
Setting domain security labels
2013-03-24 04:58:38.642+0000: 13367: debug :
virLXCProcessSetupInterfaceBridged:316 : calling vethCreate()
2013-03-24 04:58:38.646+0000: 13367: debug :
virLXCProcessSetupInterfaceBridged:320 : parentVeth: veth0,
containerVeth: veth1
2013-03-24 04:58:38.719+0000: 13367: error : virLXCProcessStart:1254 :
internal error bob: /var/run/libvirt/lxc, testdeb
bob: /var/run/libvirt/lxc, testdeb
2013-03-24 04:58:38.719+0000: 13348: error : virNetSocketReadWire:1362
: Cannot recv data: Connection reset by peer
2013-03-24 04:58:38.719+0000: 13348: debug :
virLXCMonitorEOFNotify:120 : EOF notify mon=0x7f3994004850
2013-03-24 04:58:38.719+0000: 13348: debug :
virLXCMonitorEOFNotify:127 : EOF callback mon=0x7f3994004850
vm=0x7f39a00f4dd0
2013-03-24 04:58:38.719+0000: 13348: debug :
virLXCProcessMonitorEOFNotify:561 : mon=0x7f3994004850
vm=0x7f39a00f4dd0
2013-03-24 04:58:38.819+0000: 13367: error : virLXCProcessStart:1262 :
internal error guest failed to start: PATH=/bin:/sbin TERM=linux
container=lxc-libvirt
container_uuid=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_UUID=df03b2ce-725a-42e2-39e4-d646be8facb3
LIBVIRT_LXC_NAME=testdeb /sbin/init
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerIdentifyCGroup
2013-03-24 04:58:38.819+0000: 13367: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=13814 reason=6
2013-03-24 04:58:38.819+0000: 13367: debug : virLXCProcessCleanup:228
: Stopping VM name=testdeb pid=13814 reason=6
2013-03-24 04:58:38.819+0000: 13367: debug :
virLXCProcessAutoDestroyRemove:148 : vm=testdeb
uuid=df03b2ce-725a-42e2-39e4-d646be8facb3
2013-03-24 04:58:38.819+0000: 13367: debug : virLXCMonitorClose:209 :
mon=0x7f3994004850
2013-03-24 04:58:38.819+0000: 13367: debug : virLXCMonitorClose:215 :
Clear EOF callback mon=0x7f3994004850
2013-03-24 04:58:38.821+0000: 13367: error : virNetDevSetOnline:536 :
Cannot get interface flags on 'veth0': No such device
2013-03-24 04:58:38.827+0000: 13367: error : virCommandWait:2315 :
internal error Child process (ip link del veth0) unexpected exit
status 1: Cannot find device "veth0"

2013-03-24 04:58:38.834+0000: 13367: error : virCommandWait:2315 :
internal error Child process (ip link del veth1) unexpected exit
status 1: Cannot find device "veth1"

2013-03-24 04:58:38.834+0000: 13348: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=-1 reason=1
2013-03-24 04:58:38.834+0000: 13348: debug : virLXCProcessStop:751 :
VM 'testdeb' not active
2013-03-24 04:58:38.834+0000: 13348: debug : virLXCProcessStop:749 :
Stopping VM name=testdeb pid=-1 reason=1
2013-03-24 04:58:38.834+0000: 13348: debug : virLXCProcessStop:751 :
VM 'testdeb' not active
2013-03-24 04:58:38.834+0000: 13348: debug : virLXCMonitorDispose:200
: mon=0x7f3994004850
2013-03-24 04:58:38.835+0000: 13348: debug :
virLXCProcessAutoDestroyRun:122 : conn=0x7f399c000ce0


# tail -n 16 /var/log/libvirt/lxc/testdeb.log
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountBasicFS:589
: Processing sysfs -> /sys
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountBasicFS:606
: Mount sysfs on /sys type=sysfs flags=1021, opts=(null)
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountBasicFS:630
: Mount devfs on /dev type=tmpfs flags=2, opts=mode=755,size=65536
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountBasicFS:642 : rc=0
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1896
: Mounting cgroups at '/sys/fs/cgroup'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/cpuset'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/cpu'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/cpuacct'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/memory'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/devices'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/freezer'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/blkio'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountCGroups:1931
: Create mount point '/sys/fs/cgroup/net_prio'
2013-03-24 04:58:38.701+0000: 1: debug : lxcContainerMountFSDevPTS:696
: Trying to move /.oldroot//var/run/libvirt/lxc/testdeb.devpts to
/dev/pts
2013-03-24 04:58:38.701+0000: 1: error : lxcContainerMountFSDevPTS:702
: Failed to mount /.oldroot//var/run/libvirt/lxc/testdeb.devpts on
/dev/pts: No such file or directory
2013-03-24 04:58:38.702+0000: 13814: error : virLXCControllerRun:1475
: error receiving signal from container: Input/output error
error receiving signal from container: Input/output error

-- 
Doug Goldstein


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]