qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info
@ 2016-05-22  9:55 Lin Ma
  2016-05-23  9:00 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Lin Ma @ 2016-05-22  9:55 UTC (permalink / raw)
  To: qemu-devel, kwolf, mreitz

Currently, the output of 'info snapshots' show fully available snapshots.
 
In my opinion there are 2 disadvantages:
1. It's opaque, hides some snapshot information to users. It's not convenient
if users want to know more about all of snapshots on every block device via monitor.
 
2. It uses snapshot id to determine whether the snapshots are 'fully available'.
It causes incorrect output in some scenario.
 
For instance:
(qemu) info block
drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2 (qcow2)
    Cache mode: 	  writeback
 
drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow2 (qcow2)
    Cache mode: 	  writeback
(qemu) 
(qemu) info snapshots 
There is no snapshot available.
(qemu) 
(qemu) snapshot_blkdev_internal drive_image1 snap1
(qemu) 
(qemu) info snapshots 
There is no suitable snapshot available
(qemu) 
(qemu) savevm checkpoint-1
(qemu) 
(qemu) info snapshots 
ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
(qemu)

$ qemu-img snapshot -l disk0.qcow2
Snapshot list:
ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
2		 checkpoint-1		   165M 2016-05-22 16:58:07   00:02:06.813

$ qemu-img snapshot -l disk1.qcow2
Snapshot list:
ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
1		 checkpoint-1			  0 2016-05-22 16:58:07   00:02:06.813
 
 
 
I'd like to patch it to make the output looking like this:
(qemu) info snapshots 
 
Snapshot list from drive_image1:
ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
2		 checkpoint-1		   165M 2016-05-22 16:58:07   00:02:06.813
 

Snapshot list from  drive_image2:
ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
1		 checkpoint-1			  0 2016-05-22 16:58:07   00:02:06.813
 
 
any comments will be appreciated.

Thanks,
Lin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info
  2016-05-22  9:55 [Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info Lin Ma
@ 2016-05-23  9:00 ` Kevin Wolf
  2016-05-25  5:49   ` [Qemu-devel] 答复: " Lin Ma
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2016-05-23  9:00 UTC (permalink / raw)
  To: Lin Ma; +Cc: qemu-devel, mreitz

Am 22.05.2016 um 11:55 hat Lin Ma geschrieben:
> Currently, the output of 'info snapshots' show fully available snapshots.
>  
> In my opinion there are 2 disadvantages:
> 1. It's opaque, hides some snapshot information to users. It's not convenient
> if users want to know more about all of snapshots on every block device via
> monitor.
>  
> 2. It uses snapshot id to determine whether the snapshots are 'fully
> available'.
> It causes incorrect output in some scenario.
>  
> For instance:
> (qemu) info block
> drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2
> (qcow2)
>     Cache mode:       writeback
>  
> drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow2
> (qcow2)
>     Cache mode:       writeback
> (qemu)
> (qemu) info snapshots
> There is no snapshot available.
> (qemu)
> (qemu) snapshot_blkdev_internal drive_image1 snap1
> (qemu)
> (qemu) info snapshots
> There is no suitable snapshot available
> (qemu)
> (qemu) savevm checkpoint-1
> (qemu)
> (qemu) info snapshots
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         snap1                     0 2016-05-22 16:57:31   00:01:30.567
> (qemu)
> 
> $ qemu-img snapshot -l disk0.qcow2
> Snapshot list:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         snap1                     0 2016-05-22 16:57:31   00:01:30.567
> 2         checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813
> 
> $ qemu-img snapshot -l disk1.qcow2
> Snapshot list:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         checkpoint-1              0 2016-05-22 16:58:07   00:02:06.813
>  
>  
>  
> I'd like to patch it to make the output looking like this:
> (qemu) info snapshots
>  
> Snapshot list from drive_image1:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         snap1                     0 2016-05-22 16:57:31   00:01:30.567
> 2         checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813
>  
> 
> Snapshot list from  drive_image2:
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         checkpoint-1              0 2016-05-22 16:58:07   00:02:06.813

I think that would clutter the output too much in the common case where
all images have the same snapshots. How about having a list with all
loadable snapshots first, and then only an additional list for images
that have snapshots that aren't present on all images?

(qemu) info snapshots
List of snapshots present on all disks:
 ID        TAG                 VM SIZE                DATE       VM CLOCK
 --        checkpoint-1           165M 2016-05-22 16:58:07   00:02:06.813

List of partial (non-loadable) snapshots on 'drive_image1':
 ID        TAG                 VM SIZE                DATE       VM CLOCK
 1         snap1                     0 2016-05-22 16:57:31   00:01:30.567

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] 答复: Re:  RFC: Make 'info snapshots' show all of snapshots with multiple devices info
  2016-05-23  9:00 ` Kevin Wolf
@ 2016-05-25  5:49   ` Lin Ma
  0 siblings, 0 replies; 3+ messages in thread
From: Lin Ma @ 2016-05-25  5:49 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, mreitz



>>> Kevin Wolf <kwolf@redhat.com> 2016/5/23 星期一 下午 5:00 >>>
>Am 22.05.2016 um 11:55 hat Lin Ma geschrieben:
>> Currently, the output of 'info snapshots' show fully available snapshots.
>>  
>> In my opinion there are 2 disadvantages:
>> 1. It's opaque, hides some snapshot information to users. It's not convenient
>> if users want to know more about all of snapshots on every block device via
>> monitor.
>>  
>> 2. It uses snapshot id to determine whether the snapshots are 'fully
>> available'.
>> It causes incorrect output in some scenario.
>>  
>> For instance:
>> (qemu) info block
>> drive_image1 (#block113): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk0.qcow2
>> (qcow2)
>>	 Cache mode:	   writeback
>>  
>> drive_image2 (#block349): /opt/vms/SLES12-SP1-JeOS-x86_64-GM/disk1.qcow2
>> (qcow2)
>>	 Cache mode:	   writeback
>> (qemu)
>> (qemu) info snapshots
>> There is no snapshot available.
>> (qemu)
>> (qemu) snapshot_blkdev_internal drive_image1 snap1
>> (qemu)
>> (qemu) info snapshots
>> There is no suitable snapshot available
>> (qemu)
>> (qemu) savevm checkpoint-1
>> (qemu)
>> (qemu) info snapshots
>> ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>> 1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
>> (qemu)
>> 
>> $ qemu-img snapshot -l disk0.qcow2
>> Snapshot list:
>> ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>> 1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
>> 2		 checkpoint-1		   165M 2016-05-22 16:58:07   00:02:06.813
>> 
>> $ qemu-img snapshot -l disk1.qcow2
>> Snapshot list:
>> ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>> 1		 checkpoint-1			  0 2016-05-22 16:58:07   00:02:06.813
>>  
>>  
>>  
>> I'd like to patch it to make the output looking like this:
>> (qemu) info snapshots
>>  
>> Snapshot list from drive_image1:
>> ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>> 1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
>> 2		 checkpoint-1		   165M 2016-05-22 16:58:07   00:02:06.813
>>  
>> 
>> Snapshot list from  drive_image2:
>> ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>> 1		 checkpoint-1			  0 2016-05-22 16:58:07   00:02:06.813
>
>I think that would clutter the output too much in the common case where
>all images have the same snapshots. How about having a list with all
>loadable snapshots first, and then only an additional list for images
>that have snapshots that aren't present on all images?
>
>(qemu) info snapshots
>List of snapshots present on all disks:
>ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>--	    checkpoint-1 		  165M 2016-05-22 16:58:07   00:02:06.813
Double short dash, good idea.

>List of partial (non-loadable) snapshots on 'drive_image1':
>ID	    TAG 			    VM SIZE 			   DATE  	 VM CLOCK
>1		 snap1					 0 2016-05-22 16:57:31   00:01:30.567
These looks more convenient. I'll do it follow this format, Thanks.
 
 
Lin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-25  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-22  9:55 [Qemu-devel] RFC: Make 'info snapshots' show all of snapshots with multiple devices info Lin Ma
2016-05-23  9:00 ` Kevin Wolf
2016-05-25  5:49   ` [Qemu-devel] 答复: " Lin Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).