82 Commits
Author SHA1 Message Date
edi-oai f101ade5d8 Worker: introduce --experimental-vm-stop-timeout (#505) 2026-09-24 18:01:08 +01:00
Yibo Zhuang f716825279 Make USB accessories opt-in for Tart VMs (#502) 2026-09-23 12:24:57 -07:00
edi-oai 9ac6ca6326 Support Tart Guest Agent transport for VM startup scripts (#490)
* Support Tart Guest Agent transport for VM startup scripts

* TestTartGuestAgentStartupScript: make ScriptContent more readable

* Align Tart Guest Agent's startup script execution with SSH

* Use mvdan.cc/sh/v3/syntax to validate "export" shell commands

* Use Bash instead of Zsh on Linux

* Invert logic when validating vm.StartupScript.Transport for simplicity

* Document startup_script's transport field in OpenAPI specification

* Prevent unbounded buffering of startup script output

* grpc.WaitForReady(true) → retry.DoWithData()
2026-09-09 08:04:25 +01:00
edi-oai 01bf2d72a9 Support port-forwarding directly to Tart Guest Agent (#489) 2026-09-08 18:40:52 +01:00
edi-oai 792324b35b Make audio and clipboard sharing opt-in (#486) 2026-09-08 10:24:42 +01:00
edi-oai d8caf2d33c Add UDP endpoint support (#485) 2026-09-07 12:35:44 +01:00
edi-oai 95b1269450 Defer in-place updates while VMs are restarting (#483) 2026-09-03 18:59:53 +01:00
edi-oai a838bb0299 Worker: introduce automatic "org.cirruslabs.orchard.worker-name" label (#481)
* Worker: introduce automatic "org.cirruslabs.orchard.worker-name" label

* TestLabelsCopy: use constants to fix linter error
2026-09-03 00:24:20 +01:00
edi-oai a3e08ffcbf Support running host processes alongside VMs (#482)
* Regenerate .pb with protoc-gen-go v1.36.11

* Support running host processes alongside VMs

* Replace existing host processes when starting a set
2026-09-03 00:24:09 +01:00
edi-oai 3fe0a284c5 Add endpoint support (#478)
* Add endpoint support

* Document endpoint network exposure
2026-09-02 16:08:39 +01:00
edi-oai 62acf3c265 Support dynamically updating Softnet policy (#477)
* Support dynamically updating Softnet policy

* Use cmpopts.EquateEmpty() when comparing two VMSpecs
2026-09-02 14:19:29 +01:00
Yibo Zhuang f0bdf3a151 tart: make deletion of missing VMs idempotent (#474)
Treat tart delete exit code 2 as successful cleanup so deleting an
already-removed VM does not prevent reconciliation from continuing.
Preserve other command failures and retain the wrapped process error
so callers can inspect its exit status.

Cover repeated deletion, other exit codes, process startup failures,
and wrapped exit-status preservation.

Pin CI actions to their previously used commit SHAs so jobs can start
under the repository action-pinning policy.

Validation: vmmanager package tests and lint for changed lines pass;
CI action pins match the last successful run.
2026-09-01 17:15:40 -07:00
Yibo Zhuang 9b8365edcf worker: wait for Tart and Vetu stop completion (#472)
Share one Stop completion per run and retain Stopping until both the stop command and VM cleanup finish. Expose transition conditions to reconciliation and return after requesting Stop so it cannot apply a generation or restart the VM early.

Cover both completion orders, repeated and concurrent calls, restart, and generation acknowledgement with bounded fake-command regressions. Allow process startup under parallel test load while preserving explicit shutdown ordering.
2026-09-01 21:59:50 +01:00
Yibo Zhuang ae29e3c979 Worker: preserve configuration of suspended Tart clones (#473)
Read the cloned VM state before applying resource overrides or randomizing
its MAC address and serial. Suspended clones must retain the configuration
used to save their state.

Cover suspended and stopped clones through the command runner, including
assigned resource precedence, optional image FQN lookup, and metadata
command and JSON errors.
2026-09-01 21:59:48 +01:00
Yibo Zhuang 28c0dd37b4 Add an option to disable Tart clipboard sharing (#475)
Expose noClipboard in VM creation, CLI inspection, and the API schema.
Pass --no-clipboard to Tart when requested. Clipboard sharing remains
enabled by default for existing VM specifications.
2026-09-01 21:32:55 +01:00
kylefuhrmanncalm cc2c0fd034 Add --no-audio support to VM spec (#460)
tart run supports --no-audio to disable host audio pass-through, but
there was no way to request it through a VM's spec - Headless, Nested,
and Suspendable all have a flag/field but audio didn't. Useful on
headless hosts with no audio hardware, where audio pass-through can
make guest CoreAudio depend on host audio services that don't exist.
2026-09-01 09:17:45 -07:00
Yibo Zhuang 6cbee5352e Bound VM inventory initialization before worker registration (#467) 2026-08-19 09:58:56 -07:00
Yibo Zhuang 6cdb1b78d9 Recover controller sessions without stopping active VMs (#466) 2026-08-19 09:21:32 -07:00
Yibo Zhuang 2da158908c Wait for VM shutdown before freeing worker capacity (#465) 2026-08-18 07:38:36 -07:00
Nikolay Edigaryev 9092a9f172 Support Vetu virtualization on Linux in addition to Tart on macOS (#419)
* Support Vetu virtualization on Linux in addition to Tart on macOS

* api(portForward): ensure that rendezvousConn is closed

* Re-try SSH connections in integration tests

Because a VM might be still booting.
2026-03-16 11:12:28 +01:00
Nikolay Edigaryev f3b4eb42ca Worker: decouple updateWorker() and syncVMs() to use different triggers (#403)
* Worker: decouple updateWorker() and syncVMs() to use different triggers

* Actually return an error otherwise errgroup won't terminate
2026-02-06 18:16:40 +01:00
Nikolay Edigaryev 230a83c740 Worker: ignore HTTP 404 when updating VM (#397) 2026-02-05 13:01:05 +01:00
Nikolay Edigaryev 688238837a Implement server-side filtering for VMs by worker (#392)
* Implement server-side filtering for VMs by worker

* Parse more than one filter but error out when more than one is provided

* Fix off-by-one

* No need to use "\n" in Debugf()
2026-01-29 17:52:24 +01:00
Nikolay Edigaryev a234ec8995 orchard worker run: introduce "--synthetic" and "--workers" hidden flags (#390)
* orchard worker run: introduce "--synthetic" and "--workers" hidden flags

* Use slices.Clone() instead of directly assigning slices

* Use errgroup's context instead of command's context
2026-01-28 16:50:25 +01:00
Nikolay Edigaryev 7775515a73 Load testing: synthetic VMs, multiple worker support and Grafana k6 test (#389)
* Load testing: synthetic VMs, multiple worker support and Grafana k6 test

* echoserver: prevent fallthrough when Accept() fails

* Move default local-dev context logic to CreateDevController()

* Synthetic: add a random delay to startup script echoing
2026-01-28 10:54:55 +01:00
Nikolay Edigaryev ea89d01760 Worker: define VM interface and make tart.VM conform to it (#388)
* Worker: define VM interface and make tart.VM conform to it

* Hopefully produce better diff
2026-01-21 18:57:22 +01:00
Fedor Korotkov 173a34b083 Some extra documentation for LLMs (#377) 2025-12-03 20:45:58 +01:00
Nikolay Edigaryev 5c162ce603 Power state fixes (#376)
* Do not call vm.Suspend() and vm.Stop() twice

* Do not attempt to Stop() or Suspend() the VM twice
2025-12-03 11:38:27 +01:00
Nikolay Edigaryev 76a552bade Ability to set VM's power state and retrieve backing Tart VM's name (#373)
* Ability to set VM's power state and retrieve backing Tart VM's name

* Validate user-provided "powerState" field

* Introduce TestSpecUpdatePowerStateSuspend

* Introduce TestSpecUpdatePowerStateStopped

* OpenAPI specification: add note about suspended VMs to "tartName" desc.

* Sometimes we need to wait more than 30 seconds
2025-12-02 16:43:17 -05:00
Nikolay Edigaryev 60303d11dd VM specification: allow suspendable VMs (#366) 2025-11-11 21:16:28 +04:00
Nikolay Edigaryev bafcf6fac2 Simplify state reconciliation and support changing Softnet settings (#364)
* Simplify state reconciliation and support changing Softnet settings

* Remove unused "updateFunc" parameter from syncOnDiskVMs()

* Don't take an address of a loop variable

* ensure → ensures

* updateVMState(): don't forget to update VMState

* Introduce TestSpecUpdateSoftnet integration test

* Update OpenAPI specification to include generation/observedGeneration
2025-11-06 20:56:31 +04:00
Nikolay Edigaryev 08e9dfbbfe Support "tart run"'s --net-softnet-allow and --net-softnet-block (#361)
* Support "tart run"'s --net-softnet-allow and --net-softnet-block

* Use ghcr.io/cirruslabs/macos-tahoe-base:latest by default
2025-10-27 23:07:43 +04:00
Nikolay Edigaryev 43e21c7963 orchard create vm: "--nested" flag to enable nested virtualization (#346) 2025-09-26 19:42:44 +04:00
Nikolay Edigaryev 873efb24e7 ghcr.io/cirruslabs/macos-sequoia-base:latest for everything (#344) 2025-09-25 20:43:53 +04:00
Nikolay Edigaryev 56260e7667 Worker: automatically scrape logical cores and memory size (#341) 2025-09-17 00:13:42 +04:00
Nikolay Edigaryev ed7921ce16 Fix websocket.(*Conn).timeoutLoop goroutine leak (#329) 2025-07-11 15:23:50 +04:00
Nikolay Edigaryev 7957a9b95a Try "tart ip --resolver=agent" first when using "--net-bridged" (#323) 2025-06-19 17:36:56 +04:00
Nikolay Edigaryev 507db0fcfe orchard create vm: introduce --disk-size command-line argument (#313) 2025-04-29 18:21:46 +04:00
Nikolay Edigaryev e3e585778c Worker: do not block RPCv2 when performing forwarding ports and resolving IPs (#306)
* Worker: do not block RPCv2 when performing actions

* Do not block RPCv1 with handleGetIP() too
2025-04-16 00:18:02 +04:00
Nikolay Edigaryev 3c2de83ea7 Orchard Worker: don't forget to use localnetworkhelper in RPC and RPCv2 (#304)
* Orchard Worker: don't forget to use localnetworkhelper in RPC and RPCv2

* Fix integration tests by not requiring an empty vm.StatusMessage
2025-04-11 00:15:13 +04:00
Nikolay Edigaryev abcfee677d Work around Sequoia's "Local Network" permission with a helper process (#302)
* Work around Sequoia's "Local Network" permission with a helper process

* README.md: macOS 15 (Sequoia) warning

* Make "orchard dev" unix-specific too, otherwise Release fails

* Fix typo in "localNetworkHerlper"

* Slightly improve the macOS 15 (Sequoia) note

* orchard worker run: better documentation for --user

* Make sure privilege dropping is the first step we do in runWorker()
2025-04-10 18:01:19 +04:00
Nikolay Edigaryev c24db17aa5 Use VM status message to reflect pulling, cloning, configuring, etc. (#298) 2025-04-03 18:08:13 +04:00
Nikolay Edigaryev 2c8d36ef70 Always randomize MAC address (#251)
* Always randomize MAC address

* Worker: check DHCP lease time and print a warning if it's unconfigured

* Further improve the explanation

* Add two leases example to the explanation

* Add an example of the resulting /var/db/dhcpd_leases
2025-02-13 12:35:12 +00:00
Nikolay Edigaryev 2aae818f78 Worker: prefer assigned CPU/memory to CPU/memory (#250)
* Worker: prefer assigned CPU/memory to CPU/memory

* orchard get worker: show default CPU, default memory and labels
2025-02-13 16:23:47 +04:00
Nikolay Edigaryev ee3c0f91f2 Startup script: implement retries for connection-related operations (#249)
* Startup script: implement retries for connection-related operations

* assert.Equal → assert.Contains

* Wait for at least 1,000 lines of logs

* Join slice of strings before calling assert.Contains()

* TestHostDirs: use require.Contains() instead of require.EqualValues()

* TestHostDirs: wait for at least 4 log lines
2025-02-12 18:11:12 +04:00
Nikolay Edigaryev 4794f2a5b6 orchard create vm: introduce --random-serial command-line argument (#248) 2025-02-12 18:00:13 +04:00
Nikolay Edigaryev 26c8808506 Support scheduling by labels (#244) 2025-02-06 18:05:36 +04:00
Nikolay Edigaryev 581de320b9 Allow creating VMs with implicit CPU and memory (#243)
* Allow creating VMs with implicit CPU and memory

* Clarify why cpu/memory can be 0 a bit better

* Controller(API): don't forget to update DefaultCPU and DefaultMemory

* Add an integration test for implicit CPU and memory
2025-02-06 00:50:01 +04:00
Nikolay Edigaryev 88fba8004d Introduce WebSocket-based RPC v2 (#239)
* Introduce WebSocket-based RPC v2

* go test: add -ldflags="-B gobuildid"

* No need to change the "controller.workerNotifier.Notify()" error message

* No need to modify Protocol Buffers/gRPC generated code

* rpcWatch(): explain that connection shouldn't be normally be closed

* Avoid "port forwarding failed: " repetition in error messages

* Improve comments and avoid repetition in IP resolution errors
2025-01-30 17:33:32 +04:00
Nikolay Edigaryev 08769e00b4 Worker: do not consider on-disk VMs syncing error as fatal (#230) 2024-12-11 19:56:00 +04:00