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 it works...

We start by listing the available KVM instances, provisioned with OpenStack in step 1. In step 2, we stop the instance by specifying its name. Please note that we can also use the instance ID to stop it. Since OpenStack uses the libvirt to manage the lifecycle of the KVM instances, in step 3, we see that the instance has been indeed destroyed. In step 4, we ensure that the QEMU process for the guest has also been terminated. In the last step, we can see that the instance state is now SHUTOFF instead of ACTIVE. Instances in this state can be started again by executing the following command:

root@controller:~# openstack server start ubuntu_instanceroot@controller:~# openstack server list+---------------------------+-----------------+--------+------------------+--------------+ ...

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