Skip to content

Commit da0e628

Browse files
committed
limactl (create|start|edit): add --video=<bool>
Signed-off-by: Akihiro Suda <[email protected]>
1 parent a797d31 commit da0e628

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

cmd/limactl/editflags/editflags.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ func registerEdit(cmd *cobra.Command, commentPrefix string) {
5959
flags.Bool("rosetta", false, commentPrefix+"enable Rosetta (for vz instances)")
6060

6161
flags.String("set", "", commentPrefix+"modify the template inplace, using yq syntax")
62+
63+
// negative performance impact: https://gitlab.com/qemu-project/qemu/-/issues/334
64+
flags.Bool("video", false, commentPrefix+"enable video output (has negative performance impact for QEMU)")
6265
}
6366

6467
// RegisterCreate registers flags related to in-place YAML modification, for `limactl create`.
@@ -179,6 +182,18 @@ func YQExpressions(flags *flag.FlagSet) ([]string, error) {
179182
},
180183
true},
181184
{"set", d("%s"), true},
185+
{"video",
186+
func(_ *flag.Flag) (string, error) {
187+
b, err := flags.GetBool("video")
188+
if err != nil {
189+
return "", err
190+
}
191+
if b {
192+
return ".video.display = \"default\"", nil
193+
}
194+
return ".video.display = \"none\"", nil
195+
},
196+
true},
182197
{"arch", d(".arch = %q"), false},
183198
{"containerd",
184199
func(_ *flag.Flag) (string, error) {

docs/experimental.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ The following commands are experimental and subject to change:
1515

1616
- `limactl (create|start|edit) --set=<YQ EXPRESSION>`
1717
- `limactl (create|start|edit) --network=<NETWORK>`
18+
- `limactl (create|start|edit) --video=<BOOL>`
1819
- `limactl snapshot *`

0 commit comments

Comments
 (0)