linux:virtual_machine_install
文書の過去の版を表示しています。
Kernel-based Virtual Machine
仮想マシンの作成
ubuntu server 20.04インストール
- ハードディスクイメージの作成
$ qemu-img create -f qcow2 images/template.qcow2 80G Formatting 'images/template.qcow2', fmt=qcow2 size=85899345920 cluster_size=65536 lazy_refcounts=off refcount_bits=16
virt-installとローカル VNC クライアントを用いてインストール$ virt-install \ > --name=template \ > --disk=images/template.qcow2,bus=virtio \ > --vcpus=2 --ram=2048 \ > --graphics vnc,password=*******,listen=0.0.0.0,keymap=ja \ > --cdrom iso/ubuntu-20.04.2-live-server-amd64.iso WARNING Graphics requested but DISPLAY is not set. Not running virt-viewer. WARNING No console to launch for the guest, defaulting to --wait -1 Starting install... Domain installation still in progress. Waiting for installation to complete.
- ローカル VNC クライアントの起動


- テキストベースのインストーラの指示に従ってインストール
===== OSのアップデート =====
<code sh>
Domain has shutdown. Continuing.
Domain creation completed.
Restarting guest.
$
</code>
<code sh>
osinfo-query' not found, but can be installed with:
sudo apt install libosinfo-bin
kimi@sstw:~$ sudo apt install libosinfo-bin
</code>
===== コンソールの有効化 =====
<file txt /etc/default/grub>
GRUB_CMDLINE_LINUX=“console=tty0 console=ttyS0,115200n8”
GRUB_CMDLINE_LINUX_DEFAULT=“console=tty0 console=ttyS0,115200n8”
GRUB_TERMINAL=“console serial”
</file>
<code sh>
$ sudo update-grub
</code>
<code sh>
$ virsh list
Id Name State
————————–
17 template running
kimi@sstw:~Connected to domain template
Escape character is ^]
template login:
</code>
<code sh>
$ virsh list
Id Name State
————————–
17 template running
kimi@sstw:~Connected to domain template
Escape character is ^]
template login:
</code>
linux/virtual_machine_install.1660809834.txt.gz · 最終更新: (外部編集)