Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 853338 Details for
Bug 1056126
virt-v2v OVA/OVF import fails with 'MegaBytes' as memory allocation units
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch; fully compliant with OVF specs AFAICT
proposed-1056126.patch (text/plain), 2.18 KB, created by
Ronald van Zantvoort
on 2014-01-21 15:54:51 UTC
(
hide
)
Description:
Proposed patch; fully compliant with OVF specs AFAICT
Filename:
MIME Type:
Creator:
Ronald van Zantvoort
Created:
2014-01-21 15:54:51 UTC
Size:
2.18 KB
patch
obsolete
>--- /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm 2013-08-09 00:02:58.000000000 +0200 >+++ ./VMwareOVASource-p1056126.pm 2014-01-21 16:44:18.224678721 +0100 >@@ -129,10 +129,45 @@ > $meta{name} = _node_val($root, '/Envelope/VirtualSystem/Name/text()'); > my ($memory) = $root->findnodes("/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $hw_families{Memory}]"); > if (defined($memory)) { >- my $units = _node_val($memory, 'rasd:AllocationUnits/text()'); >- $units =~ /^byte \* 2\^(\d+)$/ or die "Unexpected memory units: $units"; >- $units = 2 ** $1; >- $memory = _node_val($memory, 'rasd:VirtualQuantity/text()') * $units; >+ my $units; >+ >+ $units = _node_val($memory, 'rasd:VirtualQuantityUnits/text()'); >+ >+ #Officially AllocationUnits is only for the Reservation & Limit properties >+ if(!defined($units)){ >+ $units = _node_val($memory, 'rasd:AllocationUnits/text()'); >+ } >+ >+ #$1 = kilo,mega,giga >+ #$2 = s >+ #$3 = group w/calc >+ #$4 = 2 | 10 (^$5) >+ #$5 = ^digit >+ $units =~ /^(kilo|mega|giga){0,1}byte(s){0,1}([\s]*\*[\s]*(\d+)[\s]*\^[\s]*(\d+)){0,1}[\s]*$/i or die "Unexpected memory units: $units"; >+ >+ my $memory_size; >+ #Can't find references in the OVA spec to binary/decimal counting, >+ #other than that units are supposed to be logical. >+ #In the case of RAM, binary logic is logical. >+ if(defined($1)) { >+ if ($1 =~ "[Kk]ilo"){ >+ $memory_size = 1024; >+ } elsif ($1 =~ "[Mm]ega"){ >+ $memory_size = 1024 * 1024; >+ } elsif ($1 =~ "[Gg]iga"){ >+ $memory_size = 1024 * 1024 * 1024; >+ } else { >+ die "Unexpected memory units: $units"; >+ } >+ } else { >+ $memory_size = 1; >+ } >+ >+ if(defined($3)) { >+ $memory_size = $memory_size * $4 ** $5; >+ } >+ >+ $memory = _node_val($memory, 'rasd:VirtualQuantity/text()') * $memory_size; > } else { > $memory = 1 * 1024 * 1024 * 1024; # Shouldn't happen, but default to 1GB RAM > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1056126
:
853338
|
853938