Skip to content

Commit

Permalink
Merge pull request #696 from aau-network-security/develop
Browse files Browse the repository at this point in the history
Patch for vbox resolution problems rendering vms unusable
  • Loading branch information
Mikkelhost authored Mar 31, 2022
2 parents 357da4e + f95fde5 commit a63ed0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down
8 changes: 8 additions & 0 deletions virtual/vbox/vbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ func (vm *vm) Start(ctx context.Context) error {
Str("ID", vm.id).
Msg("Started VM")

log.Debug().
Str("ID", vm.id).
Msg("Setting resolution for VM")
_, err = VBoxCmdContext(ctx, vboxCtrlVM, vm.id, "setvideomodehint", "1920", "1080", "16")
if err != nil {
log.Error().Str("ID", vm.id).Msgf("Error setting resolution, VM may require reset on after connecting: %s", err.Error())
}

return nil
}

Expand Down

0 comments on commit a63ed0c

Please sign in to comment.