cloudpods icon indicating copy to clipboard operation
cloudpods copied to clipboard

[求助/Help]虚机无法透传国产 燧原 GPU 算力卡。

Open callme80 opened this issue 1 year ago • 1 comments

请问当前是否支持国产 GPU 的透传?

cloud pods 版本 :3.11

宿主机操作系统版本: PRETTY_NAME="Ubuntu 22.04.1 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

vm 操作系统版本: cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.1 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

VM 透传后的 pci 设备 lspci 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] 00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) 00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) 00:03.0 Communication controller: Red Hat, Inc. Virtio console 00:04.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI 00:05.0 Ethernet controller: Red Hat, Inc. Virtio network device 00:07.0 USB controller: Red Hat, Inc. QEMU XHCI Host Controller (rev 01) 00:08.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG

虚机开机时,透传 GPU 的vm 日志: [Sat May 25 09:45:55 2024] pci 0000:00:08.0: [1000:02b2] type 00 class 0x088000 [Sat May 25 09:45:55 2024] pci 0000:00:08.0: reg 0x10: [mem 0x00000000-0x00003fff] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: reg 0x14: [mem 0x00000000-0x00ffffff] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: reg 0x18: [mem 0x00000000-0x3ffffffff 64bit pref] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: reg 0x20: [mem 0x00000000-0x03ffffff 64bit pref] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: PME# supported from D0 D3hot D3cold [Sat May 25 09:45:55 2024] pci 0000:00:08.0: BAR 2: no space for [mem size 0x400000000 64bit pref] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: BAR 2: failed to assign [mem size 0x400000000 64bit pref] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: BAR 4: assigned [mem 0x17b80000000-0x17b83ffffff 64bit pref] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: BAR 1: assigned [mem 0x80000000-0x80ffffff] [Sat May 25 09:45:55 2024] pci 0000:00:08.0: BAR 0: assigned [mem 0x81000000-0x81003fff]

