virt-install - 找不到 Red Hat Enterprise Linux 树的 hvm 内核

virt-install - 找不到 Red Hat Enterprise Linux 树的 hvm 内核

我正在尝试通过 CLI 在 Debian 9 上安装带有 Cisco ISE 2.1 的虚拟机(KVM)。

这是我的脚本

virt-install --arch=x86_64 --name=ise21 --disk path=/var/lib/libvirt/images/ise/ise21.qcow2 --ram=6144 --cpu=host --os-type=linux --hvm --virt-type=kvm --os-variant=rhel6 --location=/opt/ise-2.1.0.474.SPA.x86_64.iso --network bridge=br0 --graphics vnc,password=heslo123,listen=0.0.0.0 --debug

当我使用 --debug 运行它时我得到这个输出

[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (cli:258) Launched with command line: /usr/share/virt-manager/virt-install --arch=x86_64 --name=ise21 --disk path=/var/lib/libvirt/images/ise/ise21.qcow2 --ram=6144 --cpu=host --os-type=linux --hvm --virt-type=kvm --os-variant=rhel6 --location=/opt/ise-2.1.0.474.SPA.x86_64.iso --network bridge=br0 --graphics vnc,password=heslo123,listen=0.0.0.0 --debug
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (cli:268) Requesting libvirt URI default
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (cli:272) Received libvirt URI qemu:///system
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (virt-install:358) Requesting virt method 'hvm', hv type 'kvm'.
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (virt-install:582) Received virt method 'kvm'
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (virt-install:583) Hypervisor name is 'hvm'
[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (virt-install:270) Distilled --network options: ['bridge=br0']

[Fri, 15 Dec 2017 14:01:13 virt-install 1928] DEBUG (virt-install:183) Distilled --disk options: ['path=/var/lib/libvirt/images/ise/ise21.qcow2']
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (guest:241) Setting Guest.os_variant to 'rhel6'
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] WARNING (cli:493) Graphics requested but DISPLAY is not set. Not running virt-viewer.
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] WARNING (virt-install:678) No console to launch for the guest, defaulting to --wait -1
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (virt-install:685) Guest.has_install_phase: True

Starting install...
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:57) Using scratchdir=/var/lib/libvirt/boot
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:302) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.ytUP3J
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:312) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/opt/ise-2.1.0.474.SPA.x86_64.iso', '/var/lib/libvirt/boot/virtinstmnt.ytUP3J']
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:477) Finding distro store for location=/opt/ise-2.1.0.474.SPA.x86_64.iso
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:499) Prioritizing distro store=<class 'virtinst.urlfetcher.RHELDistro'>
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.ytUP3J/Server) returning True
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:512) Detected distro name=Red Hat Enterprise Linux osvariant=rhel5
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.ytUP3J/images/pxeboot/vmlinuz) returning False
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (urlfetcher:326) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.ytUP3J
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (cli:307)   File "/usr/share/virt-manager/virt-install", line 996, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 990, in main
    start_install(guest, options)
  File "/usr/share/virt-manager/virt-install", line 716, in start_install
    fail(e, do_exit=False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 307, in fail
    logging.debug("".join(traceback.format_stack()))

[Fri, 15 Dec 2017 14:01:14 virt-install 1928] ERROR (cli:308) Couldn't find hvm kernel for Red Hat Enterprise Linux tree.
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (cli:310)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 695, in start_install
  transient=options.transient)
  File "/usr/share/virt-manager/virtinst/guest.py", line 443, in start_install
  self._prepare_install(meter, dry)
  File "/usr/share/virt-manager/virtinst/guest.py", line 303, in _prepare_install
  self.installer.prepare(self, meter)
  File "/usr/share/virt-manager/virtinst/installer.py", line 200, in prepare
  self._prepare(guest, meter)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 220, in _prepare
    self._prepare_kernel_url(guest, fetcher)
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 128, in _prepare_kernel_url
    kernel, initrd, args = store.acquireKernel(guest)
  File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 591, in acquireKernel
    {"distro": self.name, "type" : self.type})
RuntimeError: Couldn't find hvm kernel for Red Hat Enterprise Linux tree.
[Fri, 15 Dec 2017 14:01:14 virt-install 1928] DEBUG (cli:321) Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start ise21
otherwise, please restart your installation.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start ise21
otherwise, please restart your installation.

我几乎搜索了所有地方,但没有找到任何解决方案。有人能帮忙吗?谢谢

答案1

谢谢大家,而不是使用

--location=/opt/ise-2.1.0.474.SPA.x86_64.iso

我用过,效果很好

--cdrom=/opt/ise-2.1.0.474.SPA.x86_64.iso

相关内容