Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.


  Search this Thread
Old 06-08-2013, 03:10 AM   #1
LQ Newbie
Registered: Oct 2012
Posts: 14

Rep: Reputation: Disabled
Starting a VM in KVM

I installed a VM on KVM by using virt-install --name NAME ... command. Then, I can use virsh start NAME to start this VM. After that, I used virsh undefine NAME. Then, when I tried to use virsh start NAME command to start the VM again, but it showed that there is no VM with name NAME existing. Anybody know how to fix this and start the VM again? Thank you!
Old 06-08-2013, 11:39 AM   #2
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
undefine deletes the VM definitions. virsh will no longer have a reference to the VM you created. You need to create a new VM, and if the old disk image is still intact, you might be able to attach it to the new VM, and have the old data there
1 members found this post helpful.
Old 06-17-2013, 03:08 PM   #3
LQ Newbie
Registered: Oct 2009
Location: Recife - Brazil
Distribution: Slackware
Posts: 3

Rep: Reputation: 0

Just to complement what @RickCheung said, to stop your virtual machine in kvm you need to type:
virsh shutdown <vmname>
Old 07-29-2013, 09:29 AM   #4
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 216

Rep: Reputation: 38
Originally Posted by crudo View Post
Just to complement what @RickCheung said, to stop your virtual machine in kvm you need to type:
virsh shutdown <vmname>
just to ad another little bit in case the VM doesn't shutdown properly (sometimes happens e.g. with Windows guests):

virsh destroy <vmname>

This works like pulling the power cord from a physical machine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
KVM API for starting virtual machines guardian1 Linux - Virtualization and Cloud 2 09-04-2012 11:33 AM
Starting a KVM guest on boot up dman777 Linux - Virtualization and Cloud 3 09-13-2011 08:02 AM
[SOLVED] Slackware64 13.37 KVM GUEST Xorg segfaults when starting KDE (workaround) rtguille Slackware 2 05-15-2011 05:13 PM
Starting KVM with public bridge as normal user under Debian/Ubuntu sfxpt Linux - Virtualization and Cloud 3 02-10-2011 08:37 AM
[SOLVED] kvm: lan freezes when starting vmachine with 2 net cards tirab Linux - Virtualization and Cloud 5 02-08-2011 02:54 AM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration