Fix missing XML namespace
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
454b5e92b0
commit
a7ded04317
@ -51,7 +51,7 @@ $NS = [System.Xml.XmlNamespaceManager]$XML.NameTable
|
|||||||
[void]$NS.AddNamespace('ovf', $XML.DocumentElement.ovf)
|
[void]$NS.AddNamespace('ovf', $XML.DocumentElement.ovf)
|
||||||
|
|
||||||
ForEach ($ReferencedDisk in $OVFConfig.Disks.Referenced) {
|
ForEach ($ReferencedDisk in $OVFConfig.Disks.Referenced) {
|
||||||
$XMLDisk = $XML.SelectSingleNode("//ns:DiskSection/ns:Disk[@ovf:diskId='$($ReferencedDisk.Id)']")
|
$XMLDisk = $XML.SelectSingleNode("//ns:DiskSection/ns:Disk[@ovf:diskId='$($ReferencedDisk.Id)']", $NS)
|
||||||
If ($XMLDisk.Count -eq 1) {
|
If ($XMLDisk.Count -eq 1) {
|
||||||
Switch ($ReferencedDisk.UnitSize) {
|
Switch ($ReferencedDisk.UnitSize) {
|
||||||
'KB' {
|
'KB' {
|
||||||
@ -83,7 +83,7 @@ ForEach ($ReferencedDisk in $OVFConfig.Disks.Referenced) {
|
|||||||
}
|
}
|
||||||
ForEach ($DynamicDisk in $OVFConfig.Disks.Dynamic) {
|
ForEach ($DynamicDisk in $OVFConfig.Disks.Dynamic) {
|
||||||
# Determine next free available diskId
|
# Determine next free available diskId
|
||||||
$XMLDisks = $XML.SelectNodes("//ns:DiskSection/ns:Disk[contains(@ovf:diskId,'vmdisk')]")
|
$XMLDisks = $XML.SelectNodes("//ns:DiskSection/ns:Disk[contains(@ovf:diskId,'vmdisk')]", $NS)
|
||||||
$DiskId = $XMLDisks.Count + 1
|
$DiskId = $XMLDisks.Count + 1
|
||||||
While ($XMLDisks.DiskId -contains "vmdisk$($DiskId)") {
|
While ($XMLDisks.DiskId -contains "vmdisk$($DiskId)") {
|
||||||
$DiskId++
|
$DiskId++
|
||||||
|
Loading…
Reference in New Issue
Block a user