Use same virtual Hard Drive in many virtual machines

Hi,

to do performance tests of our software I have a physical machine running several Hyper-V virtual machines with different OS and setup.
When I start a performance test only one of the machines s running.
Each test run needs a volume to store about 1 TB of data. After each test run the data will be cleared and the data volume will be empty.

The physical hard drives does not have space for more machines having their own data volume. So I decided to share one virtual hard drive attached to all virtual machines. Due to the fact that only one machine is running at the same time it seems to work. But I don't know if there are any other impacts and if it is a good idea.

Any hints are appreciated.

Thanks in advance!


  • Edited by Do Django 9 hours 13 minutes ago typo
September 11th, 2015 5:13pm

As long as you are sure that only one machine is running at a time, it should work.  As soon as you start a second machine you will have instant data corruption.  You have to answer the question if the risk is worth the setup.
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 5:17pm

It is not that you would have data corruption, it is that any +1 VM would not be able to lock the file and thus might not start.

Depending on the OS of the VM, just the act of one VM OS using it, then another can also cause an OS to report corruption.  The way around this is if the VM only reads and does not write, or if the disk is cleaned between each VM run (as if you are using it for logging)

One way around this (if the disk contains data that needs to be read, but you want to toss the writes away) is to use a differencing disk for each VM off the root data disk.  Then each VM gets a clean write space.

There can be a miniscule impact on performance doing this, but it is negligible these days.

September 11th, 2015 5:27pm

Thanks, yes I get the error message saying the drive is already in use by another process.

And also yes, I worry about the different os to leave the volume in a state another machine will detect as corrupt (or will not detect).

The data volume contains a SQL Server database during the test. The database will be restored from a backup over the network before the test starts and will be deleted right after the test has finished.
The SQL Servers (several versions) are installed to the root volume of the virtual machines except the tempdb. The tempdb is also stored on the data volume.

All OS are Windows based (2012 and 2012 R2). The physical hard drive is a Fusion-io PCIe SSD.

At the moment I cannot see any negative impact on working as descibed. It seems to work fine. So thanks for your help, I will continue and hopefully have no trouble doing so :-).


  • Edited by Do Django 9 hours 8 minutes ago typo
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2015 5:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics