Posts tagged “Hyper-V

Function/tool to return Regex-safe version of input string

Some of Powershell comparison operators use Regular Expressions, such as -match, -notmatch, and -replace operators. This poses a problem when trying to match against a string that contains Regex metacharacters. This function tools solves this issue by accepting an input string as input and returning a Regex-safe version of the same string where every Regex metacharacter in the input string is escaped.

The script can be downloaded from the Microsoft Script Center Repository. To use this function download it, unblock the file, and run it to load the function.


Imagine you wish to make a PS script to detach a VHD(X) disk from one Hyper-V VM and attach it to another. The script may start like this:

# Input:
$SourceVM = ‘v-2012R2-G2a’
$TargetVM = ‘vHost22’
$VHDX = ‘vHost01d(Web)-D.vhdx’

This next section will show current attached disks:

Get-VMHardDiskDrive -VMName $SourceVM
Get-VMHardDiskDrive -VMName $TargetVM


At this point, if we try to identify the disk that needs to be detached from one VM and attached to another using the input data:

Get-VMHardDiskDrive -VMName $SourceVM | Where { $_.Path -match $VHDX }

This cmdlet returns no matches. This is because the string we’re comparing to ‘vHost01d(Web)-D.vhdx’ contains 3 Regex metacharacters, namely ‘().’

This issue can be remedied by the use of this RegexSafe function:

Get-VMHardDiskDrive -VMName $SourceVM | Where { $_.Path -match (RegexSafe $VHDX) }


The full script to move a VHD(x) disk from one VM to another can be found here.

Powershell script to install Nasuni Filer on Windows Hyper-V 2012 R2

Nasuni provides managed storage service that offers interesting functionality in the cloud integrated storage space. The Nasuni Filer Virtualization Guide suggests to import the Nasuni Filer VM from the unzipped files from Before using this script you need to obtain the Filer.vhd file – see this post for more details.

This script automates and streamlines the process of installing the Nasuni Filer Virtual Machine on Hyper-V 2012 R2. It can be downloaded from the Microsoft Script Center Repository.

In this example,

  • I’ve stored the script as \\rd06\scripts$\Install-Nasuni-Filer.ps1
  • I’m running the script on a Hyper-V host
  • I will storing the VM files under C:\ClusterStorage\Volume1 – this can be any local path on the Hyper-V host
  • The path for the needed Filer.vhd file is \\rd06\d$\Nasuni\Filer.vhd
  • In this particular environment, guest networking is on VLAN 5. If you’re not using VLANs you can omit this parameter
  • I will call this VM “Nasuni-Demo2”

Dot source the script with parameters similar to:

. \\rd06\scripts$\Install-Nasuni-Filer.ps1 -VMPath C:\ClusterStorage\Volume1 -VHDPath \\rd06\d$\Nasuni\Filer.vhd -VLAN 5 -VMName Nasuni-Demo2


The script creates a subfolder with the VM name under the VMPath

It converts the Filer.vhd to VHDX format. VHDX format has many performance and other enhancements over VHD.

It creates the Nasuni Filer VM as Gen 1 VM.

It detects the host’s first external vSwitch and attaches the VM vNIC to it. If you have more than 1 external vSwitch on this Hyper-V host, you can spell out which one to use in the command line by using the -vSwitch parameter

It sets the VM startup memory to 6GB as recommended by the Nasuni Filer Virtualization Guide.

It assigns the VM 4 CPU vCores. This can be adjusted by the optional parameter -ProcessorCount

It sets VM automatic start action to “start”. This ensures the VM is started when the host is rebooted.

It sets the VM memory to static. This VM does not have the Hyper-V Linux Integration Service and cannot use dynamic memory.

It assigns the VM vNIC a static MAC address. This is necessary for live-migration. Otherwise the VM will lose its IP settings when live-migrated.

It assigns the vNIC VLAN ID if the -VLAN parameter is used

It creates and adds the Cache.vhdx and COW.vhdx disks and attaches them to the VM. They’re attached to SCSI controller 0 / LUN 0, and controller 1 / LUN 1. This is to mirror setup suggested by Nasuni. It’s not clear why the Cow.vhdx disk needs to be on a separate SCSI controller or why it needs LUN 1 specifically. By default, the second SCSI disk added will go on controller 0 / LUN 1.

