BartekSz95 / phpvirtualbox

A web interface to manage and access Virtualbox machines.
Other
57 stars 16 forks source link

VMs with disk encryption do not start #5

Closed TobiasH76 closed 1 year ago

TobiasH76 commented 1 year ago

when I try to start a VM with an encrypted disk, I get error 500.

The logged error is:

PHP Fatal error: Uncaught Error: Call to undefined method IConsole::removeDiskEncryptionPassword() in /server/vol1/wwwroot/vbox/endpoints/lib/vboxconnector.php:4404\nStack trace:\n#0 /server/vol1/wwwroot/vbox/endpoints/lib/vboxconnector.php(952): vboxconnector->remote_consoleAddDiskEncryptionPasswords()\n#1 /server/vol1/wwwroot/vbox/endpoints/api.php(316): vboxconnector->__call()\n#2 {main}\n thrown in /server/vol1/wwwroot/vbox/endpoints/lib/vboxconnector.php on line 4404

BartekSz95 commented 1 year ago

@TobiasH76 I can't reproduce this issue. Can you tell me what you do step by step? I created encrypted disk on my new VM and running without problem after that.

TobiasH76 commented 1 year ago

1) start the VM (VM with encrypted disk has been created before, not in this session) 2) a window opens to enter the password 3) enter the password and press ok 4) HTTP error 500 image

When I look into the code, the method removeDiskEncryptionPassword is called in line 4404 of vboxconnector.php but when I do a full-text search in the code of the entire project, this method doesn't exist

BartekSz95 commented 1 year ago

Hmm, yea, I saw that the encryption method changed on VBox 7.0. Can you send your phpVirtualBox cfg? Of course, without any logins and passwords to your VBox session on your server. I can do blind fix for this issue, cause I don't have this problem, but I think, we have something difference into our configs.

BartekSz95 commented 1 year ago

@TobiasH76 I think, I have fix for this. I read changes on VBox API 7.0 and method was changed for encryption. I need fix one more issue with encryption, when I end this, I will release commit.

BartekSz95 commented 1 year ago

@TobiasH76 Release with fixed encryption/decryption: https://github.com/BartekSz95/phpvirtualbox/releases/tag/v7.0-rc1

TobiasH76 commented 1 year ago

It works, thank You very much