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