troubleshooting Question

Set the first boot device of a generation two Hyper-v virtual machine

Avatar of itnifl
itniflFlag for Norway asked on
Microsoft Virtual ServerHyper-VWindows Server 2012
6 Comments1 Solution5084 ViewsLast Modified:
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:

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.VirtualMachineManager.Cmdlets.SetVMCmdlet


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.VirtualMachineManager.Cmdlets.SetVMCmdlet

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 CERTIFIED SOLUTION
andersoncarvalho

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros