Initializes the API client with the specified socket path.
The path to the Unix socket (e.g., '/tmp/firecracker.socket')
OptionalbaseUrl: stringThe base URL for the API (default is 'http://localhost'). Don't include trailing slash.
ProtectedundiciThe Undici HTTP client configured to connect over the provided Unix socket.
Creates new drive with ID specified by drive_id or updates existing drive. This works pre-boot only. Will fail if update is not possible.
Guest drive properties
Gets the machine configuration of the VM. When called before the PUT operation, it will return the default values for the vCPU count (=1), memory size (=128 MiB). By default SMT is disabled and there is no CPU Template.
the machine configuration
Protectedjsonrequest() internallyProtectednorequest() internallyPartially updates the Machine Configuration of the VM. Pre-boot only.
A subset of Machine Configuration Parameters
ProtectedrequestMakes a request to the API.
the options for the request. Everything will work except the 'Content-Type' header, which is always set to 'application/json'.
array of valid status codes for the response
the response from the API
Creates new boot source if one does not already exist, otherwise updates it. This is works pre-boot only. Will fail if update is not possible.
the bootsource
Updates the Machine Configuration of the VM. Pre-boot only.
mem_size_mib must be a multiple of 2.Machine Configuration Parameters
Starts an action on the instance
The action to start
resolves when the action is successfully started
Updates the properties of a drive with the specified ID. This works post-boot only. Will fail if update is not possible.
Guest drive properties to update
API Client for interacting with the Firecracker API over a Unix socket.