SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


linux:virtual_machine_install

仮想マシンの作成

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 \
> --name=template \
> --disk=images/template.qcow2,bus=virtio \
> --vcpus=2 --ram=2048 \
> --graphics vnc,password=zbr88n,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.

Domain has shutdown. Continuing.
Domain creation completed.
Restarting guest.
$ 
osinfo-query' not found, but can be installed with:
 
sudo apt install libosinfo-bin
 
kimi@sstw:~$ sudo apt install libosinfo-bin

コンソールの有効化

/etc/default/grub
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
GRUB_TERMINAL="console serial"
$ sudo update-grub
$ virsh list
 Id   Name       State
--------------------------
 17   template   running
 
kimi@sstw:~Connected to domain template
Escape character is ^]
 
template login: 
$ virsh list
 Id   Name       State
--------------------------
 17   template   running
 
kimi@sstw:~Connected to domain template
Escape character is ^]
 
template login: 
linux/virtual_machine_install.txt · 最終更新: 2021/03/01 16:53 by kimi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki