

You first need to access the guest VM via ssh.

You are now back at your host console, and can restart the guest host using virsh. Press CTRL+Shift+] to exit back to your host console.

When the installer finishes it will show the installation complete screen like below. This is required for ssh access in the next section. Remember the username and password you specify in this process, because you will need it later.īe sure to select “OpenSSH Server” when the installer asks for which software packages you want. This will take you through the same OS installation steps as described in the Ubuntu documentation (picking language, keyboard, disk partitions, etc). Install/Configure OSĪfter running virt-install above, the console will be filled with the text based Ubuntu installer as shown below. If we had instead used “–cdrom” pointing to an ISO, we could not have used the “–extra-args” to the kernel, which is mandatory. Notice that we used “–location” pointing to an Ubuntu installer on the internet.

disk pool=default,size=20,bus=virtio,format=qcow2 \ Now use virt-install to create a VM that has “graphics” set to none, “console” set to a pseudo terminal of type serial, “location” set to the Ubuntu installer on, and sending “extra-args” to the kernel to indicate a serial console. If you have not installed KVM on Ubuntu, then read my article here. Then we will get access to the guest OS using standard ssh and ‘virsh console’. In this article, I will show you how to install Ubuntu Xenial Server by using the Ubuntu text-based installer. Once deployed, this guest VM can be accessed by using ssh or ‘virsh console’, without the need for a graphics display. If you are running KVM on a console-only host OS, you can still do a full Ubuntu installation on a KVM guest VM by using serial port output and the Ubuntu Server text-based installer.
