CyberKeeda In Social Media

ERROR Guest name 'centos7' is already in use.

Starting a VM

To start a VM you've just created after the installation, use the virsh start NAME command:

virsh start centos7
Use the virsh list --all to list all available virtual machines, including powered off ones:

$ virsh list --all
 Id    Name                           State
 4     centoS                        running
 -     debian                        shut off
 -     win10                         shut off
 -     win7                          shut off
 -     winxp                         shut off

Stopping and removing
To stop a VM, you give the (unintuitive) command virsh destroy NAME:

virsh destroy centos7
It will not remove any data, just stop the VM by pulling the virtual power cable.

If you want to remove the VM from the virsh list, you need to undefine it:

virsh undefine centos7
This will remove the configuration. If you don't undefine the VM and want to try the virt-install again it will give an error like this:

ERROR    Guest name 'centos' is already in use.
You do manually need to remove the virtual disk after undefining a vm.

No comments:

Post a Comment

Designed By Kunal Saha