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 1118718 - VMstate static checker: backport -dump-vmstate feature to export json-encoded vmstate info
Summary: VMstate static checker: backport -dump-vmstate feature to export json-encoded...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-11 10:40 UTC by Amit Shah
Modified: 2014-10-14 07:02 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.435.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:02:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description Amit Shah 2014-07-11 10:40:31 UTC
Description of problem:


The static checker is merged usptream; backport it for 6.6.

This will be useful to get vmstate json output and check for migration compatibility between various versions of qemu.

Syntax is:

qemu-kvm -dump-vmstate -M <machine type> -dump-vmstate <filename>


Later, from the qemu sources,

./scripts/vmstate-static-checker.py -s src.json -d dest.json

will output any migration-breaking changes introduced in dest.json as compared with src.json.

Comment 1 Amit Shah 2014-07-11 10:40:49 UTC
More info on invocation from upstream commit messages:

For qemu:

    migration: dump vmstate info as a json file for static analysis
    
    This commit adds a new command, '-dump-vmstate', that takes a filename
    as an argument.  When executed, QEMU will dump the vmstate information
    for the machine type it's invoked with to the file, and quit.
    
    The JSON-format output can then be used to compare the vmstate info for
    different QEMU versions, specifically to test whether live migration
    would break due to changes in the vmstate data.
    
    A Python script that compares the output of such JSON dumps is included
    in the following commit.

and the script:

    vmstate-static-checker: script to validate vmstate changes
    
    This script compares the vmstate dumps in JSON format as output by QEMU
    with the -dump-vmstate option.
    
    It flags various errors, like version mismatch, sections going away,
    size mismatches, etc.
    
    This script is tolerant of a few changes that do not change the on-wire
    format, like embedding a few fields within substructs.
    
    The script takes -s/--src and -d/--dest parameters, to which filenames
    are given as arguments.
    
    Example:
    
    (in a qemu 2.0 tree):
    ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate qemu-2.0.json
    
    (in a qemu 2.2 tree:)
    ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate -M pc-i440fx-2.0 \
       qemu-2.2-m2.0.json
    
    ./scripts/vmstate-static-checker.py -s qemu-2.0.json -d qemu-2.2-m2.0.json
    
    The script also takes a --reverse parameter to switch the src and dest
    jsons.  This is just a shorthand for reversing the src and dest.
    
    The --help parameter shows usage information.

Comment 4 Jeff Nelson 2014-08-04 22:29:22 UTC
Fix included in qemu-kvm-0.12.1.2-2.435.el6

Comment 6 Shaolong Hu 2014-08-05 07:18:35 UTC
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64:

[root@dhcp-8-176 ~]# /usr/libexec/qemu-kvm -dump-vmstate pc.json -M rhel6.5.0
VNC server running on `::1:5900'


qemu-kvm-0.12.1.2-2.435.el6.x86_64:

[root@localhost 435]# /usr/libexec/qemu-kvm -dump-vmstate rhel6.5.0.json -M rhel6.5.0
VNC server running on `::1:5900'



[root@shu-fedora16 scripts]# ./vmstate-static-checker.py -s rhel6.5.0.json -d rhel6.5.0-RHEL7.json
Section "pcnet" does not exist in dest
Section "ES1370" does not exist in dest
Warning: checking incompatible machine types: "rhel6.6.0", "rhel6.5.0"
Section "ne2k_pci" does not exist in dest

Don't know whether "Warning: checking incompatible machine types: "rhel6.6.0", "rhel6.5.0"" is a problem.

Comment 7 Shaolong Hu 2014-08-05 08:12:23 UTC
(In reply to Shaolong Hu from comment #6)
> qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64:
> 
> [root@dhcp-8-176 ~]# /usr/libexec/qemu-kvm -dump-vmstate pc.json -M rhel6.5.0
> VNC server running on `::1:5900'
> 
> 
> qemu-kvm-0.12.1.2-2.435.el6.x86_64:
> 
> [root@localhost 435]# /usr/libexec/qemu-kvm -dump-vmstate rhel6.5.0.json -M
> rhel6.5.0
> VNC server running on `::1:5900'
> 
> 
> 
> [root@shu-fedora16 scripts]# ./vmstate-static-checker.py -s rhel6.5.0.json
> -d rhel6.5.0-RHEL7.json
> Section "pcnet" does not exist in dest
> Section "ES1370" does not exist in dest
> Warning: checking incompatible machine types: "rhel6.6.0", "rhel6.5.0"
> Section "ne2k_pci" does not exist in dest
> 
> Don't know whether "Warning: checking incompatible machine types:
> "rhel6.6.0", "rhel6.5.0"" is a problem.

The warning is by my mistake, it works correctly:

[root@shu-fedora16 scripts]# ./vmstate-static-checker.py -s rhel6.5.0.json -d rhel6.5.0-RHEL7.json
Section "pcnet" does not exist in dest
Section "ES1370" does not exist in dest
Section "ne2k_pci" does not exist in dest

Comment 8 errata-xmlrpc 2014-10-14 07:02:33 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.

http://rhn.redhat.com/errata/RHBA-2014-1490.html


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