Hyper-V 中的 Docker 中的 KVM

Hyper-V 中的 Docker 中的 KVM

用例是 Cuckoo 沙盒,这是一种在隔离环境中测试恶意软件的方法。Cuckoo 在 Ubuntu VM 中的 Docker 容器中运行,而 Ubuntu VM 又由 Hyper-V 管理。

在这个 Docker 容器中,Cuckoo 使用 KVM“动态”创建新的 Windows VM。但它不起作用。

当尝试在 Docker 容器内使用此 KVM 手动启动 Windows VM(使用 virsh start win7vm)时,Docker 容器内会显示以下错误:

> root@0a25149f706c:/var/log/libvirt# cat libvirtd.log 2019-11-05
> 10:54:56.137+0000: 5201: info : libvirt version: 4.0.0, package:
> 1ubuntu8.13 (Christian Ehrhardt <[email protected]>
> Wed, 21 Aug 2019 11:08:                           29 +0200) 2019-11-05
> 10:54:56.137+0000: 5201: info : hostname: 634d767f325e 2019-11-05
> 10:54:56.137+0000: 5201: error : virDBusGetSystemBus:109 : internal
> error: Unable to get DBus system bus connection: Failed to connect to
> socket /var/run/d                           bus/system_bus_socket: No
> such file or directory 2019-11-05 10:54:56.137+0000: 5201: error :
> dnsmasqCapsRefreshInternal:741 : Cannot check dnsmasq binary
> /usr/sbin/dnsmasq: No such file or directory 2019-11-05
> 10:54:56.210+0000: 5201: error : virFirewallValidateBackend:193 :
> direct firewall backend requested, but /sbin/ebtables is not
> available: No such file or d                           irectory
> 2019-11-05 10:54:56.210+0000: 5201: error : virFirewallApply:916 :
> internal error: Failed to initialize a valid firewall backend
> 2019-11-05 10:54:57.768+0000: 5201: error : virSysinfoReadX86:1032 :
> internal error: Failed to find path for dmidecode binary 2019-11-05
> 10:54:57.768+0000: 5201: error : virSysinfoReadX86:1032 : internal
> error: Failed to find path for dmidecode binary 2019-11-05
> 10:54:57.780+0000: 5201: error : virNodeSuspendSupportsTarget:336 :
> internal error: Cannot probe for supported suspend types 2019-11-05
> 10:54:57.780+0000: 5201: warning : virQEMUCapsInit:1224 : Failed to
> get host power management capabilities 2019-11-05 10:54:59.525+0000:
> 5201: error : virNodeSuspendSupportsTarget:336 : internal error:
> Cannot probe for supported suspend types 2019-11-05 10:54:59.525+0000:
> 5201: warning : umlCapsInit:76 : Failed to get host power management
> capabilities 2019-11-05 10:54:59.525+0000: 5201: error :
> virNetDevBridgeCreate:484 : error creating bridge interface virbr0:
> Operation not permitted 2019-11-08 13:19:45.472+0000: 59: info :
> libvirt version: 4.0.0, package: 1ubuntu8.13 (Christian Ehrhardt
> <[email protected]> Wed, 21 Aug 2019 11:08:29          
> +0200) 2019-11-08 13:19:45.472+0000: 59: info : hostname: 0a25149f706c 2019-11-08 13:19:45.472+0000: 59: error :
> dnsmasqCapsRefreshInternal:741 : Cannot check dnsmasq binary
> /usr/sbin/dnsmasq: No such file or directory 2019-11-08
> 13:19:45.476+0000: 59: error : virFirewallValidateBackend:193 : direct
> firewall backend requested, but /sbin/ebtables is not available: No
> such file or dir                           ectory 2019-11-08
> 13:19:45.476+0000: 59: error : virFirewallApply:916 : internal error:
> Failed to initialize a valid firewall backend 2019-11-08
> 13:19:45.478+0000: 59: error : virSysinfoReadX86:1032 : internal
> error: Failed to find path for dmidecode binary 2019-11-08
> 13:19:45.478+0000: 59: error : virSysinfoReadX86:1032 : internal
> error: Failed to find path for dmidecode binary 2019-11-08
> 13:19:45.490+0000: 59: error : virNodeSuspendSupportsTarget:336 :
> internal error: Cannot probe for supported suspend types 2019-11-08
> 13:19:45.490+0000: 59: warning : virQEMUCapsInit:1224 : Failed to get
> host power management capabilities 2019-11-08 13:19:48.331+0000: 59:
> error : virSysinfoReadX86:1032 : internal error: Failed to find path
> for dmidecode binary 2019-11-08 13:19:48.770+0000: 59: error :
> virNodeSuspendSupportsTarget:336 : internal error: Cannot probe for
> supported suspend types 2019-11-08 13:19:48.770+0000: 59: warning :
> virLXCDriverCapsInit:90 : Failed to get host power management
> capabilities 2019-11-08 13:19:48.772+0000: 59: error :
> virNodeSuspendSupportsTarget:336 : internal error: Cannot probe for
> supported suspend types 2019-11-08 13:19:48.772+0000: 59: warning :
> umlCapsInit:76 : Failed to get host power management capabilities
> 2019-11-08 13:19:48.774+0000: 59: error : virFirewallApply:916 :
> internal error: Failed to initialize a valid firewall backend

相关内容