LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
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.

Notices

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

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
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 808

Rep: Reputation: 87
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
crudo
LQ Newbie
 
Registered: Oct 2009
Location: Recife - Brazil
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
Smile

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
dt64
Member
 
Registered: Sep 2012
Distribution: RHEL5/6, CentOS5/6
Posts: 141

Rep: Reputation: 18
Quote:
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 07:16 AM.

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