Skip to contentSkip to conversation

KVM call agenda for Oct 19

Qemu-devel Ayal Baron 3 participants 5 messages Oct 19, 2010 – Oct 20, 2010 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 314565543.45891287507100965.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com

Ayal Baron

author
#1 lore raw
Quoted 25 lines · ----- "Anthony Liguori
Quoted 11 lines · Dor Laor
Quoted 9 lines · Chris Wright
Quoted 2 lines · * Juan Quintela ([email protected]) wrote:

Please send in any agenda items you are interested in covering.

- 0.13.X -stable handoff
- 0.14 planning
- threadlet work
- virtfs proposals

Quoted 4 lines

- Live snapshots
- We were asked to add this feature for external qcow2 images. Will simple approach of fsync + tracking each requested backing file (it can be per vDisk) and re-open the new image

would

Quoted 1 line

be accepted?

I had assumed that this would involve:

qemu -hda windows.img

(qemu) snapshot ide0-disk0 snap0.img

Quoted 8 lines

1) create snap0.img internally by doing the equivalent of `qemu-img create -f qcow2 -b windows.img snap0.img'
2) bdrv_flush('ide0-disk0')
3) bdrv_open(snap0.img)
4) bdrv_close(windows.img)
5) rename('windows.img', 'windows.img.tmp')
6) rename('snap0.img', 'windows.img')
7) rename('windows.img.tmp', 'snap0.img')

All the rename logic assumes files, need to take into account devices as well (namely LVs) Also, just to make sure, this should support multiple images (concurrent snapshot of all of them or a subset). Otherwise looks good.

Quoted 26 lines

Regards,

Anthony Liguori

Quoted 2 lines

- Integration with FS freeze for consistent guest app snapshot Many apps do not sync their ram state to disk correctly or

frequent

Quoted 1 line

enough. Physical world backup software calls fs freeze on xfs

and

Quoted 4 lines

VSS for windows to make the backup consistent.
In order to integrated this with live snapshots we need a guest agent to trigger the guest fs freeze.
We can either have qemu communicate with the agent directly

through

Quoted 2 lines

virtio-serial or have a mgmt daemon use virtio-serial to communicate with the guest in addition to QMP messages about

the

Quoted 2 lines

live snapshot state.
Preferences? The first solution complicates qemu while the

second

Quoted 5 lines

complicates mgmt.

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 41 lines · Ayal Baron
Quoted 29 lines · ----- "Anthony Liguori
Quoted 12 lines · Dor Laor
Quoted 10 lines · Chris Wright
Quoted 2 lines · * Juan Quintela ([email protected]) wrote:

Please send in any agenda items you are interested in covering.

- 0.13.X -stable handoff
- 0.14 planning
- threadlet work
- virtfs proposals

Quoted 5 lines

- Live snapshots
- We were asked to add this feature for external qcow2 images. Will simple approach of fsync + tracking each requested backing file (it can be per vDisk) and re-open the new image

would

Quoted 2 lines

be accepted?

I had assumed that this would involve:

qemu -hda windows.img

(qemu) snapshot ide0-disk0 snap0.img

Quoted 9 lines

1) create snap0.img internally by doing the equivalent of `qemu-img create -f qcow2 -b windows.img snap0.img'
2) bdrv_flush('ide0-disk0')
3) bdrv_open(snap0.img)
4) bdrv_close(windows.img)
5) rename('windows.img', 'windows.img.tmp')
6) rename('snap0.img', 'windows.img')
7) rename('windows.img.tmp', 'snap0.img')

Quoted 2 lines

All the rename logic assumes files, need to take into account devices as well (namely LVs)

Sure, just s/rename/lvrename/g.

The renaming step can be optional and a management tool can take care of that. It's really just there for convenience since the user expectation is that when you give a name of a snapshot, that the snapshot is reflected in that name not that the new in-use image is that name.

Quoted 2 lines

Also, just to make sure, this should support multiple images (concurrent snapshot of all of them or a subset).

Yeah, concurrent is a little trickier. Simple solution is for a management tool to just do a stop + multiple snapshots + cont. It's equivalent to what we'd do if we don't do it aio which is probably how we'd do the first implementation.

