func pickSCSIController(l object.VirtualDeviceList, bus int) (types.BaseVirtualController, error) {
	log.Printf("[DEBUG] pickSCSIController: Looking for SCSI controller at bus number %d", bus)
	l = l.Select(func(device types.BaseVirtualDevice) bool {
		switch d := device.(type) {
		case types.BaseVirtualSCSIController:
			return d.GetVirtualSCSIController().BusNumber == int32(bus)
		}
		return false
	})

	if len(l) == 0 {
		return nil, fmt.Errorf("could not find scsi controller at bus number %d", bus)
	}

	log.Printf("[DEBUG] pickSCSIController: Found SCSI controller: %s", l.Name(l[0]))
	return l[0].(types.BaseVirtualController), nil
}
func pickSCSIController(l object.VirtualDeviceList, bus int) (types.BaseVirtualController, error) {
	log.Printf("[DEBUG] pickSCSIController: Looking for SCSI controller at bus number %d", bus)
	l = l.Select(func(device types.BaseVirtualDevice) bool {
		switch d := device.(type) {
		case types.BaseVirtualSCSIController:
			return d.GetVirtualSCSIController().BusNumber == int32(bus)
		}
		return false
	})

	if len(l) == 0 {
		return nil, fmt.Errorf("could not find scsi controller at bus number %d", bus)
	}

	log.Printf("[DEBUG] pickSCSIController: Found SCSI controller: %s", l.Name(l[0]))
	return l[0].(types.BaseVirtualController), nil
}
// getSCSIController picks a SCSI controller at the specific bus number supplied.