Get-Disk |Format-Table -Autosize -Property DeviceID, Model, Path, Partitions, SerialNumber The script shows the serials for all the host machine's physical drives each time it runs: echo "*** This powershell script finds a raw drive by its serial number, and then attaches it to a desired vbox virtual machine***"Įcho "*** When VBOX loses its track on the drive, between unplug/replug, this will fix it for that serial."Įcho "*** Must be run as administrator ***Įcho "Here are all the drives we can find:" The following powershell script I worked on looks up the windows path for a hardcoded drive serial number, and does everything necessary to replace the broken rawvmdk file with a working one. I need an easy and consistent way to start the machine. It takes a bunch time/frustration to figure this out each time. Each time it breaks, I have to get just right the particulars of how to correctly re-create the rawvmdk file, and the right order of configuration of the virtual machine. And you can't just create rawvmdk's for all the likely paths because Virtualbox machines can't have a broken vmdk file. The reason I found is that there is no guarantee how Windows may path your physical drive each time or where you plug it in. When un-plugging/re-plugging removable drives in Windows, my Virtualbox rawvmdk files consistently break. The idea is that I either boot this drive bare metal or in Virtualbox. I am using removable thunderbolt (NVMe) drives that are partitioned/configured for bare metal boot drives in Virtualbox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |