Linux KVM: Delete virtual machine client

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Linux KVM: Delete virtual machine client

Post by peter_b »

HowTo remove a VM-client from a libvirt KVM host, using "virsh"

1) Start the "virsh" shell:
As root (or using "sudo"), run the following command on the KVM host:

Code: Select all

$ virsh
2) Shutdown the client:
You can get a list of all clients on that KVM host:

Code: Select all

list --all
It'll return something like this:

Code: Select all

 Id    Name                           State
----------------------------------------------------
 2     my-kvmclient                   running
Use the "Name" to address the VM-client and shut it down:

Code: Select all

shutdown my-kvmclient
If successful, "list --all" will show the machine as "shut off":

Code: Select all

 Id    Name                           State
----------------------------------------------------
 -     my-kvmclient                   shut off

3) Undefine the client's domain:

Code: Select all

undefine my-kvmclient

That's it. :D


Links:
Post Reply