Finally the script starts the VM.


As usual, the script leave a log file behind on the folder where it ran. Log file lists steps taken and will look like:

2014.12.05 06:50:23 AM: 

 Directory: C:\ClusterStorage\Volume1

Mode LastWriteTime Length Name 
---- ------------- ------ ---- 
d---- 12/5/2014 6:50 AM Nasuni-Demo2 

2014.12.05 06:50:23 AM: VM Path 'C:\ClusterStorage\Volume1\Nasuni-Demo2' has been verified/created
2014.12.05 06:50:23 AM: Converting file '\\rd06\d$\Nasuni\Filer.vhd' to 'C:\ClusterStorage\Volume1\Nasuni-Demo2\Filer.vhdx'.. 
2014.12.05 06:55:13 AM: done in 50 seconds
2014.12.05 06:55:13 AM: Creating VM 'Nasuni-Demo2' on host 'HV02-A'.. 
2014.12.05 06:55:16 AM: done in 2 seconds
2014.12.05 06:55:17 AM: Configured VM 'Nasuni-Demo2' with '4' CPU cores
2014.12.05 06:55:17 AM: Configured VM 'Nasuni-Demo2' to automatically start upon host bootup
2014.12.05 06:55:50 AM: 
VMName VMNetworkAdapterName Mode VlanList
------ -------------------- ---- --------
Nasuni-Demo2 Network Adapter Access 5 

2014.12.05 06:55:50 AM: Set VLAN ID for vNIC 'Network Adapter' to '5' on VM 'Nasuni-Demo2'
2014.12.05 06:55:51 AM: 

ComputerName : HV02-A
Path : C:\ClusterStorage\Volume1\Nasuni-Demo2\Cache.VHDX
VhdFormat : VHDX
VhdType : Dynamic
FileSize : 4194304
Size : 68719476736
MinimumSize : 
LogicalSectorSize : 512
PhysicalSectorSize : 4096
BlockSize : 33554432
ParentPath : 
DiskIdentifier : dcf132e9-6e97-4523-b6cf-7cd2944372b1
FragmentationPercentage : 0
Alignment : 1
Attached : False
DiskNumber : 
Key : 
IsDeleted : False
Number : 

2014.12.05 06:55:52 AM: 
VMName ControllerType ControllerNumber ControllerLocation DiskNumber Path 
------ -------------- ---------------- ------------------ ---------- ---- 
Nasuni-Demo2 SCSI 0 0 C:\ClusterStorage\Volume1\Nasuni-Demo2\Cache.VHDX

2014.12.05 06:55:52 AM: Created and added 64 TB dynamic cache disk 'C:\ClusterStorage\Volume1\Nasuni-Demo2\Cache.VHDX' to VM 'Nasuni-Demo2'
2014.12.05 06:55:54 AM: 

ComputerName : HV02-A
Path : C:\ClusterStorage\Volume1\Nasuni-Demo2\Cow.VHDX
VhdFormat : VHDX
VhdType : Dynamic
FileSize : 4194304
Size : 64424509440
MinimumSize : 
LogicalSectorSize : 512
PhysicalSectorSize : 4096
BlockSize : 33554432
ParentPath : 
DiskIdentifier : 48a4a329-3303-4c7e-b4c9-e958fcf67e03
FragmentationPercentage : 0
Alignment : 1
Attached : False
DiskNumber : 
Key : 
IsDeleted : False
Number : 

2014.12.05 06:55:55 AM: 
VMName ControllerType ControllerNumber ControllerLocation DiskNumber Path 
------ -------------- ---------------- ------------------ ---------- ---- 
Nasuni-Demo2 SCSI 1 1 C:\ClusterStorage\Volume1\Nasuni-Demo2\Cow.VHDX

2014.12.05 06:55:55 AM: Created and added 60 TB dynamic cow disk 'C:\ClusterStorage\Volume1\Nasuni-Demo2\Cow.VHDX' to VM 'Nasuni-Demo2'
2014.12.05 06:56:07 AM: Started VM 'Nasuni-Demo2'

After VM installation, go to Hyper-V Manager:


Open the VM console, you’ll see display similar to:


