LoginSignup
0
0

Ubuntu Server 22.04.3 LTSをKVMで動かしてみた

Last updated at Posted at 2023-10-27

はじめに

Ubuntu Server 20.04.6 LTSのKVMで、Ubuntu Server 22.04.3 LTSを動かしたときのメモです。

参考にしたサイト

環境

ホストOS

  • Ubuntu Server 20.04.6 LTS

ゲストOS

  • Ubuntu Server 22.04.3 LTS

実行したコマンド

virt-install \
--name ubuntu22-41 \
--hvm \
--virt-type kvm \
--ram 16384 \
--vcpus 16 \
--arch x86_64 \
--os-type linux \
--disk /home/user/kvm/ubuntu22-41/ubuntu22-41.qcow2 \
--network bridge=virbr0 \
--graphics none \
--serial pty \
--console pty \
--location /home/user/linux/cd/ubuntu-22.04.3-live-server-amd64.iso,kernel=casper/vmlinuz,initrd=casper/initrd \
--extra-args "console=ttyS0"
  • GUIを入れていない環境なので、--graphics noneを指定しています。

さいごに

Couldn't find hvm kernel for Ubuntu tree.というエラーが出ていたのですが、--locationの末尾にkernel=casper/vmlinuz,initrd=casper/initrdを指定することで起動できました。

余談

実は、過去にCentOS 7.9をホストOSとしてUbuntu Server 22.04を動かそうとして失敗していました。その時は代替手段として、Cloud Image使っていました。

もしくは、20.04のLegacyイメージでインストールして、22.04にアップグレードしていました。

「新しい酒は新しい革袋に盛れ」じゃないけど、ゲストOSとしてUbuntuを動かしたければ、ホストOSもUbuntuにしとけってことですかね…?

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0