Options if I can't connect ESPHome hardware to HA host?

I want to add ESPHome to my HA Core setup. HA is running in a Docker container on an Ubuntu VM, on an ESXi 6.7.0 host.
I am not able to connect my ESPHome hardware (M5 Atom Lite) to the HA host, as it is not being passed through to the guest O/S as a USB device. Even though the host USB controller has passthrough enabled, whenever I try to add a new USB device I get a message saying: “There are no more USB devices available to add”. Since I already have two USB hard drives passed through to the same guest O/S I don’t know why the Atom Lite isn’t being detected.
Anyway…I have installed ESPHome in a Docker container, on the same Ubuntu VM as HA Core. I can access it via port 6052 in a web browser. When I try to add the ESPHome Integration to HA, using the same host name and port 6052, I get an error: “Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.”
I have no idea where the YAML is that it’s referring to - could anyone advise where/what this file is?

Also, if I use a laptop (running Ubuntu) to flash and configure the Atom Lite, would I be able to then connect it to the ESPHome instance that I installed on the same machine as HA?
But I don’t know where

This one is easy. In HA, settings / Devices & Services / Integrations / + Add Integration.

Select ESPHome. You’ll be prompted for the IP address of the ESP device.

In the HA “config” directory, under sub-directory ESPHome. These get created when you create a new device in the ESPHome Web UI.

You can also create them using ESPHome on your laptop, then just copy the .yaml files to the HA directory. That way you can have your laptop do all the work, but still access them from HA. That’s what I do, since my HA is running on a wimpy little RPi and I hate to beat it up doing the compiles.

For the whole initial setting up of new devices and compiling and coding etc you don’t need the HA host at all. My HA runs on a Pi, but I do all my esphome development on a windows10 laptop via the command line version of ESPHOME. I then add the new esphome nodes via the devices page in HA. No need to even have the uncompiled yaml files on the HA system etc.

Ah OK so it seems that installing ESPHome on the same machine as HA was unnecessary, as I can create and modify all of my devices on another machine (provided I have the ESPHome dashboard installed on that machine), and the HA integration can connect to them via wifi once they are configured?
I mistakenly thought that the HA ESPHome integration needed to be connected to the ESPHome server/dashboard, whereas it actually connects to each individual device/node.

One more question…if I configure the ESPHome device on one machine running ESPHome, can I later modify its config on a different machine, and can it be done wirelessly (or do I need to connect the device via USB again)?

as long as you copy over the yaml code from the first machine to the different one, yes.

from the moment on an ESPHOME node has its first running code, it usually doesnt need a usb connection for updates anymore