Upstream proxmox-git/pve-storage state of the touched files before 1860d190cb
This commit is contained in:
1 parent
ab149ea5d1
commit
095cd282f3
3 files changed
+326
-44
No files matched your search
@@ -369,24 +369,6 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id,
|
||||
};
|
||||
}
|
||||
|
||||
# the address is only unique per controller, so disks on different controllers of the same
|
||||
# type can end up with the same address, move those to the next free one of that bus
|
||||
my $used_addresses = { map { $_->{disk_address} => 1 } @disks };
|
||||
my $assigned_addresses = {};
|
||||
for my $disk (@disks) {
|
||||
if (
|
||||
$assigned_addresses->{ $disk->{disk_address} }
|
||||
&& $disk->{disk_address} =~ m/^([a-z]+)\d+$/
|
||||
) {
|
||||
my $bus = $1;
|
||||
my $index = 0;
|
||||
$index++ while $used_addresses->{"$bus$index"};
|
||||
$disk->{disk_address} = "$bus$index";
|
||||
$used_addresses->{ $disk->{disk_address} } = 1;
|
||||
}
|
||||
$assigned_addresses->{ $disk->{disk_address} } = 1;
|
||||
}
|
||||
|
||||
my $nic_id = dtmf_name_to_id('Ethernet Adapter');
|
||||
my $xpath_find_nics =
|
||||
"/ovf:Envelope/ovf:VirtualSystem/ovf:VirtualHardwareSection/ovf:Item[rasd:ResourceType=${nic_id}]";
|
||||
|
||||
Reference in new issue
Block a user