LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2016, 10:42 PM   #1
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Rep: Reputation: 34
virsh does not list the VM after reboot


Hi All, I have been strugalling for the past few days with out any answer!!!!!!!!

I am using CentOS release 6.8 (Final) with KVM and this is a compute in a cloudestack installation.

Now the issue is, I hade to reset the machine due to RAM issue and when finally the node came up, I am missing one VM. Through cloudstack I can see the VM but when I do "virsh list --all" I only see 2 where there should be 3. The disks attached to this VM is visible though ls.

Can some one help me to get this reattached (if that is the term to use ) KVM or to diagnose what is going on

Thanks and Regards
 
Old 06-29-2016, 12:50 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try
Code:
virsh vol-list --details --all

# then 
virsh vol-list --details --pool VolGroup00  # replace VolGroup00 with value from prev cmd
This just shows the storage, but its a start
 
Old 06-29-2016, 01:29 AM   #3
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Original Poster
Rep: Reputation: 34
Hi Chrism01, thank you for the reply, when I do below command I get an error. please see below

[root@kvm01 primary]# virsh vol-list --details --all
error: command 'vol-list' doesn't support option --all


Thanks and Bet Regards
 
Old 06-29-2016, 02:16 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Sorry about that
Code:
 virsh pool-list --details --all
 
Old 06-29-2016, 03:05 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I don't pretend to know cloudstack, but if it is any similar to OpenStack, it could well be that the VM persists in the cloudstack database but has disappeared from the VM host. Perhaps cloudstack has taken a snapshot of it and removed it?

Does cloudstack allow you to see the status of the VM? What is it?
You could try some actions on the VM via cloudstack. For example, start or restart or stop or suspend (or whatever similar actions exist in cloudstack). What happens when you do that?
 
Old 06-29-2016, 03:55 AM   #6
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Original Poster
Rep: Reputation: 34
Hi Bernbdaush thanks for the update

The status on the UI says it is stopped but when I try to start it says the action is completed but the status remains the same. If I to see from the compute node there is no entry for this VM or it is running. I can see the vm disks where were attached to this lost instance, that's about it.

It feels the same but setting cloudstack up is much, much easer then openstack

By the way this is just a POC environment with once control node and a one worker node

Thanks and Regards

Last edited by procfs; 06-29-2016 at 03:57 AM.
 
Old 06-29-2016, 09:16 AM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I need to guess, but it's likely that the VM doesn't exist anymore, and what you see in cloudstack is its ghost. It disappeared but cloudstack didn't notice.
I suggest you find a way to remove it from your cloud.
 
Old 06-29-2016, 09:03 PM   #8
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Original Poster
Rep: Reputation: 34
Hi Berndbausch, I can remove this from the db (mysql), but it would be nice to find out what happened since its rather scary the situation. Just reboot can cause such a havoc, think it was on a production .

But I can see the v-disks from the OS side, do you think this has something to do with KVM it self since verish list --all does not show this vm but rest are fine and working. Is there any chance that I could import this disk to a KVM instance with out the aid of cloudstack.

Thanks and Best regards
 
Old 06-30-2016, 01:36 AM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by procfs View Post

But I can see the v-disks from the OS side, do you think this has something to do with KVM it self since verish list --all does not show this vm but rest are fine and working. Is there any chance that I could import this disk to a KVM instance with out the aid of cloudstack.
Yes you can. You create a new VM and specify the existing disk as root disk (and add any other existing disks). The easiest way is via the GUI, virt-manager. If the compute node has desktop software installed, you may have virt-manager installed already. If you can't add desktop software to the compute node, you should be able to run virt-manager somewhere else and remote-control the compute node via a libvirt connection. From memory I don't know how this is done.

If GUI is not an option, I am aware of two ways to create a VM via command line. One is virt-install, providing all the parameters like network, console, RAM, and storage, as command line options.
The other is copying the XML that describes another VM and adapt it. Roughly:
Code:
virsh dumpxml nameofexistingVM > newvm.xml
(edit newvm.xml: Adapt storage, change MAC addresses, remove UUID)
virsh define newvm.xml
virsh start newvm.xml
libvirt.org has useful documentation for virsh and the XML file.
 
Old 07-01-2016, 01:10 PM   #10
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 651

Original Poster
Rep: Reputation: 34
Hi Bernbdaush thank you for the reply and I had to recreate the VM since this was to be a poc but I do have a backup of the issued VM, let me try and import the vmdisk at he vm create time

Thanks you and best regards
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Insyde H2O BIOS (on Sony Vaio) clears UEFI boot list on reboot ellington Slackware 3 10-19-2013 01:29 PM
VM's name/uuid/id is not listed/shown when doing "virsh list --all" newbiez Linux - Virtualization and Cloud 4 08-30-2013 10:06 PM
KVM: old working .img files no longer seen by virsh list cmd: how to recover? chrism01 Linux - Virtualization and Cloud 1 11-23-2012 04:57 AM
Shutdown, Reboot does not work through virsh Mohan.Sundar Linux - Virtualization and Cloud 2 05-10-2011 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration