You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec875e6
Browse filesBrowse the repository at this point in the historyBrowse files
Change VM app deployer to run CT install scripts during image customization (virt-customize --run) instead of via a first-boot systemd service. Updated docs to reflect live installation, new update workflow (curl the ct/<app>.sh inside the VM), and new troubleshooting/reinstall guidance. misc/vm-app.func now injects function libs, runs a temporary wrapper inside virt-customize (with logging and error handling), removes the first-boot service and update wrapper injection, and updates summary/status messages to mark apps as pre-installed.
Copy file name to clipboardExpand all lines: docs/vm/APP_DEPLOYER_VM.md
+30-45Lines changed: 30 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Deploy LXC applications inside a full Virtual Machine instead of an LXC containe
4
4
5
5
## Overview
6
6
7
-
The App Deployer VM bridges the gap between CT install scripts (`install/*.sh`) and VM infrastructure. It leverages the existing install scripts — originally designed for LXC containers — and runs them inside a full VM via a first-boot systemd service.
7
+
The App Deployer VM bridges the gap between CT install scripts (`install/*.sh`) and VM infrastructure. It leverages the existing install scripts — originally designed for LXC containers — and runs them **live during image build** via `virt-customize --run`.
The update mechanism reuses the existing CT script logic. Since `pveversion` is not available inside the VM, the `start()` function automatically enters the update/settings mode — the same path it takes inside LXC containers.
87
+
The update mechanism reuses the existing CT script logic. Since `pveversion` is not available inside the VM, the `start()` function automatically enters the update/settings mode — exactly the same as running updates in LXC containers.
93
88
94
89
## Architecture
95
90
@@ -106,13 +101,13 @@ The update mechanism reuses the existing CT script logic. Since `pveversion` is
106
101
107
102
1.**Install scripts run unmodified** — The same `install/*.sh` scripts that work in LXC containers work inside VMs. The environment (`FUNCTIONS_FILE_PATH`, exports) is replicated identically.
108
103
109
-
2.**Image customization via `virt-customize`** — All files are injected into the qcow2 image before the VM boots. No SSH or guest agent required during setup.
104
+
2.**Image customization via `virt-customize`** — All dependencies are installed and the app install script runs live inside the qcow2 image during build. No SSH or guest agent required during setup.
110
105
111
-
3.**First-boot systemd service** — The install script runs automatically on first boot. Progress can be monitored via `/var/log/app-install.log`.
106
+
3.**Live installation** — The install script runs during image build (not on first boot), so the application is ready immediately when the VM starts.
112
107
113
-
4.**Update via CT script** — The existing CT script's `start()` → `update_script()` flow works in VMs without modification.
108
+
4.**Update via CT script URL** — Run the same `bash -c "$(curl ...ct/<app>.sh)"` command inside the VM, just like in an LXC container.
114
109
115
-
### Environment Variables (set during first-boot)
110
+
### Environment Variables (set during image build)
│ └── (downloaded on update) # CT script for updates
139
-
└── update-app.sh # Update wrapper script
129
+
└── tools.func # Helper functions
140
130
```
141
131
142
132
## Limitations
143
133
144
134
-**Alpine-based apps**: Currently only Debian/Ubuntu VMs are supported. Alpine install scripts are not compatible.
145
135
-**LXC-specific features**: Some CT features (FUSE, TUN, GPU passthrough) are configured differently in VMs.
146
-
-**First-boot timing**: The app installation happens after the VM boots, so the application is not immediately available (monitor `/var/log/app-install.log`).
147
136
-**`cleanup_lxc`**: This function works fine in VMs (it only cleans package caches), but the name is LXC-centric.
148
137
149
138
## Troubleshooting
150
139
151
-
### Check installation progress
140
+
### Check build log
152
141
153
-
```bash
154
-
# From inside the VM
155
-
tail -f /var/log/app-install.log
142
+
If the installation fails during image build, check the log on the Proxmox host:
Re-build the VM from scratch — since the app is installed during image build, there is no in-VM reinstall mechanism. Simply delete the VM and run the deployer again.
151
+
152
+
### Verify installation worked
168
153
169
-
### Check if installation completed
154
+
After the VM boots, SSH in and check if the application service is running:
170
155
171
156
```bash
172
-
test -f /root/.app-installed &&echo"Installed"||echo"Not yet installed"
0 commit comments