DBus调试命令

查询连接名

### 查询所有连接名
# dbus-send --system --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListActivatableNames### 查询当前生效的连接名
# dbus-send --system --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames

查询连接对象路径

### 不断递归查找子节点,知道找到叶子节点
# dbus-send --system --print-reply --dest=<连接名> / org.freedesktop.DBus.Introspectable.Introspect
# dbus-send --system --print-reply --dest=<连接名> /<节点> org.freedesktop.DBus.Introspectable.Introspect

监控dbus消息

# dbus-monitor --system

实际应用

问题描述

### kolla部署openstack后虚拟机创建报错
2017-08-04 13:51:55.905+0000: 16256: error : virSystemdCreateMachine:383 : Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

分析过程

首先看下出错的对应代码

查询下对应连接

# dbus-send --system --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListActivatableNames
method return sender=org.freedesktop.DBus -> dest=:1.15 reply_serial=2array [string "org.freedesktop.DBus"string "org.freedesktop.login1"string "org.freedesktop.machine1"string "org.freedesktop.systemd1"string "org.freedesktop.import1"string "org.freedesktop.PolicyKit1"string "org.freedesktop.hostname1"string "org.freedesktop.NetworkManager"string "fi.epitest.hostap.WPASupplicant"string "org.freedesktop.timedate1"string "fi.w1.wpa_supplicant1"string "org.freedesktop.locale1"string "org.freedesktop.nm_dispatcher"]

连接是存在的,接着我们查询下对应方法

# dbus-send --system --print-reply --dest=org.freedesktop.machine1 / org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.17 -> dest=:1.16 reply_serial=2string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Peer"><method name="Ping"/><method name="GetMachineId"><arg type="s" name="machine_uuid" direction="out"/></method></interface><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="data" type="s" direction="out"/></method></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" direction="in" type="s"/><arg name="property" direction="in" type="s"/><arg name="value" direction="out" type="v"/></method><method name="GetAll"><arg name="interface" direction="in" type="s"/><arg name="properties" direction="out" type="a{sv}"/></method><method name="Set"><arg name="interface" direction="in" type="s"/><arg name="property" direction="in" type="s"/><arg name="value" direction="in" type="v"/></method><signal name="PropertiesChanged"><arg type="s" name="interface"/><arg type="a{sv}" name="changed_properties"/><arg type="as" name="invalidated_properties"/></signal></interface><node name="org/freedesktop/machine1"/><node name="org/freedesktop/machine1/image"/><node name="org/freedesktop/machine1/image/_2ehost"/><node name="org/freedesktop/machine1/machine"/>
</node>
"### 继续查询<node name="org/freedesktop/machine1"/>
# dbus-send --system --print-reply --dest=org.freedesktop.machine1 /org/freedesktop/machine1 org.freedesktop.DBus.Introspectable.Introspect
method return sender=:1.20 -> dest=:1.19 reply_serial=2string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Peer"><method name="Ping"/><method name="GetMachineId"><arg type="s" name="machine_uuid" direction="out"/></method></interface><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="data" type="s" direction="out"/></method></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" direction="in" type="s"/><arg name="property" direction="in" type="s"/><arg name="value" direction="out" type="v"/></method><method name="GetAll"><arg name="interface" direction="in" type="s"/><arg name="properties" direction="out" type="a{sv}"/></method><method name="Set"><arg name="interface" direction="in" type="s"/><arg name="property" direction="in" type="s"/><arg name="value" direction="in" type="v"/></method><signal name="PropertiesChanged"><arg type="s" name="interface"/><arg type="a{sv}" name="changed_properties"/><arg type="as" name="invalidated_properties"/></signal></interface><interface name="org.freedesktop.machine1.Manager"><method name="GetMachine"><arg type="s" direction="in"/><arg type="o" direction="out"/></method><method name="GetImage"><arg type="s" direction="in"/><arg type="o" direction="out"/></method><method name="GetMachineByPID"><arg type="u" direction="in"/><arg type="o" direction="out"/></method><method name="ListMachines"><arg type="a(ssso)" direction="out"/></method><method name="ListImages"><arg type="a(ssbttto)" direction="out"/></method><method name="CreateMachine"><arg type="s" direction="in"/><arg type="ay" direction="in"/><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="u" direction="in"/><arg type="s" direction="in"/><arg type="a(sv)" direction="in"/><arg type="o" direction="out"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="CreateMachineWithNetwork"><arg type="s" direction="in"/><arg type="ay" direction="in"/><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="u" direction="in"/><arg type="s" direction="in"/><arg type="ai" direction="in"/><arg type="a(sv)" direction="in"/><arg type="o" direction="out"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="RegisterMachine"><arg type="s" direction="in"/><arg type="ay" direction="in"/><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="u" direction="in"/><arg type="s" direction="in"/><arg type="o" direction="out"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="RegisterMachineWithNetwork"><arg type="s" direction="in"/><arg type="ay" direction="in"/><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="u" direction="in"/><arg type="s" direction="in"/><arg type="ai" direction="in"/><arg type="o" direction="out"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="KillMachine"><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="i" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="TerminateMachine"><arg type="s" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="GetMachineAddresses"><arg type="s" direction="in"/><arg type="a(iay)" direction="out"/></method><method name="GetMachineOSRelease"><arg type="s" direction="in"/><arg type="a{ss}" direction="out"/></method><method name="OpenMachinePTY"><arg type="s" direction="in"/><arg type="h" direction="out"/><arg type="s" direction="out"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="OpenMachineLogin"><arg type="s" direction="in"/><arg type="h" direction="out"/><arg type="s" direction="out"/></method><method name="RemoveImage"><arg type="s" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="RenameImage"><arg type="s" direction="in"/><arg type="s" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="CloneImage"><arg type="s" direction="in"/><arg type="s" direction="in"/><arg type="b" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><method name="MarkImageReadOnly"><arg type="s" direction="in"/><arg type="b" direction="in"/><annotation name="org.freedesktop.systemd1.Privileged" value="true"/></method><signal name="MachineNew"><arg type="s"/><arg type="o"/></signal><signal name="MachineRemoved"><arg type="s"/><arg type="o"/></signal></interface>
</node>
"

