code: def stop(self):
          
  
          self._hw_virtualization = False
          yield from self._stop_ubridge()
          yield from self._stop_remote_console()
          vm_state = yield from self._get_vm_state()
          if vm_state == "running" or vm_state == "paused" or vm_state == "stuck":
              if self.acpi_shutdown:
                  # use ACPI to shutdown the VM
                  result = yield from self._control_vm("acpipowerbutton")
                  trial = 0
                  while True:
                      vm_state = yield from self._get_vm_state()
                      if vm_state == "poweroff":
                          break
                      yield from asyncio.sleep(1)
                      trial += 1
                      if trial >= 120:
                          yield from self._control_vm("poweroff")
                          break
                  self.status = "stopped"
                  log.debug("ACPI shutdown result: {}".format(result))
              else:
                  # power off the VM
                  result = yield from self._control_vm("poweroff")
                  self.status = "stopped"
                  log.debug("Stop result: {}".format(result))
  
              log.info("VirtualBox VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
              yield from asyncio.sleep(0.5)  # give some time for VirtualBox to unlock the VM
              try:
                  # deactivate the first serial port
                  yield from self._modify_vm("--uart1 off")
              except VirtualBoxError as e:
                  log.warn("Could not deactivate the first serial port: {}".format(e))
  
              for adapter_number in range(0, self._adapters):
                  nio = self._ethernet_adapters[adapter_number].get_nio(0)
                  if nio:
                      yield from self._modify_vm("--nictrace{} off".format(adapter_number + 1))
                      yield from self._modify_vm("--cableconnected{} off".format(adapter_number + 1))
                      yield from self._modify_vm("--nic{} null".format(adapter_number + 1))
          yield from super().stop()
docs: Stops this VirtualBox VM.