blob: c968004155192586a8ade8e2614460e004477616 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
no batmap on convertion from qcow2 to vhd
we run following version of qemu-img:
$ qemu-img --version
qemu-img version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.41), Copyright (c) 2004-2008 Fabrice Bellard
$
Here is os version:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
$
When we use qemu-img for conversion of qcow2 to vhd newly created file doesnt show batmap summary when we run:
# vhd-util read -p -n centos76.vhd
VHD Footer Summary:
-------------------
Cookie : conectix
Features : (0x00000002) <RESV>
File format version : Major: 1, Minor: 0
Data offset : 512
Timestamp : Mon Mar 4 13:21:27 2019
Creator Application : 'qemu'
Creator version : Major: 5, Minor: 3
Creator OS : Windows
Original disk size : 8192 MB (8590417920 Bytes)
Current disk size : 8192 MB (8590417920 Bytes)
Geometry : Cyl: 16645, Hds: 16, Sctrs: 63
: = 8192 MB (8590417920 Bytes)
Disk type : Dynamic hard disk
Checksum : 0xfffff119|0xfffff119 (Good!)
UUID : 23772822-a66c-45a2-be37-8474604147c7
Saved state : No
Hidden : 0
VHD Header Summary:
-------------------
Cookie : cxsparse
Data offset (unusd) : 18446744073709
Table offset : 1536
Header version : 0x00010000
Max BAT size : 4097
Block size : 2097152 (2 MB)
Parent name :
Parent UUID : 00000000-0000-0000-0000-000000000000
Parent timestamp : Fri Dec 31 19:00:00 1999
Checksum : 0xfffff466|0xfffff466 (Good!)
#
I am not so strong in VHD format details and not exactly sure how batmap is needed, but when I do conversion of qcow2 image by using vhd-util at the end I get file with proper batmap summary.
In our environment we use CloudStack and Citrix and we use those converted from qcow2 to vhd images as templates. In general there is no problems, but whenever we create snapshot out of VM created from such template vhd-util read command starts giving us error like below:
#
-------------------
Cookie : conectix
Features : (0x00000002) <RESV>
File format version : Major: 1, Minor: 0
Data offset : 512
Timestamp : Thu Aug 29 16:04:30 2019
Creator Application : 'tap'
Creator version : Major: 1, Minor: 3
Creator OS : Unknown!
Original disk size : 8194 MB (8592031744 Bytes)
Current disk size : 8194 MB (8592031744 Bytes)
Geometry : Cyl: 16648, Hds: 16, Sctrs: 63
: = 8193 MB (8591966208 Bytes)
Disk type : Dynamic hard disk
Checksum : 0xfffff074|0xfffff074 (Good!)
UUID : 2b3cac7d-16e1-4771-b8cd-bb8c7876c761
Saved state : No
Hidden : 0
VHD Header Summary:
-------------------
Cookie : cxsparse
Data offset (unusd) : 18446744073709
Table offset : 1536
Header version : 0x00010000
Max BAT size : 4097
Block size : 2097152 (2 MB)
Parent name :
Parent UUID : 00000000-0000-0000-0000-000000000000
Parent timestamp : Sat Jan 1 00:00:00 2000
Checksum : 0xfffff466|0xfffff466 (Good!)
failed to get batmap header
#
With the templates that show correct batmap summary that are created by conversion of qcow2 image by vhd-util convert we don't have such problems.
So I wanted to check with community if not existence of the batmap can cause (be the reason of) this behaviour later on snapshot creation stage? Should we always have batmap summary on output of vhd-util read command?
|