code: func (l VirtualDeviceList) AssignController(device types.BaseVirtualDevice, c types.BaseVirtualController) {
  	d := device.GetVirtualDevice()
  	d.ControllerKey = c.GetVirtualController().Key
  	d.UnitNumber = new(int32)
  	*d.UnitNumber = l.newUnitNumber(c)
  	if d.Key == 0 {
  		d.Key = -1
  	}
  }
docs: // AssignController assigns a device to a controller.