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 1387140 - Virsh shutdown is not working with RHEL graphical installation
Summary: Virsh shutdown is not working with RHEL graphical installation
Keywords:
Status: CLOSED DUPLICATE of bug 1395097
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ademar Reis
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 08:43 UTC by vaibhav
Modified: 2019-12-16 07:10 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-25 12:34:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description vaibhav 2016-10-20 08:43:37 UTC
Description of problem:

Not able to shutdown the RHEL 7.3 VM by using virsh command. 


Version-Release number of selected component (if applicable):

RHEL 7.3 beta
Running guest = 7.3 beta.

How reproducible:-

100%

Steps to Reproduce:
1.Create new VM on top of RHEL 7.3 with graphical installation.
2.try to shutdown VM by command.
   # virsh -c qemu:///system shutdown rhel7.3
3. After running above command guest didnt turned off, only screen become black.

Actual results:-

After running above command guest vm didnt turned off, its screen become black.

Expected results:

VM should get turned off after running shutdown command.

Additional info:

Comment 5 jingzhao 2016-11-02 07:56:13 UTC
Tested it on rhel7.3 and rhel7.2, rhel7.3 and rhel7.2 can reproduce the issue with guest graphical model. follow are the details

1. Version:

rhel7.2:
kernel-3.10.0-327.43.1.el7.x86_64
qemu-kvm-1.5.3-105.el7_2.10.x86_64

rhel7.3:
kernel-3.10.0-514.1.1.el7.x86_64
qemu-kvm-1.5.3-126.el7.x86_64

2. Test scenario:

rhel7.2 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
rhel7.3 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
rhel7.3 qemu-kvm + 7.3 guest (kernel-3.10.0-506.el7.x86_64)

3. Test details
1) Boot guest with command[1];
2) Set guest as graphic model and terminal model
: systemctl set-default graphical.target/multi-user.target
3) shutdown guest through "system_powerdown" in hmp

4. Test Result:
1) graphical model: guest didn't turn off and display black screen
2) terminal model: guest can turn off successfully

Add info
Tried it with virsh cmd (virsh -c qemu:///system shutdown generic) on rhel7.2 host, the same test result with above

[1]
/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-nodefaults -rtc base=utc \
-m 4G \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-name rhel7.3 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-serial unix:/tmp/console,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-chardev file,path=/home/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-qmp tcp::8887,server,nowait \
-vga qxl \
-spice port=5932,disable-ticketing \
-drive file=/home/bug/rhel72.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet1 \
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=54:52:00:B6:40:22 \
-monitor stdio \
-usb -device usb-mouse,id=mouse \


Thanks
Jing Zhao

Comment 6 Ademar Reis 2016-11-03 16:36:23 UTC
(In reply to jingzhao from comment #5)
> Tested it on rhel7.3 and rhel7.2, rhel7.3 and rhel7.2 can reproduce the
> issue with guest graphical model. follow are the details
> 
> 1. Version:
> 
> rhel7.2:
> kernel-3.10.0-327.43.1.el7.x86_64
> qemu-kvm-1.5.3-105.el7_2.10.x86_64
> 
> rhel7.3:
> kernel-3.10.0-514.1.1.el7.x86_64
> qemu-kvm-1.5.3-126.el7.x86_64
> 
> 2. Test scenario:
> 
> rhel7.2 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
> rhel7.3 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
> rhel7.3 qemu-kvm + 7.3 guest (kernel-3.10.0-506.el7.x86_64)
> 
> 3. Test details
> 1) Boot guest with command[1];
> 2) Set guest as graphic model and terminal model
> : systemctl set-default graphical.target/multi-user.target
> 3) shutdown guest through "system_powerdown" in hmp
> 
> 4. Test Result:
> 1) graphical model: guest didn't turn off and display black screen
> 2) terminal model: guest can turn off successfully
> 
> Add info
> Tried it with virsh cmd (virsh -c qemu:///system shutdown generic) on
> rhel7.2 host, the same test result with above

Thanks for the testing, this confirms it's not a regression from 7.2. Can you please run one more test, now with qemu-kvm-rhev?

Comment 7 jingzhao 2016-11-04 02:04:07 UTC
The same result when tested it with qemu-kvm-rhev

Test version:
 rhel7.2:
 kernel-3.10.0-327.43.1.el7.x86_64
 qemu-kvm-rhev-2.3.0-31.el7_2.23.x86_64
 
 rhel7.3:
 kernel-3.10.0-514.1.1.el7.x86_64
 qemu-kvm-rhev-2.6.0-28.el7.x86_64

Test scenario:
 rhel7.2 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
 rhel7.3 qemu-kvm + 7.2 guest (kernel-3.10.0-327.el7.x86_64)
 rhel7.3 qemu-kvm + 7.3 guest (kernel-3.10.0-506.el7.x86_64)

Thanks
Jing Zhao

Comment 8 Ademar Reis 2016-11-16 12:45:28 UTC
May be related to Bug 1394469

Comment 9 Gerd Hoffmann 2016-11-16 13:19:30 UTC
please test whenever this seabios test build fixes the issue:
http://people.redhat.com/ghoffman/bz1392569/

Comment 10 yafu 2016-11-18 11:16:23 UTC
I think it's not a bug. 'virsh shutdown' use agent mode in default with qemu hypervisor. If not setting guest agent, then use acpi mode. To use acpi mode correctly with rhel7.2/rhel7.3 guest(since the default value of "# gsettings get org.gnome.settings-daemon.plugins.power button-power" is "suspend" in rhel7.2/rhel7.3. When running shutdown command by acpi mode,the guest will not shutdown.), it needs to execute the following command in the guest firstly:
#gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown

The guest can shutdown correctly after executing the command.
The guest also can shutdown correctly if setting agent channel in the domain xml and start qemu-guest-agent service in the guest.

Comment 11 Ademar Reis 2016-11-25 12:34:23 UTC
(In reply to yafu from comment #10)
> I think it's not a bug. 'virsh shutdown' use agent mode in default with qemu
> hypervisor. If not setting guest agent, then use acpi mode. To use acpi mode
> correctly with rhel7.2/rhel7.3 guest(since the default value of "# gsettings
> get org.gnome.settings-daemon.plugins.power button-power" is "suspend" in
> rhel7.2/rhel7.3. When running shutdown command by acpi mode,the guest will
> not shutdown.), it needs to execute the following command in the guest
> firstly:
> #gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown
> 
> The guest can shutdown correctly after executing the command.
> The guest also can shutdown correctly if setting agent channel in the domain
> xml and start qemu-guest-agent service in the guest.

Agree. Thanks for the clarification.

*** This bug has been marked as a duplicate of bug 1395097 ***


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