Skip to contentSkip to conversation

QEMUFile's format

Qemu-devel ¤終於aware 5 participants 6 messages Dec 23, 2011 – Dec 30, 2011

lore
Share & tools
lore
#0 lore raw

Hi,
Is anyone clear about the format of qemu file for savevm or loadvm?

bruce

#1 lore raw

Do you mean the file format? qcow2, qed, raw? Or the content layout in the file image?

Quoted 3 lines · ¤終於aware

Hi,
Is anyone clear about the format of qemu file for savevm or loadvm? bruce

Signature · 2 lines
Shu Ming<[email protected]>
IBM China Systems and Technology Laboratory
#2 lore raw
Quoted 5 lines · Shu Ming

Do you mean the file format? qcow2, qed, raw? Or the content layout in the file image?

Quoted 2 lines · ¤終於aware

Hi,
Is anyone clear about the format of qemu file for savevm or loadvm?

                                                  ^^^^^^^^^^

savevm requires image's format to be qcow2.

You can check http://en.wikipedia.org/wiki/Qcow for more information.

Regards,
chenwj

Signature · 5 lines
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
#4 lore raw
In reply to 陳韋任

You could have a look at docs/specs directory.

2011/12/23 陳韋任 <[email protected]>

Quoted 22 lines · Shu Ming
Quoted 5 lines

Do you mean the file format? qcow2, qed, raw? Or the content layout in the file image?

Quoted 2 lines · ¤終於aware

Hi,
Is anyone clear about the format of qemu file for savevm or loadvm?

                                                  ^^^^^^^^^^

savevm requires image's format to be qcow2.

You can check http://en.wikipedia.org/wiki/Qcow for more information.

Regards,
chenwj

--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

#5 lore raw
In reply to ¤終於aware
Quoted 1 line · ¤終於aware

Is anyone clear about the format of qemu file for savevm or loadvm?

If you are interested in the serialized device state format (e.g. the e1000 NIC's serialized state) then the answer is no. I'm not aware of any specification or schema that documents the device state.

It has been known to change in the past and writing tools that depend on a specific device state layout outside of qemu.git is not viable today because you'll have to watch qemu.git hw/ code changes and update your external code every time something changes. It seems like a bad idea to duplicate the device state layout outside of qemu.git.

For a temporary hack, read the QEMUFile and hw/ save/load code. You can try qemu-io -c "read -b 0 $length" to extract the vmstate from a qcow2 image file.

Stefan