<?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>article Specify the boot devices for a virtual machine in VMware PowerCLI Documents</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/ta-p/2794980</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below Powershell script is (heavily) based on &lt;A href="http://download3.vmware.com/sample_code/Perl/VMBootOrder.html"&gt;this Perl script&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It uses a feature that is available with &lt;STRONG&gt;VC2.5&lt;/STRONG&gt; or later and &lt;STRONG&gt;ESX 3.5&lt;/STRONG&gt; or later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The keyword "&lt;STRONG&gt;bios.bootDeviceClasses&lt;/STRONG&gt;" allows to define the boot devices in the VMX file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="#ff0000" __jive_macro_name="color"&gt;Note&lt;/SPAN&gt;: this does not allow one to change the boot order !&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info on the syntax see the Perl script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example sets the boot devices of the virtual machine to the CD drive and the hard disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code"&gt;

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.extraConfig += New-Object VMware.Vim.OptionValue
$spec.extraConfig[0].key = "bios.bootDeviceClasses"
$spec.extraConfig[0].value = "allow:cd,hd"
 
(get-view (Get-VM -Name &amp;lt;VM-name&amp;gt;).ID).ReconfigVM_Task($spec)

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to force a boot from CD, for example for an OS deployment, only allow the CD device.&lt;/P&gt;&lt;P&gt;Once the OS installation is complete change the allowed boot devices to only the hard disk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2008 18:19:00 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2008-04-24T18:19:00Z</dc:date>
    <item>
      <title>Specify the boot devices for a virtual machine</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/ta-p/2794980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below Powershell script is (heavily) based on &lt;A href="http://download3.vmware.com/sample_code/Perl/VMBootOrder.html"&gt;this Perl script&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It uses a feature that is available with &lt;STRONG&gt;VC2.5&lt;/STRONG&gt; or later and &lt;STRONG&gt;ESX 3.5&lt;/STRONG&gt; or later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The keyword "&lt;STRONG&gt;bios.bootDeviceClasses&lt;/STRONG&gt;" allows to define the boot devices in the VMX file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="#ff0000" __jive_macro_name="color"&gt;Note&lt;/SPAN&gt;: this does not allow one to change the boot order !&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info on the syntax see the Perl script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following example sets the boot devices of the virtual machine to the CD drive and the hard disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code"&gt;

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.extraConfig += New-Object VMware.Vim.OptionValue
$spec.extraConfig[0].key = "bios.bootDeviceClasses"
$spec.extraConfig[0].value = "allow:cd,hd"
 
(get-view (Get-VM -Name &amp;lt;VM-name&amp;gt;).ID).ReconfigVM_Task($spec)

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to force a boot from CD, for example for an OS deployment, only allow the CD device.&lt;/P&gt;&lt;P&gt;Once the OS installation is complete change the allowed boot devices to only the hard disk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 18:19:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/ta-p/2794980</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-04-24T18:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Specify the boot devices for a virtual machine</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/tac-p/2794981#M309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to a typo the boot order is hard disk followed by the CD drive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 18:39:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/tac-p/2794981#M309</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-04-24T18:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Specify the boot devices for a virtual machine</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/tac-p/2794982#M310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Corrected in version 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 18:48:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Specify-the-boot-devices-for-a-virtual-machine/tac-p/2794982#M310</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2008-04-24T18:48:39Z</dc:date>
    </item>
  </channel>
</rss>

