itnifl
asked on
Set the first boot device of a generation two Hyper-v virtual machine
I want to set the first boot device of a generation two Hyper-v virtual machine. As I have understood, the way to do this is to use the Set-SCVirtualMachine cmdlet with the FirstBootDevice parameter which takes some string:
But I have found no examples on what that string is so that I actually am able to change the first boot device,
Here are various attempts:
I also tried several other versions of this as a string, including lunId which I assumed was 1, but I have no idea. So, how to do this right?
Set-SCVirtualMachine -VM "theNameHere" -FirstBootDevice "someStringHere"
But I have found no examples on what that string is so that I actually am able to change the first boot device,
Here are various attempts:
PS C:\Windows\system32> Set-SCVirtualMachine -VM "nameHere" -FirstBootDevice "CD"
Set-SCVirtualMachine : The input string "CD" for the FirstBootDevice parameter cannot be parsed and may be invalid. (Er
ror ID: 23351, Detailed Error: )
Make sure the string uses one of the following formats: "SCSI,BusId(integer),LunId(integer)" or "NIC,SlotId(integer)"
At line:1 char:1
+ Set-SCVirtualMachine -VM "nameHere" -FirstBootDevice "CD"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~
+ CategoryInfo : ReadError: (:) [Set-SCVirtualMachine], CarmineException
+ FullyQualifiedErrorId : 23351,Microsoft.SystemCenter.Virtual MachineMan ager.Cmdle ts.SetVMCm dlet
PS C:\Windows\system32> Set-SCVirtualMachine -VM "nameHere" -FirstBootDevice "SCSI,BusId(1)"
Set-SCVirtualMachine : The input string "SCSI,BusId(1)" for the FirstBootDevice parameter cannot be parsed and
may be invalid. (Error ID: 23351, Detailed Error: )
Make sure the string uses one of the following formats: "SCSI,BusId(integer),LunId(integer)" or "NIC,SlotId(integer)"
At line:1 char:1
+ Set-SCVirtualMachine -VM "nameHere" -FirstBootDevice "SCSI,BusId(1) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~
+ CategoryInfo : ReadError: (:) [Set-SCVirtualMachine], CarmineException
+ FullyQualifiedErrorId : 23351,Microsoft.SystemCenter.Virtual MachineMan ager.Cmdle ts.SetVMCm dlet
I also tried several other versions of this as a string, including lunId which I assumed was 1, but I have no idea. So, how to do this right?
ASKER
I am guessing that you are dealing with a Generation 1 Hyper-V Guest in your example? Because this menu is not visible via VMM and the Firmware tab in the Hardware Configuration of the VM. There is a link there that points to:
http://technet.microsoft.com/library/dn440675.aspx
I need to set the first boot device to be the CD-ROM.
http://technet.microsoft.com/library/dn440675.aspx
Because of underlying differences between generation 1 and generation 2 virtual machines, the startup order (boot order) for different devices (such as a hard disk or CD) is not handled the same way in the two generations. To customize the startup order for a generation 2 virtual machine in System Center 2012 R2, you must use a Windows PowerShell command that specifies the first boot device, rather than an ordered list of boot devices.
I need to set the first boot device to be the CD-ROM.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I found another that can help you:
http://blogs.technet.com/b/jhoward/archive/2013/10/25/hyper-v-generation-2-virtual-machines-part-2.aspx
http://blogs.technet.com/b/jhoward/archive/2013/10/25/hyper-v-generation-2-virtual-machines-part-2.aspx
ASKER
Great!!
hyper-v.PNG