Skip to content

Commit a63ed0c

Browse files
authored
Merge pull request #696 from aau-network-security/develop
Patch for vbox resolution problems rendering vms unusable
2 parents 357da4e + f95fde5 commit a63ed0c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

go.sum

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
6464
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
6565
github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
6666
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
67-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
6867
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
6968
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
7069
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=

virtual/vbox/vbox.go

+8
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ func (vm *vm) Start(ctx context.Context) error {
129129
Str("ID", vm.id).
130130
Msg("Started VM")
131131

132+
log.Debug().
133+
Str("ID", vm.id).
134+
Msg("Setting resolution for VM")
135+
_, err = VBoxCmdContext(ctx, vboxCtrlVM, vm.id, "setvideomodehint", "1920", "1080", "16")
136+
if err != nil {
137+
log.Error().Str("ID", vm.id).Msgf("Error setting resolution, VM may require reset on after connecting: %s", err.Error())
138+
}
139+
132140
return nil
133141
}
134142

0 commit comments

Comments
 (0)