In this example, I have DHCP server running on the network. The Nasuni Filer VM obtained an IP address via DHCP as shown.

If no DHCP server is running on the network, assign IP address to the Nasuni Filer VM by using the following commands:

  • Hit enter to enter the Service Menu, login as service, password is serviceNasuni010
  •  Type in the following commands:Nasuni010
    • editnetwork
    • setall static
  • Enter the desired IP information for the VM.
  • Type in “save” to save settings
  • Type in “close” to exit the Service Menu

Browse to the IP address of the Nasuni Filer to complete setup. Bypass the certificate security warning. Nasuni-HyperV9

Enter/confirm IP settings.

Nasuni-HyperV10Click on the Edit button next to the Ethernet 1 device to update its IP info. Enter 9000 for MTU if using jumbo frames.


Review and continue. Nasuni-HyperV12Click Continue to save settings. Nasuni-HyperV13

Enter Serial Number and Authorization code. In the email from Nasui, there will be a link and credentials to obtain these. Nasuni-HyperV14

Type in “confirm” to confirm, and check the box to accept the EULA. Confirm/edit the name for this Nasuni Filer. Nasuni-HyperV15

If you already have the Nasuni Management Console (VM) deployed, you’ll get this screen:Nasuni-HyperV16

Check the box to manage this Filer under the central NMC.

Enter/create admin credentials for this Filer. Nasuni-HyperV17


Get-VMMetering script to collect and reset VM Metering data, report to CSV

This script can be downloaded from the Microsoft Script Center Repository. It can be set as a scheduled task on one of the Hyper-V hosts in the environment, not all of them.

Set the schedule of the scheduled task to run as often as you’d like to have the VM metering data collected and reset.

Edit the top 3 lines to match your environment details:

  • $CSV = “d:\sandbox\MeteringReports”
    • Edit this line to enter the path to the folder to save CSV files. This can be a UNC path like “\\server\share\folder”
  • $HVHosts = @(“Host1″,”Host2”)
    • Edit this line to list Hyper-V hosts in your environment
  • $Sort = “AvgCPU”
    • Edit this line to change the report sort order. Options include: AvgCPU, AvgRAM, MaxRAM, MinRAM, TotalDisk, NetworkInbound, NetworkOutbound, VMName, ComputerName

Report data and output will look like:


Hyper-V Virtual Machine checkpoints

In Windows Server 2012 R2 a VM checkpoint in Hyper-V captures a point in time state of a virtual machine’s memory, CPU, system state, and disk contents.

Checkpoints were called VM Snapshots in Server 2012 but that was confusing because it was too close to VSS volume snapshots for example, and it was also known as Checkpoint in VMM.

When a checkpoint is invoked, a .avhd file is created for each of the VM’s .vhd(x) files, and the .vhd(x) files becomes read-only. All changes are then written to the .avhd files preserving the state of the .vhd(x) files at the point of creating the checkpoint. If the VM attempts to access a file, Hyper-V will look for it in the .avhd file first, if not found, it will look for the parent .vhd file. This causes a performance degradation particularly if a number of nested checkpoints are created like:


In this example, The disk files can be observed in the VM folder:


where all the files are read-only except the latest .avhd file at the bottom. Only one checkpoint .avhd file is read-write at any given point in time. Each checkpoint has 1 parent check point. In Powershell, we can run the cmdlet:

Get-VMSnapshot -VMName vHost17

to identify each checkpoint’s parent checkpoint:


Removing a checkpoint merges its content (blocks) with its parent checkpoint. Checkpoints do not have to be removed in order. In this example, we can remove the 7:37:31 checkpoint using this Powershell cmdlet or from the Hyper-V Manager GUI:

Remove-VMSnapshot -VMName vHost17 -Name “vHost17 – (9/21/2014 – 7:37:31 PM)”

Hyper-V will merge the 7:37:31 checkpoint blocks with its parent RW checkpoint (7:37:43):



The entire tree of checkpoints can be deleted in one step by right clicking on the top checkpoint in Hyper-V Manager, and clicking ‘Delete Checkpoint Subtree’.

A checkpoint can be exported using the Export-VMSnapshot cmdlet. The resulting .vhd(x) file(s) can be used to create a clone of the original VM.

A checkpoint can be renamed in either Hyper-V Manager GUI or via Powershell cmdlet Rename-VMSnapshot.

A checkpoint can be applied (restored). This reverts the VM back to the point in time where the checkpoint was taken.



Powershell Function to get Hyper-V host networking configuration

This function generates a txt report on one or more Hyper-V hosts’ networking configuration. It’s a useful tool when troubleshooting issues that relate to VM live-migration, VM replication and similar issues. It can be downloaded from the Microsoft Script Center Repository.

To get help for the function type in:

help Get-HVNetworking -full

You will see output similar to:

  Function to get Hyper-V host networking configuration 
  Function generates report in txt format 
  The function will skip computers that don't have Hyper-V role installed 
 .Parameter ComputerName 
  Name(s) of the Hyper-V host(s) to report on 
 .Parameter ReportFile 
  File name to save the resulting report to.  
  Example: "c:\reports\Hyper-V_Networking.txt" 
  If absent, the resulting report is saved to a text file in the current folder. 
  Get-HVNetworking -ComputerName "Host1" 
  This example reports on the Hyper-V host "Host1" 
  Get-HVNetworking "Host1","Host2","Host3" -Verbose 
  This example reports on the Hyper-V hosts "Host1","Host2","Host3" 
  and displays results to the screen as well. 
  Get-ADComputer -Filter * | Select name | foreach-Object { Get-HVNetworking $ ".\Domain-HVNetworkingReport.txt" -Verbose } 
  This example goes through all computers in the domain  
  and reports on the ones that have Hyper-V role installled  
  and saves all gathered data into a single report 
  Function by Sam Boutros 
  v1.0 - 08/29/2014 
  Possible future updates: 
    Select specific properties of interest instead of returning all properties 
    Return selected properties as a PSObject  

SBTools module, adds function to get VM’s VHD file path

You may need to track the location of Hyper-V virtual machines’ VHD files. This may be important to identify the storage platform where a particular VM drive is located, which is in turn important in troubleshooting performance and disk IO issues.

To use this function, download SBTools.rar from the Microsoft Script Center Repository and run .\install-SBTools.ps1

The difficulty in identifying where a VM drive resides physically lies in the fact that VM drives are referred to differently from the VM and its host’s prospectives. This module includes a function; Get-SBVHD that retrieves a VM’s drive VHD file path. For example, consider this VM:


It has a total of 7 disks: 3 attached to 2 different IDE controllers, and 4 attached to 2 different SCSI controllers.

From the Hyper-V host’s prospective the 7 disks look like:

From the host’s prospective
ControllerType ControllerNumber ControllerLocation
ide 0 0
ide 0 1
ide 1 1
scsi 0 0
scsi 0 1
scsi 0 2
scsi 1 0

However, from the guest virtual machine’s prospective the 7 disks are identified as:

From the Guest’s prospective
Controller DiskNumber
ide 0
ide 1
ide 2
scsi 3
scsi 4
scsi 5
scsi 6

The host can tell us the VHD path to the VM disk presented in SCSI controller 0 location 1 for example, but it’s unaware of what’s on the disk in terms of partitions, and volumes.

The guest can tell us the volumes on a particular partition and the partitions on a particular disk, but it’s unaware of the VHD file path that represents this disk.

To add another wrinkle, starting with a guest VM’s drive letter, a volume has no information on what partition it resides on. Also, a partition has no information on what disk it resides on.

For example:

(get-volume -DriveLetter d) | Select-Object *

returns output similar to:

HealthStatus : Healthy
DriveType : Fixed
DriveLetter : D
FileSystem : NTFS
FileSystemLabel :
ObjectId : \\?\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\
Path : \\?\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\
Size : 107372081152
SizeRemaining : 94993174528
PSComputerName :
CimClass : ROOT/Microsoft/Windows/Storage:MSFT_Volume
CimInstanceProperties : {DriveLetter, DriveType, FileSystem, FileSystemLabel…}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties

Nothing here tells me what partition this volume resides on.

Using WMI class directly does not provide the needed information:

