<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities: Message List - Get RDM size</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools/windows_toolkit?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 06 Jan 2009 14:19:09 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-01-06T14:19:09Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136957?tstart=0#1136957</link>
      <description>Yes good old "Reboot" Vcenter solved the problem.. &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
My next task is &lt;br /&gt;
&lt;p /&gt;
1) how to add  the Percentage of the RDM used .. ( Monitor the space left on the RDM)&lt;br /&gt;
&lt;p /&gt;
2) List all RDM with less than 10% free</description>
      <pubDate>Tue, 06 Jan 2009 14:17:23 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136957?tstart=0#1136957</guid>
      <dc:date>2009-01-06T14:17:23Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136952?tstart=0#1136952</link>
      <description>Make sure you are connected to the vc&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
blog www.ivobeerens.nl</description>
      <pubDate>Tue, 06 Jan 2009 13:52:38 GMT</pubDate>
      <author>ief</author>
      <guid>http://communities.vmware.com/message/1136952?tstart=0#1136952</guid>
      <dc:date>2009-01-06T13:52:38Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136882?tstart=0#1136882</link>
      <description>&lt;br /&gt;
yes exactly the same version ..was working ok till this afternoon..&lt;br /&gt;
&lt;p /&gt;
 Think i will have do give it a chinese cure " reboot vCenter"....</description>
      <pubDate>Tue, 06 Jan 2009 12:15:58 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136882?tstart=0#1136882</guid>
      <dc:date>2009-01-06T12:15:58Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136881?tstart=0#1136881</link>
      <description>Are you running the samve VC version on both ?&lt;br /&gt;
Different versions use different APIs.&lt;br /&gt;
It could be that one VC doesn't support all the objects.</description>
      <pubDate>Tue, 06 Jan 2009 12:02:50 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1136881?tstart=0#1136881</guid>
      <dc:date>2009-01-06T12:02:50Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136845?tstart=0#1136845</link>
      <description>&lt;br /&gt;
Strange if i run the same script pointing to a diffrent Vcenter is works..?????????????? Point it back I get the same error&lt;br /&gt;
&lt;p /&gt;
Any ideas ???</description>
      <pubDate>Tue, 06 Jan 2009 11:16:18 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136845?tstart=0#1136845</guid>
      <dc:date>2009-01-06T11:16:18Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136843?tstart=0#1136843</link>
      <description>&lt;br /&gt;
You cannot call a method on a null-valued expression.&lt;br /&gt;
&lt;p /&gt;
At :line:26 char:21&lt;br /&gt;
&lt;p /&gt;
+ if(($dev.gettype( &amp;lt;&amp;lt;&amp;lt;&amp;lt; )).Name -eq "VirtualDisk"){</description>
      <pubDate>Tue, 06 Jan 2009 11:00:44 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136843?tstart=0#1136843</guid>
      <dc:date>2009-01-06T11:00:44Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136851?tstart=0#1136851</link>
      <description>Can you attach the script you are using ?&lt;br /&gt;
I have no line 30 &lt;img class="jive-emoticon" border="0" src="http://communities.vmware.com/images/emoticons/sad.gif" alt=":-(" /&gt;</description>
      <pubDate>Tue, 06 Jan 2009 10:49:17 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1136851?tstart=0#1136851</guid>
      <dc:date>2009-01-06T10:49:17Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136842?tstart=0#1136842</link>
      <description>&lt;br /&gt;
I seem to be getting an error&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
You cannot call a method on a null-valued expression.&lt;br /&gt;
&lt;p /&gt;
At :line:30 char:21&lt;br /&gt;
&lt;p /&gt;
+ if(($dev.gettype( &amp;lt;&amp;lt;&amp;lt;&amp;lt; )).Name -eq "VirtualDisk"){</description>
      <pubDate>Tue, 06 Jan 2009 10:36:46 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136842?tstart=0#1136842</guid>
      <dc:date>2009-01-06T10:36:46Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Get RDM size</title>
      <link>http://communities.vmware.com/message/1136837?tstart=0#1136837</link>
      <description>You could use the script from  &lt;a href="http://communities.vmware.com/message/1061917#1061917" class="jive-link-message"&gt;list disks rdm with powershell&lt;/a&gt;.&lt;br /&gt;
With a minor adaption it will also display the disk capacity.&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$report = @()
$vms = Get-VM  | Get-View
foreach($vm in $vms){
  foreach($dev in $vm.Config.Hardware.Device){
    if(($dev.gettype()).Name -eq &amp;quot;VirtualDisk&amp;quot;){
	  if(($dev.Backing.CompatibilityMode -eq &amp;quot;physicalMode&amp;quot;) -or 
	     ($dev.Backing.CompatibilityMode -eq &amp;quot;virtualMode&amp;quot;)){
	    $row = &amp;quot;&amp;quot; | select VMName, HDDeviceName, HDFileName, HDMode, HDsize
          $row.VMName = $vm.Name
	    $row.HDDeviceName = $dev.Backing.DeviceName
	    $row.HDFileName = $dev.Backing.FileName
	    $row.HDMode = $dev.Backing.CompatibilityMode
           $row.HDSize = $dev.CapacityInKB
	    $report += $row
	  }
	}
  }
}
$report
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
An RDM is mapped via a .vmdk file.&lt;br /&gt;
Through the .vmdk file the size can be obtained.</description>
      <pubDate>Tue, 06 Jan 2009 10:02:18 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1136837?tstart=0#1136837</guid>
      <dc:date>2009-01-06T10:02:18Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Get RDM size</title>
      <link>http://communities.vmware.com/message/1136794?tstart=0#1136794</link>
      <description>&lt;br /&gt;
Hi all and a happy new year to evryone..&lt;br /&gt;
&lt;p /&gt;
The Following script gives a good list of all the RDM ..&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$report1 = @()&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$vms = Get-VM |Sort Name -Descending | Get-View&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;foreach($vm in $vms){&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;foreach($dev in $vm.Config.Hardware.Device){&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;if(($dev.gettype()).Name -eq "VirtualDisk"){&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
*&lt;i&gt;if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or&lt;/i&gt; *&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;($dev.Backing.CompatibilityMode -eq "virtualMode")){&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$row = "" | select VMName, HDDeviceName, HDFileName, HDMode&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$row.VMName = $vm.Name&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$row.HDDeviceName = $dev.Backing.DeviceName&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$row.HDFileName = $dev.Backing.FileName&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$row.HDMode = $dev.Backing.CompatibilityMode&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;+$report1 &lt;i&gt;= $row&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;}&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;}&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;}&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;}&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;&lt;i&gt;$report1 | ConvertTo-Html -title "Virtual Machine information" -body "&amp;lt;H2&amp;gt;RDM information.&amp;lt;/H2&amp;gt;" -head "&amp;lt;link rel='stylesheet' href='style.css' type='text/css' /&amp;gt;" | Out-File -Append $filelocation&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
is there a way i can get the actual size (capacity) of the RDms..????</description>
      <pubDate>Tue, 06 Jan 2009 08:51:06 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/message/1136794?tstart=0#1136794</guid>
      <dc:date>2009-01-06T08:51:06Z</dc:date>
      <clearspace:dateToText>10 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
  </channel>
</rss>

