O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To build a new KVM instance and connect to it using the console, perform the following steps:

  1. Install a new KVM virtual machine using the official Debian repository:
root@kvm:~# virt-install --name kvm1 --ram 1024 --extra-args="text console=tty0 utf8 console=ttyS0,115200" --graphics vnc,listen=146.20.141.158 --hvm --location=http://ftp.us.debian.org/debian/dists/stable/main/installer-amd64/ --disk path=/tmp/kvm1.img,size=8Retrieving file MANIFEST... | 3.3 kB 00:00 ...Retrieving file linux... | 6.0 MB 00:00 ...Retrieving file initrd.gz... | 29 MB 00:00 ...Creating storage file kvm1.img | 8.0 GB 00:00WARNING Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.Domain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required