我们接着来看下dbus收到了哪些消息

# dbus-monitor --system
signal sender=org.freedesktop.DBus -> dest=:1.25 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquiredstring ":1.25"signal sender=org.freedesktop.DBus -> dest=(null destination) serial=202 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChangedstring ":1.26"string ""string ":1.26"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=208 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChangedstring "org.freedesktop.machine1"string ""string ":1.26"
signal sender=:1.0 -> dest=(null destination) serial=287 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobRemoveduint32 2797object path "/org/freedesktop/systemd1/job/2797"string "systemd-machined.service"string "done"
signal sender=:1.0 -> dest=(null destination) serial=288 path=/org/freedesktop/systemd1/unit/systemd_2dmachined_2eservice; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Service"array [dict entry(string "MainPID"variant             uint32 22125)dict entry(string "ControlPID"variant             uint32 0)dict entry(string "StatusText"variant             string "")dict entry(string "StatusErrno"variant             int32 0)dict entry(string "Result"variant             string "success")dict entry(string "ExecMainStartTimestamp"variant             uint64 1501856600666609)dict entry(string "ExecMainStartTimestampMonotonic"variant             uint64 16667635543)dict entry(string "ExecMainExitTimestamp"variant             uint64 0)dict entry(string "ExecMainExitTimestampMonotonic"variant             uint64 0)dict entry(string "ExecMainPID"variant             uint32 22125)dict entry(string "ExecMainCode"variant             int32 0)dict entry(string "ExecMainStatus"variant             int32 0)]array [string "ExecStartPre"string "ExecStart"string "ExecStartPost"string "ExecReload"string "ExecStop"string "ExecStopPost"]
signal sender=:1.0 -> dest=(null destination) serial=289 path=/org/freedesktop/systemd1/unit/systemd_2dmachined_2eservice; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Unit"array [dict entry(string "ActiveState"variant             string "active")dict entry(string "SubState"variant             string "running")dict entry(string "InactiveExitTimestamp"variant             uint64 1501856600666635)dict entry(string "InactiveExitTimestampMonotonic"variant             uint64 16667635568)dict entry(string "ActiveEnterTimestamp"variant             uint64 1501856600696439)dict entry(string "ActiveEnterTimestampMonotonic"variant             uint64 16667665373)dict entry(string "ActiveExitTimestamp"variant             uint64 0)dict entry(string "ActiveExitTimestampMonotonic"variant             uint64 0)dict entry(string "InactiveEnterTimestamp"variant             uint64 0)dict entry(string "InactiveEnterTimestampMonotonic"variant             uint64 0)dict entry(string "Job"variant             struct {uint32 0object path "/"})dict entry(string "ConditionResult"variant             boolean true)dict entry(string "AssertResult"variant             boolean true)dict entry(string "ConditionTimestamp"variant             uint64 1501856600665536)dict entry(string "ConditionTimestampMonotonic"variant             uint64 16667634470)dict entry(string "AssertTimestamp"variant             uint64 1501856600665537)dict entry(string "AssertTimestampMonotonic"variant             uint64 16667634470)]array []
signal sender=:1.0 -> dest=(null destination) serial=290 path=/org/freedesktop/systemd1/unit/systemd_2dmachined_2eservice; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Service"array [dict entry(string "MainPID"variant             uint32 22125)dict entry(string "ControlPID"variant             uint32 0)dict entry(string "StatusText"variant             string "Processing requests...")dict entry(string "StatusErrno"variant             int32 0)dict entry(string "Result"variant             string "success")dict entry(string "ExecMainStartTimestamp"variant             uint64 1501856600666609)dict entry(string "ExecMainStartTimestampMonotonic"variant             uint64 16667635543)dict entry(string "ExecMainExitTimestamp"variant             uint64 0)dict entry(string "ExecMainExitTimestampMonotonic"variant             uint64 0)dict entry(string "ExecMainPID"variant             uint32 22125)dict entry(string "ExecMainCode"variant             int32 0)dict entry(string "ExecMainStatus"variant             int32 0)]array [string "ExecStartPre"string "ExecStart"string "ExecStartPost"string "ExecReload"string "ExecStop"string "ExecStopPost"]
signal sender=:1.0 -> dest=(null destination) serial=291 path=/org/freedesktop/systemd1/unit/systemd_2dmachined_2eservice; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Unit"array [dict entry(string "ActiveState"variant             string "active")dict entry(string "SubState"variant             string "running")dict entry(string "InactiveExitTimestamp"variant             uint64 1501856600666635)dict entry(string "InactiveExitTimestampMonotonic"variant             uint64 16667635568)dict entry(string "ActiveEnterTimestamp"variant             uint64 1501856600696439)dict entry(string "ActiveEnterTimestampMonotonic"variant             uint64 16667665373)dict entry(string "ActiveExitTimestamp"variant             uint64 0)dict entry(string "ActiveExitTimestampMonotonic"variant             uint64 0)dict entry(string "InactiveEnterTimestamp"variant             uint64 0)dict entry(string "InactiveEnterTimestampMonotonic"variant             uint64 0)dict entry(string "Job"variant             struct {uint32 0object path "/"})dict entry(string "ConditionResult"variant             boolean true)dict entry(string "AssertResult"variant             boolean true)dict entry(string "ConditionTimestamp"variant             uint64 1501856600665536)dict entry(string "ConditionTimestampMonotonic"variant             uint64 16667634470)dict entry(string "AssertTimestamp"variant             uint64 1501856600665537)dict entry(string "AssertTimestampMonotonic"variant             uint64 16667634470)]array []
signal sender=:1.0 -> dest=(null destination) serial=302 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNewstring "libvirt-guests.service"object path "/org/freedesktop/systemd1/unit/libvirt_2dguests_2eservice"
signal sender=:1.0 -> dest=(null destination) serial=303 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNewstring "libvirtd.service"object path "/org/freedesktop/systemd1/unit/libvirtd_2eservice"
signal sender=:1.0 -> dest=(null destination) serial=304 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNewstring "machine-qemu\x2d2\x2dinstance\x2d00000004.scope"object path "/org/freedesktop/systemd1/unit/machine_2dqemu_5cx2d2_5cx2dinstance_5cx2d00000004_2escope"
signal sender=:1.0 -> dest=(null destination) serial=305 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobNewuint32 2895object path "/org/freedesktop/systemd1/job/2895"string "machine-qemu\x2d2\x2dinstance\x2d00000004.scope"
signal sender=:1.26 -> dest=(null destination) serial=10 path=/org/freedesktop/machine1; interface=org.freedesktop.machine1.Manager; member=MachineNewstring "qemu-2-instance-00000004"object path "/org/freedesktop/machine1/machine/qemu_2d2_2dinstance_2d00000004"
signal sender=:1.0 -> dest=(null destination) serial=306 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobRemoveduint32 2895object path "/org/freedesktop/systemd1/job/2895"string "machine-qemu\x2d2\x2dinstance\x2d00000004.scope"string "done"
signal sender=:1.0 -> dest=(null destination) serial=308 path=/org/freedesktop/systemd1/unit/machine_2dqemu_5cx2d2_5cx2dinstance_5cx2d00000004_2escope; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Scope"array [dict entry(string "Result"variant             string "success")]array []
signal sender=:1.0 -> dest=(null destination) serial=309 path=/org/freedesktop/systemd1/unit/machine_2dqemu_5cx2d2_5cx2dinstance_5cx2d00000004_2escope; interface=org.freedesktop.DBus.Properties; member=PropertiesChangedstring "org.freedesktop.systemd1.Unit"array [dict entry(string "ActiveState"variant             string "active")dict entry(string "SubState"variant             string "running")dict entry(string "InactiveExitTimestamp"variant             uint64 1501856600700114)dict entry(string "InactiveExitTimestampMonotonic"variant             uint64 16667669047)dict entry(string "ActiveEnterTimestamp"variant             uint64 1501856600700114)dict entry(string "ActiveEnterTimestampMonotonic"variant             uint64 16667669047)dict entry(string "ActiveExitTimestamp"variant             uint64 0)dict entry(string "ActiveExitTimestampMonotonic"variant             uint64 0)dict entry(string "InactiveEnterTimestamp"variant             uint64 0)dict entry(string "InactiveEnterTimestampMonotonic"variant             uint64 0)dict entry(string "Job"variant             struct {uint32 0object path "/"})dict entry(string "ConditionResult"variant             boolean true)dict entry(string "AssertResult"variant             boolean true)dict entry(string "ConditionTimestamp"variant             uint64 1501856600699722)dict entry(string "ConditionTimestampMonotonic"variant             uint64 16667668656)dict entry(string "AssertTimestamp"variant             uint64 1501856600699722)dict entry(string "AssertTimestampMonotonic"variant             uint64 16667668656)]array []

