<?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 - Problem with New-Harddisk</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>Thu, 05 Jun 2008 06:15:54 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-06-05T06:15:54Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Problem with New-Harddisk</title>
      <link>http://communities.vmware.com/message/963622?tstart=0#963622</link>
      <description>&lt;br /&gt;
That did the trick. Thanks for the nice script. (I modified it to add a LSI scsi adapter in no time)&lt;br /&gt;
&lt;p /&gt;
Regards&lt;br /&gt;
&lt;p /&gt;
Claus</description>
      <pubDate>Thu, 05 Jun 2008 06:15:54 GMT</pubDate>
      <author>crnielsen</author>
      <guid>http://communities.vmware.com/message/963622?tstart=0#963622</guid>
      <dc:date>2008-06-05T06:15:54Z</dc:date>
      <clearspace:dateToText>1 year, 5 months ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Problem with New-Harddisk</title>
      <link>http://communities.vmware.com/message/963127?tstart=0#963127</link>
      <description>The function below adds a BusLogic SCSI controller to a guest.&lt;br /&gt;
&lt;br /&gt;
The prerequisite for the function to work correctly is that there are no devices with the same "key" defined on the guest.&lt;br /&gt;
The function could be elaborated with a test that loops through the current devices and checks if the key is free.&lt;br /&gt;
Something like the functions I showed in  &lt;a class="jive-link-message" href="http://communities.vmware.com/message/939935#939935"&gt;Re: Changing Disk Persistence&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt;function add-SCSIController &lt;font color="navy"&gt;{&lt;/font&gt;
  param($VMname)
 
  $vm = Get-View (Get-VM $VMname).ID
 
  $spec = New-Object VMware.Vim.VirtualMachineConfigSpec
  $spec.deviceChange = @()
  $spec.deviceChange += New-Object VMware.Vim.VirtualDeviceConfigSpec
 
  $spec.deviceChange[0].device = New-Object VMware.Vim.VirtualBusLogicController
  $spec.deviceChange[0].device.busNumber = 0
  $spec.deviceChange[0].device.ControllerKey = 100
  $spec.deviceChange[0].device.DeviceInfo = New-Object VMware.Vim.Description
  $spec.deviceChange[0].device.DeviceInfo.label = &amp;quot;SCSI Controller 0&amp;quot;
  $spec.deviceChange[0].device.DeviceInfo.summary = &amp;quot;BusLogic&amp;quot;
  $spec.deviceChange[0].device.hotAddRemove = $TRUE
  $spec.deviceChange[0].device.key = 1000
  $spec.deviceChange[0].device.scsiCtlrUnitNumber = 7
  $spec.deviceChange[0].device.sharedBus = &amp;quot;noSharing&amp;quot;
  $spec.deviceChange[0].operation = &amp;quot;add&amp;quot;
 
  $vm.ReconfigVM_Task($spec)
&lt;font color="navy"&gt;}&lt;/font&gt;
 
Add-SCSIController(&amp;quot;HORSE&amp;quot;)
 
Get-VM &amp;quot;HORSE&amp;quot; | New-HardDisk -CapacityKB 10240
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Wed, 04 Jun 2008 19:12:25 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/963127?tstart=0#963127</guid>
      <dc:date>2008-06-04T19:12:25Z</dc:date>
      <clearspace:dateToText>1 year, 5 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Problem with New-Harddisk</title>
      <link>http://communities.vmware.com/message/961911?tstart=0#961911</link>
      <description>&lt;br /&gt;
Hi&lt;br /&gt;
&lt;p /&gt;
I am trying to create a new harddisk to my VM. When I execute the command I get an error.&lt;br /&gt;
&lt;p /&gt;
PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows&amp;gt; get-vm "HORSE" | new-harddisk -capacitykb 10240&lt;br /&gt;
New-HardDisk : 03-06-2008 21:54:47    New-HardDisk        No free LSI nodes&lt;br /&gt;
At line:1 char:32&lt;br /&gt;
+ get-vm "HORSE" | new-harddisk  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -capacitykb 10240&lt;br /&gt;
PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows&amp;gt;&lt;br /&gt;
&lt;p /&gt;
It is a VM without a SCSI controller, an I guess it tells me that. Then my question is: How do I add a SCSI controller??&lt;br /&gt;
&lt;p /&gt;
Regards&lt;br /&gt;
&lt;p /&gt;
Claus</description>
      <pubDate>Tue, 03 Jun 2008 20:01:08 GMT</pubDate>
      <author>crnielsen</author>
      <guid>http://communities.vmware.com/message/961911?tstart=0#961911</guid>
      <dc:date>2008-06-03T20:01:08Z</dc:date>
      <clearspace:dateToText>1 year, 5 months ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
  </channel>
</rss>

