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
    • 最新
    • 标签
主页 / server / 问题 / 1043798
Accepted
Codejoy
Codejoy
Asked: 2020-11-25 13:33:44 +0800 CST2020-11-25 13:33:44 +0800 CST 2020-11-25 13:33:44 +0800 CST

物理机重新启动后无法 virsh 启动我的 VM。错误仅支持单个 IDE 控制器?

  • 772

我有一个在 kvm 下运行的虚拟机(它是一个 .img 文件),它运行的服务器严重崩溃并重新启动,最后终于搞定了……我想我跑了

yum install -y qemu-kvm

我确信在一个非常古老的未更新操作系统上更新了很多东西。这台机器死后我遇到了问题,因为它看到 vm 像 KVM 本身一样在那里(图像文件在那里,但它们没有在任何地方“注册”)。不知道我是怎么把它找回来的,但是所有的 VMS 都启动了 virsh 但是一个......它给出了一个错误:

[root@sdss4-server1 ~]# virsh start sdss-host2
setlocale: No such file or directory
error: Failed to start domain sdss-host2
error: unsupported configuration: Only a single IDE controller is supported for this machine type

我的文件损坏了吗?我可以修理它吗?我很乐意让这个虚拟机再次运行,因为没有备份,并且一些数据需要从它中取出。(我以为我可以以某种方式在 linux 中挂载 .img 文件?但我尝试了以下方法)

kpartx -av sdsshost2.img
add map loop0p1 (253:2): 0 208782 linear /dev/loop0 63
add map loop0p2 (253:3): 0 10490445 linear /dev/loop0 208845
device-mapper: resume ioctl on loop0p3  failed: Invalid argument
create/reload failed on loop0p3
add map loop0p3 (0:0): 0 62916711 linear /dev/loop0 10699290


[root@sdss4-server1 vm-cache]# sudo mount /dev/mapper/loop0p2 /mnt/host2
mount: unknown filesystem type 'swap'

[root@sdss4-server1 vm-cache]# sudo mount /dev/mapper/loop0p1 /mnt/host2

(I think this is a boot and the files in it are:)


System.map                      initrd-2.4.21-27.0.2.EL.img             vmlinux-2.4.21-27.0.2.ELsmp
System.map-2.4.21-27.0.2.EL     initrd-2.4.21-27.0.2.ELsmp.img          vmlinux-2.4.21-32.0.1.EL
System.map-2.4.21-27.0.2.ELsmp  initrd-2.4.21-32.0.1.EL.img             vmlinux-2.4.21-32.0.1.ELsmp
System.map-2.4.21-32.0.1.EL     initrd-2.4.21-32.0.1.ELsmp.3w-9xxx.img  vmlinuz-2.4.21-27.0.2.EL
System.map-2.4.21-32.0.1.ELsmp  initrd-2.4.21-32.0.1.ELsmp.img          vmlinuz-2.4.21-27.0.2.ELsmp
config-2.4.21-27.0.2.EL         initrd-2.4.21-52.ELBOOT.img             vmlinuz-2.4.21-32.0.1.EL
config-2.4.21-27.0.2.ELsmp      kernel.h                                vmlinuz-2.4.21-32.0.1.ELsmp
config-2.4.21-32.0.1.EL         message                                 vmlinuz-2.4.21-52.ELBOOT
config-2.4.21-32.0.1.ELsmp      message.ja
grub                            vmlinux-2.4.21-27.0.2.EL

当然不是我想要的,看起来 loop0p3 是我想要安装的,但是 kpartx 给出了一个我不完全理解的错误。

那么我的虚拟驱动器/磁盘坏了吗?我能做些什么来恢复这个如何?

主机定义文件:

<domain type='kvm'>
  <name>sdss-host2</name>
  <uuid>36637cc5-63a1-4485-9a41-31afafb352dd</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <hugepages/>
  </memoryBacking>
  <vcpu placement='static' cpuset='21'>1</vcpu>
  <cputune>
    <emulatorpin cpuset='21'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>coreduo</model>
    <vendor>Intel</vendor>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/vm-cache/sdsshost2.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sdi'/>
      <target dev='hdb' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='piix3-uhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='ide' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='direct'>
      <mac address='52:54:00:2d:d1:ee'/>
      <source dev='enp4s0f0' mode='vepa'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='vga' vram='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>
centos kvm-virtualization qemu kpartx
  • 1 1 个回答
  • 944 Views

1 个回答

  • Voted
  1. Best Answer
    Michael Hampton
    2020-11-25T19:24:56+08:002020-11-25T19:24:56+08:00

    有趣的。您确实定义了两个 IDE 控制器,但两个虚拟驱动器都使用第一个。您应该能够安全地移除第二个 IDE 控制器。

    具体来说,这个节点应该被删除:

        <controller type='ide' index='1'>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </controller>
    
    • 1

相关问题

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 使用 crontab 和 /etc/cron.hourly,daily,weekly 的区别

  • 持续监控许多服务器运行状况的简单方法?

  • Hudson 无法在 tomcat5 中启动

  • CentOS 的依赖挑战

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