A few years ago, we have tried to place a VM on an NFS share. You can find the results of our experiment here:
We used Windows Server 2012 because Hyper-V is a native hypervisor from Microsoft.
Now we have decided to reproduce the experiment on Windows Server 2016. Just because of boundless curiosity 😊
So, we have 2 nodes: S3n11 serves as NFS Fileserver and S3n12 takes the Hyper-V server role.
We will do exactly the same thing as we did before, but this time on Windows Server 2016 on both VMs.
Let’s start!
1st Test Scenario
First of all, we’re creating the NFS share on the S3n11 machine. In order to do this, we need to add the following roles and features:
Creating the share with advanced parameters:
Nothing special here, just specifying a name and a place for the share:
We don’t need any authentication as this is for testing…
Turning on all the possible read/write permissions:
The next step is to add all permissions for a Hyper-V host:
We are going to store a virtual machine on the share, so we select Application Files in management properties:
No quotas. We don’t need anything to influence the process in any way.
Ok, let’s confirm that our share settings are correct:
The NFS share is created, now let’s install a Hyper-V client for the NFS role on the Hyper-V host (S3n12).
Now, when our test environment is ready, we can start the experiment right away!
The first scenario is to create a VM directly on the NFS share.
As you see, VHDX is located on the NFS share as well.
When we confirm the creation of the test VM, we get the first error. Microsoft is yelling to us: “NFS share is not for VMs!”
2nd Test Scenario
Ok, what if we try to create a virtual machine on a local data store and then move it to the share?
When we come to the last step of the Hyper-V Move Wizard we see the following message:
3rd Test Scenario
Our test environment remains the same: the NFS share and a Hyper-V server with an NFS Client role.
What if we copy the test VM to the NFS share manually?
We create a new VM…
… try to connect the existing VHDX disk located on the share…
… and finally get the error message with a file system limitation alert!
Conclusion
Honestly, I have expected this behavior. It is not possible to run most services from NFS shares, which includes Hyper-V VMs. I hope this small experiment will save some of your time in case you’ll try to put a VM on an NFS share. If you have any ideas on how to do this, feel free to comment on this post.