VirtualBox does not support loading from paths that contain Unicode symbols. It's impossible to even use wide char on Windows, since vritualboxes uses A version of API.
Moreover, short paths does not work either.
Is there a workaround, e.g. encoding we can use to to transform Path into A-acceptable version VirtualBox will be able to understand later?
Kernel module cannot be loaded on Windows due to Unicode
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Kernel module cannot be loaded on Windows due to Unicode
Could you provide a sample code to reproduce the issue please? Including the creation of the folder with the unicode name.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Kernel module cannot be loaded on Windows due to Unicode
I'd like to see justification of "short paths don't work either". I don't see how they can fail, and I'm pretty sure I've seen VBox error messages using them (which implies that they're being passed around internally on Windows hosts).
Re: Kernel module cannot be loaded on Windows due to Unicode
It's a little hard to provide source code, but we are using the setExtraData method to set string like "C:\غازي\MyKernelModule.dll". We use Python bindings, but AFAIK VirtualBox only uses A version of API which cannot represent such string by definition.
We tried to mitigate that by converting paths into short paths (even if they do not contain unicode symbols, to avoid unnecessary checks). But VirtualBox failed with the Unable to load R3 module GetLastError==126 error (VERR_MODULE_NOT_FOUND). Example of such path would be "C:\PROGRA~1\Andy\LIBAND~2.DLL"
Just recovered another strange thing from our discussion: the following path "D:\طفجدفسفم\lib64" was written as "D:\طفجدفسفم\lib64" into vbox file of VM.
We tried to mitigate that by converting paths into short paths (even if they do not contain unicode symbols, to avoid unnecessary checks). But VirtualBox failed with the Unable to load R3 module GetLastError==126 error (VERR_MODULE_NOT_FOUND). Example of such path would be "C:\PROGRA~1\Andy\LIBAND~2.DLL"
Just recovered another strange thing from our discussion: the following path "D:\طفجدفسفم\lib64" was written as "D:\طفجدفسفم\lib64" into vbox file of VM.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Kernel module cannot be loaded on Windows due to Unicode
Why is that strange? An ASCII xml file will use xml escape encodings.
Re: Kernel module cannot be loaded on Windows due to Unicode
Ok, that does mean that string was properly saved into XML file, that's good to know.
It worths to note that my module should support 4.3.12 and onwards.
VirtualBox uses the LoadLibraryA function to load modules till VirtualBox 5. That means that there is no way paths such those I posted will work.
Now, I'm trying to figure out why cannot it load it by short path. It could be a code signing issue… We're further debugging it and I will let you know as soon as I will have results.
It worths to note that my module should support 4.3.12 and onwards.
VirtualBox uses the LoadLibraryA function to load modules till VirtualBox 5. That means that there is no way paths such those I posted will work.
Now, I'm trying to figure out why cannot it load it by short path. It could be a code signing issue… We're further debugging it and I will let you know as soon as I will have results.
Re: Kernel module cannot be loaded on Windows due to Unicode
It appears that VirtualBox 4.3.12 rejects my kernel module because of the signature created using Verisign certificate (signtool says it's OK).
In other hand it loads the same module signed with COMODO certificate (signtool says it's OK as well).
However the error is VERR_MODULE_NOT_FOUND which is greatly misleading.
In other hand it loads the same module signed with COMODO certificate (signtool says it's OK as well).
However the error is VERR_MODULE_NOT_FOUND which is greatly misleading.
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Kernel module cannot be loaded on Windows due to Unicode
Yes, signature restriction were already in effect at this point I believe. There are several discussions about this restrictions in VirtualBox OSE Forum.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: Kernel module cannot be loaded on Windows due to Unicode
Which version of VirtualBox have you been using? I believe this problem was fixed late in the 5.0.0 test cycle.
Kind regards,
bird.
Kind regards,
bird.
Knut St. Osmundsen
Oracle Corporation
Oracle Corporation