<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RDM Disks -&amp;gt; Existing Disk - Using New-HardDisk Errors in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992401#M113597</link>
    <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;I tried it with:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$DiskPath = ((Get-VM -Name $Server1 | Get-HardDisk | Where-Object {$_.Filename -Match "_RDM"}).FileName)[1]&lt;/LI-CODE&gt;&lt;P&gt;No luck, same error still unfortunately.&lt;/P&gt;&lt;P&gt;For now using [1] is ok but in my full code for the automation I have an index that increments with every loop.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 07:33:43 GMT</pubDate>
    <dc:creator>CODETL19</dc:creator>
    <dc:date>2023-10-24T07:33:43Z</dc:date>
    <item>
      <title>RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992384#M113595</link>
      <description>&lt;P&gt;I am writing a powershell/powercli script to automate adding RDM disks to two VM's in a two node Windows Failover Cluster for SQL.&lt;BR /&gt;The RDM disks are presented from a physical storage unit and using their naa.id's I can successfully add them to my first VM without issue using the New-HardDisk module like shown below (thanks lucd for earlier help):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$DataStore = "DataStore_Name_RDM"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$VM1 = Get-VM -Name "VM1"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$VM2 = Get-VM -Name "VM2"&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;New-HardDisk -VM $VM1 -DeviceName "/vmfs/devices/disks/$($Disk)" -Datastore $DataStore -DiskType RawPhysical | New-ScsiController -Type ParaVirtual -BusSharingMode Physical&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But when it comes to adding the disk to the 2nd VM (like you would in the GUI by hitting 'existing disk' and finding the .vmdk in the datastore), I am prompted with this error:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;"New-HardDisk The specified disk path is not accessible or does not exist: '[DataStore_Name_RDM] VM1/VM1.vmdk"&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is the code I am using to map the existing disk:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;$DiskPath = (Get-VM -Name $Server1 | Get-HardDisk | Select-Object -Property Filename | Where-Object {$_.Filename -Match "_RDM"})[1]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;New-HardDisk -VM $VM2 -DiskPath $DiskPath&lt;SPAN&gt;.FilePath&lt;/SPAN&gt;&amp;nbsp;| New-ScsiController -Type ParaVirtual -&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;BusSharingMode Physical&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I can add the disk no problem via the GUI, using the 'Existing Disk' option, so the disk is accessible and does exist.&lt;/DIV&gt;&lt;DIV&gt;The datastore is presented to all hosts in the cluster these VM's sit on.&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any idea what might be causing this error, or any tips on how to troubleshoot it further?.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please also let me know what other information I can provide here to help troubleshoot.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;PowerCLI Version&lt;BR /&gt;----------------&lt;BR /&gt;VMware.PowerCLI 13.1.0 build 21624340&lt;BR /&gt;---------------&lt;BR /&gt;Component Versions&lt;BR /&gt;---------------&lt;BR /&gt;VMware Common PowerCLI Component 13.0 build 20797081&lt;BR /&gt;VMware Cis Core PowerCLI Component PowerCLI Component 13.0 build 20797636&lt;BR /&gt;VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.0 build 20797821&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Oct 2023 02:18:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992384#M113595</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-24T02:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992395#M113596</link>
      <description>&lt;P&gt;The Select-Object cmdlet doesn't return a single String, but an object.&lt;BR /&gt;The DiskPath expects a String.&lt;BR /&gt;&lt;BR /&gt;Try with&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;$DiskPath = ((Get-VM -Name $Server1 | Get-HardDisk | Where-Object {$_.Filename -Match "_RDM"}).FileName)[1]&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Note: assuming that the 2nd returned String , with [1], is the correct HD might be risky.&lt;BR /&gt;Better is to match part of the value in the FileName&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 06:31:54 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992395#M113596</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2023-10-24T06:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992401#M113597</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;I tried it with:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$DiskPath = ((Get-VM -Name $Server1 | Get-HardDisk | Where-Object {$_.Filename -Match "_RDM"}).FileName)[1]&lt;/LI-CODE&gt;&lt;P&gt;No luck, same error still unfortunately.&lt;/P&gt;&lt;P&gt;For now using [1] is ok but in my full code for the automation I have an index that increments with every loop.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:33:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992401#M113597</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-24T07:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992403#M113598</link>
      <description>&lt;P&gt;Did you check what you have in $DiskPath and the type?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 08:12:20 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992403#M113598</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2023-10-24T08:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992405#M113599</link>
      <description>&lt;P&gt;Yes I did, sorry I should have put the results.&lt;BR /&gt;&lt;BR /&gt;Type&lt;/P&gt;&lt;P&gt;IsPublic IsSerial Name BaseType&lt;BR /&gt;-------- -------- ---- --------&lt;BR /&gt;True True String System.Object&lt;/P&gt;&lt;P&gt;And the output was as expected.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 08:20:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992405#M113599</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-24T08:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992406#M113600</link>
      <description>&lt;P&gt;And how did you do the New-HardDisk?&lt;BR /&gt;Because that should now be&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;New-HardDisk -VM $VM2 -DiskPath $DiskPath | New-ScsiController -Type ParaVirtual -BusSharingMode Physical&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;No FilePath property&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 08:33:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992406#M113600</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2023-10-24T08:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992529#M113608</link>
      <description>&lt;P&gt;Yep the New-HardDisk command was exactly as you pasted, without the .FileName extension:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;New-HardDisk -VM $VM2 -DiskPath $DiskPath | New-ScsiController -Type ParaVirtual -BusSharingMode Physical&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Oct 2023 00:01:33 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992529#M113608</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-25T00:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992541#M113609</link>
      <description>&lt;P&gt;Then I'm out of ideas I'm afraid.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 06:06:48 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992541#M113609</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2023-10-25T06:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992542#M113610</link>
      <description>&lt;P&gt;Sad times :(.&lt;/P&gt;&lt;P&gt;I will keep looking and feedback here if I find anything!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 06:13:23 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992542#M113610</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-25T06:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992969#M113627</link>
      <description>&lt;P&gt;With a bit more investigation I have found that this is nothing to do with the code. It looks to be down to some specific datastores in our vCenter as I have my script working on a different datastore, using the methods discussed here + some.&lt;/P&gt;&lt;P&gt;No idea what the cause is on the datastore, but we are looking further.&lt;/P&gt;&lt;P&gt;If you have any suggestions, please fire away!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 05:08:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2992969#M113627</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-10-27T05:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993657#M113658</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;So far I've now found this difference.&lt;/P&gt;&lt;P&gt;When running:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$ds&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Get-Datastore&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Name &lt;/SPAN&gt;&lt;SPAN&gt;"DATASTORE_NAME"&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Server &lt;/SPAN&gt;&lt;SPAN&gt;"server.myserver.com"&lt;/SPAN&gt; &lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;Get-HardDisk&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$ds&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;.Filename&lt;BR /&gt;&lt;BR /&gt;My files do not show in the results, but if I browse to the datastore in the GUI, the files show.&lt;BR /&gt;They show their 'type' is of 'File' as you can see below&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Not Working Files.png" style="width: 400px;"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/104234iCBE1B47CA055B068/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Not Working Files.png" alt="Not Working Files.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;However when I run that same code on the datastore that is not giving me grief, the results are returned, and the files are of type 'Virtual Disk' as shown below:&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Working Files.png" style="width: 400px;"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/104235i4E540F57BB3B626F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Working Files.png" alt="Working Files.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The only difference I could see between the datastores is that the working DS version is&amp;nbsp;&lt;SPAN&gt;&lt;SPAN&gt;VMFS 6.81 and the NON working DS is&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;VMFS 6.82.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am adding the disks to each DS in the exact same way... Any thoughts on this one?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Nov 2023 02:12:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993657#M113658</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-11-01T02:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993670#M113659</link>
      <description>&lt;P&gt;You could try to unregister/register that VM, and check if that changes the type of the files.&lt;BR /&gt;&lt;BR /&gt;Do all VMs on that datastore show the VMDK as "file"?&lt;BR /&gt;&lt;BR /&gt;I suggest opening an SR.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 07:05:08 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993670#M113659</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2023-11-01T07:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993841#M113665</link>
      <description>&lt;P&gt;I normally create new scsi controller first on second node with flat disk, then get scsi name&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;New-HardDisk&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;VM &lt;/SPAN&gt;&lt;SPAN&gt;$vm2&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;DiskType flat &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;CapacityGB &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt; &lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;New-ScsiController&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;BusSharingMode Physical &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Type ParaVirtual&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$scsiname2&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;$vm2&lt;/SPAN&gt; &lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;Get-ScsiController&lt;/SPAN&gt;&lt;SPAN&gt;).name[&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Then, get disk naa id from node 1 and export result to csv&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN&gt;$vm1&lt;/SPAN&gt; &lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;Get-HardDisk&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;DiskType RawPhysical &lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;SPAN&gt; Select &lt;/SPAN&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;N&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;'VM'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN&gt;E&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;$_&lt;/SPAN&gt;&lt;SPAN&gt;.Parent.Name&lt;/SPAN&gt;&lt;SPAN&gt;}}&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FileName &lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;Export-Csv&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Path .\xxx.csv &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;UseCulture &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;NoTypeInformation&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Then read result from csv and add them each to node 2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Import-Csv&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Path .\xxx.csv &lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;UseCulture &lt;/SPAN&gt;&lt;SPAN&gt;|&lt;/SPAN&gt; &lt;SPAN&gt;ForEach-Object&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Process {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;$vm&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Name &lt;/SPAN&gt;&lt;SPAN&gt;$vm2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;New-HardDisk&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;VM &lt;/SPAN&gt;&lt;SPAN&gt;$vm&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;DiskPath &lt;/SPAN&gt;&lt;SPAN&gt;$_&lt;/SPAN&gt;&lt;SPAN&gt;.FileName&lt;/SPAN&gt; &lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;Controller &lt;/SPAN&gt;&lt;SPAN&gt;$scsiname2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This should work, I use it each time to mount RDM disk. Please also make sure both servers power off.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Nov 2023 03:26:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993841#M113665</guid>
      <dc:creator>JieX</dc:creator>
      <dc:date>2023-11-02T03:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: RDM Disks -&gt; Existing Disk - Using New-HardDisk Errors</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993850#M113666</link>
      <description>&lt;P&gt;Thanks for the suggestion JieX, I already have the naa.id for the disk and the issue isn't creating the SCSI controller.&lt;/P&gt;&lt;P&gt;Considering the code works 100% on Datastores with a version of 6.81, its got to be something related to the versioning and the file type.&lt;BR /&gt;&lt;BR /&gt;We will be raising a SR soon once I get relevant access from the company I work for.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 06:18:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/RDM-Disks-gt-Existing-Disk-Using-New-HardDisk-Errors/m-p/2993850#M113666</guid>
      <dc:creator>CODETL19</dc:creator>
      <dc:date>2023-11-02T06:18:31Z</dc:date>
    </item>
  </channel>
</rss>

