ubuntu - 找不到 Ubuntu 树的 hvm 内核

标签 ubuntu centos gpu kvm

我的服务器环境是centos7.3,我想在上面安装kvm Ubuntu16.04。我的安装命令如下:

virt-install --name demo01 --ram 4096 \
--disk path=/var/lib/libvirt/images/demo01.img,size=90 \
--vcpus 2 --os-type linux --os-variant ubuntunatty \
--network bridge=br0 --graphics none --console pty,target_type=serial \ 
--location /workspace/ubuntu-16-server.iso \
--extra-args 'console=ttyS0,115200n8 serial' --host-device 04:00.0 \ 
--features kvm_hidden=on --machine q35 \

然后发生了错误:
ERROR    Couldn't find hvm kernel for Ubuntu tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start demo01
otherwise, please restart your installation.

最佳答案

Ubuntu 20.04 服务器的测试解决方案,我的额外参数为 autoinstall :

virt-install \
  --name=$VMNAME \
  --os-variant=ubuntu20.04 \
  --memory=2048 \
  --vcpus=1 \
  --network network=default \
  --disk=${IMG_PATH},cache=none,format=qcow2,bus=virtio \
  --location=/home/user/Downloads/ubuntu-20.04.3-live-server-amd64.iso,kernel=casper/vmlinuz,initrd=casper/initrd \
  --extra-args "autoinstall ds=nocloud-net;s=http://192.168.122.1:3003/" \
  --noreboot
来自 man virt-install :
Additionally, --location can take 'kernel' and 'initrd' sub options. These paths relative to the specified location URL/ISO that allow selecting specific files for kernel/initrd
           within the install tree. This can be useful if virt-install/ libosinfo doesn't know where to find the kernel in the specified --location.

           For example, if you have an ISO that libosinfo doesn't know about called my-unknown.iso, with a kernel at 'kernel/fookernel' and initrd at 'kernel/fooinitrd', you can make this
           work with:

             --location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd

关于ubuntu - 找不到 Ubuntu 树的 hvm 内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52969026/

相关文章:

python - OpenCV:从 VideoCapture 读取帧将视频推进到奇怪的错误位置

python - 使用 gtk.FileChooserDialog 选择大量文件时的平台相关性能问题

PHP 5.3.8、JSON 和 CentOS 6

python - 如何确保 PyTorch 已释放 GPU 内存?

python - 带有 moviepy 的 FFMPEG

在 Java 中创建按钮事件时发生 Java 运行时错误

firefox - Headless 中的 Selenium FirefoxDriver 出现错误

centos - 没有包 confluent-community-2.11 可用

ruby-on-rails - Varnish 缓存 http 301 302 header 位置重定向

python - Tensorflow - 在多个 GPU 上复制模型并共享变量?