Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a physical linux server that I'm considering moving to a virtual linux server running on the standalone Hyper-V R2 hypervisor. Theres alot of unused cycles on that box that could be shared with other machines. Normally this would be a pretty easy choice, but this particular server is hosting an mdadm raid5 array on it. Once I get a similar linux virtual server running, is there a way to add the discs that make up the array to the virtual machine and have it use them directly?

In other words, I dont want to have to convert them all to virtual discs and then rebuild the array; I want to just use the existing discs and partitions in a kind of 'pass through' mode. The array is working just fine, I dont want to go through all the I/O of moving it off these discs to new, virtual, ones. Hyper-V supports a mode called 'passthrough', would that do the trick?

share|improve this question
Can you provide more details? Are you sure that ESXi will run on your existing server? Are you sure the hard drive controller is supported under ESXi? – Zoredache Sep 23 '09 at 2:32
ESXi? He's talking about Hyper-V from Microsoft, not ESXi from VMware. – mrdenny Oct 12 '09 at 6:57
up vote 1 down vote accepted

Yes. In the Hyper-V management OS, take those disks offline. This can be done either with the Disk Management MMC snapin or through the command line with diskpart.exe. Then, when configuring the VM, add a Virtual SCSI controller and attach hard disks to it. The disks that you offlined will show up as candidates for assignment.

share|improve this answer
I've found that it's also important to have the administrator account from the Hyper-V server registered via cmdkey (or similar) on the administration client machine. Otherwise, the client cant connect to the VDS service and enumerate the disks. – Jeff Shattock Feb 16 '10 at 18:50

It may be possible to setup a raw device mapping. It depends a lot on what type of hardware you have.

share|improve this answer

It's possible to do the raw device mapping. I've not used Hyper-V, but on VMware Workstation I had a Linux install I ran physically as well as from within Workstation on Windows. I identified my array with UUIDs to allow device names to change without issue (e.g. /dev/sda becoming /dev/hda or something similar), this worked without problems. As long as Hyper-V allows you to directly access drives you could likely virtualize the whole machine with a minimum of downtime and fuss. Linux won't complain too much about hardware changes as long as you have proper support for the Hyper-V virtual hardware, which is generally built off generic drivers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.