// SetBootOrder sets the VM boot order
SetBootOrder sets the VM boot order
// SetBootOrder sets the VM boot order
func (v *VirtualMachine) SetBootOrder(bootOrder []int32) error {
	if err := v.activeSettingsData.Set("BootOrder", bootOrder); err != nil {
		return errors.Wrap(err, "Set BootOrder")
	}
	vmText, err := v.activeSettingsData.GetText(1)
	if err != nil {
		return errors.Wrap(err, "GetText")
	}
	jobPath := ole.VARIANT{}
	jobState, err := v.mgr.svc.Get("ModifySystemSettings", vmText, &jobPath)
	if err != nil {
		return errors.Wrap(err, "calling ModifySystemSettings")
	}
	if jobState.Value().(int32) == wmi.JobStatusStarted {
		err := wmi.WaitForJob(jobPath.Value().(string))
		if err != nil {
			return errors.Wrap(err, "waiting for job")
		}
	}
	return nil
}
func ( v * VirtualMachine ) SetBootOrder ( bootOrder [ ] int32 ) error { if err := v . activeSettingsData . Set ( " " , bootOrder ) ; err != nil { return errors . Wrap ( err , " " ) } vmText , err := v . activeSettingsData . GetText ( 1 ) if err != nil { return errors . Wrap ( err , " " ) } jobPath := ole . VARIANT { } jobState , err := v . mgr . svc . Get ( " " , vmText , & jobPath ) if err != nil { return errors . Wrap ( err , " " ) } if jobState . Value ( ) . ( int32 ) == wmi . JobStatusStarted { err := wmi . WaitForJob ( jobPath . Value ( ) . ( string ) ) if err != nil { return errors . Wrap ( err , " " ) } } return nil }
SetBootOrder sets the VM boot order
SetBootOrder sets the VM boot order