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 853903 Details for
Bug 1056534
virt-v2v OVF/OVA import fails when disks aren't attached to either IDE or SCSI controllers
[?]
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]
This proposed patch makes the device list OVF-compliant, checks all possible controllers for disks and preserves bustypes
proposed-1056534.patch (text/plain), 6.92 KB, created by
Ronald van Zantvoort
on 2014-01-22 14:56:50 UTC
(
hide
)
Description:
This proposed patch makes the device list OVF-compliant, checks all possible controllers for disks and preserves bustypes
Filename:
MIME Type:
Creator:
Ronald van Zantvoort
Created:
2014-01-22 14:56:50 UTC
Size:
6.92 KB
patch
obsolete
>--- /usr/share/perl5/vendor_perl/Sys/VirtConvert/Connection/VMwareOVASource.pm 2013-08-09 00:02:58.000000000 +0200 >+++ ./VMwareOVASource-p1056534.pm 2014-01-22 15:39:43.023413363 +0100 >@@ -49,18 +49,41 @@ > =cut > > # Hardware profiles for Hardware Resources in OVF file >- >+# http://schemas.dmtf.org/wbem/cim-html/2.39.0+/CIM_ResourceAllocationSettingData.html > our %hw_families = ( >- 'CPU' => 3, >- 'Memory' => 4, >- 'IDE Controller' => 5, >- 'SCSI Controller' => 6, >- 'Ethernet' => 10, >- 'Floppy' => 14, >- 'CD Drive' => 15, >- 'DVD Drive' => 16, >- 'Disk Drive' => 17, >- 'USB Controller' => 23 >+ 'Other' => 1, >+ 'Computer System' => 2, >+ 'Processor' => 3, >+ 'Memory' => 4, >+ 'IDE Controller' => 5, >+ 'Parallel SCSI HBA' => 6, >+ 'FC HBA' => 7, >+ 'iSCSI HBA' => 8, >+ 'IB HCA' => 9, >+ 'Ethernet Adapter' => 10, >+ 'Other Network Adapter' => 11, >+ 'I/O Slot' => 12, >+ 'I/O Device' => 13, >+ 'Floppy Drive' => 14, >+ 'CD Drive' => 15, >+ 'DVD Drive' => 16, >+ 'Disk Drive' => 17, >+ 'Tape Drive' => 18, >+ 'Storage Extent' => 19, >+ 'Other storage device' => 20, >+ 'Serial port' => 21, >+ 'Parallel port' => 22, >+ 'USB Controller' => 23, >+ 'Graphics controller' => 24, >+ 'IEEE 1394 Controller' => 25, >+ 'Partitionable Unit' => 26, >+ 'Base Partitionable Unit' => 27, >+ 'Power' => 28, >+ 'Cooling Capacity' => 29, >+ 'Ethernet Switch Port' => 30, >+ 'Logical Disk' => 31, >+ 'Storage Volume' => 32, >+ 'Ethernet Connection' => 33 > ); > > # Support for uncompressing big files >@@ -138,7 +161,7 @@ > } > $meta{memory} = $memory; > >- $meta{cpus} = _node_val($root, "/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $hw_families{CPU}]/VirtualQuantity"); >+ $meta{cpus} = _node_val($root, "/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $hw_families{Processor}]/VirtualQuantity"); > $meta{cpus} ||= 1; # Shouldn't happen, but default to 1 CPU > > # return vmx-08 that is vmware esxi 5.0 >@@ -149,51 +172,58 @@ > $meta{disks} = []; > $meta{removables} = []; > >- #iterate on scsi controllers Id >- >- my $scsi_controllers = _collect_controllers($root, $hw_families{'SCSI Controller'}); >+ my @controllerTypes = ('IDE Controller', 'Parallel SCSI HBA', 'FC HBA', 'iSCSI HBA', 'IB HCA', 'Other storage device'); > my $scsi_letter = 'a'; >- for my $scsi_controller (sort keys %$scsi_controllers) { >- foreach my $disk (_get_resources($root, $scsi_controllers->{$scsi_controller})) { >- my %info; >- $info{device} = 'sd'.$scsi_letter++; >- >- my $resource_type = _node_val($disk, 'rasd:ResourceType/text()'); >- if ($resource_type eq $hw_families{'Disk Drive'}) { >- $info{src} = $self->_get_volume($root, $disk); >- push(@{$meta{disks}}, \%info); >- } >- >- elsif ($resource_type eq $hw_families{'CD Drive'}) { >- $info{type} = 'cdrom'; >- push(@{$meta{removables}}, \%info); >- } >+ my $ide_letter = 'a'; >+ my $disk_prefix; >+ my $disk_bus; >+ >+ foreach my $controllerType (@controllerTypes) { >+ my $disk_letter; >+ if ($controllerType eq 'IDE Controller') { >+ $disk_prefix = 'hd'; >+ $disk_letter = \$ide_letter; >+ $disk_bus = 'ide'; >+ } else { >+ $disk_prefix = 'sd'; >+ $disk_letter = \$scsi_letter; >+ $disk_bus = 'scsi'; > } >- } > >- my $ide_controllers = _collect_controllers($root, $hw_families{'IDE Controller'}); >- my $ide_letter = 'a'; >- for my $ide_controller (sort keys %$ide_controllers) { >- foreach my $disk (_get_resources($root, $ide_controllers->{$ide_controller}, $hw_families{'Disk Drive'})) { >- my %info; >- $info{device} = 'hd'.$ide_letter++; >- >- my $resource_type = _node_val($disk, 'rasd:ResourceType/text()'); >- if ($resource_type eq $hw_families{'Disk Drive'}) { >- $info{src} = $self->_get_volume($root, $disk); >- push(@{$meta{disks}}, \%info); >+ my $controllers = _collect_controllers($root, $hw_families{$controllerType}); >+ >+ foreach my $controller (sort keys %$controllers){ >+ my $controllerID = $controllers->{$controller}[0]; >+ my $controllerSubType = $controllers->{$controller}[1]; >+ >+ #'scsi' should become 'sata' in a limited number of instances >+ if ($controllerSubType eq 'AHCI') { >+ $disk_bus = 'sata'; > } > >- elsif ($resource_type eq $hw_families{'CD Drive'}) { >- $info{type} = 'cdrom'; >- push(@{$meta{removables}}, \%info); >+ foreach my $disk (_get_resources($root, $controllerID)) { >+ my %info; >+ $info{device} = $disk_prefix . $$disk_letter++; >+ $info{bus} = $disk_bus; >+ >+ my $resource_type = _node_val($disk, 'rasd:ResourceType/text()'); >+ if ($resource_type eq $hw_families{'Disk Drive'}) { >+ $info{src} = $self->_get_volume($root, $disk); >+ push(@{$meta{disks}}, \%info); >+ } >+ >+ elsif ($resource_type eq $hw_families{'CD Drive'} or $resource_type eq $hw_families{'DVD Drive'}) { >+ $info{type} = 'cdrom'; >+ push(@{$meta{removables}}, \%info); >+ } > } >+ > } > } > > $meta{nics} = []; > >- foreach my $nic ($root->findnodes("/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $hw_families{Ethernet}]")) { >+ foreach my $nic ($root->findnodes("/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $hw_families{Ethernet Adapter}]")) { > my %info; > > $info{mac} = undef; # it's assigned automatically by the hypervisor >@@ -212,11 +242,12 @@ > foreach my $controller ($root->findnodes("/Envelope/VirtualSystem/VirtualHardwareSection/Item[rasd:ResourceType = $kind]")) { > my $address = _node_val($controller, 'rasd:Address/text()'); > my $instanceID = _node_val($controller, 'rasd:InstanceID/text()'); >+ my $subType = _node_val($controller, 'rasd:ResourceSubType/text()'); > $address ||= '0'; # Item doesn't have rasd:Address if there's only 1 > >- $controllers{$address} = $instanceID; >+ $controllers{$address} = [ $instanceID, $subType ]; > } >- >+ > return \%controllers; > } >
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 1056534
: 853903