RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1177207 - virt-manager cannot show the right state of guest on a remote xen host.
Summary: virt-manager cannot show the right state of guest on a remote xen host.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-25 06:25 UTC by Ye Lingfei
Modified: 2015-11-19 05:23 UTC (History)
4 users (show)

Fixed In Version: virt-manager-1.2.0-1-el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (1019 bytes, text/plain)
2015-02-25 13:45 UTC, Giuseppe Scrivano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2206 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-11-19 08:17:29 UTC

Description Ye Lingfei 2014-12-25 06:25:01 UTC
Description of problem:
virt-manager cannot show the right state of guest on a remote xen host.

Version-Release number of selected component (if applicable):
virt-manager-1.1.0-10.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.Create a guest on a xen server(complete the installation) and start it.
2.Launch virt-manager on your host: #virt-manager.
3.Connect to a remote xen host
  ("File ->Add Connection ->Choose Xen for Hypervisor -> Click "connect to remote host"
  --> choose 'SSH' --> Input the hostname (eg:10.66.106.64)-->Click 'Connect'")
4.Input the password and the connect suceesfully.
5.Force off the running guest just created and the state shows 'Shut off'.
6.Run the guest just forced off.

Actual results:
After step 6, the state of the guest stays 'Shut off'.

Expected results:
After step 6, the state of the guest shows 'Running'.

Additional info:
On a rhel6 host, repeat the steps,
after step 6, the state of the guest shows 'Running'.

Comment 1 Ye Lingfei 2015-01-06 09:07:28 UTC
With virt-manager-0.10.0-20.el7(rhel-7.0 released), I cannot reproduce this problem.

Comment 4 Giuseppe Scrivano 2015-02-25 13:45:12 UTC
Created attachment 995215 [details]
reproducer

Comment 5 Giuseppe Scrivano 2015-02-25 15:10:41 UTC
it seems to be an issue in libvirt as it doesn't report correctly the domain status with as part of: virDomainInfo(domain)[0]

I have attached a small reproducer script, this is the output I get when I use it with KVM (to trigger the issue I just start and destroy a guest trough virsh) on Fedora 21:

$ python test.py
Using uri:qemu:///system
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=1 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=1 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=1 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=1 virDomainInfo[0]=5

and the same script with XEN:

$ python test.py xen+ssh://root.106.64/
Using uri:xen+ssh://root.106.64/
Info status event=2 detail=0 virDomainInfo[0]=0
Info status event=5 detail=0 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=0 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=1
Info status event=5 detail=0 virDomainInfo[0]=5
Info status event=2 detail=0 virDomainInfo[0]=0
Info status event=5 detail=0 virDomainInfo[0]=5

virDomainInfo[0]=0 seems to be the issue here, as when the domain is started, the status reported by virDomainInfo is VIR_DOMAIN_NOSTATE instead of VIR_DOMAIN_RUNNING.

It was working with older versions of virt-manager, as virt-manager was continuously polling the status of the domains and after some time virDomainInfo[0] could return the correct status.

One solution could be to disable events and use the old polling for XEN HVs.  I will propose a patch upstream soon.

Comment 6 Giuseppe Scrivano 2015-02-25 15:34:55 UTC
patch proposed here:

https://www.redhat.com/archives/virt-tools-list/2015-February/msg00072.html

Comment 7 Giuseppe Scrivano 2015-02-26 10:19:58 UTC
and upstream now:

commit 64264e8fa2030021137457b6d65c94e743af11ca
Author: Giuseppe Scrivano <gscrivan>
Date:   Wed Feb 25 16:25:21 2015 +0100

    Disable domain events with XEN
    
    When XEN is used, disable domain events and use polling.
    
    On RHEL-5.9 virDomainInfo() seems to not report correctly the domain
    status when called immediately after the event is received.
    
    Solves: https://bugzilla.redhat.com/show_bug.cgi?id=1177207
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>

Comment 10 fwu 2015-05-18 10:40:34 UTC
I can reproduce the bug with package:
virt-manager-1.1.0-10.el7.noarch

Try to verify the bug with new build:
virt-manager-1.2.0-3.el7.noarch

Steps:
1.Create a guest on a xen server(complete the installation) and start it.
2.Launch virt-manager on your host: #virt-manager.
3.Connect to a remote xen host
  ("File ->Add Connection ->Choose Xen for Hypervisor -> Click "connect to remote host"--> choose 'SSH' --> Input the hostname (eg:10.66.106.64)-->Click 'Connect'")
4.Input the password and the connect suceesfully.
5.Force off the running guest just created and the state shows 'Shut off'.
6.Run the guest just forced off.

Result:
After step 6, the state of the guest shows 'Running'.

According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 12 errata-xmlrpc 2015-11-19 05:23:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2206.html


Note You need to log in before you can comment on or make changes to this bug.