我们手动测试下列举虚拟机命令

# dbus-send --system --print-reply --dest=org.freedesktop.machine1 /org/freedesktop/machine1 org.freedesktop.machine1.Manager.ListMachines
Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

我们看下连接点org.freedesktop.machine1对应systemd-machined服务的状态

# cat /usr/lib/systemd/system/systemd-machined.service
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.[Unit]
Description=Virtual Machine and Container Registration Service
Documentation=man:systemd-machined.service(8)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/machined
Wants=machine.slice
After=machine.slice[Service]
ExecStart=/usr/lib/systemd/systemd-machined
BusName=org.freedesktop.machine1
CapabilityBoundingSet=CAP_KILL CAP_SYS_PTRACE CAP_SYS_ADMIN CAP_SETGID CAP_SYS_CHROOT CAP_DAC_READ_SEARCH
WatchdogSec=3min
PrivateTmp=yes
PrivateDevices=yes
PrivateNetwork=yes
ProtectSystem=full
ProtectHome=yes### 发现服务挂掉了,如果我们启动服务人,然后执行上面的org.freedesktop.machine1.Manager.ListMachines方法就会出现我们创建虚拟机时的消息,而且在能正常创建虚拟机的环境下,此服务也是正常启动的(没创建虚拟机前是inactive的,创建虚拟机时被启动)# systemctl status systemd-machined.service
● systemd-machined.service - Virtual Machine and Container Registration ServiceLoaded: loaded (/usr/lib/systemd/system/systemd-machined.service; static; vendor preset: disabled)Active: inactive (dead)Docs: man:systemd-machined.service(8)http://www.freedesktop.org/wiki/Software/systemd/machinedAug 04 22:23:20 localhost.localdomain systemd-machined[22125]: New machine qemu-2-instance-00000004.
Aug 04 22:23:50 localhost.localdomain systemd-machined[22125]: Machine qemu-2-instance-00000004 terminated.
Aug 04 22:45:47 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Aug 04 22:45:47 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Aug 04 22:48:00 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Aug 04 22:48:00 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Aug 04 22:56:10 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Aug 04 22:56:10 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Aug 04 22:56:10 localhost.localdomain systemd-machined[27779]: New machine qemu-3-instance-00000005.
Aug 04 22:56:40 localhost.localdomain systemd-machined[27779]: Machine qemu-3-instance-00000005 terminated.

我们再来看下服务日志

### 正常的
Aug 05 06:12:52 localhost.localdomain sudo[2938]:     nova : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/var/lib/kolla/venv/bin/nova-rootwrap /etc/nova/rootwrap.conf touch -c /var/lib/nova/i
Aug 05 06:12:55 localhost.localdomain sudo[2955]:     nova : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/var/lib/kolla/venv/bin/nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-
Aug 05 06:12:56 localhost.localdomain kernel: warning: `privsep-helper' uses deprecated v2 capabilities in a way that may be insecure.
Aug 05 06:12:56 localhost.localdomain ovs-vsctl[2967]: ovs|00001|vsctl|INFO|Called as ovs-vsctl -- --may-exist add-br br-int -- set Bridge br-int datapath_type=system
Aug 05 06:12:56 localhost.localdomain kernel: tun: Universal TUN/TAP device driver, 1.6
Aug 05 06:12:56 localhost.localdomain kernel: tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Aug 05 06:12:56 localhost.localdomain NetworkManager[743]: <info>  (tapc8d87b70-ed): new Tun device (carrier: OFF, driver: 'tun', ifindex: 8)
Aug 05 06:12:56 localhost.localdomain ovs-vsctl[2985]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port tapc8d87b70-ed -- add-port br-int tapc8d87b70-ed -- set I
Aug 05 06:12:56 localhost.localdomain kernel: device tapc8d87b70-ed entered promiscuous mode
Aug 05 06:12:56 localhost.localdomain NetworkManager[743]: <info>  (tapc8d87b70-ed): enslaved to non-master-type device ovs-system; ignoring
Aug 05 06:12:56 localhost.localdomain kernel: Netfilter messages via NETLINK v0.30.
Aug 05 06:12:56 localhost.localdomain kernel: ctnetlink v0.93: registering with nfnetlink.
Aug 05 06:12:56 localhost.localdomain NetworkManager[743]: <info>  (tapc8d87b70-ed): enslaved to non-master-type device ovs-system; ignoring
Aug 05 06:12:56 localhost.localdomain NetworkManager[743]: <info>  (tapc8d87b70-ed): link connected
Aug 05 06:12:56 localhost.localdomain dbus-daemon[736]: dbus[736]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
Aug 05 06:12:56 localhost.localdomain dbus[736]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
Aug 05 06:12:56 localhost.localdomain systemd[1]: Created slice Virtual Machine and Container Slice.
Aug 05 06:12:56 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Slice.
Aug 05 06:12:56 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Aug 05 06:12:56 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
Aug 05 06:12:56 localhost.localdomain dbus-daemon[736]: dbus[736]: [system] Successfully activated service 'org.freedesktop.machine1'
Aug 05 06:12:56 localhost.localdomain dbus[736]: [system] Successfully activated service 'org.freedesktop.machine1'
Aug 05 06:12:56 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Aug 05 06:12:56 localhost.localdomain systemd-machined[3006]: New machine qemu-1-instance-00000007.
Aug 05 06:12:56 localhost.localdomain systemd[1]: Started Virtual Machine qemu-1-instance-00000007.
Aug 05 06:12:56 localhost.localdomain systemd[1]: Starting Virtual Machine qemu-1-instance-00000007.
Aug 05 06:12:57 localhost.localdomain kvm[3011]: 1 guest now active
Aug 05 06:12:57 localhost.localdomain kernel: kvm: zapping shadow pages for mmio generation wraparound
Aug 05 06:12:57 localhost.localdomain kernel: kvm: zapping shadow pages for mmio generation wraparound### 出错的
Aug 04 23:07:34 localhost.localdomain sudo[5933]:     nova : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/var/lib/kolla/venv/bin/nova-rootwrap /etc/nova/rootwrap.conf touch -c /var/lib/nova/i
Aug 04 23:07:37 localhost.localdomain sudo[5961]:     nova : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/var/lib/kolla/venv/bin/nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-
Aug 04 23:07:38 localhost.localdomain kernel: warning: `privsep-helper' uses deprecated v2 capabilities in a way that may be insecure.
Aug 04 23:07:39 localhost.localdomain ovs-vsctl[5980]: ovs|00001|vsctl|INFO|Called as ovs-vsctl -- --may-exist add-br br-int -- set Bridge br-int datapath_type=system
Aug 04 23:07:39 localhost.localdomain kernel: tun: Universal TUN/TAP device driver, 1.6
Aug 04 23:07:39 localhost.localdomain kernel: tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Aug 04 23:07:39 localhost.localdomain NetworkManager[745]: <info>  (tap2960ed0a-bd): new Tun device (carrier: OFF, driver: 'tun', ifindex: 10)
Aug 04 23:07:39 localhost.localdomain ovs-vsctl[5992]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port tap2960ed0a-bd -- add-port br-int tap2960ed0a-bd -- set I
Aug 04 23:07:39 localhost.localdomain kernel: device tap2960ed0a-bd entered promiscuous mode
Aug 04 23:07:39 localhost.localdomain NetworkManager[745]: <info>  (tap2960ed0a-bd): enslaved to non-master-type device ovs-system; ignoring
Aug 04 23:07:39 localhost.localdomain kernel: Netfilter messages via NETLINK v0.30.
Aug 04 23:07:39 localhost.localdomain kernel: ctnetlink v0.93: registering with nfnetlink.
Aug 04 23:07:39 localhost.localdomain NetworkManager[745]: <info>  (tap2960ed0a-bd): enslaved to non-master-type device ovs-system; ignoring
Aug 04 23:07:39 localhost.localdomain NetworkManager[745]: <info>  (tap2960ed0a-bd): link connected
Aug 04 23:07:39 localhost.localdomain dbus-daemon[736]: dbus[736]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
Aug 04 23:07:39 localhost.localdomain dbus[736]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
Aug 04 23:07:39 localhost.localdomain systemd[1]: Created slice Virtual Machine and Container Slice.
Aug 04 23:07:39 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Slice.
Aug 04 23:07:39 localhost.localdomain systemd[1]: Starting Virtual Machine and Container Registration Service...
Aug 04 23:07:39 localhost.localdomain kernel: IPVS: Creating netns size=2040 id=3
Aug 04 23:07:39 localhost.localdomain kernel: SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
Aug 04 23:07:39 localhost.localdomain dbus-daemon[736]: dbus[736]: [system] Successfully activated service 'org.freedesktop.machine1'
Aug 04 23:07:39 localhost.localdomain dbus[736]: [system] Successfully activated service 'org.freedesktop.machine1'
Aug 04 23:07:39 localhost.localdomain systemd[1]: Started Virtual Machine and Container Registration Service.
Aug 04 23:07:39 localhost.localdomain systemd-machined[6002]: New machine qemu-1-instance-00000008.
Aug 04 23:07:39 localhost.localdomain systemd[1]: Started Virtual Machine qemu-1-instance-00000008.
Aug 04 23:07:39 localhost.localdomain systemd[1]: Starting Virtual Machine qemu-1-instance-00000008.
Aug 04 23:08:09 localhost.localdomain kernel: device tap2960ed0a-bd left promiscuous mode
Aug 04 23:08:09 localhost.localdomain NetworkManager[745]: <warn>  (tap2960ed0a-bd): failed to disable userspace IPv6LL address handling
Aug 04 23:08:10 localhost.localdomain systemd-machined[6002]: Machine qemu-1-instance-00000008 terminated.
Aug 04 23:08:10 localhost.localdomain ovs-vsctl[6111]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port tap2960ed0a-bd