(Get-WmiObject -Class Win32_Volume -Filter “DriveLetter = ‘d:'”) | Select-Object *

returns more information about the volume:

PSComputerName : CM01
__GENUS : 2
__CLASS : Win32_Volume
__SUPERCLASS : CIM_StorageVolume
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_Volume.DeviceID=”\\\\?\\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\\”
__DERIVATION : {CIM_StorageVolume, CIM_StorageExtent, CIM_LogicalDevice, CIM_LogicalElement…}
__NAMESPACE : root\cimv2
__PATH : \\CM01\root\cimv2:Win32_Volume.DeviceID=”\\\\?\\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\\”
Access :
Automount : True
Availability :
BlockSize : 4096
BootVolume : False
Capacity : 107372081152
Caption : D:\
Compressed : False
ConfigManagerErrorCode :
ConfigManagerUserConfig :
CreationClassName :
Description :
DeviceID : \\?\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\
DirtyBitSet : False
DriveLetter : D:
DriveType : 3
ErrorCleared :
ErrorDescription :
ErrorMethodology :
FileSystem : NTFS
FreeSpace : 94993149952
IndexingEnabled : True
InstallDate :
Label :
LastErrorCode :
MaximumFileNameLength : 255
Name : D:\
NumberOfBlocks :
PageFilePresent : False
PNPDeviceID :
PowerManagementCapabilities :
PowerManagementSupported :
Purpose :
QuotasEnabled : False
QuotasIncomplete : False
QuotasRebuilding : False
SerialNumber : 950910896
Status :
StatusInfo :
SupportsDiskQuotas : True
SupportsFileBasedCompression : True
SystemCreationClassName :
SystemName : CM01
SystemVolume : False
Scope : System.Management.ManagementScope
Path : \\CM01\root\cimv2:Win32_Volume.DeviceID=”\\\\?\\Volume{6e7e57fb-e9c7-11e3-80bd-00155d65010c}\\”
Options : System.Management.ObjectGetOptions
ClassPath : \\CM01\root\cimv2:Win32_Volume
Properties : {Access, Automount, Availability, BlockSize…}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY…}
Qualifiers : {dynamic, locale, provider}
Site :
Container :

but nothing about the partition on which this volume resides.

The Get-SBVHD function in this module identifies the VHD file path of a given drive on a given VM.

to see more details type in

help Get-SBVHD -Full


All about time

timeIn a post in the Powershell Q&A forum, Tim Warner wrote:

Who remembers systeminfo? I liked to use systeminfo | more on my Windows XP and Win 7 systems to get the boot datetime, but Microsoft appears to have stripped the property in Windows 8 and Windows Server 2012. At any rate, it’s not what I want. :)

What would you say is the most efficient way in Windows PowerShell v3 or later to get not the boot time but the elapsed uptime of the box in an eyeball-friendly format?

Ultimately, I’d like to add this function to my profile script so I see the info at-a-glance every time I start the console. I’d like to see output that is similar to the following:

Uptime: 8 days, 12 hours, 36 minutes

I thought sure that should be easy via querying WMI from Powershell. Then Dave Wyatt  added:

Windows 8 will throw you all off, though. By default, when you “Shut down” a Windows 8 computer, you’re actually going into a sleep / hibernate state, and waking up from that doesn’t reset the WMI LastBootUpTime value (but a reboot does; go figure.) You can figure out the last “boot” time on Windows 8 by searching the event log, though.

Which got me thinking, with Windows 8 / Server 2012 and above we may not be getting uptime by querying WMI, so I looked into different ways to get computer uptime and wrote this script which can be downloaded from the Microsoft Script Center Repository.

Script output looks like:


This script shows different ways to get and display computer uptime.  The script saves output to a log file in the folder where it runs. Log file name can be modified by editing the $LogFile variable.

The script gets uptime from:

  1. The VM’s Hyper-V host if the computer is a virtual machine
  2. Systeminfo
  3. Net statistics
  4. Event Log
  5. Win32_OperatingSystem class
  6. Win32_PerfFormattedData_PerfOS_System class (pointed out by Vern Anderson)

8/1/2014 – V.10

Get-Busy.ps1 powershell script to create files on many PCs and collect metrics

