Guest agent for Tart VMs
Go to file
Daniel Gräfe 6bceea7928 Lazy clipboard init and backoff when SPICE not connected
When the SPICE clipboard channel is not available (e.g., running
headless or without clipboard sharing), the vdagent would previously
retry every 1 second, initializing the clipboard library each time.
This caused unnecessary CPU usage.

Changes:
- Defer clipboard.Init() until first successful SPICE message
- Add ErrSPICENotConnected error type to distinguish "never connected"
  from "connection lost"
- Use 1-minute backoff when SPICE is not available, vs 1-second for
  transient failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 10:33:34 +01:00
.github Enable weekly Dependabot updates for "gomod" ecosystem (#18) 2025-07-23 17:02:46 +04:00
cmd Automatically install and start a systemd service (#21) 2025-08-04 16:33:59 +04:00
internal Lazy clipboard init and backoff when SPICE not connected 2026-01-23 10:33:34 +01:00
packaging Automatically install and start a systemd service (#21) 2025-08-04 16:33:59 +04:00
proto/rpc RPC: introduce ResolveIP() method to support "tart ip --resolver=agent" (#14) 2025-06-19 13:06:26 +04:00
.cirrus.yml RPC: introduce ResolveIP() method to support "tart ip --resolver=agent" (#14) 2025-06-19 13:06:26 +04:00
.gitignore Build universal binary instead of architecture dependent (#7) 2025-05-12 23:42:45 +04:00
.golangci.yml Automatic disk resizing for macOS VMs (#1) 2025-04-07 22:54:19 +04:00
.goreleaser.yml Automatically install and start a systemd service (#21) 2025-08-04 16:33:59 +04:00
LICENSE Add LICENSE and publish to our tap (#2) 2025-04-07 23:41:27 +04:00
README.md RPC: introduce ResolveIP() method to support "tart ip --resolver=agent" (#14) 2025-06-19 13:06:26 +04:00
buf.gen.yaml "tart exec" support (--run-rpc) and component groups (e.g. --run-daemon) (#10) 2025-05-19 18:53:16 +04:00
buf.yaml "tart exec" support (--run-rpc) and component groups (e.g. --run-daemon) (#10) 2025-05-19 18:53:16 +04:00
go.mod Bump golang.org/x/sys from 0.39.0 to 0.40.0 in the all-updates group (#36) 2026-01-14 15:01:05 +01:00
go.sum Bump golang.org/x/sys from 0.39.0 to 0.40.0 in the all-updates group (#36) 2026-01-14 15:01:05 +01:00

README.md

Guest agent for Tart VMs

A guest agent for Tart VMS is a lightweight background service that runs inside the virtual machine and enables enhanced communication between the host and guest and other useful features, such as automatic disk resizing.

Currently implemented features:

  • Automatic disk resizing for macOS VMs with recovery partition removed (--resize-disk)
  • Clipboard sharing for macOS VMs using our in-house SPICE vdagent implementation (--run-vdagent)
  • tart exec support (--run-rpc)
    • it's recommended to invoke it as a launchd global agent because fewer privileges will be available to commands started via tart exec
    • however, you can also invoke it as a launchd global daemon if running commands started via tart exec as root is desired
  • tart ip --resolver=agent support (--run-rpc)
    • allows resolving VM's IP address without relying on DHCP leases and/or an ARP table

To run all features appropriate for a given context, use component groups: