[et-mgmt-tools] [patch] virt-image verify disk checksum

Joey Boggs jboggs at redhat.com
Mon Oct 20 15:04:52 UTC 2008


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
>
>
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: virt-image-disk-csum-verify-10-20-1100.patch
Type: text/x-patch
Size: 924 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20081020/0fc8768a/attachment.bin>


More information about the et-mgmt-tools mailing list