3 # Test parallels load bitmap
5 # Copyright (c) 2021 Virtuozzo International GmbH.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 CT
=parallels-with-bitmap-ct
22 DIR
=$PWD/parallels-with-bitmap-dir
24 XML
=$DIR/DiskDescriptor.xml
25 TARGET
=parallels-with-bitmap.bz2
29 prlctl create
$CT --vmtype ct
30 prlctl
set $CT --device-add hdd
--image $DIR --recreate --size 2G
33 qemu-img create
-f parallels
$IMG 64G
38 prlctl
set $CT --device-del hdd1
41 dev
=$
(ploop mount
$XML |
sed -n 's/^Adding delta dev=\(\/dev\/ploop[0-9]\+\).*/\1/p')
42 dd if=/dev
/zero of
=$dev bs
=64K seek
=5 count
=2 oflag
=direct
43 dd if=/dev
/zero of
=$dev bs
=64K seek
=30 count
=1 oflag
=direct
44 dd if=/dev
/zero of
=$dev bs
=64K seek
=10 count
=3 oflag
=direct
45 ploop umount
$XML # bitmap name will be in the output