MultiDrive – free backup, clone & wipe disk utility from Atola Technology

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Use VirtualBox to test physical hard drives?
PostPosted: March 18th, 2014, 6:58 
Offline
User avatar

Joined: October 22nd, 2008, 22:07
Posts: 110
Has anyone tried this?

MHDD will scan a virtual hard disk from a Hirens boot CD ISO image booted in a virtual machine. Strangely, after you hit F4 you have to hit ESC to get it to start scanning...

I was thinking that if this worked, you could run tools limited to IDE primary and secondary, like early MHDD versions, WDR, HDDERASE, and others on SATA drives without using a physical SATA to IDE adapter, because VirtualBox will remap the SATA ports to virtual IDE ports.


----------------------------------------------------------------------
9.7.1.1. Access to entire physical hard disk
While this variant is the simplest to set up, you must be aware that this will give a guest operating system direct and full access to an entire physical disk. If your host operating system is also booted from this disk, please take special care to not access the partition from the guest at all. On the positive side, the physical disk can be repartitioned in arbitrary ways without having to recreate the image file that gives access to the raw disk.

To create an image that represents an entire physical hard disk (which will not contain any actual data, as this will all be stored on the physical disk), on a Linux host, use the command

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda
This creates the image /path/to/file.vmdk (must be absolute), and all data will be read and written from /dev/sda.

On a Windows host, instead of the above device specification, use e.g. \\.\PhysicalDrive0. On a Mac OS X host, instead of the above device specification use e.g. /dev/disk1. Note that on OS X you can only get access to an entire disk if no volume is mounted from it.

Creating the image requires read/write access for the given device. Read/write access is also later needed when using the image from a virtual machine.

Just like with regular disk images, this does not automatically register the newly created image in the internal registry of hard disks. If you want this done automatically, add -register:

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk
-rawdisk /dev/sda -register
After registering, you can assign the newly created image to a virtual machine with e.g.

VBoxManage storageattach WindowsXP --storagectl "IDE Controller"
--port 0 --device 0 --type hdd --medium /path/to/file.vmdk
When this is done the selected virtual machine will boot from the specified physical disk.
------------------------------------------------

_________________
http://www.youtube.com/user/TerraformingMaster


Top
 Profile  
 
 Post subject: Re: Use VirtualBox to test physical hard drives?
PostPosted: March 22nd, 2014, 7:34 
Offline
User avatar

Joined: October 22nd, 2008, 22:07
Posts: 110
I case you were wondering why one would want this, a VirtualBox virtual appliance allows portability, so you can take your whole computer with you, and use it on another machine elsewhere.

_________________
http://www.youtube.com/user/TerraformingMaster


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group