This script uses Busy.ps1 which is a script that I posted earlier. This script can be downloaded from the Microsoft TechNet Gallery. To use this script you need to edit the 4 data entry lines on top:


  • $WorkFolder = “e:\support” # Folder on each VM where test files will be created
  • $MaxSpaceToUseOnDisk = 20GB # Maximum amount of disk space to be used on each VM’s $WorkFolder during testing
  • $VMPrefix = “V-2012R2-LAB” # We’ll use that to scope this script (only running VMs with name matching this Prefix will be processed)
  • $LocalAdmin = “administrator” # This is the local admin account on the VMs. You can also use a domain account here if you like.

The script requires 1 positional parameter to indicate whether you wish to start the testing on the VMs or stop it. For example to start:

.\get-busy.ps1 start


 To end the testing, use:

 .\get-busy.ps1 stop

The script will reach out to the VMs being tested and stop the busy.ps1 script, collect the test results, and cleanup the $Workfolder on each VM.

The script generates 2 log files:

  • A general log file that contains the messages displayed on the screen about each action attempted.
  • A CSV file that contains the compiled test results from all the CSV files generated by each busy.ps1 script on each of the tested VMs

Here’s an example of the compiled CSV file Get-busy_20140714_071428PM.csv

Powershell script to live migrate all running VMs including storage from one host to another

Powershell Script to live migrate all running VMs; including storage; from one host to another. Enter the source and destination host names (or IPs) in lines 4 and 5. Enter the drive letters of the destination host where you wish to live migrate the source host VMs to in line 6.


You can download this script from the Microsoft TechNet Gallery.

The script live migrates the VMs:


It also leaves 2 files on the folder where it runs:

– A log file that shows different information about the source and destination hosts, and the VMs being migrated.

– A CSV file that shows one record per migrated VM listing the source path of each of its disks. This may be useful for failback..

Powershell script to setup NFS share on Server 2012 R2

The following script sets up NFS share on Server 2012 R2:


# Script to setup NFS share on Server 2012 R2
# Sam Boutros – 7/7/2014
# References:,
$NFSFolder = “d:\shares\NFS1” # Tye in the path to the folder to be shared via NFS
$NFSShare = “nfs1” # Type in the share name you wish to use
# End Data entry section
Import-Module ServerManager
Add-WindowsFeature FS-NFS-Service
Import-Module NFS
if (!(Test-Path $NFSFolder)) {New-Item -ItemType directory -Path $NFSFolder}
New-NfsShare -name $NFSShare -Path $NFSFolder
$ShareName = $env:COMPUTERNAME + “:/” + $NFSShare
Write-Output “NFS share has been created: $ShareName”

You can see the new share in Server Manager under File and Storage Services:


The default NFS share properties are:



Under Share Permissions, I clicked Add, entered the IP address (or name) of the Linux host that needs to connect to this 2012 R2 NFS share, and selected the desired access (read/write):


No changes to NTFS permissions:


Finally, I enabled the following firewall rule to allow me to ping this server:NFS8

Next, I setup a Red Hat 6.5 VM to test with.  I picked v6.5 because

  1. It comes with the Hyper-V integration built in – no need for manual RTM installation,
  2. The Hyper-V integration server for 6.5 kernel allows for Host-based VSS backup – no need for guest agent inside the Linux machine. We get crash consistent backup (not application consistent backup), but that’s a big improvement from Hyper-V integration service for kernel version 6.4 and older,
  3. The Hyper-V integration service supports dynamic RAM. Again, with kernel versions 6.4 and older, we can only use static RAM with Linux guests

I downloaded the media ISO Boot and DVD files from Red Hat,

created VM with 2 DVDs so that I can mount both media during setup, followed the simple installation steps, rebooted

Next, I used the console (and later on Putty to SSH) to the new Red Hat machine, logged in as root,


I ran the following commands:

ifconfig -a => show interfaces
ifconfig eth0 netmask => to setup IP address and mask
ping => confirm connection to NFS server (enabled ping rule in Windows firewall)
mount -t ext4 => to show partitions formatted with ext4 file system
mkdir /pub => to create local mount point directory /pub
mount /pub (must have added permission on NFS share on Server 2012)
cd /pub => to change directory to /pub
ls => to see files on remote NFS share
echo hello >test1.txt => to test creating a text file named test1

You might want to edit /etc/fstab and modify the following line to match your configuration. For example: /pub nfs defaults 0 0

The files were visible also on the 2012 R2 server.