I've been trying to virtualize my AAD-joined, corporate-managed work machine setup on my personal laptop (to keep my host OS free of group policy and other restrictions), and have been playing with Hyper-V, VMWare, and VirtualBox for the last few days. So far, VirtualBox has been providing the best compromise of performance and functionality, including webcam (USB capture) and sound support for my constant Teams usage in meetings. However, I've been having one problem that so far seems insurmountable. Hopefully someone can point me in a new direction.
The laptop has a 1TB SSD. The guest is set up on an expanding VDI, which has the SSD flag set in the VM's settings. The guest OS is installed via an IT-provided/approved bootable ISO. The installation is basically a normal Windows 11 install, except IT has some scripting in place to also install M365 apps, apply group policy, force immediate BitLocker encryption, etc. etc.
The problem is that I can't get the guest OS to recognize the virtual drive (its own boot drive) as an SSD, despite the SSD flag being set in the virtual drive's options in VBox. In Task Manager and other places where hard drive type is shown, it's listed as an HDD, including in the drive optimization tool. When the guest OS thinks it's on an HDD, its normal scheduled drive optimizations perform full defragmentation passes that are detrimental to the underlying physical SSD's life, and possibly there are other more subtle effects on how disk writes are handled by the OS, which is why I'd really like to get this fixed. Here are the actions I've taken so far, based on lots of web searches, with some results coming from this very forum:
- During the first install, forgot to set the SSD flag, so it was understandable that the guest OS thought it was on an HDD. I tried the corrective actions listed below, but none of them fixed the issue, and in one forum about cloning an OS from a physical HDD to a physical SSD there was a comment that sadly once Windows decides a drive is one type, it won't change its mind no matter what, and only a fresh install can fix it. So, reluctantly I started over. New VDI, SSD flag set from the beginning, and another ISO boot to get the guest OS installed from scratch. Nope. Still recognized as HDD.
- The often-cited fix is to re-run WinSAT assessment. Open an administrative command prompt (on the guest) and run "winsat formal" (full assessment) or "winsat diskformal" (just the disk assessment). Supposedly the disk type is re-assessed/re-recognized, and the Windows flag for it is reset. Didn't work despite repeated attempts, both on the original install and on the second install where the VBox SSD flag was set from the start.
- One other promising approach was to run PowerShell as administrator (in the guest) and use Get-PhysicalDisk and Set-PhysicalDisk to verify and if necessary reset the detected drive type. When I ran Get-PhysicalDisk, I found that the drive's media type was "Unspecified". After running Set-PhysicalDisk to change the media type to SSD, another Get-PhysicalDisk indeed reported it as SSD. Hurray! But no, all the UI indicators in the OS still report it as HDD, and the drive optimization tool still performs an HDD-style defragment when it runs. Re-running WinSAT yet again had no effect.