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
10-20-2008, 02:23 PM
Bryan Kearney
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
10-20-2008, 02:32 PM
Cole Robinson
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
10-20-2008, 03:03 PM
Joey Boggs
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
10-20-2008, 03:04 PM
Joey Boggs
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
10-20-2008, 03:16 PM
Cole Robinson
virt-image verify disk checksum
Joey Boggs wrote:
> updated to use corrected method
>
>