machine: USB passthrough

Sets up USB passthrough for machine. Additionally moves `SetOptions` out
from `pkg/machine/config.go` to its own file in
`pkg/machine/define/setopts.go`.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
Jake Correnti
2024-02-08 19:25:10 -05:00
parent 5311233f86
commit 7be6cd4b09
10 changed files with 74 additions and 50 deletions

View File

@ -68,15 +68,6 @@ type ListResponse struct {
UserModeNetworking bool
}
type SetOptions struct {
CPUs *uint64
DiskSize *uint64
Memory *uint64
Rootful *bool
UserModeNetworking *bool
USBs *[]string
}
type SSHOptions struct {
Username string
Args []string
@ -101,7 +92,7 @@ type VM interface {
Init(opts define.InitOptions) (bool, error)
Inspect() (*InspectInfo, error)
Remove(name string, opts RemoveOptions) (string, func() error, error)
Set(name string, opts SetOptions) ([]error, error)
Set(name string, opts define.SetOptions) ([]error, error)
SSH(name string, opts SSHOptions) error
Start(name string, opts StartOptions) error
State(bypass bool) (define.Status, error)