Skip to content

Commit cf132ea

Browse files
authored
Merge pull request #1365 from balajiv113/fix-vz-video
Fix vz crash with video configuration
2 parents 89c38bd + 02769db commit cf132ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/hostagent/hostagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func (a *HostAgent) Run(ctx context.Context) error {
291291
return err
292292
}
293293

294-
if *a.y.Video.Display == "vnc" {
294+
if a.y.Video.Display != nil && *a.y.Video.Display == "vnc" {
295295
vncdisplay, vncoptions, _ := strings.Cut(*a.y.Video.VNC.Display, ",")
296296
vnchost, vncnum, err := net.SplitHostPort(vncdisplay)
297297
if err != nil {

pkg/limayaml/defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func FillDefault(y, d, o *LimaYAML, filePath string) {
192192
if o.Video.VNC.Display != nil {
193193
y.Video.VNC.Display = o.Video.VNC.Display
194194
}
195-
if y.Video.VNC.Display == nil || *y.Video.VNC.Display == "" {
195+
if (y.Video.VNC.Display == nil || *y.Video.VNC.Display == "") && *y.VMType == QEMU {
196196
y.Video.VNC.Display = pointer.String("127.0.0.1:0,to=9")
197197
}
198198

0 commit comments

Comments
 (0)