@@ -45,6 +45,7 @@ type Config struct {
45
45
LimaYAML * limayaml.LimaYAML
46
46
SSHLocalPort int
47
47
SSHAddress string
48
+ VirtioGA bool
48
49
}
49
50
50
51
// MinimumQemuVersion is the minimum supported QEMU version.
@@ -987,11 +988,13 @@ func Cmdline(ctx context.Context, cfg Config) (exe string, args []string, err er
987
988
args = append (args , "-chardev" , fmt .Sprintf ("socket,id=%s,path=%s,server=on,wait=off" , qmpChardev , qmpSock ))
988
989
args = append (args , "-qmp" , "chardev:" + qmpChardev )
989
990
990
- // Guest agent via serialport
991
- guestSock := filepath .Join (cfg .InstanceDir , filenames .GuestAgentSock )
992
- args = append (args , "-chardev" , fmt .Sprintf ("socket,path=%s,server=on,wait=off,id=qga0" , guestSock ))
993
- args = append (args , "-device" , "virtio-serial" )
994
- args = append (args , "-device" , "virtserialport,chardev=qga0,name=" + filenames .VirtioPort )
991
+ if cfg .VirtioGA {
992
+ // Guest agent via serialport
993
+ guestSock := filepath .Join (cfg .InstanceDir , filenames .GuestAgentSock )
994
+ args = append (args , "-chardev" , fmt .Sprintf ("socket,path=%s,server=on,wait=off,id=qga0" , guestSock ))
995
+ args = append (args , "-device" , "virtio-serial" )
996
+ args = append (args , "-device" , "virtserialport,chardev=qga0,name=" + filenames .VirtioPort )
997
+ }
995
998
996
999
// QEMU process
997
1000
args = append (args , "-name" , "lima-" + cfg .Name )
0 commit comments