AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-436008

kab00m's questions

Martin Hope
kab00m
Asked: 2021-08-09 10:29:26 +0800 CST

KVM 上的 SLES 11 PV 虚拟机

  • 0

我有 SUSE 11 SP4 VM,最初它在 PV 模式下在 Xen 上工作。现在我将其移至 KVM。我常用的方法是在目标 VM 中启动任何 Linux,挂载目标操作系统的根目录,chroot 并重建 initramfs,然后将 VM 重新启动到目标操作系统。

SLES 11 SP4 似乎缺少一些东西,因为在那之后 initramfs 找不到任何 vbd 设备来挂载 root。但是,我已经设法通过 KVM 主机上的直接 qemu 命令运行它:

qemu-kvm -m 32768 -smp 8 -device virtio-net-pci,mac=42:5f:96:48:39:fa,netdev=vmnic -netdev tap,id=vmnic,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -nographic -serial mon:stdio -drive file=/dev/lvm/vm,if=none,id=drive0,format=raw  -device virtio-blk-pci,drive=drive0,scsi=off

它工作正常。

KVM 配置(与磁盘相关)如下所示:

<devices>
  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <disk type="block" device="disk">
    <driver name="qemu" type="raw" cache="none" io="native"/>
    <source dev="/dev/lvm/vm"/>
    <target dev="vda" bus="virtio"/>
    <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
  </disk>
  <controller type="pci" index="3" model="pcie-root-port">
    <model name="pcie-root-port"/>
    <target chassis="3" port="0xa"/>
    <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
  </controller>

而且我的 virt-manager 不允许我在这里进行重大更改。

我在这里可能错了,但我认为主要区别在于 PCI 设备结构,因此 initramfs 以一种方式工作,而不是另一种工作方式。我比较了 PCI 设备:

在通过 qemu 命令直接运行的 VM 上找到的设备树:

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.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 Ethernet controller: Red Hat, Inc Virtio network device
00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device

在任何其他 KVM 虚拟机(同一主机)上找到的设备树:

00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.2 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.3 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.4 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.5 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.6 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:01.7 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 01)
02:00.0 USB controller: Red Hat, Inc. QEMU XHCI Host Controller (rev 01)
03:00.0 SCSI storage controller: Red Hat, Inc. Virtio block device (rev 01)
04:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon (rev 01)
05:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG (rev 01)
08:00.0 SCSI storage controller: Red Hat, Inc. Virtio block device (rev 01)

在这里我看到了不同之处:qemu 允许将存储连接到根 PCI 主机桥,但在 KVM 中它始终连接到 QEMU PCIe 根端口。

我的问题是:

  1. SLES 11 是否可能太旧而无法支持 QEMU PCIe Root 端口?
  2. 是否可以简化 VM 配置以将存储直接附加到主机桥?
  3. 我在目标环境中重建 initramfs,不向配置文件添加任何内容。重建 initramfs 时我是否遗漏了某些东西(挂钩或驱动程序)?
linux kvm-virtualization qemu sles11
  • 1 个回答
  • 41 Views
Martin Hope
kab00m
Asked: 2021-05-22 05:10:23 +0800 CST

mtx 命令打开 HP MSL 磁带库上的邮槽

  • 2

我想通过命令行以编程方式打开磁带库。我的 HP MSL4048 有 3 个磁带邮槽和 4 个杂志,我只能从 Web 界面打开。阅读手册我知道打开邮槽或解锁杂志命令不是标准的,每个供应商可能都有自己的方法来做到这一点。有谁知道弹出 HPE MSL4048 邮槽或解锁杂志的命令?我还相信 Quantum i40 或 Sun Storagetek SL48 或 IBM TS3000 库系列具有相似的硬件,并且可能对这两种操作都有相似的命令。

我努力了:

mtx -f /dev/sg2 unlock (does nothing)
mtx -f /dev/sg4 eepos 1 transfer 32 32 (give an error)
mtx -f /dev/sg4 eepos 0 transfer 32 32 (give Source Element Address 1032 is Empty)

和之后的任何其他数字eepos。

linux tape
  • 1 个回答
  • 166 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve