From patchwork Fri Jan 12 09:01:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klim Kireev X-Patchwork-Id: 859667 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="LHJZzI9/"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHxfq4jhlz9s75 for ; Fri, 12 Jan 2018 20:05:39 +1100 (AEDT) Received: from localhost ([::1]:55074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZvHN-0005g3-Jp for incoming@patchwork.ozlabs.org; Fri, 12 Jan 2018 04:05:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZvDd-0003Dq-FT for qemu-devel@nongnu.org; Fri, 12 Jan 2018 04:01:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZvDZ-0000I7-3x for qemu-devel@nongnu.org; Fri, 12 Jan 2018 04:01:45 -0500 Received: from mail-eopbgr60112.outbound.protection.outlook.com ([40.107.6.112]:3712 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZvDY-0000F6-RF; Fri, 12 Jan 2018 04:01:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4PSk5RLbX+YFGMmcjui8HtfP5PJiLV4ZN4yb1wfRdt0=; b=LHJZzI9/IvtRKHmVumJiO03Vja/qSJ/gOV3JCRXJzmb26KUZvxNJUz9I8wnFAHYbLPGYyZ/PlSUnBTZnshFggz+gy+l9j58bm8QQ5wZf1hrl/eZd5pjvLXPTOpDn/umXW3a90NGhxlZWI66oXqQc7nAERK9hMVYleLb5Nf590ZY= Received: from localhost.sw.ru (195.214.232.6) by DB6PR0801MB2070.eurprd08.prod.outlook.com (2603:10a6:4:77::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 12 Jan 2018 09:01:36 +0000 From: Klim Kireev To: qemu-devel@nongnu.org Date: Fri, 12 Jan 2018 12:01:18 +0300 Message-Id: <20180112090122.1702-2-klim.kireev@virtuozzo.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180112090122.1702-1-klim.kireev@virtuozzo.com> References: <20180112090122.1702-1-klim.kireev@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR05CA0269.eurprd05.prod.outlook.com (2603:10a6:3:fc::21) To DB6PR0801MB2070.eurprd08.prod.outlook.com (2603:10a6:4:77::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93bae4d5-4beb-4299-4d1c-08d5599b166e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020079)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DB6PR0801MB2070; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB2070; 3:EIukBRqcz5DTiCfNuvkUsIUdz6aASpnnzbbBbKVCblcgJv+gX1h19D66Ulbw+JR9XEnseeGlnz46KdB5k/qX1SIWoF68cXShUGDNMOQ8mdVm1gTqMBsrpw7fl6ryoA0/+WAs4HcVcghfjMbpOGdt6PNqtgrQdAbKYmmmFHVfXT+nw960/6LxFC8ve53eR7pcD6D811ieJO8Jwjm7Jrm/M2AG6mui3nFL7xfeA1shS7c9OGpTgCLhA42fJ4BEUB3d; 25:FxALj5DAV5yRQo2uy2x3MZtkiaR4unlFh8C/Z8ewT+NKXZ09VpVQMF3I3FZmjhZOfcmyCeVluH0uGSwLJKse83b/Dn9jqvkTUkyDImGRRULYUUnF4jAJQf2cBopmpzjhSFqJfsXl3KN8cF9baPRONEF/uchSttYbU6bqA2t30mj95hLz7PwOCEbd3iOeHJxAPe0fThUO6FZFtYPcnwrR4Z6GZ8BA6goolIh+GhutCUAP4fpnf6MdyQ9Wn63poNxmzbBCqrt5Wii8pnPTwzy15FxKIz5dXy9hzVHDyh2iYmLtwpIk2MnvXkcg7+QztCEEhxCEAaSm9fq1XesJqvxnIQ==; 31:4gk43YPv2UR0Y92Bz5HYSWFkkkJQ65LAtl0+zQLL9wGviPRJcEEbBIjGThbMtS37+NOW+evOg3U3wvpEM+/BdzM5ehDjq58TIzEIZGn8OEgx/WrYfvL4HVsgWxdbfC9cmuCWVhVG+HU/vPHXHCZYbQromj2FukhLfoGCrBjQCKoLWGiswDP3z1oeZ5XaIbp6eCpGU0YYREbneF394UJyptxBmpNeltwQJNcnYWLZPiY= X-MS-TrafficTypeDiagnostic: DB6PR0801MB2070: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=klim.kireev@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB2070; 20:hNoLP1a/5eCuNUmchowldL5qeyaxqj9mFmYtLgPk5WRWviLsD/bgf0E1pB+GtEwDnQXD7ei/k4krH6KlT2W77GMg5Pv6Sj/kucAWETzrYXUT57N4T09CWhylMRsiNwPxmLgYMk0Z1MZKk5H30ffGt/z6u2Uy+j1WH0gdLSLtjZcviGGENgtIXHC+8phpv5a4I9sDexFXZftWjI+lSBU3eLc/R10HUxnzT04UOBglt9veRjTYVgQyiPO7UsgCoWZgl+jndZLeN8WCJENPIvkGgDs/nKBhHLt49MxpfuGuHJJ+Q2YPvqIrY1r9STaEMV+jGh9JXT7SWCOhbWFEu9uG5RG0zIDHNJtiH1+ii6N/0ISdDcA/jQkIZLwvk8OFCVUw3YqIaQKB3pOcq3l5xFoGUYg1oV6kMH7p2i2LZo/GTtY=; 4:DLYQGZnaZrW1riiEsSXAheEPKEb17Q1XBhrWVgSN+KU43eNNJwlPTax/dMnTYCv1T792t7Z76f1pMb+BrQzVLsm58fCLF4QfLNxSpUbAFz8oRQSRXD8SWZ5ED7sz5WGv5VzHc/LW92vmy7Cf2T62zBOYRMmnPqKBRb0dl+AVPXrBm5O79DH4iGgX9WQZBvFJefGG2C9uGO+Yj4KDFutpUv/TWNXZSCIf4sx0LSiHsAyLcI/+xypOS7xHTm++uI3JYZLIfl8wJ5hvNRo7xQnRoR6VZmhpKOfZ47MEjpanT6yzaxvYYg0xsktuwQk2N4aajuwH/uYd3kL81eCkhwgp1fBUfOkgv/cGfpMQsAOchuw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(944501141)(10201501046)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:DB6PR0801MB2070; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DB6PR0801MB2070; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6069001)(366004)(376002)(396003)(39850400004)(39380400002)(346002)(199004)(189003)(1076002)(386003)(69596002)(2351001)(66066001)(7736002)(6486002)(305945005)(2361001)(76176011)(51416003)(25786009)(36756003)(59450400001)(2906002)(52116002)(6506007)(47776003)(4326008)(6666003)(2950100002)(97736004)(5660300001)(6916009)(16586007)(50466002)(8936002)(81166006)(16526018)(81156014)(8676002)(48376002)(50226002)(316002)(76506005)(106356001)(6512007)(575784001)(86362001)(53416004)(6116002)(53936002)(3846002)(68736007)(478600001)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0801MB2070; H:localhost.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0801MB2070; 23:1tbUb33Q/0euE4L2Hq2sQ0OOtQYMMJhNVgtE6cz?= hnXPp/jBTUGu+2eqUdkA3v+pX4/uhl824R50rxftHQujQQ2ZE0rxH1DMR5qtRZDpW6ZpwLK5/q4PA6EOGEsjK5pTip8zJojiK1U2M3S8IjT44NJZLiW4tOgZcAI+jGLepmRZkeuBai/7sPgYk5D51h7jxfN/M8363GTqZzp8TpvMnaWHtPckAPJBxDRS4gcKqOtIWDpNewd86HyjguvwbrffbosOAQ3gb87ZQ18ebVvVTV+rNokallOrwCPvOpVUM2jgxpaClTUr0j3zSKJlpyRYZkVhB3fvYvIOgk18kSYFSToJZdQ/twNMyQ/fy/dfRUOzSLY0IXhZpWO8qs6AA+Dwm5fT+yJS3GEgBztam6PeIQ1eJoobt0O9hGss5o4RgNo3kpVq4nPKM1ewxkBvy5pGaSHEIXjQCwWpbUorUrWp0g8DwM/vC5DPWbQ4tOgpn6lBlY0YQf7TjHh/1jxiD6PCE7wewPglkkUfKoScxnuJQj2AmkcVqRSg50OgpIBKkwCC//jnBRpRNb7EbHlQ71psc8XJCpGpgVXjV3aWG0vgLgpNcP5aPVrym0zGI++1GH7keOrovx/LdGGuZO8tBcLzXCu9hwxH5P2w5DDeY766tQitxJIuEi5Qa4Pa4xCGkpcLQZHYlM6No6VAF+28NTvlKDCQ1AdpuvXr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JdSTINUJx4y8pA6+bOjlhkCt2Xmz6xAN/VguPlH8/LS/S4hNqZk3/G/htDNeo=; 24:XT+vGRPeu4AcZ0LMeBrFi+S1l1fMxHZXJKbfbe/LBeh3OUU6fw9bKnIcMMje+Nx1eTJ7d5PrtrzXeSdUCdGEl67gXkUT1cNwtcFMYDByvFA=; 7:SiJOWR23yeibUjB3Hnt0VML1Zab8mcM+qtzhK6f1/XE4Aa3zJykEXcVi6YGNWPdmTWMuWK9PLysO449tDx6Gppv28f/XQkm79VDcBaOJLHSSGySUM+CEEyTCwThL8qiDfWJTXReVz6FjI+cfx8UT9P8Xy4AojCsLTbRqFEzfnj1dKXhoOEkpvVUbh+THTpJubmLSkbS4dnIp+Waf7f2uq8CF52Ths7a3qmfClCAHQ1D59DAeRa87y6SZ1ybtq5M6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0801MB2070; 20:OyPlIQpeOvqvJdStbartFHD5Rcjf3zEQ4P/HHmHLCRXXiIT21DDu5uBR/JIShMAyCdEfkwtS4xbVqelnyw07wpprVSRxic9mWuoPhgpttnNx+dTTW86cz4lAihYeDxiUMpY2V5X7ImV9BlQ1KkL3OkxItDPnabRfEz4TiwuMpJg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 09:01:36.7829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93bae4d5-4beb-4299-4d1c-08d5599b166e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2070 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.6.112 Subject: [Qemu-devel] [PATCH 1/5] docs/interop/prl-xml: description of Parallels Disk format X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, den@openvz.org, stefanha@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch adds main information about Parallels Disk format, which consists of DiskDescriptor.xml and other files. Signed-off-by: Edgar Kaziakhmedov Signed-off-by: Klim Kireev Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi --- docs/interop/prl-xml.txt | 158 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 docs/interop/prl-xml.txt diff --git a/docs/interop/prl-xml.txt b/docs/interop/prl-xml.txt new file mode 100644 index 0000000000..7031f8752c --- /dev/null +++ b/docs/interop/prl-xml.txt @@ -0,0 +1,158 @@ += License = + +Copyright (c) 2015-2017, Virtuozzo, Inc. +Authors: + 2015 Denis Lunev + 2015 Vladimir Sementsov-Ogievskiy + 2016-2017 Klim Kireev + 2016-2017 Edgar Kaziakhmedov + +This work is licensed under the terms of the GNU GPL, version 2 or later. +See the COPYING file in the top-level directory. + +This specification contains minimal information about Parallels Disk Format, +which is enough to proper work with QEMU. Nevertheless, Parallels Cloud Server +and Parallels Desktop are able to add some unspecified nodes to xml and use +them, but they are for internal work and don't affect functionality. Also it +uses auxiliary xml "Snapshot.xml", which allows to store optional snapshot +information, but it doesn't influence open/read/write functionality. QEMU and +other software should not use fields not covered in this document and +Snapshot.xml file and must leave them as is. + += Parallels Disk Format = + +Parallels disk consists of two parts: the set of snapshots and the disk +descriptor file, which stores information about all files and snapshots. + +== Definitions == + Snapshot a record of the contents captured at a particular time, + capable of storing current state. A snapshot has UUID and + parent UUID. + + Snapshot image an overlay representing the difference between this + snapshot and some earlier snapshot. + + Overlay an image storing the different sectors between two captured + states. + + Root image snapshot image with no parent, the root of snapshot tree. + + Storage the backing storage for a subset of the virtual disk. When + there is more than one storage in a Parallels disk then that + is referred to as a split image. In this case every storage + covers specific address space area of the disk and has its + particular root image. Split images are not considered here + and are not supported. Each storage consists of disk + parameters and a list of images. The list of images always + contains a root image and may also contain overlays. The + root image can be an expandable Parallels image file or + plain. Overlays must be expandable. + + Description DiskDescriptor.xml stores information about disk parameters, + file snapshots, storages. + + Top The overlay between actual state and some previous snapshot. + Snapshot It is not a snapshot in the classical sense because it + serves as the active image that the guest writes to. + + Sector a 512-byte data chunk. + +== Description file == +All information is placed in a single XML element Parallels_disk_image. +The element has only one attribute "Version", that must be 1.0. +Schema of DiskDescriptor.xml: + + + + ... + + + ... + + + ... + + + +== Disk_Parameters element == +The Disk_Parameters element describes the physical layout of the virtual disk +and some general settings. + +The Disk_Parameters element MUST contain the following child elements: + * Disk_size - number of sectors in the disk, + desired size of the disk. + * Cylinders - number of the disk cylinders. + * Heads - number of the disk heads. + * Sectors - number of the disk sectors per cylinder + (sector size is 512 bytes) + Limitation: Product of the Heads, Sectors and Cylinders + values MUST be equal to the value of the Disk_size parameter. + * Padding - must be 0. Parallels Cloud Server and Parallels Desktop may + use padding set to 1, however this case is not covered + by this spec, QEMU and other software should not open + such disks and should not create them. + +== StorageData element == +This element of the file describes the root image and all snapshot images. + +The StorageData element consists of the Storage child element, as shown below: + + + ... + + + +A Storage element has following child elements: + * Start - start sector of the storage, in case of non split storage + equals to 0. + * End - number of sector following the last sector, in case of non + split storage equals to Disk_size. + * Blocksize - storage cluster size, number of sectors per one cluster. + Cluster size for each "Compressed" (see below) image in + parallels disk must be equal to this field. Note: cluster + size for Parallels Expandable Image is in 'tracks' field of + its header (see docs/interop/parallels.txt). + * Several Image child elements. + +Each Image element has following child elements: + * GUID - image identifier, UUID in curly brackets. + For instance, {12345678-9abc-def1-2345-6789abcdef12}. + The GUID is used by the Snapshots element to reference images + (see below) + * Type - image type of the element. It can be: + "Plain" for raw files. + "Compressed" for expanding disks. + * File - path to image file. Path can be relative to DiskDecriptor.xml or + absolute. + +== Snapshots element == +The Snapshots element describes the snapshot relations with the snapshot tree. + +The element contains the set of Shot child elements, as shown below: + + ... /* Optional child element */ + + ... + + + ... + + ... + + +Each Shot element contains the following child elements: + * GUID - an image GUID. + * ParentGUID - GUID of the image of the parent snapshot. + +The software may traverse snapshots from child to parent using +field as reference. ParentGUID of root snapshot is +{00000000-0000-0000-0000-000000000000}. There should be only one root +snapshot. Top snapshot could be described via two ways: via TopGUID child +element of the Snapshots element or via predefined GUID +{5fbaabe3-6958-40ff-92a7-860e329aab41}. If TopGUID is defined, predefined GUID is +interpreted as usual GUID. All snapshot images (except Top Snapshot) should be +opened read-only. There is another predefined GUID, +BackupID = {704718e1-2314-44c8-9087-d78ed36b0f4e}, which is used by original and +some third-party software for backup, QEMU and other software may operate with +images with GUID = BackupID as usual, however, it is not recommended to use this +GUID for new disks. Top snapshot cannot have this GUID.