分析上面的日志可以得出是tap出了问题导致虚拟机创建失败,查看正常环境和异常环境,发现docker版本不同,正常的是1.12.0,不正常的是1.12.5(由于时间问题,只能排查到这里)

Aug 04 23:08:09 localhost.localdomain kernel: device tap2960ed0a-bd left promiscuous mode
Aug 04 23:08:09 localhost.localdomain NetworkManager[745]: <warn>  (tap2960ed0a-bd): failed to disable userspace IPv6LL address handling
Aug 04 23:08:10 localhost.localdomain systemd-machined[6002]: Machine qemu-1-instance-00000008 terminated.
Aug 04 23:08:10 localhost.localdomain ovs-vsctl[6111]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port tap2960ed0a-bd

参考文档

DBus学习笔记
machined

转载于:https://www.cnblogs.com/silvermagic/p/7666194.html

虚拟创建失败之Dbus调试相关推荐

  1. 【VirtualBox】VirtualBox使用现有的虚拟盘文件(如VHD)创建虚拟机时,报错:打开虚拟硬盘失败,“UUID already exist”的解决方法

    ###0.问题描述 使用现有的虚拟盘文件(如VHD)创建虚拟机时,报错:打开虚拟硬盘失败,"UUID already exists"的错误. ###1.参考博客 https://w ...

  2. webmin开新网站/创建虚拟服务器失败setquota: Quota file not found

    如果你在webmin后台,开新网站/创建服务器遇到如下提示,恭喜,你找对教程了. 创建虚拟服务器失败 : setquota: Quota file not found or has wrong for ...

  3. linux——Shell脚本说明、创建、执行、调试

    一.什么是Shell shell也是操作系统中的一个软件,它包在linux内核的外面,为用户和内核之间的交互提供了一个接口,系统中的命令用shell去解释shell接收系统回应的输出并显示其到屏幕中 ...

  4. k8s中pod sandbox创建失败failed to start sandbox container

    背景 今天在k8s更新服务时,发现pod启动失败,报错failed to start sandbox container,如下所示: Events:Type Reason Age From Messa ...

  5. 记一次GI安装失败(root.sh在第一个node上失败)的调试经历

    新拿到一个c'lu'ster,尝试安装GI(grid infrastructure),root.sh在第一个node上失败了.调试过程 第一步:首先查看log 在root.sh的log里 看到如下的错 ...

  6. oracle vm virtualbox 失败,VirtualBox 打开 虚拟硬盘 失败

    如果你想修改Oracle VM VirtualBox虚拟磁盘的位置,以前最直接的把法就是把这个文件拷贝到别的地方. 但是不知从哪个版本开始,会提示错误,因为Oracle VM VirtualBox识别 ...

  7. Microsoft visual studio 2015已停止工作及项目创建失败解决方法

    Microsoft visual studio 2015已停止工作 问题明细信息 问题签名:   问题事件名称: CLR20r3   问题签名 01: devenv.exe   问题签名 02: 14 ...

  8. 为什么vs2005内置Web application server中调用COM组件时正常,在IIS中运行时组件创建失败?...

    如题. 在vs2005内置服务器中运行正常,发布到IIS中运行时出现组件创建失败的错误.错误页面如 下: 不知道有没有遇到过这种情况的兄弟?麻烦指点一二.谢谢!

  9. java poi 只能创建?,JAVA POI创建多个sheet的Excel文件,及多个sheet也创建失败原因

    最近写一个生成多个sheet页的表格,正好遇到了sheet只有一个的问题,拿出来跟大家分享下 解决问题直接下拉! import java.io.IOException; import java.uti ...

