それマグで!

知識はカップより、マグでゆっくり頂きます。 takuya_1stのブログ

習慣に早くから配慮した者は、 おそらく人生の実りも大きい。

virt-install のos varian が unknown で怒られたときに、OSをインストールするときの名前を調べたい

osinfo-query

virt-install のos variant が unknown で怒られたときに、OSをインストールするときの名前を調べたい

$ virt-install  --os-variant ubuntu 
ERROR    Unknown OS name 'ubuntu'. See `osinfo-query os` for valid values.

名前がわからない・・・・どうしたらいいいのか

コマンドで調べることができる

コマンドで調べる

$ osinfo-query os

コマンドのインストール

通常のままだと、コマンドが存在しないので、インストールする必要があった。

takuya@:~$ apt-file search osinfo-query
libosinfo-bin: /usr/bin/osinfo-query
libosinfo-bin: /usr/share/man/man1/osinfo-query.1.gz

インストール

sudo apt install  libosinfo-bin

実行例

実行してみると、次のようにデータが出てくる。

takuya@:~$ osinfo-query os
Short ID        | Name                    | Version  | ID
-----------------+-------------------------+----------+-----------------------------------------
alpinelinux3.10 | Alpine Linux 3.10       | 3.10     | http://alpinelinux.org/alpinelinux/3.10
alpinelinux3.11 | Alpine Linux 3.11       | 3.11     | http://alpinelinux.org/alpinelinux/3.11
alpinelinux3.12 | Alpine Linux 3.12       | 3.12     | http://alpinelinux.org/alpinelinux/3.12
alpinelinux3.13 | Alpine Linux 3.13       | 3.13     | http://alpinelinux.org/alpinelinux/3.13
android-x86-8.1 | Android-x86 8.1         | 8.1      | http://android-x86.org/android-x86/8.1
android-x86-9.0 | Android-x86 9.0         | 9.0      | http://android-x86.org/android-x86/9.0
archlinux       | Arch Linux              |      
centos6.9       | CentOS 6.9              | 6.9      | http://centos.org/centos/6.9
centos7.0       | CentOS 7                | 7        | http://centos.org/centos/7.0
centos8         | CentOS 8                | 8        | http://centos.org/centos/8
cirros0.3.0     | CirrOS 0.3.0            | 0.3.0    | http://cirros-cloud.net/cirros/0.3.0
debian7         | Debian 7                | 7        | http://debian.org/debian/7
debian8         | Debian 8                | 8        | http://debian.org/debian/8
debian9         | Debian 9                | 9        | http://debian.org/debian/9
debiantesting   | Debian testing          | testing  | http://debian.org/debian/testing
freebsd9.0      | FreeBSD 9.0             | 9.0      | http://freebsd.org/freebsd/9.0
freebsd9.1      | FreeBSD 9.1             | 9.1      | http://freebsd.org/freebsd/9.1
freebsd9.2      | FreeBSD 9.2             | 9.2      | http://freebsd.org/freebsd/9.2
freebsd9.3      | FreeBSD 9.3             | 9.3      | http://freebsd.org/freebsd/9.3
freedos1.2      | FreeDOS 1.2             | 1.2      | http://freedos.org/freedos/1.2
ubuntu17.10     | Ubuntu 17.10            | 17.10    | http://ubuntu.com/ubuntu/17.10
ubuntu18.04     | Ubuntu 18.04 LTS        | 18.04    | http://ubuntu.com/ubuntu/18.04
ubuntu18.10     | Ubuntu 18.10            | 18.10    | http://ubuntu.com/ubuntu/18.10
ubuntu19.04     | Ubuntu 19.04            | 19.04    | http://ubuntu.com/ubuntu/19.04
ubuntu19.10     | Ubuntu 19.10            | 19.10    | http://ubuntu.com/ubuntu/19.10
ubuntu20.04     | Ubuntu 20.04            | 20.04    | http://ubuntu.com/ubuntu/20.04
ubuntu20.10     | Ubuntu 20.10            | 20.10    | http://ubuntu.com/ubuntu/20.10
win10           | Microsoft Windows 10    | 10.0     | http://microsoft.com/win/10
win7            | Microsoft Windows 7     | 6.1      | http://microsoft.com/win/7
winvista        | Microsoft Windows Vista | 6.0      | http://microsoft.com/win/vista
winxp           | Microsoft Windows XP    | 5.1      | http://microsoft.com/win/xp
takuya@:~$

参考資料

http://ossfan.net/setup/kvm-08.html