Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora/Linux Management Tools (http://www.linux-archive.org/fedora-linux-management-tools/)
-   -   virt-image verify disk checksum (http://www.linux-archive.org/fedora-linux-management-tools/178290-virt-image-verify-disk-checksum.html)

Joey Boggs 10-17-2008 08:17 PM

virt-image verify disk checksum
 
This patch will make use of the recent disk checksum function for
virt-image and verifies prior to importing



_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Bryan Kearney 10-20-2008 02:23 PM

virt-image verify disk checksum
 
Joey Boggs wrote:
This patch will make use of the recent disk checksum function for
virt-image and verifies prior to importing



Is there any reason why I would want to control which signature to check?

-- bk

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Cole Robinson 10-20-2008 02:32 PM

virt-image verify disk checksum
 
Joey Boggs wrote:
> This patch will make use of the recent disk checksum function for
> virt-image and verifies prior to importing
>

> diff -r 9f45a36d8242 virt-image
> --- a/virt-image Thu Oct 16 11:18:49 2008 -0400
> +++ b/virt-image Fri Oct 17 16:12:16 2008 -0400
> @@ -145,6 +145,8 @@
> parser.add_option("", "--replace",action="store_true", dest="replace",
> help=_("Overwrite, or destroy, an existing image with the same name"),
> default=False)
> + parser.add_option("","--skip-checksum", action="store_true", dest="skipchecksum",
> + help=_("Skip disk checksum verification process"))
>
> (options,args) = parser.parse_args()
> if len(args) < 1:
> @@ -204,6 +206,10 @@
> if options.noapic:
> guest.features["apic"] = False
>
> + if not options.skipchecksum:
> + for d in image.storage.values():
> + virtinst.ImageParser.Disk.check_disk_signature(d)
> +

This line just abuses the way python does object orientation. You
want to do:

if not options.skipchecksum:
for disk in image.storage.values():
disk.check_disk_signature()

Thanks,
Cole


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Joey Boggs 10-20-2008 03:03 PM

virt-image verify disk checksum
 
Bryan Kearney wrote:

Joey Boggs wrote:
This patch will make use of the recent disk checksum function for
virt-image and verifies prior to importing



Is there any reason why I would want to control which signature to check?

More or less could be just preference, sha256 being stronger and less
potential to generate the same signature again. Final checksum is up to
the image release person/vendor.



-- bk

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Joey Boggs 10-20-2008 03:04 PM

virt-image verify disk checksum
 
updated to use corrected method




Cole Robinson wrote:

Joey Boggs wrote:

This patch will make use of the recent disk checksum function for
virt-image and verifies prior to importing







diff -r 9f45a36d8242 virt-image
--- a/virt-image Thu Oct 16 11:18:49 2008 -0400
+++ b/virt-image Fri Oct 17 16:12:16 2008 -0400
@@ -145,6 +145,8 @@
parser.add_option("", "--replace",action="store_true", dest="replace",
help=_("Overwrite, or destroy, an existing image with the same name"),
default=False)
+ parser.add_option("","--skip-checksum", action="store_true", dest="skipchecksum",

+ help=_("Skip disk checksum verification process"))

(options,args) = parser.parse_args()

if len(args) < 1:
@@ -204,6 +206,10 @@
if options.noapic:
guest.features["apic"] = False

+ if not options.skipchecksum:

+ for d in image.storage.values():
+ virtinst.ImageParser.Disk.check_disk_signature(d)
+



This line just abuses the way python does object orientation. You
want to do:

if not options.skipchecksum:
for disk in image.storage.values():
disk.check_disk_signature()

Thanks,
Cole





_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Cole Robinson 10-20-2008 03:16 PM

virt-image verify disk checksum
 
Joey Boggs wrote:
> updated to use corrected method
>
>

Thanks, applied:

http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=976334e29192

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


All times are GMT. The time now is 09:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.