Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 963592

Summary: [virsh cmd] can not set emulator_period
Product: Red Hat Enterprise Linux 7 Reporter: Jincheng Miao <jmiao>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, dyuan, gsun, lcui, mkletzan, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.0.6-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:44:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jincheng Miao 2013-05-16 08:20:28 UTC
Description of problem:
set emulator_period failed, return "error: Unable to find emulator cgroup for rhel7: No such file or directory"

Version-Release number of selected component (if applicable):
libvirt-1.0.5-1.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64

How reproducible:
100%

Steps:

1. edit a domain with:
  <vcpu placement='auto'>2</vcpu>
  <cputune>
    <shares>2048</shares>
    <period>1000000</period>
    <quota>1000</quota>
    <emulator_period>1000000</emulator_period>
    <emulator_quota>1000</emulator_quota>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <emulatorpin cpuset='2'/>
  </cputune>


2. start it
[root@dhcp-66-71-41 ~]# virsh start rhel7

3. check schedinfo 
[root@dhcp-66-71-41 ~]# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 1000

4. set emulator_period
[root@dhcp-66-71-41 ~]# virsh schedinfo rhel7 --set emulator_period=900000
Scheduler      : posix
error: Unable to find emulator cgroup for rhel7: No such file or directory

Actual results:
cannot set emulator_period. 

Expected results:
set emulator_period successfully.

Comment 2 Jincheng Miao 2013-05-16 08:44:02 UTC
this bug is still in libvirt-1.0.5-2.el7.x86_64.

Comment 3 Martin Kletzander 2013-05-16 09:16:23 UTC
I've found out the problem, but not the root cause, yet.  I'm bisecting the sources now, so I'm assigning it to myself.

Comment 6 Martin Kletzander 2013-05-16 20:24:15 UTC
Moving to POST with upstream commit v1.0.5-243-g0471637:

commit 0471637d5628106d058f0eb5516ffa7d5285cc6f
Author: Martin Kletzander <mkletzan>
Date:   Thu May 16 14:37:54 2013 +0200

    qemu: Fix cgroup handling when setting VCPU BW

Comment 7 Jincheng Miao 2013-06-05 14:20:22 UTC
This bug fix is verified.

# rpm -q libvirt
libvirt-1.0.6-1.el7.x86_64

# virsh schedinfo rhel7
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 1000000
emulator_quota : 1000

# virsh schedinfo rhel7 --set emulator_period=900000
Scheduler      : posix
cpu_shares     : 2048
vcpu_period    : 1000000
vcpu_quota     : 1000
emulator_period: 900000
emulator_quota : 1000

Comment 8 Ludek Smid 2014-06-13 12:44:44 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.