[PVE-User] VMA endianness bug?

Gwenn Gueguen gwenn+proxmox at beurre.demisel.net
Fri Nov 25 11:27:35 CET 2016


Hi,

I had an issue while reading a VMA file written by a proxmox backup
on an up-to-date Proxmox 4.3 node.

According to vma_spec.txt[1], "All numbers in VMA archive are stored in
Big Endian byte order." but it looks like the 2 byte size field at the
beginning of each blob are stored in little endian byte order.

Here is an extract of the blob buffer:

030000 00 11 00 71 65 6D 75 2D 73 65 72 76 65 72 2E 63 ...qemu-server.c
030020 6F 6E 66 00 24 02 62 61 6C 6C 6F 6F 6E 3A 20 31 onf.$.balloon: 1

Config name length is 17 (0x0011) but is written in file as 4352
(0x1100).
Config data length is 548 (0x0224) but is written in file as 9218
(0x2402).

Others numbers in the header (version, timestamp, etc.) are written in
big endian byte order (0X00000001 for the version).

Cheers,

[1] https://git.proxmox.com/?p=pve-qemu-kvm.git;a=blob;f=vma_spec.txt

-- 
Gwenn Gueguen



More information about the pve-user mailing list