vmsan 0.1.0-alpha.24 → 0.1.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -47
- package/dist/_chunks/connect.mjs +0 -1
- package/dist/_chunks/context.mjs +215 -195
- package/dist/_chunks/create.mjs +107 -113
- package/dist/_chunks/download.mjs +1 -2
- package/dist/_chunks/errors.mjs +2 -2
- package/dist/_chunks/exec.mjs +2 -3
- package/dist/_chunks/list.mjs +2 -1
- package/dist/_chunks/network.mjs +2 -1
- package/dist/_chunks/remove.mjs +2 -1
- package/dist/_chunks/start.mjs +2 -1
- package/dist/_chunks/stop.mjs +2 -1
- package/dist/_chunks/summary.mjs +1 -1
- package/dist/_chunks/timeout-extender.mjs +1 -1
- package/dist/_chunks/upload.mjs +1 -2
- package/dist/_chunks/vm-context.mjs +288 -3
- package/dist/index.d.mts +12 -8
- package/dist/index.mjs +3 -4
- package/package.json +8 -8
- package/dist/_chunks/vm-state.mjs +0 -242
package/README.md
CHANGED
|
@@ -29,26 +29,30 @@ Create, manage, and connect to isolated [Firecracker](https://github.com/firecra
|
|
|
29
29
|
- 📂 **File transfer** — upload and download without SSH
|
|
30
30
|
- 🐳 **Docker images** — build rootfs from any OCI image with `--from-image`
|
|
31
31
|
- 🏃 **Command execution** — run commands with streaming output, env injection, and sudo
|
|
32
|
-
- 🧩 **Multiple runtimes** — `base`, `node22`, `python3.13`
|
|
32
|
+
- 🧩 **Multiple runtimes** — `base`, `node22`, `node24`, `python3.13`
|
|
33
33
|
- 📸 **VM snapshots** — save and restore VM state
|
|
34
34
|
- 📊 **JSON output** — `--json` flag for scripting and automation
|
|
35
35
|
|
|
36
36
|
## 📋 Prerequisites
|
|
37
37
|
|
|
38
38
|
- Linux (x86_64 or aarch64) with KVM support
|
|
39
|
-
- [Bun](https://bun.sh) >= 1.2
|
|
40
|
-
- [Go](https://go.dev) >= 1.22 (to build the in-VM agent)
|
|
41
39
|
- Root/sudo access (required for TAP device networking and jailer)
|
|
42
|
-
-
|
|
40
|
+
- Docker (for building runtime images and `--from-image`)
|
|
43
41
|
|
|
44
42
|
## 🚀 Install
|
|
45
43
|
|
|
46
|
-
### 1. Install Firecracker, kernel, and rootfs
|
|
47
|
-
|
|
48
44
|
```bash
|
|
49
45
|
curl -fsSL https://vmsan.dev/install | bash
|
|
50
46
|
```
|
|
51
47
|
|
|
48
|
+
This downloads and installs everything into `~/.vmsan/`:
|
|
49
|
+
|
|
50
|
+
- Firecracker + Jailer (latest release)
|
|
51
|
+
- Linux kernel (vmlinux 6.1)
|
|
52
|
+
- Ubuntu 24.04 rootfs (converted from squashfs to ext4)
|
|
53
|
+
- vmsan CLI + in-VM agent
|
|
54
|
+
- Runtime images (node22, node24, python3.13)
|
|
55
|
+
|
|
52
56
|
<details>
|
|
53
57
|
<summary>Uninstall</summary>
|
|
54
58
|
|
|
@@ -58,53 +62,27 @@ curl -fsSL https://vmsan.dev/install | bash -s -- --uninstall
|
|
|
58
62
|
|
|
59
63
|
</details>
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- Firecracker + Jailer (latest release)
|
|
64
|
-
- Linux kernel (vmlinux 6.1)
|
|
65
|
-
- Ubuntu 24.04 rootfs (converted from squashfs to ext4)
|
|
66
|
-
|
|
67
|
-
### 2. Install vmsan CLI
|
|
68
|
-
|
|
69
|
-
<!-- automd:pm-install -->
|
|
70
|
-
|
|
71
|
-
```sh
|
|
72
|
-
# ✨ Auto-detect
|
|
73
|
-
npx nypm install vmsan
|
|
74
|
-
|
|
75
|
-
# npm
|
|
76
|
-
npm install vmsan
|
|
77
|
-
|
|
78
|
-
# yarn
|
|
79
|
-
yarn add vmsan
|
|
80
|
-
|
|
81
|
-
# pnpm
|
|
82
|
-
pnpm add vmsan
|
|
83
|
-
|
|
84
|
-
# bun
|
|
85
|
-
bun install vmsan
|
|
86
|
-
|
|
87
|
-
# deno
|
|
88
|
-
deno install npm:vmsan
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
<!-- /automd -->
|
|
65
|
+
<details>
|
|
66
|
+
<summary>Development setup</summary>
|
|
92
67
|
|
|
93
|
-
|
|
68
|
+
If you want to build from source:
|
|
94
69
|
|
|
95
70
|
```bash
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cd ..
|
|
99
|
-
```
|
|
71
|
+
# Install dependencies
|
|
72
|
+
bun install
|
|
100
73
|
|
|
101
|
-
|
|
74
|
+
# Build the in-VM agent
|
|
75
|
+
cd agent && make install && cd ..
|
|
102
76
|
|
|
103
|
-
|
|
104
|
-
bun
|
|
77
|
+
# Build the CLI
|
|
78
|
+
bun run build
|
|
79
|
+
|
|
80
|
+
# Link local build
|
|
81
|
+
mkdir -p ~/.vmsan/bin
|
|
82
|
+
ln -sf "$(pwd)/dist/bin/cli.mjs" ~/.vmsan/bin/vmsan
|
|
105
83
|
```
|
|
106
84
|
|
|
107
|
-
|
|
85
|
+
</details>
|
|
108
86
|
|
|
109
87
|
## 📖 Usage
|
|
110
88
|
|
|
@@ -202,7 +180,7 @@ docs/ Documentation site (vmsan.dev)
|
|
|
202
180
|
### How it works
|
|
203
181
|
|
|
204
182
|
1. **vmsan** uses [Firecracker](https://github.com/firecracker-microvm/firecracker) to create lightweight microVMs with a jailer for security isolation
|
|
205
|
-
2. Each VM gets a TAP network device with its own `/30` subnet (`
|
|
183
|
+
2. Each VM gets a TAP network device with its own `/30` subnet (`198.19.{slot}.0/30`)
|
|
206
184
|
3. A Go-based **agent** runs inside the VM, exposing an HTTP API for command execution, file operations, and shell access
|
|
207
185
|
4. The CLI communicates with the agent over the host-guest network
|
|
208
186
|
|
package/dist/_chunks/connect.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as vmsanPaths } from "./paths.mjs";
|
|
2
2
|
import { l as handleCommandError } from "./errors.mjs";
|
|
3
3
|
import { t as createCommandLogger } from "./logger.mjs";
|
|
4
|
-
import "./vm-state.mjs";
|
|
5
4
|
import { n as waitForAgent, t as resolveVmState } from "./vm-context.mjs";
|
|
6
5
|
import { t as ShellSession } from "./shell.mjs";
|
|
7
6
|
import { consola } from "consola";
|