虚机关机时,透传 GPU default-host 提供的日志: [info 2024-05-27 01:25:40 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 30c6d4-0dbd1b-f7e5d4 POST /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/sync (10.40.63.82:41114:compute_v2) 0.81ms [info 2024-05-27 01:25:40 workmanager.(*workerTask).Run(manager.go:99)] DelayTask complete: [info 2024-05-27 01:25:40 modules.TaskComplete(task.go:34)] Sync task 4f0a7805-0d31-4bf5-893c-4dd768a7e42a complete succ [info 2024-05-27 01:25:40 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 30c6d4-0dbd1b-16c8ee GET /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/status (10.40.63.82:41126:compute_v2) 0.27ms [info 2024-05-27 01:25:40 modules.TaskComplete(task.go:34)] Sync task c0987fc4-c6e4-4282-8a7f-bbea0d9187e7 complete succ [info 2024-05-27 01:25:55 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 417ccf POST /write?db=telegraf (192.168.110.42:46848) 14.34ms [info 2024-05-27 01:26:15 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 db102d-20230b-ae84e0 POST /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/start (10.40.63.82:53866:compute_v2) 4.54ms [info 2024-05-27 01:26:15 guestman.(*SKVMGuestInstance).allocGuestNumaCpuset(qemu-kvm.go:2857)] alloc numa cpus map[0:{[71 79 17 66 70 75 57 65 82 10 73 83 14 26 62 74 13 21 61 67 59 69 1 3 24 58 80 6 60 72 77 8 20 9 27 81 64 5 16 68 56 78 4 18 19 22 0 11 23 25 2 63 7 12 15 76] 0 false}] [info 2024-05-27 01:26:15 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:828)] Use vnc port 14 [info 2024-05-27 01:26:16 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 200571 POST /write?db=telegraf (192.168.110.45:54410) 13.86ms [warning 2024-05-27 01:26:16 guestman.(*SKVMGuestInstance).StartMonitor(qemu-kvm.go:1101)] Guest 28fe9e7f-9d92-4d1c-847b-8038c9e48b9f start monitor failed, can't get qmp monitor port or monitor path [warning 2024-05-27 01:26:16 guestman.(*SKVMGuestInstance).scriptStart(qemu-kvm.go:2308)] Guest dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) waiting monitor connect [info 2024-05-27 01:26:16 monitor.(*SBaseMonitor).connect(monitor.go:298)] Connect tcp 127.0.0.1:56114 success [info 2024-05-27 01:26:16 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:868)] VM started dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) ... [info 2024-05-27 01:26:16 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:874)] Async start server dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) success! [info 2024-05-27 01:26:16 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 4}, "package": "2023-07-20_04:06:34@buildkitsandbox@"}, "capabilities": ["oob"]}} [info 2024-05-27 01:26:16 guestman.(*SKVMGuestInstance).onMonitorConnected(qemu-kvm.go:1293)] Monitor connected ... [info 2024-05-27 01:26:16 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"qmp_capabilities"} [info 2024-05-27 01:26:16 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"query-version"} [info 2024-05-27 01:26:17 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 218c92 POST /write?db=telegraf (192.168.110.41:60618) 14.90ms [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {"qemu": {"micro": 0, "minor": 2, "major": 4}, "package": "2023-07-20_04:06:34@buildkitsandbox@"}} [info 2024-05-27 01:26:18 guestman.(*SKVMGuestInstance).onGetQemuVersion(qemu-kvm.go:1363)] Guest(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) qemu version 4.2.0 [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"info status"}} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": "VM status: paused (prelaunch)\r\n"} [info 2024-05-27 01:26:18 guestman.(*SGuestResumeTask).onConfirmRunning(guesttasks.go:1488)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: onConfirmRunning status paused (prelaunch) [error 2024-05-27 01:26:18 cgrouputils.(*CGroupTask).createTask(cgrouputils.go:275)] mkdir /sys/fs/cgroup/memory/cloudpods.hostagent/server_28fe9e7f-9d92-4d1c-847b-8038c9e48b9f_759339: no such file or directory [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"cont"} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"block_set_io_throttle drive_0 0 0 0 0 0 0"}} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716773178, "microseconds": 180350}, "event": "RESUME"} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""RESUME"", Data:map[string]interface {}{}, Timestamp:(*monitor.Timestamp)(0xc001c16040)} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"info status"}} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": ""} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": "VM status: running\r\n"} [info 2024-05-27 01:26:18 guestman.(*SGuestResumeTask).onConfirmRunning(guesttasks.go:1488)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: onConfirmRunning status running [info 2024-05-27 01:26:18 modules.TaskComplete(task.go:34)] Sync task ff0afea5-df56-4404-8d84-770de1618424 complete succ [info 2024-05-27 01:26:18 guestman.(*SKVMGuestInstance).detachStartupTask(qemu-kvm.go:1811)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: detachStartupTask [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"query-block-jobs"} [info 2024-05-27 01:26:18 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": []} [info 2024-05-27 01:26:21 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"set_password","arguments":{"password":"b5tK4rSb","protocol":"vnc"}} [info 2024-05-27 01:26:21 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:26:30 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716773190, "microseconds": 167863}, "event": "DEVICE_DELETED", "data": {"device": "dev_1b_00.0", "path": "/machine/peripheral/dev_1b_00.0"}} [info 2024-05-27 01:26:30 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""DEVICE_DELETED"", Data:map[string]interface {}{"device":"dev_1b_00.0", "path":"/machine/peripheral/dev_1b_00.0"}, Timestamp:(*monitor.Timestamp)(0xc0016de920)} [info 2024-05-27 01:26:32 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716773192, "microseconds": 664968}, "event": "NIC_RX_FILTER_CHANGED", "data": {"name": "netdev-vm4049-43", "path": "/machine/peripheral/netdev-vm4049-43/virtio-backend"}} [info 2024-05-27 01:26:32 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""NIC_RX_FILTER_CHANGED"", Data:map[string]interface {}{"name":"netdev-vm4049-43", "path":"/machine/peripheral/netdev-vm4049-43/virtio-backend"}, Timestamp:(*monitor.Timestamp)(0xc000f03760)} [info 2024-05-27 01:26:32 hostdhcp.(*SGuestDHCPServer).serveDHCPInternal(dhcpserver.go:251)] Make DHCP Reply 192.168.110.43 TO 00:22:82:87:4f:88 [info 2024-05-27 01:26:32 hostdhcp.(*SGuestDHCPServer).serveDHCPInternal(dhcpserver.go:251)] Make DHCP Reply 192.168.110.43 TO 00:22:82:87:4f:88 [info 2024-05-27 01:26:33 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 77c9cc POST /write?db=telegraf (192.168.110.40:57104) 14.38ms [info 2024-05-27 01:26:55 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 0e113c POST /write?db=telegraf (192.168.110.42:51114) 14.80ms [info 2024-05-27 01:45:33 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 57b8ed POST /write?db=telegraf (192.168.110.40:52830) 14.36ms [info 2024-05-27 01:45:42 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 a096fb-2931c1-aa348e POST /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/sync (10.40.63.82:56428:compute_v2) 0.81ms [info 2024-05-27 01:45:42 workmanager.(*workerTask).Run(manager.go:99)] DelayTask complete: [info 2024-05-27 01:45:42 modules.TaskComplete(task.go:34)] Sync task 889911dc-6b25-497b-8704-80ffd726057b complete succ [info 2024-05-27 01:45:42 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 a096fb-2931c1-faeb41 GET /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/status (10.40.63.82:56440:compute_v2) 0.28ms [info 2024-05-27 01:45:42 modules.TaskComplete(task.go:34)] Sync task f94d23eb-5880-4976-8394-c5c33f306371 complete succ [info 2024-05-27 01:45:55 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 97712a POST /write?db=telegraf (192.168.110.42:43662) 14.17ms [info 2024-05-27 01:46:04 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 200 f258b2-f20bd2-5ce16e POST /servers/28fe9e7f-9d92-4d1c-847b-8038c9e48b9f/start (10.40.63.82:60816:compute_v2) 5.65ms [info 2024-05-27 01:46:04 guestman.(*SKVMGuestInstance).allocGuestNumaCpuset(qemu-kvm.go:2857)] alloc numa cpus map[0:{[10 73 83 14 26 62 74 13 21 61 67 59 69 1 3 24 58 80 6 60 72 77 8 20 9 27 81 64 5 16 68 56 78 4 18 19 22 0 11 23 25 2 63 7 12 15 76 71 79 17 66 70 75 57 65 82] 0 false}] [info 2024-05-27 01:46:04 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:828)] Use vnc port 15 [warning 2024-05-27 01:46:05 guestman.(*SKVMGuestInstance).StartMonitor(qemu-kvm.go:1101)] Guest 28fe9e7f-9d92-4d1c-847b-8038c9e48b9f start monitor failed, can't get qmp monitor port or monitor path [warning 2024-05-27 01:46:05 guestman.(*SKVMGuestInstance).scriptStart(qemu-kvm.go:2308)] Guest dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) waiting monitor connect [info 2024-05-27 01:46:05 monitor.(*SBaseMonitor).connect(monitor.go:298)] Connect tcp 127.0.0.1:56115 success [info 2024-05-27 01:46:05 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:868)] VM started dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) ... [info 2024-05-27 01:46:05 guestman.(*SKVMGuestInstance).asyncScriptStart(qemu-kvm.go:874)] Async start server dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) success! [info 2024-05-27 01:46:06 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 4}, "package": "2023-07-20_04:06:34@buildkitsandbox@"}, "capabilities": ["oob"]}} [info 2024-05-27 01:46:06 guestman.(*SKVMGuestInstance).onMonitorConnected(qemu-kvm.go:1293)] Monitor connected ... [info 2024-05-27 01:46:06 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"qmp_capabilities"} [info 2024-05-27 01:46:06 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"query-version"} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {"qemu": {"micro": 0, "minor": 2, "major": 4}, "package": "2023-07-20_04:06:34@buildkitsandbox@"}} [info 2024-05-27 01:46:08 guestman.(*SKVMGuestInstance).onGetQemuVersion(qemu-kvm.go:1363)] Guest(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f) qemu version 4.2.0 [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"info status"}} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": "VM status: paused (prelaunch)\r\n"} [info 2024-05-27 01:46:08 guestman.(*SGuestResumeTask).onConfirmRunning(guesttasks.go:1488)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: onConfirmRunning status paused (prelaunch) [error 2024-05-27 01:46:08 cgrouputils.(*CGroupTask).createTask(cgrouputils.go:275)] mkdir /sys/fs/cgroup/memory/cloudpods.hostagent/server_28fe9e7f-9d92-4d1c-847b-8038c9e48b9f_798848: no such file or directory [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"cont"} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"block_set_io_throttle drive_0 0 0 0 0 0 0"}} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716774368, "microseconds": 543402}, "event": "RESUME"} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""RESUME"", Data:map[string]interface {}{}, Timestamp:(*monitor.Timestamp)(0xc001967dc0)} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"human-monitor-command","arguments":{"command-line":"info status"}} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": ""} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": "VM status: running\r\n"} [info 2024-05-27 01:46:08 guestman.(*SGuestResumeTask).onConfirmRunning(guesttasks.go:1488)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: onConfirmRunning status running [info 2024-05-27 01:46:08 modules.TaskComplete(task.go:34)] Sync task 615f40a6-767a-4e48-86ae-8e5050aa1466 complete succ [info 2024-05-27 01:46:08 guestman.(*SKVMGuestInstance).detachStartupTask(qemu-kvm.go:1811)]28fe9e7f-9d92-4d1c-847b-8038c9e48b9f: detachStartupTask [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"query-block-jobs"} [info 2024-05-27 01:46:08 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": []} [info 2024-05-27 01:46:11 monitor.(*QmpMonitor).write(qmp.go:260)] QMP Write dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"execute":"set_password","arguments":{"password":"WmtTT8Z5","protocol":"vnc"}} [info 2024-05-27 01:46:11 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"return": {}} [info 2024-05-27 01:46:16 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 d1f62b POST /write?db=telegraf (192.168.110.45:42100) 13.66ms [info 2024-05-27 01:46:17 appsrv.(*Application).ServeHTTP(appsrv.go:289)] dIOGtz9Ztqqttf3sbyrBrTejpu8= 204 598eac POST /write?db=telegraf (192.168.110.41:58322) 13.22ms [info 2024-05-27 01:46:19 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716774379, "microseconds": 771477}, "event": "DEVICE_DELETED", "data": {"device": "dev_1b_00.0", "path": "/machine/peripheral/dev_1b_00.0"}} [info 2024-05-27 01:46:19 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""DEVICE_DELETED"", Data:map[string]interface {}{"device":"dev_1b_00.0", "path":"/machine/peripheral/dev_1b_00.0"}, Timestamp:(*monitor.Timestamp)(0xc000df6830)} [info 2024-05-27 01:46:24 monitor.(*QmpMonitor).read(qmp.go:182)] QMP Read dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): {"timestamp": {"seconds": 1716774384, "microseconds": 679695}, "event": "NIC_RX_FILTER_CHANGED", "data": {"name": "netdev-vm4049-43", "path": "/machine/peripheral/netdev-vm4049-43/virtio-backend"}} [info 2024-05-27 01:46:24 monitor.(*QmpMonitor).watchEvent(qmp.go:252)] QMP event dc03-2204(28fe9e7f-9d92-4d1c-847b-8038c9e48b9f): QMP Event result: &monitor.Event{Event:""NIC_RX_FILTER_CHANGED"", Data:map[string]interface {}{"name":"netdev-vm4049-43", "path":"/machine/peripheral/netdev-vm4049-43/virtio-backend"}, Timestamp:(*monitor.Timestamp)(0xc0012a8970)} [info 2024-05-27 01:46:24 hostdhcp.(*SGuestDHCPServer).serveDHCPInternal(dhcpserver.go:251)] Make DHCP Reply 192.168.110.43 TO 00:22:82:87:4f:88 [info 2024-05-27 01:46:24 hostdhcp.(*SGuestDHCPServer).serveDHCPInternal(dhcpserver.go:251)] Make DHCP Reply 192.168.110.43 TO 00:22:82:87:4f:88