最新文章

  1. 浅谈XXE漏洞攻击与防御——本质上就是注入,盗取数据用
  2. pycharm远程开发项目
  3. C语言验证6174数学问题
  4. Spring学习之旅(四):面向切面编程(AOP)
  5. 服务器即将维护完成,新一轮大服务器即将开启:3月26日维护8小时
  6. sql azure 语法_将SQL工作负载迁移到Microsoft Azure:规划迁移
  7. 启动Tomcat 出现java.net.BindException:Address already in use:JVM_Bind
  8. python123随机密码生成器_python实例--随机密码生成器
  9. selenium爬取拉钩网数据
  10. 微信公众号答题功能搭建
  11. 用友U8案例实验实际成本后台配置
  12. 案例 | 苏州农村商业银行金融云平台支撑互联网创新业务发展
  13. Java开发学习进阶路线
  14. JetBrain系列软件的学生授权认证及认证到期重新申请授权
  15. 【LabVIEW懒人系列教程-小白入门】1.13LabVIEW程序结构之事件结构
  16. 使用FME 批量OSGB转FBX(OBJ) (亲测)
  17. 离校毕业生刚去新的陌生城市,需要提高警惕的几点
  18. riak教程 java_在Erlang(和Riak)中开发应用程序时的良好实践?
  19. python怎样使用各个日期赤纬_基于Python的天文软件命令行界面设计与实现
  20. 蓝桥杯---Cowboys---DP

热门文章

  1. 嫦.娥,名人,原生态的Blog
  2. 多线程编程核心技术总结(读周志明书籍的总结)
  3. python中for in的用法python中for in的用法
  4. 企业上云是工业互联网的前提,中国企业上云潜力巨大
  5. 【生产力工具】Surfingkeys——网页版Vim
  6. Typora+图床详解(小白都能学得会)
  7. OCR技术识别文档的技术
  8. UEFI-win10-EDK2搭建
  9. 逍遥安卓模拟器卡android,逍遥安卓模拟器卡顿如何解决
  10. 银河麒麟V10操作系统修改屏幕分辨率