Skip to content

Error create virtual machine - Too few arguments to function IVirtualBox #321

@rbernardes

Description

@rbernardes

After this issue implementation, i try to create a new virtual machine, with follow steps:

  • new
  • select name/type/version
  • set memory
  • create hard disk (vdi)
  • dynamically allocated
    and then

There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.

The list of virtual machines will not begin auto-refreshing again until this page is reloaded.

HTTP error: 500 error

On details:

readyState: "4"
responseText: ""
status: "500"
statusText: "error"

Nginx error:

thrown in /var/www/virtualbox/endpoints/lib/vboxServiceWrappers.php on line 1544" while reading response header from upstream, client: xx.xx.xx.xx, server: xx.xx.xx, request: "POST /endpoints/api.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9001", host: xx.xx.xx.xx
2022/12/22 11:27:42 [error] 36129#36129: *8378 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "context" in /var/www/virtualbox/endpoints/lib/language.php on line 77" while reading response header from upstream, client: 172.71.11.133, server:xx.xx.xx.xx, request: "GET /endpoints/language.php?_=1671719262366 HTTP/2.0", upstream: "fastcgi://127.0.0.1:9001", host: "xx.xx.xx.xx"
2022/12/22 11:28:36 [error] 36129#36129: *8373 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function IVirtualBox::createMachine(), 6 passed in /var/www/virtualbox/endpoints/lib/vboxconnector.php on line 3802 and exactly 8 expected in /var/www/virtualbox/endpoints/lib/vboxServiceWrappers.php:1544
Stack trace:
#0 /var/www/virtualbox/endpoints/lib/vboxconnector.php(3802): IVirtualBox->createMachine(NULL, 'win2016vm', NULL, 'Windows2016_64', NULL, NULL)
#1 /var/www/virtualbox/endpoints/lib/vboxconnector.php(951): vboxconnector->remote_machineCreate(Array)
#2 /var/www/virtualbox/endpoints/api.php(316): vboxconnector->__call('machineCreate', Array)
#3 {main}
thrown in /var/www/virtualbox/endpoints/lib/vboxServiceWrappers.php on line 1544" while reading response header from upstream, client: 172.71.11.133, server: xx.xx.xx.xx, request: "POST /endpoints/api.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9001", host: "xx.xx.xx.xx"

Trying with php 7.4/8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions