mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-30 03:51:43 +02:00
Add --no-audio support to VM spec (#460)
tart run supports --no-audio to disable host audio pass-through, but there was no way to request it through a VM's spec - Headless, Nested, and Suspendable all have a flag/field but audio didn't. Useful on headless hosts with no audio hardware, where audio pass-through can make guest CoreAudio depend on host audio services that don't exist.
This commit is contained in:
@@ -28,6 +28,7 @@ var netSoftnetBlock []string
|
||||
var netBridged string
|
||||
var headless bool
|
||||
var nested bool
|
||||
var noAudio bool
|
||||
var suspendable bool
|
||||
var username string
|
||||
var password string
|
||||
@@ -70,6 +71,7 @@ func newCreateVMCommand() *cobra.Command {
|
||||
command.Flags().StringVar(&netBridged, "net-bridged", "", "whether to use Bridged network mode")
|
||||
command.Flags().BoolVar(&headless, "headless", true, "whether to run without graphics")
|
||||
command.Flags().BoolVar(&nested, "nested", false, "enable nested virtualization")
|
||||
command.Flags().BoolVar(&noAudio, "no-audio", false, "disable audio pass-through to the host")
|
||||
command.Flags().BoolVar(&suspendable, "suspendable", false, "treat the VM as suspendable, "+
|
||||
"disabling certain devices for suspendability support and issuing \"tart suspend\" instead of \"tart stop\" "+
|
||||
"when VM's specification is updated, thus preserving the VM's state between specification generations")
|
||||
@@ -156,6 +158,7 @@ func runCreateVM(cmd *cobra.Command, args []string) error {
|
||||
NetBridged: netBridged,
|
||||
Headless: headless,
|
||||
Nested: nested,
|
||||
NoAudio: noAudio,
|
||||
Username: username,
|
||||
Password: password,
|
||||
RandomSerial: randomSerial,
|
||||
|
||||
Reference in New Issue
Block a user