mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 11:19:25 -05:00
VM manager: remove and rebuild USB controllers
This commit is contained in:
@@ -1116,6 +1116,11 @@
|
||||
if ($p2['bus'] && $p2['slot'] && $p2['function'] && $p2['bus']==$pci['bus'] && $p2['slot']==$pci['slot'] && $p2['function']==$function) unset($old['devices']['hostdev'][$k]);
|
||||
}
|
||||
}
|
||||
// remove and rebuild usb controllers
|
||||
$devices = $old['devices']['controller'];
|
||||
foreach ($devices as $key => $controller) {
|
||||
if ($controller['@attributes']['type']=='usb') unset($old['devices']['controller'][$key]);
|
||||
}
|
||||
// preserve existing disk driver settings
|
||||
foreach ($new['devices']['disk'] as $key => $disk) {
|
||||
$source = $disk['source']['@attributes']['file'];
|
||||
|
||||
Reference in New Issue
Block a user