But in the long term, I think the most elegant solution would be to expose the freeze api via QMP and let a management tool freeze multiple devices, then start taking snapshots, then unfreeze them when all snapshots are complete.

Regards,

Anthony Liguori

Quoted 40 lines

Otherwise looks good.

Quoted 37 lines

Regards,

Anthony Liguori

Quoted 3 lines

- Integration with FS freeze for consistent guest app snapshot Many apps do not sync their ram state to disk correctly or

frequent

Quoted 2 lines

enough. Physical world backup software calls fs freeze on xfs

and

Quoted 5 lines

VSS for windows to make the backup consistent.
In order to integrated this with live snapshots we need a guest agent to trigger the guest fs freeze.
We can either have qemu communicate with the agent directly

through

Quoted 3 lines

virtio-serial or have a mgmt daemon use virtio-serial to communicate with the guest in addition to QMP messages about

the

Quoted 3 lines

live snapshot state.
Preferences? The first solution complicates qemu while the

second

Quoted 6 lines

complicates mgmt.

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

Am 19.10.2010 19:09, schrieb Anthony Liguori:

Quoted 42 lines · Ayal Baron
Quoted 41 lines
Quoted 38 lines · ----- "Anthony Liguori
Quoted 12 lines · Dor Laor
Quoted 10 lines · Chris Wright
Quoted 2 lines · * Juan Quintela ([email protected]) wrote:

Please send in any agenda items you are interested in covering.

- 0.13.X -stable handoff
- 0.14 planning
- threadlet work
- virtfs proposals

Quoted 5 lines

- Live snapshots
- We were asked to add this feature for external qcow2 images. Will simple approach of fsync + tracking each requested backing file (it can be per vDisk) and re-open the new image

would

Quoted 2 lines

be accepted?

I had assumed that this would involve:

qemu -hda windows.img

(qemu) snapshot ide0-disk0 snap0.img

1) create snap0.img internally by doing the equivalent of `qemu-img create -f qcow2 -b windows.img snap0.img'
2) bdrv_flush('ide0-disk0')
3) bdrv_open(snap0.img)
4) bdrv_close(windows.img)
5) rename('windows.img', 'windows.img.tmp')
6) rename('snap0.img', 'windows.img')
7) rename('windows.img.tmp', 'snap0.img')

Quoted 4 lines
Quoted 2 lines

All the rename logic assumes files, need to take into account devices as well (namely LVs)

Sure, just s/rename/lvrename/g.

That would mean that you need to have both backing file and new COW image on LVs.

Quoted 4 lines

The renaming step can be optional and a management tool can take care of that. It's really just there for convenience since the user expectation is that when you give a name of a snapshot, that the snapshot is reflected in that name not that the new in-use image is that name.

I think that depends on the terminology you use.

If you call it doing a snapshot, then probably people expect that the snapshot is a new file and they continue to work on the same file (and they may not understand that removing the snapshot destroys the "main" image).

If you call it something like creating a new branch, they will expect that the old file stays as it is and they create something new on top of that.

So maybe we shouldn't start doing renames (which we cannot do for anything but files anyway, consider not only LVs, but also nbd or http backends), but rather think of a good name for the operation.

Kevin

author
#4 lore raw
Quoted 47 lines · ----- "Kevin Wolf

Am 19.10.2010 19:09, schrieb Anthony Liguori:

Quoted 11 lines · Ayal Baron
Quoted 10 lines
Quoted 7 lines · ----- "Anthony Liguori
Quoted 5 lines · Dor Laor
Quoted 3 lines · Chris Wright
Quoted 1 line · * Juan Quintela ([email protected]) wrote:

Please send in any agenda items you are interested in

covering.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 1 line

- 0.13.X -stable handoff
- 0.14 planning
- threadlet work
- virtfs proposals

- Live snapshots
- We were asked to add this feature for external qcow2 images. Will simple approach of fsync + tracking each

requested

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

backing file (it can be per vDisk) and re-open the new

image

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

would

Quoted 2 lines

be accepted?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

I had assumed that this would involve:

qemu -hda windows.img

(qemu) snapshot ide0-disk0 snap0.img

1) create snap0.img internally by doing the equivalent of

`qemu-img

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

