Raw block device passthrough support
This commit is contained in:
parent
0870f8113a
commit
003b562e48
7 changed files with 133 additions and 26 deletions
|
|
@ -51,10 +51,10 @@ func doUSBRootCheck() {
|
|||
}
|
||||
|
||||
func runVM(passthroughArg string, fn func(context.Context, *vm.VM, *vm.FileManager) int, forwardPortsRules []vm.PortForwardingRule, unrestrictedNetworking bool) int {
|
||||
var passthroughConfig []vm.USBDevicePassthroughConfig
|
||||
var passthroughConfig vm.PassthroughConfig
|
||||
|
||||
if passthroughArg != "" {
|
||||
passthroughConfig = []vm.USBDevicePassthroughConfig{getDevicePassthroughConfig(passthroughArg)}
|
||||
passthroughConfig = getDevicePassthroughConfig(passthroughArg)
|
||||
doUSBRootCheck()
|
||||
}
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ func runVM(passthroughArg string, fn func(context.Context, *vm.VM, *vm.FileManag
|
|||
|
||||
MemoryAlloc: vmMemAllocFlag,
|
||||
|
||||
USBDevices: passthroughConfig,
|
||||
PassthroughConfig: passthroughConfig,
|
||||
ExtraPortForwardingRules: forwardPortsRules,
|
||||
|
||||
OSUpTimeout: time.Duration(vmOSUpTimeoutFlag) * time.Second,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue