Jump to content

anpple

Moderators
  • Posts

    192
  • Joined

  • Last visited

Posts posted by anpple

  1. On 8/27/2024 at 5:41 AM, zhandong.yang said:

    今天,现在对docker进行自定义网络IP,结果进行ip访问或者使用域名访问时使用重新定向访问。无法使用https访问,报错原因是访问后台ip错误。如果网络模式改为都桥接,屁股出现问题,但可能造成PT流量走梯子的情况。请问大佬们,如何解决?系统版本是6.12.10

    你系统开启了SSL访问,有添加证书才可以https访问

  2. On 5/3/2024 at 8:29 PM, souldream said:

    铭凡ms -01 直通其中一个x710 网卡给虚拟机ikuai,虚拟机日志有错误提示,

    -boot strict=on \
    -device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
    -device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
    -device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
    -device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
    -device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
    -device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
    -device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
    -device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pcie.0","addr":"0x7.0x7"}' \
    -device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pcie.0","multifunction":true,"addr":"0x7"}' \
    -device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pcie.0","addr":"0x7.0x1"}' \
    -device '{"driver":"ich9-usb-uhci3","masterbus":"usb.0","firstport":4,"bus":"pcie.0","addr":"0x7.0x2"}' \
    -device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.2","addr":"0x0"}' \
    -blockdev '{"driver":"file","filename":"/mnt/cache/domains/ikuai/vdisk1.img","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
    -blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
    -device '{"driver":"virtio-blk-pci","bus":"pci.1","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk2","bootindex":1,"write-cache":"on","serial":"vdisk1"}' \
    -chardev pty,id=charserial0 \
    -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
    -chardev socket,id=charchannel0,fd=34,server=on,wait=off \
    -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
    -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
    -audiodev '{"id":"audio1","driver":"none"}' \
    -vnc 0.0.0.0:0,websocket=5700,audiodev=audio1 \
    -k en-us \
    -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \
    -device '{"driver":"vfio-pci","host":"0000:03:00.0","id":"hostdev0","bus":"pci.3","addr":"0x0"}' \
    -device '{"driver":"vfio-pci","host":"0000:04:00.0","id":"hostdev1","bus":"pci.4","addr":"0x0"}' \
    -device '{"driver":"vfio-pci","host":"0000:06:00.1","id":"hostdev2","bus":"pci.5","addr":"0x0"}' \
    -device '{"driver":"vfio-pci","host":"0000:5d:00.0","id":"hostdev3","bus":"pci.6","addr":"0x0"}' \
    -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
    -msg timestamp=on
    char device redirected to /dev/pts/1 (label charserial0)
    qxl_send_events: spice-server bug: guest stopped, ignoring
    2024-05-03T12:11:18.705228Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.705261Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -2 (No such file or directory)
    2024-05-03T12:11:18.705352Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.705357Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:18.705490Z qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:06:00.1
    Device option ROM contents are probably invalid (check dmesg).
    Skip option ROM probe with rombar=0, or load from file with romfile=
    2024-05-03T12:11:18.728467Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.728484Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:18.728691Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.728697Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:18.769172Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.769185Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:18.769303Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:18.769307Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:23.958778Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.958802Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:23.958827Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.958831Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:23.959400Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.959405Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:23.959417Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.959421Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:23.959951Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.959956Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:23.959967Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.959971Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:23.960290Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.960294Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:23.960304Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:23.960308Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.007540Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.007554Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.007681Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.007684Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.008137Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.008142Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.008263Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.008266Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.008690Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.008694Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.008808Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.008811Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.009250Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.009255Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.009366Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.009369Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.009784Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.009788Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.009906Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.009909Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)
    2024-05-03T12:11:24.057986Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.058009Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000000000, 0x800000, 0x1471d2400000) = -22 (Invalid argument)
    2024-05-03T12:11:24.058058Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
    2024-05-03T12:11:24.058063Z qemu-system-x86_64: vfio_dma_map(0x1471dd382e00, 0x382000801000, 0x7000, 0x1471e0ec7000) = -22 (Invalid argument)

    虚拟机日志.txt 9.14 kB · 1 download

    可以看到多次出现了与 VFIO_MAP_DMA 相关的错误,表明在尝试映射直通设备(如网络卡)的DMA(直接内存访问)时遇到了问题。具体错误消息为 "VFIO_MAP_DMA failed: Invalid argument" 和 "vfio_dma_map(...) = -22 (Invalid argument)",这表明参数无效或者不适当。

  3.  

    1. 检查IOMMU设置: 确保在BIOS/UEFI中启用了IOMMU (Intel VT-d 或 AMD-Vi),这是使用VFIO进行设备直通的必要条件。

    2. 内核参数: 确认Linux内核启动参数中包含了必要的IOMMU选项,如

    intel_iommu=on

    amd_iommu=on

    。对于某些特定的硬件,您可能还需要添加

    iommu=pt

    来启用透传模式,这可以减少对DMA映射的干预。

    3. 固件问题: 检查是否有网卡固件相关的问题。有时候,硬件在没有适当固件支持的情况下无法正确进行DMA操作。确认网卡固件是最新的,或尝试更换不同版本的固件。

    4. ROM文件: 如果设备的选项ROM(固件)损坏或不适用,可能会导致直通失败。你可以尝试在虚拟机配置中禁用ROM探测(通过添加

    rombar=0

    到设备配置),或者指定一个有效的ROM文件(使用

    romfile=path_to_rom

    )。

    5. 日志和系统消息: 查看系统的dmesg日志(通过运行

    dmesg | grep vfio

    )来获取更多关于问题的上下文和错误细节。这可以提供更多关于为什么DMA映射失败的线索。

    6. 硬件兼容性: 确保你的硬件完全支持VFIO和设备直通。某些硬件组合可能因为不兼容而导致问题,尤其是在使用老旧或非标准硬件时。

    7. 虚拟机配置审查: 仔细检查你的虚拟机配置文件,确保所有的PCI设备地址和总线分配是正确的。不当的设备配置可能导致资源分配问题。

     

  4. Unraid 系统在启动过程中遇到了一些 XFS 文件系统相关的 I/O 错误。这些错误通常指示有硬件问题,如磁盘故障或数据线问题,或者文件系统损坏

    依次排查:

    1.启动进入安全模式,测试稳定性

    2.检查硬盘smart看硬盘有没有报错

    3.文件系统修复,终端执行

    xfs_repair /dev/md1
    #md1为设备示例名,替换成实际

    4.检查并更换数据线

×
×
  • Create New...