虚机启动后的 dmesg 日志: dmesg | grep -i pci [ 0.172399] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.190854] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.190857] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] [ 0.190859] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] [ 0.190861] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] [ 0.190863] pci_bus 0000:00: root bus resource [mem 0x80000000-0xfebfffff window] [ 0.190865] pci_bus 0000:00: root bus resource [mem 0x17c00000000-0x1800400ffff window] [ 0.190986] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 [ 0.192048] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 [ 0.192635] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 [ 0.195352] pci 0000:00:01.1: reg 0x20: [io 0xc100-0xc10f] [ 0.196545] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.196550] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.196551] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.196553] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.196763] pci 0000:00:01.2: [8086:7020] type 00 class 0x0c0300 [ 0.200507] pci 0000:00:01.2: reg 0x20: [io 0xc0c0-0xc0df] [ 0.201555] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 [ 0.201986] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI [ 0.201997] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB [ 0.202816] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 [ 0.204752] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref] [ 0.207489] pci 0000:00:02.0: reg 0x18: [mem 0xfc058000-0xfc058fff] [ 0.214415] pci 0000:00:02.0: reg 0x30: [mem 0xfc040000-0xfc04ffff pref] [ 0.214467] pci 0000:00:02.0: BAR 0: assigned to efifb [ 0.214491] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] [ 0.215334] pci 0000:00:03.0: [1af4:1003] type 00 class 0x078000 [ 0.216388] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc03f] [ 0.217413] pci 0000:00:03.0: reg 0x14: [mem 0xfc059000-0xfc059fff] [ 0.227024] pci 0000:00:03.0: reg 0x20: [mem 0x18004000000-0x18004003fff 64bit pref] [ 0.229165] pci 0000:00:04.0: [1af4:1004] type 00 class 0x010000 [ 0.230193] pci 0000:00:04.0: reg 0x10: [io 0xc040-0xc07f] [ 0.231201] pci 0000:00:04.0: reg 0x14: [mem 0xfc05a000-0xfc05afff] [ 0.234250] pci 0000:00:04.0: reg 0x20: [mem 0x18004004000-0x18004007fff 64bit pref] [ 0.238643] pci 0000:00:05.0: [1af4:1000] type 00 class 0x020000 [ 0.239512] pci 0000:00:05.0: reg 0x10: [io 0xc080-0xc0bf] [ 0.240329] pci 0000:00:05.0: reg 0x14: [mem 0xfc05b000-0xfc05bfff] [ 0.242517] pci 0000:00:05.0: reg 0x20: [mem 0x18004008000-0x1800400bfff 64bit pref] [ 0.243295] pci 0000:00:05.0: reg 0x30: [mem 0xfc000000-0xfc03ffff pref] [ 0.244591] pci 0000:00:06.0: [1000:02b2] type 00 class 0x120000 [ 0.384296] pci 0000:00:06.0: reg 0x10: [mem 0xfc050000-0xfc053fff] [ 0.384364] pci 0000:00:06.0: reg 0x14: [mem 0xfb000000-0xfbffffff] [ 0.384457] pci 0000:00:06.0: reg 0x18: [mem 0x17c00000000-0x17fffffffff 64bit pref] [ 0.384538] pci 0000:00:06.0: reg 0x20: [mem 0x18000000000-0x18003ffffff 64bit pref] [ 0.385133] pci 0000:00:06.0: PME# supported from D0 D3hot [ 0.386204] pci 0000:00:07.0: [1b36:000d] type 00 class 0x0c0330 [ 0.386643] pci 0000:00:07.0: reg 0x10: [mem 0xfc054000-0xfc057fff 64bit] [ 0.389111] pci 0000:00:08.0: [1af4:1005] type 00 class 0x00ff00 [ 0.389700] pci 0000:00:08.0: reg 0x10: [io 0xc0e0-0xc0ff] [ 0.391897] pci 0000:00:08.0: reg 0x20: [mem 0x1800400c000-0x1800400ffff 64bit pref] [ 0.414524] pci 0000:00:02.0: vgaarb: setting as boot VGA device [ 0.414524] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.414524] pci 0000:00:02.0: vgaarb: bridge control possible [ 0.414653] PCI: pci_cache_line_size set to 64 bytes [ 0.436402] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 0.436405] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 0.436407] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 0.436409] pci_bus 0000:00: resource 7 [mem 0x80000000-0xfebfffff window] [ 0.436411] pci_bus 0000:00: resource 8 [mem 0x17c00000000-0x1800400ffff window] [ 0.436448] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.436459] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.436470] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.477413] pci 0000:00:01.2: quirk_usb_early_handoff+0x0/0x160 took 39966 usecs [ 0.519605] pci 0000:00:07.0: quirk_usb_early_handoff+0x0/0x160 took 41123 usecs [ 0.695640] ehci-pci: EHCI PCI platform driver [ 0.695660] ohci-pci: OHCI PCI platform driver [ 1.638775] input: QEMU QEMU USB Keyboard as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input5 [ 3.271794] input: QEMU QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-2/1-2.1/1-2.1:1.0/0003:0627:0001.0002/input/input6

透传设备信息:

image

lspci -nv -s 1b:00.0 1b:00.0 1200: 1e36:8001 (rev 01) Subsystem: 1e36:8001 Physical Slot: 6 Flags: fast devsel, NUMA node 0, IOMMU group 288 Memory at d7000000 (32-bit, non-prefetchable) [disabled] [size=16K] Memory at d6000000 (32-bit, non-prefetchable) [disabled] [size=16M] Memory at 27800000000 (64-bit, prefetchable) [disabled] [size=16G] Memory at 27c00000000 (64-bit, prefetchable) [disabled] [size=64M] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+ Capabilities: [70] Express Endpoint, MSI 00 Capabilities: [b0] MSI-X: Enable- Count=8 Masked- Capabilities: [100] Advanced Error Reporting Capabilities: [148] Secondary PCI Express Capabilities: [178] Physical Layer 16.0 GT/s > Capabilities: [1a8] Lane Margining at the Receiver > Capabilities: [1f0] Readiness Time Reporting > Capabilities: [1fc] Vendor Specific Information: ID=0002 Rev=4 Len=100 > Capabilities: [2fc] Vendor Specific Information: ID=0001 Rev=1 Len=038 > Capabilities: [334] Data Link Feature > Capabilities: [340] Physical Resizable BAR Kernel driver in use: vfio-pci

callme80 avatar May 27 '24 01:05 callme80

@callme80 这个不一定能支持,建议先问一下设备厂商对透传有什么要求

wanyaoqi avatar May 27 '24 02:05 wanyaoqi

If you do not provide feedback for more than 37 days, we will close the issue and you can either reopen it or submit a new issue.

您超过 37 天未反馈信息,我们将关闭该 issue,如有需求您可以重新打开或者提交新的 issue。

github-actions[bot] avatar Jul 04 '24 02:07 github-actions[bot]