create -f qcow2 -b windows.img snap0.img'
2) bdrv_flush('ide0-disk0')
3) bdrv_open(snap0.img)
4) bdrv_close(windows.img)
5) rename('windows.img', 'windows.img.tmp')
6) rename('snap0.img', 'windows.img')
7) rename('windows.img.tmp', 'snap0.img')

Quoted 8 lines
Quoted 1 line
Quoted 1 line

All the rename logic assumes files, need to take into account

devices as well (namely LVs)

Quoted 3 lines
Quoted 1 line

Sure, just s/rename/lvrename/g.

That would mean that you need to have both backing file and new COW image on LVs.

That is indeed the way we work (LVs all the way) and you are correct that qemu should not assume this, but as Anthony said, the rename bit should be optional (and we would opt to go without) if at all.

Quoted 28 lines
Quoted 2 lines

The renaming step can be optional and a management tool can take

care of

Quoted 1 line

that. It's really just there for convenience since the user

expectation

Quoted 2 lines

is that when you give a name of a snapshot, that the snapshot is reflected in that name not that the new in-use image is that name.

I think that depends on the terminology you use.

If you call it doing a snapshot, then probably people expect that the snapshot is a new file and they continue to work on the same file (and
they may not understand that removing the snapshot destroys the "main"
image).

If you call it something like creating a new branch, they will expect that the old file stays as it is and they create something new on top of
that.

So maybe we shouldn't start doing renames (which we cannot do for anything but files anyway, consider not only LVs, but also nbd or http
backends), but rather think of a good name for the operation.

Kevin

#5 lore raw
In reply to Kevin Wolf
Quoted 55 lines · Kevin Wolf

Am 19.10.2010 19:09, schrieb Anthony Liguori:

Quoted 53 lines · Ayal Baron
Quoted 52 lines
Quoted 47 lines · ----- "Anthony Liguori
Quoted 16 lines · Dor Laor
Quoted 13 lines · Chris Wright
Quoted 3 lines · * Juan Quintela ([email protected]) wrote:

Please send in any agenda items you are interested in covering.

- 0.13.X -stable handoff
- 0.14 planning
- threadlet work
- virtfs proposals

Quoted 6 lines

- Live snapshots
- We were asked to add this feature for external qcow2 images. Will simple approach of fsync + tracking each requested backing file (it can be per vDisk) and re-open the new image

would

Quoted 3 lines

be accepted?

I had assumed that this would involve:

qemu -hda windows.img

(qemu) snapshot ide0-disk0 snap0.img

1) create snap0.img internally by doing the equivalent of `qemu-img create -f qcow2 -b windows.img snap0.img'
2) bdrv_flush('ide0-disk0')
3) bdrv_open(snap0.img)
4) bdrv_close(windows.img)
5) rename('windows.img', 'windows.img.tmp')
6) rename('snap0.img', 'windows.img')
7) rename('windows.img.tmp', 'snap0.img')

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

All the rename logic assumes files, need to take into account devices as well (namely LVs)

Sure, just s/rename/lvrename/g.

That would mean that you need to have both backing file and new COW image on LVs.

Yeah, I guess there are two options. You could force a user to create the new leaf image or you could make the command take a blockdev spec excluding the backing_file and automatically insert the backing_file attribute into the spec before creating the bs.

Quoted 12 lines
Quoted 5 lines

The renaming step can be optional and a management tool can take care of that. It's really just there for convenience since the user expectation is that when you give a name of a snapshot, that the snapshot is reflected in that name not that the new in-use image is that name.

I think that depends on the terminology you use.

If you call it doing a snapshot, then probably people expect that the snapshot is a new file and they continue to work on the same file (and they may not understand that removing the snapshot destroys the "main" image).

Quoted 8 lines

If you call it something like creating a new branch, they will expect that the old file stays as it is and they create something new on top of that.

So maybe we shouldn't start doing renames (which we cannot do for anything but files anyway, consider not only LVs, but also nbd or http backends), but rather think of a good name for the operation.

Yeah, that's a reasonable point.

Regards,

Anthony Liguori

Quoted 2 lines

Kevin