WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] Re: XCP / xenAPI shows no vms but vm is still running

To: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Subject: [Xen-API] Re: XCP / xenAPI shows no vms but vm is still running
From: Chonduy Nguyen <chonduy9@xxxxxxxxx>
Date: Fri, 5 Mar 2010 19:12:04 -0800 (PST)
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 05 Mar 2010 19:12:09 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1267845125; bh=/E74ToncDzFCBwPgjS1Q+xmG4gZqhyiGVQ1ZYBmnn8I=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=g6Eaott2ywXVthMP18ftHJFULT8zFyFLgPbhPDc0vqB7R/TUTfyUV4yQxLyk4AFrq7nIV336zcMZNld5NC+7DjGWjceTOGVd3yEq9kK/RVv/SxcHynEgNrO8mdHueHTeopeLfQ9aXkN2zLWnVYsnAWm/JNh0KGVePn31pd5VMws=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Hb3S42lhLnSl1rlNLEuXzTzJM5rs0SHoKts7VbW5M+i5OY3VP2Zbv8lHbvIm6wBw2gB7K1g9OqGsrTrZ9ViR4YGb5WfZynVO0lZ8aZIrOB95FkV6HHRO1/Gy0xIyvoga/xnQnr6+0LkmaY0+TXcxCIKNHmA44lFWSxzCpjbJEvI=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <81A73678E76EA642801C8F2E4823AD21565E55415F@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <352893.60058.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <81A73678E76EA642801C8F2E4823AD21565E554155@xxxxxxxxxxxxxxxxxxxxxxxxx> <146961.9334.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <81A73678E76EA642801C8F2E4823AD21565E55415F@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Hi Dave

Thanks so much for the info.  The list_domains really help me

Another question:
 I did try the destroy_domain - however, I thought since I destroy the domain - I can start vm again - but it  gives me VDI error

may I ask destroy_domain command - not actually cleanup shutdown the vms?

I need to reboot the machine in order to make it start this ken-debian-vm3

Please advice?

ChonDuy/TNguyen




[root@septedecim ~]# xe vm-start vm=ken-debian-vm-3 on=quindecim
The server failed to handle your request, due to an internal error.  The given message may give details useful for debugging the problem.
message: Failure("The VDI 12acfcd0-de66-4eed-ab0b-56226cbec9a4 is already attached in RW mode; it can't be attached in RO mode!")


so below are steps I am doing


1. Make node quindecim down but ifdown 2 interfaces

2. from master host ==>run xe vm-reset-power-state vm=ken-debian-vm-3

3. from master host ==> xe vm-star vm=ken-debian-vm-3 on=master

4. list_domains on quindecim -did show 2 entries
[root@quindecim ~]# list_domains
id |                                 uuid |  state
 0 | 24bdb04b-6809-4cea-b4d0-758f97a4b732 |     R
 1 | d787745d-ad7d-91c1-2f09-084d8c9d4aea |    B 

5. run destroy domain

[root@quindecim ~]# /opt/xensource/debug/destroy_domain -domid 1

6. list_domains: now show 1 entry:

[root@quindecim ~]# list_domains
id |                                 uuid |  state
 0 | 24bdb04b-6809-4cea-b4d0-758f97a4b732 |     R


7.  shutdown vm=ken-debian-vm-3 on maseter

8. Make node quindecim up

9. [root@septedecim ~]# xe vm-start vm=ken-debian-vm-3 on=quindecim
The server failed to handle your request, due to an internal error.  The given message may give details useful for debugging the problem.
message: Failure("The VDI 12acfcd0-de66-4eed-ab0b-56226cbec9a4 is already attached in RW mode; it can't be attached in RO mode!")





From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
To: Chonduy Nguyen <chonduy9@xxxxxxxxx>
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>; Stephen Spector <stephen.spector@xxxxxxxxxx>
Sent: Fri, March 5, 2010 3:15:26 PM
Subject: RE: XCP / xenAPI shows no vms but vm is still running

Hi,

 

Xapi considers a VM to be “resident-on” one host at a time. It sounds like you’re interested in which *domains* are running on the host (each domain has the same UUID as the corresponding VM). Have a look at the command “list_domains”. If some domains need cleaned up it’s possible to run commands like “/opt/xensource/debug/destroy_domain –domid <domid>”

 

HTH,

Dave

 

 

From: Chonduy Nguyen [mailto:chonduy9@xxxxxxxxx]
Sent: 05 March 2010 19:41
To: Dave Scott
Cc: xen-api@xxxxxxxxxxxxxxxxxxx; Stephen Spector
Subject: Re: XCP / xenAPI shows no vms but vm is still running

 

Hi Dave,

Since the current XCP didnot provide Fault Tolerant and HA yet, we tried to write a simple monitoring where we ping the node and check
if this node is unreachable - for whatever reason - could be network connection down or could be physical hardware etc...

we will disconnect this problem  node  out of XCP network by filter traffic from this node to storage network and other nodes -using iptables filtering and we want to quickly move Vms to start at other mahines - Therefore,we need to use reset-power-state

However, since we keep monitoring this node - the node could be back up again. That time we want to find a way to check if VMs running - but XCP
showed that VMs not there - but actually VMs still there.

Can you please suggest a way to find out if VMs running on machine or not ? XCP will fail to show this - I am wondering is there anyway we can detect
VMs running on OS?

Please let me know

Thanks

ChonDuy/TNguyen


From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
To: Chonduy Nguyen <chonduy9@xxxxxxxxx>; "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Cc: Stephen Spector <stephen.spector@xxxxxxxxxx>
Sent: Fri, March 5, 2010 4:09:47 AM
Subject: RE: XCP / xenAPI shows no vms but vm is still running


Hi,

 

You should only use ‘reset-power-state’ on VMs which have failed e.g. if the host has failed. If the VMs are still running then you shouldn’t do this – if you start a VM twice then there is a high chance of disk corruption.

 

Cheers,

Dave

 

From: Chonduy Nguyen [mailto:chonduy9@xxxxxxxxx]
Sent: 05 March 2010 01:18
To: xen-api@xxxxxxxxxxxxxxxxxxx
Cc: Dave Scott; Stephen Spector
Subject: XCP / xenAPI shows no vms but vm is still running

 

Hi

I tried the case when the node - said "P" is unreachable by interface down - so, we restart Vms of that machine to another machine by
doing reset-power-state first and call vms to start at other machine said node "A"

However when the problem node "P"  is up again - xenAPI shows that there is no Vm running on it-   Which is wrong, Vms should be running.
I tested this by stop the vm on "A"  to start that vm on the "P" - "P" complains that

[root@quindecim ~]# xe vm-start vm=ken-debian-vm-2 on=quindecim
The server failed to handle your request, due to an internal error.  The given message may give details useful for debugging the problem.
message: Failure("The VDI 57a82bd4-a889-42ff-94d3-479a2618f2ec is already attached in RW mode; it can't be attached in RO mode!")

After I reboot the node, vm can start.  So, is there any way I can detect that VMs are currently running on the "P" problem machine?

after the Vms relocated to other machine, info from XenAPI showed that that machine has no VMs ( which is incorrect!)

Thanks

ChonDuy/Tnguyen

 

 


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api