Starting, stopping, and removing KVM instances
In the previous recipe, we saw how to define new KVM virtual machine by either manually writing the XML definition file or using the virt-install
tool to define the instance for us.
If you define a new instance from an XML file, by default the instance will not start automatically. In this recipe, we will see how to start an instance that was previously configured.
Getting ready
For this recipe, we are going to need the following:
- The QEMU binaries, provided after following the Installing and configuring QEMU recipe from Chapter 1, Getting Started with QEMU and KVM.
- The custom raw Debian image we built in the Installing a custom OS on the image with debootstrap recipe from the previous chapter.
- The virsh tool provided by completing the Installing and configuring libvirt recipe.
- The defined instance from the Defining KVM instances recipe in a
shut off
state.
How to do it...
The following steps outline the process of listing, starting, and stopping KVM...