Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
Hi,
we are realigning all our VHD from a HyperV R2 cluster. 6 Windows 2008 r2 cluster farm connected to 6 NetApp Luns and using CSV.
Our NetApp system consist of 4 2240 installed with Data Ontap cluster mode 8.1.2
I succeed into connecting to the Cluster using this powershell command :
$vserver=Connect-NcController myNetappcluster -Credential admin -Vserver myVserver
I succeed into seeing if VHD is aligned or not using this command :
Get-NcVirtualDiskAlignment C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd
I succeed into realigning the VHD using this command :
Repair-NcVirtualDiskAlignment -VirtualDisk C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
But i DONT succeed using powershell to convert Dynamic VHD into Fixed VHD using this command :
ConvertTo-NcVhd -SourceVhd C:\ClusterStorage\VolumeX\MyVM\dynamic_c.vhd -DestinationVhd C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
I've got an error message :
ConvertTo-NaVhd : Source and destination files must reside on the same controller.
Au niveau de ligne : 1 Caractère : 16
+ ConvertTo-NcVhd <<<< -DestinationVhd "C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd" -SourceVhd "C:\ClusterStorage\VolumeX\MyVM\dynamic_c.vhd" -ForceHostCopy
+ CategoryInfo : InvalidArgument: (:) [ConvertTo-NaVhd], ArgumentException
+ FullyQualifiedErrorId : Could not set up sis clone operation,DataONTAP.PowerShell.SDK.Cmdlets.HyperV.ConvertToNaVhd
I tried many other parameters, resulting the same result.
I forgot : we are using Data ONTAP PowerShell Toolkit, version 3.0.1.101
Solved! See The Solution
OK, i finally sorted out my case with the help of Beam in private messages.
In fact, since my hypervisor cluster farm doesnt have access to the Netapp Cluster Management interface, but only to iSCSI LIFs i use a Linux machine as a "gateway" with SOCAT
The problem was that when i made the following :
$vserver=Connect-NcController mycluster -Credential admin -Vserver myvserver
the $vserver.Address was an IP address going to the gateway and not the IP Address of the real vServer or Netapp Cluster
so, setting $verver.Address='my Netapp Cluster management IP' made the ConvertTo-NcVhd cmdlet to work fine.
I think Beam is looking to modify the cmdlet for next version for taking care of that.
The main goal was to realign all my VHDs, so my final script may look like that (for information)
# connect
$vserver=Connect-NcController mycluster -Credential admin -Vserver myvserver
$verver.Address='my Netapp Cluster management IP'
# convert to fixed
ConvertTo-NcVhd -SourceVhd C:\ClusterStorage\VolumeX\MyVM\dynamic_c.vhd -DestinationVhd C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
# eventually resize
# Set-NcVirtualDiskSize C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd 50g
# fix alignment
Repair-NcVirtualDiskAlignment -VirtualDisk C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
# dont forget to delete the fixed_c.bkup file if the VM is working
Hi, so nobody ?
ps : using the latest toolkit.
OK, i finally sorted out my case with the help of Beam in private messages.
In fact, since my hypervisor cluster farm doesnt have access to the Netapp Cluster Management interface, but only to iSCSI LIFs i use a Linux machine as a "gateway" with SOCAT
The problem was that when i made the following :
$vserver=Connect-NcController mycluster -Credential admin -Vserver myvserver
the $vserver.Address was an IP address going to the gateway and not the IP Address of the real vServer or Netapp Cluster
so, setting $verver.Address='my Netapp Cluster management IP' made the ConvertTo-NcVhd cmdlet to work fine.
I think Beam is looking to modify the cmdlet for next version for taking care of that.
The main goal was to realign all my VHDs, so my final script may look like that (for information)
# connect
$vserver=Connect-NcController mycluster -Credential admin -Vserver myvserver
$verver.Address='my Netapp Cluster management IP'
# convert to fixed
ConvertTo-NcVhd -SourceVhd C:\ClusterStorage\VolumeX\MyVM\dynamic_c.vhd -DestinationVhd C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
# eventually resize
# Set-NcVirtualDiskSize C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd 50g
# fix alignment
Repair-NcVirtualDiskAlignment -VirtualDisk C:\ClusterStorage\VolumeX\MyVM\fixed_c.vhd -Controller $vserver
# dont forget to delete the fixed_c.bkup file if the VM is working