0365.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Passthrough Mounting A Physical Disk Drive in VirtualBox</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Hypervisor,.vmdk,Windows,Virtualization,VirtualBox,Virtual Machines,Virtual Machine,Virtual Disk,Virtual Disk Image,VM,VDI,Storage,SSD,HDD,VirtualBox Add Physical Storage,Hard Disk,Hard Drive,Disk,Debian,Add Storage,VirtualBox Hardware Passthrough,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Passthrough Mounting A Physical Disk Drive in VirtualBox">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="08/09/2022 06:21:42 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Passthrough Mounting A Physical Disk Drive in VirtualBox</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>Creating the Physical Disk VMDK</h2>
  26. <ol>
  27. <li>Connect the physical disk to the host</li>
  28. <li>Log into the VirtualBox host</li>
  29. <li>Launch PowerShell as administrator</li>
  30. <li>Run the following commands
  31. <div class="codeBlock PS"># list physical disks<br />
  32. Get-PhysicalDisk</div>
  33. </li>
  34. <li>Take note of the disk number for the target disk to mount in VirtualBox</li>
  35. <li>Continue with the following commands
  36. <div class="codeBlock PS"># cd to the virtualbox installation directory<br />
  37. cd &quot;$ENV:ProgramFiles\Oracle\VirtualBox&quot;<br />
  38. # create a vmdk disk pointing to the target physical disk<br />
  39. # usage<br />
  40. # .\VBoxManage.exe internalcommands createrawvmdk -filename &quot;&lt;%fullpathto.vmdk%&gt;&quot; -rawdisk \\.\PhysicalDrive&lt;%disknumber%&gt;<br />
  41. .\VBoxManage.exe internalcommands createrawvmdk -filename &quot;D:\VMs\SSD.vmdk&quot; -rawdisk \\.\PhysicalDrive2<br />
  42. # launch virtualbox manager<br />
  43. .\VirtualBox.exe</div>
  44. </li>
  45. </ol>
  46. <h2>Attaching the Physical Disk to a Virtual Machine</h2>
  47. <p><span style="font-size:12px;"><em>NOTE: If you don&#39;t run VirtualBox Manager as administrator you will get permissions errors trying to access the physical disk</em></span></p>
  48. <ol>
  49. <li>Right click on the target VM &gt; Settings</li>
  50. <li>Select Storage from the left navigation menu</li>
  51. <li>Click the Add Hard disk icon</li>
  52. <li>Click Add &gt; Browse to and select the .vmdk file created earlier</li>
  53. <li>Scroll to the bottom of the listing and select the .vmdk &gt; Click Choose</li>
  54. <li>Click OK to confirm the VM settings</li>
  55. <li>Right click on the target VM &gt; Start</li>
  56. </ol>
  57. <p>Documentation: <a href="https://www.virtualbox.org/manual/ch09.html#rawdisk" target="_blank">https://www.virtualbox.org/manual/ch09.html#rawdisk</a></p> </div>
  58. </div>
  59. </body>
  60. </html>