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 start a new virtual machine using the qemu-system utility, perform the following steps:

  1. Start a new QEMU virtual machine using the x86_64 CPU architecture:
root@kvm:~# qemu-system-x86_64 -name debian -vnc 146.20.141.254:0 -cpu Nehalem -m 1024 -drive     format=raw,index=2,file=debian.img -daemonize    root@kvm:~#
  1. Ensure that the instance is running:
root@kvm:~# pgrep -lfa qemu3527 qemu-system-x86_64 -name debian -vnc 146.20.141.254:0 -m 1024 -drive format=raw,index=2,file=debian.img -daemonize    root@kvm:~#
  1. Terminate the Debian QEMU instance:
root@kvm:~# pkill qemu    root@kvm:~#
  1. Start a new QEMU instance using the prebuilt CentOS image:
root@kvm:~# qemu-system-x86_64 -vnc 146.20.141.254:0 -m 1024 -hda CentOS-7-x86_64-GenericCloud.qcow2 ...

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