Vài tuần trước, tôi quyết định test Macrium Reflect, phần mềm system imaging free. Macrium Reflect dùng Windows PE làm bootable live media, bên trong bạn có thể perform cả backup và restore operation. Với system imaging software, testing restores là quan trọng nhất, và tôi quyết định làm này cả trên physical hardware và trong VM.
Đây là nơi tôi hit a problem. Cố gắng boot PE image trong VirtualBox, tôi nhận được lỗi sau - E_FAIL (0x80004005), với more details available in VBoxHardening.log file. Bên trong file này, giữa nhiều dòng text, tôi tìm thấy several hits đọc lacks WinVerifyTrust, một trong số chúng resulting in failure bên dưới. What now?
Vấn đề chi tiết hơn
Mã lỗi cụ thể cũng như error attribute không too telling. Chúng ta cần nhìn vào created log file để understand better what happened. Cụ thể, đây là các dòng dẫn đến failure:
\Device\HarddiskVolume5\Windows\System32\bcrypt.dll [lacks WinVerifyTrust]
13b4.1f40: Error (rc=0):
13b4.1f40: supR3HardenedScreenImage/NtCreateSection: cached rc=Unknown Status -626 (0xfffffd8e) fImage=1 fProtect=0x10 fAccess=0xf cHits=4 \Device\HarddiskVolume5\Windows\System32\bcrypt.dll
Chúng ta thấy ở đây là library cụ thể này (bcrypt.dll) fail WinVerifyTrust check. Lưu ý rằng có thể có object khác fail check này nhưng không fatal. Thực tế, với thông tin này, chúng ta thấy indeed có ticket trên issue này, cũng như long forum discussion.
Về bản chất, điều này probably caused by mismatch trong certificates mà Windows cung cấp, như một phần của PE image, và những gì VirtualBox có, trong build hiện tại. Error được triggered by security hardening introduced in virtualization product này.
Giải pháp
Có vài cách around this. Bạn có thể revert to earlier Windows build cho VM - trong trường hợp này, dùng different, older Windows 10 PE image làm baseline cho rescue media ví dụ, hoặc cho most people, just a different version of OS. Alternatively, bạn có thể change (upgrade) VirtualBox edition. The latter is usually a cheaper, faster workaround than messing with OS. The best way would be to toggle hardening flags off, but that does not seem possible in any trivial way.
Và vậy, mặc dù nó may sound like Hello Capt. Obvious, what are you doing here, the solution is to try to update VirtualBox to latest edition, if possible. Trong testing của tôi trên several hosts, moving from 5.1.X branch to 5.2.X branch resolved this issue cho Windows 10 based VM.
Kết luận
Là techie, bạn probably get angry khi support people tell you to update software to latest version. Sometimes though, like in this case, it's the fastest and most sensible way to work around this problem. Security hardening in VirtualBox introduces various complications, và it will always be the game of cat and mouse giữa Microsoft và Oracle. Occasionally, some libraries may not load, causing your VMs to stop working.
Tuy nhiên, technical bits less important here - what matters is that you know how to approach this issue in a systematic manner. First, carefully examine error code, then read error logs. Once you find the culprit, you will also be able to ask the right questions and find the right solutions. In this case, it's the matter of a program update, but we do that with the full understanding of what went wrong. I hope you find this little guide useful, for all your current and future VirtualBox snags.
Chúc vui.