你好(我是新手),
我有一台在裸机上运行 Ubuntu 18.04.1 服务器的服务器。我正尝试使用 virt-install 启动虚拟机。这适用于 14.04 和 16.04,但我尝试使用 18.04 或 18.10 时完全失败。我的安装已完全更新。我正在尝试运行一些 Alpha 版本的软件,因此需要虚拟机,而它恰好需要版本 18(我被告知)。
ziggidy@zeus:~/ISOs$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
ziggidy@zeus:~/ISOs$
这是我用来启动虚拟机的语法。我有 2 台虚拟机运行 14.04,几个月来没有出现任何问题,所以这些虚拟机运行良好。我不确定错误是什么,但我已经运行 wget 几次直接从 Ubuntu 获取版本 18 ISO,不确定问题是否出在 ISO 上。
18.04 版本的问题
ziggidy@zeus:~/ISOs$ sudo virt-install \
> --name Hermes \
> --description "Bedrock Minecraft VM" \
> --os-type=Linux \
> --os-variant=ubuntu18.04 \
> --ram=2048 \
> --vcpus=2 \
> --disk path=/home/ziggidy/VMs/Drive2/Hermes.img,bus=virtio,size=50 \
> --network bridge:br0 \
> --graphics none \
> --location /home/ziggidy/ISOs/ubuntu-18.04.1-live-server-amd64.iso \
> --extra-args console=ttyS0
Starting install...
Retrieving file .treeinfo... | 0 B 00:00:00
Retrieving file content... | 0 B 00:00:00
Retrieving file info... | 70 B 00:00:00
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 Hermes
otherwise, please restart your installation.
ziggidy@zeus:~/ISOs$
尝试 18.10 服务器时出现相同错误
ziggidy@zeus:~/ISOs$ sudo virt-install \
> --name Hermes \
> --description "Bedrock Minecraft VM" \
> --os-type=Linux \
> --os-variant=ubuntu18.10 \
> --ram=2048 \
> --vcpus=2 \
> --disk path=/home/ziggidy/VMs/Drive2/Hermes.img,bus=virtio,size=50 \
> --network bridge:br0 \
> --graphics none \
> --location /home/ziggidy/ISOs/ubuntu-18.10-live-server-amd64.iso \
> --extra-args console=ttyS0
Starting install...
Retrieving file .treeinfo... | 0 B 00:00:00
Retrieving file content... | 0 B 00:00:00
Retrieving file info... | 68 B 00:00:00
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 Hermes
otherwise, please restart your installation.
ziggidy@zeus:~/ISOs$
16.04 版没有任何问题
ziggidy@zeus:~/ISOs$ sudo virt-install \
> --name Hermes \
> --description "Bedrock Minecraft VM" \
> --os-type=Linux \
> --os-variant=ubuntu16.04 \
> --ram=2048 \
> --vcpus=2 \
> --disk path=/home/ziggidy/VMs/Drive2/Hermes.img,bus=virtio,size=50 \
> --network bridge:br0 \
> --graphics none \
> --location /home/ziggidy/ISOs/ubuntu-16.04.5-server-amd64.iso \
> --extra-args console=ttyS0
Starting install...
Retrieving file .treeinfo... | 0 B 00:00:00
Retrieving file content... | 0 B 00:00:00
Retrieving file info... | 67 B 00:00:00
Retrieving file vmlinuz... | 6.8 MB 00:00:00
Retrieving file initrd.gz... | 14 MB 00:00:00
^CDomain install interrupted.
Installation aborted at user request
ziggidy@zeus:~/ISOs$