Install Centos 7 guest on KVM host

How to install a Centos 7 guest on a KVM host

Download ISO


Create guest:

virt-install --name test --ram 1024 --disk path=/guests/web-shard-1.qcow2,size=100,bus=virtio,format=qcow2 --vcpus 1 --os-type linux --os-variant centos7.0 --network bridge=br0 --graphics vnc --location=/var/lib/libvirt/boot/CentOS-7-x86_64-NetInstall-1804.iso

Connect to install

On a separate terminal on the host find out what the VNC port is:

virsh dumpxml test | grep vnc

The output will look something like this:

Open a new ssh terminal to the host with a tunnel for VNC:

ssh -L 5900:


If using the NetInstall ISO you need to specify the repo URL, CentOS 7 is here: