HostOnNet Blog

virt-install OS variant does not exist

Looking for Linux Server Admin or WordPress Expert? We can help.

When creating virtual machine with virt-install, i get error

ERROR OS variant ‘ubuntu16.04’ does not exist in our dictionary for OS type ‘linux’

[root@server22 ubuntu_vm_1]# virt-install \
>   --import \
>   --name ubuntu_vm_1 \
>   --ram 1024 \
>   --vcpus 1 \
>   --cpu host \
>   --disk ubuntu_vm_1.qcow2,format=qcow2,bus=virtio \
>   --disk ubuntu_vm_1-cidata.iso,device=cdrom \
>   --network bridge=virbr0,model=virtio \
>   --os-type=linux \
>   --os-variant=ubuntu16.04 \
>   --graphics vnc,listen=0.0.0.0 \
>   --noautoconsole 
ERROR    OS variant 'ubuntu16.04' does not exist in our dictionary for OS type 'linux'
[root@server22 ubuntu_vm_1]#

This is because the version of libvirt installed on the server do not support OS variant ‘ubuntu16.04’.

To get list of all supported OS varient, run

virt-install --os-variant list

Example

[root@server22 ubuntu_vm_1]# virt-install --os-variant list
win7                 : Microsoft Windows 7 or later
vista                : Microsoft Windows Vista
winxp64              : Microsoft Windows XP (x86_64)
winxp                : Microsoft Windows XP
win2k                : Microsoft Windows 2000
win2k8               : Microsoft Windows Server 2008 or later
win2k3               : Microsoft Windows Server 2003
openbsd4             : OpenBSD 4.x or later
freebsd8             : FreeBSD 8.x or later
freebsd7             : FreeBSD 7.x
freebsd6             : FreeBSD 6.x
solaris9             : Sun Solaris 9
solaris10            : Sun Solaris 10 or later
opensolaris          : Sun OpenSolaris or later
netware6             : Novell Netware 6 or later
netware5             : Novell Netware 5
netware4             : Novell Netware 4
msdos                : MS-DOS
generic              : Generic
debianwheezy         : Debian Wheezy or later
debiansqueeze        : Debian Squeeze
debianlenny          : Debian Lenny
debianetch           : Debian Etch
fedora18             : Fedora 18 or later
fedora17             : Fedora 17
fedora16             : Fedora 16
fedora15             : Fedora 15
fedora14             : Fedora 14
fedora13             : Fedora 13
fedora12             : Fedora 12
fedora11             : Fedora 11
fedora10             : Fedora 10
fedora9              : Fedora 9
fedora8              : Fedora 8
fedora7              : Fedora 7
fedora6              : Fedora Core 6
fedora5              : Fedora Core 5
mageia1              : Mageia 1 or later
mes5.1               : Mandriva Enterprise Server 5.1 or later
mes5                 : Mandriva Enterprise Server 5.0
mandriva2010         : Mandriva Linux 2010 or later
mandriva2009         : Mandriva Linux 2009 or earlier
rhel7                : Red Hat Enterprise Linux 7 or later
rhel6                : Red Hat Enterprise Linux 6
rhel5.4              : Red Hat Enterprise Linux 5.4 or later
rhel5                : Red Hat Enterprise Linux 5
rhel4                : Red Hat Enterprise Linux 4
rhel3                : Red Hat Enterprise Linux 3
rhel2.1              : Red Hat Enterprise Linux 2.1
sles11               : Suse Linux Enterprise Server 11 or later
sles10               : Suse Linux Enterprise Server
opensuse12           : openSuse 12 or later
opensuse11           : openSuse 11
ubuntuquantal        : Ubuntu 12.10 (Quantal Quetzal) or later
ubuntuprecise        : Ubuntu 12.04 LTS (Precise Pangolin)
ubuntuoneiric        : Ubuntu 11.10 (Oneiric Ocelot)
ubuntunatty          : Ubuntu 11.04 (Natty Narwhal)
ubuntumaverick       : Ubuntu 10.10 (Maverick Meerkat)
ubuntulucid          : Ubuntu 10.04 LTS (Lucid Lynx)
ubuntukarmic         : Ubuntu 9.10 (Karmic Koala)
ubuntujaunty         : Ubuntu 9.04 (Jaunty Jackalope)
ubuntuintrepid       : Ubuntu 8.10 (Intrepid Ibex)
ubuntuhardy          : Ubuntu 8.04 LTS (Hardy Heron)
virtio26             : Generic 2.6.25 or later kernel with virtio
generic26            : Generic 2.6.x kernel
generic24            : Generic 2.4.x kernel

[root@server22 ubuntu_vm_1]# 

Since latest Ubuntu is not supported by installed version of libvirt, you can use any of the newer OS variant available for Ubuntu. In this case, we have

ubuntuquantal        : Ubuntu 12.10 (Quantal Quetzal) or later

It will work for Ubuntu 16.04.

[root@server22 ubuntu_vm_1]# virt-install \
>   --import \
>   --name ubuntu_vm_1 \
>   --ram 1024 \
>   --vcpus 1 \
>   --cpu host \
>   --disk ubuntu_vm_1.qcow2,format=qcow2,bus=virtio \
>   --disk ubuntu_vm_1-cidata.iso,device=cdrom \
>   --network bridge=virbr0,model=virtio \
>   --os-type=linux \
>   --os-variant=ubuntuquantal \
>   --graphics vnc,listen=0.0.0.0 \
>   --noautoconsole 

Starting install...
Creating domain...                                                                                                                                                                   |    0 B     00:00     
Domain creation completed. You can restart your domain by running:
  virsh --connect qemu:///system start ubuntu_vm_1
[root@server22 ubuntu_vm_1]# virsh list
 Id    Name                           State
----------------------------------------------------
 22    ubuntu_vm_1                    running

[root@server22 ubuntu_vm_1]# 

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.