0

What steps do I need to take in order to use VirtualBox to access a CentOS 7 installation that is on a detached hard drive?

Here is the situation:

  1. CentOS 7 and Windows 7 were installed on a PC in a dual boot fashion.

  2. The dual boot PC died.

  3. I extracted the hard drive and connected it to a new Windows 8.1 PC using an Apricorn SATA Wire 3.0.

  4. I installed VirtualBox on the new Windows 8.1 machine and created a new CentOS 7 VM.

  5. I then started to create another VM called CentOS old, to access the contents of the detached hard drive from the old PC through the SATA Wire. But I have not configured or tried to launch the CentOS old VM. This posting asks how.

How do I configure all the settings for the CentOS old VM so that I can successfully access all the contents from the CentOS portion of the old dead PC via VirtualBox?

Here is a screenshot of the settings definition GUI for the desired VM in VirtualBox:

enter image description here

1 Answer 1

0

It's simple, use the following VBoxManage command to get VirtualBox to boot from an external USB.

cd %programfiles%\oracle\virtualbox

VBoxManage internalcommands createrawvmdk -filename "%USERPROFILE%"\desktop\usb.vmdk -rawdisk \\.\PhysicalDrive#

Where # is the disk drive number of the USB. Which can be found in Disk Manager (diskmgmt.msc) The code also uses Environmental Variables that should run without changing anything (except the #)

From there you can run a dd command, Windows program or utility in order to clone the CentOS drive. This will allow you to have a "physical" copy of the virtual image that you can boot from without needing the external USB plugged in.

Source: http://www.pendrivelinux.com/boot-a-usb-flash-drive-in-virtualbox/

4
  • Your using the drive letter when you need to use the drive number. DiskManagement >> Find Drive Letter I >> Drive number will be to the left. s9.postimg.org/rumejc47z/Untitled.png I recommend deleting your added edit, since both my directions and the source specifically mention drive number. Mostly importantly though, just because it's extra, unnecessary info.
    – user431052
    Jun 24, 2015 at 0:44
  • Create a Virtual Machine like you normally would. Assigning RAM, you don't need to create a VHDD since you just did. You add the .vmdk file to the SATA controller where you have CentOS Old.vdi mounted in the image you posted. in case you need me to hold your hand >> s11.postimg.org/7kj8x33sj/Untitled2.png. If you prefer a VDI, VHD, RAW extension rather than the VMDK >> github.com/BiTinerary/ConVertual. I would like to add that upvotes are for accuracy/details of the question or answer. Not if you can get them to work or not, that's what the "mark as answered" is for.
    – user431052
    Jun 24, 2015 at 1:03
  • Run VirtualBox as administrator and make sure you have ownership of the generated .vmdk >> Take ownership made easy: howtogeek.com/howto/windows-vista/…
    – user431052
    Jun 24, 2015 at 1:06
  • I'm done. The .vmdk file you created was a VIRTUAL bootloader, you can't actually add/edit/save files. In order to do that, also mentioned in my answer post that you didn't pay attention to, you need to clone the drive using a dd command, or boot to a cloning tool and clone the virtual drive. Over and out.
    – user431052
    Jun 24, 2015 at 1:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .