Skip to main content
Keep Docker, containerd, the NVIDIA driver and the rest of the system current on your host machine. Verification requires a currently supported NVIDIA driver; see Verification stages. This page upgrades everything except the kernel. The kernel has its own page, Upgrade the Kernel; its full system upgrade path does not touch the packages the Vast daemon holds or pins, so use this page for those. The steps are the same on Ubuntu Server 22.04 and 24.04. Before you start, make sure you can reach the machine without SSH (IPMI, iDRAC, iLO, or a monitor and keyboard). Step 7 reboots onto a new driver, containerd and Docker at once.
Multi-machine hosts: do one machine at a time. Hold lists, driver branch and kernel flavour differ per machine, so read every output on the machine you are on.

1. Check for rentals and unlist

The Docker restart in step 5 and the reboot in step 7 stop every instance on the machine, running or stopped. Do not go past this step until both checks below show the machine has no instances at all. Wait until all rental contracts have ended, or schedule the window with vastai schedule maintenance so renters are notified and can save their work.
List every container, including stopped ones:
Lines starting with C. are client instances. Exited still counts as a rental: the client keeps the disk and can restart it. Then confirm in the console. Open the machine’s card in the Vast.ai console; Occ, #Running and #Stored must all read 0:
No C. lines and all three at 0 means the machine is free. Unlist it so nobody rents it while Docker or the GPUs are down, then continue at step 2:
See vastai unlist machine.
If anything is rented and you still want to upgrade: unlist the machine with the command above, then schedule maintenance so renters get a notification with your window. Do not stop or delete client containers.
See vastai schedule maint. When the window starts, repeat both checks above and continue only when both are clear.

2. Check what needs upgrading

Nothing changes on the machine in this step.
The Vast daemon pins Docker and containerd to their current major version. The -o option makes apt ignore the pin for this one command so you can see the real newest version:
If Candidate equals Installed for both, step 5 has nothing to do. List every other package with an update:
Empty list and Docker already current: nothing to upgrade. Relist and stop here. List the packages the daemon holds. Everything here gets upgraded:
A shorter list (no qemu/libvirt without VMs, no nvidia-docker2) is fine.
If docker-ce is missing from the list, check the source:
A docker.io line means Ubuntu’s Docker. Skip step 5; step 6 upgrades it with everything else.

3. Stop the Vast daemon

The daemon re-applies its apt-mark holds every hour, and a plain stop is not enough because it restarts itself. Stop it, then mask it so it stays down until step 8. The unit is a real file, so it has to be backed up and removed before mask will work:
Confirm it is down:
Loaded: masked and Active: inactive (dead). The machine shows Offline in the console until step 8; it is unlisted, so that is fine.

4. Remove the holds, keep the kernel

Remove every hold from step 2 at once:
One line per package. E: No packages found means nothing was held; go back to step 2. Hold the kernel so this page never installs one. The metapackage is linux-generic on some machines and linux-generic-hwe-24.04 on others, so let dpkg pick the installed names:
Three lines, with or without the -hwe-24.04 suffix. Step 8 releases this hold.

5. Upgrade Docker and containerd

Every running container stops when Docker restarts. Step 1 made sure none are running.Do not add "features": {"containerd-snapshotter": true} to /etc/docker/daemon.json. A machine installed with Docker 28 keeps overlay2 on Docker 29; changing the image store hides every existing image and container.
Upgrade both, ignoring the pin for this one command:
Answer y. --only-upgrade skips packages that are not installed. Docker restarts on the Setting up docker-ce line.
Both must say active before you continue.
Both must equal the Candidate from step 2.

6. Upgrade everything else

GPUs are unusable from here until the reboot. nvidia-smi fails with Driver/library version mismatch until then; that is expected. Do not relist before step 8.If Ubuntu asks which services to restart, do not choose “restart all”. Do not run needrestart -r a or apt autoremove.
Check how the NVIDIA kernel module is delivered on this machine:
linux-modules-nvidia-* means prebuilt: nothing is compiled. nvidia-dkms-* means the module is compiled during the upgrade, which takes several minutes. Remember which one you have for the recovery section. Upgrade. NEEDRESTART_MODE=l lists services needing a restart instead of restarting them:
Answer y. kept back must name the kernel packages from step 4 (Ubuntu may add a phased-update package; that is fine). Wait for the prompt to return.

7. Reboot

Wait about 5 minutes and log back in. If the machine does not come back, use the out-of-band console (IPMI, iDRAC, iLO, another BMC, or a monitor and keyboard). The kernel was held in step 4, so booting the previous kernel, the fix on the kernel page, does not apply here. Read the boot messages on the console to see which service fails.

8. Verify, start the daemon and relist

The daemon is still masked. Check Docker and the GPUs first and start the daemon only when they are healthy.

Services

Both must say active.

GPUs

One line per GPU, driver version as installed in step 6. Do not start the daemon until this works.

Docker configuration

The upgrade must not have touched /etc/docker/daemon.json:
The runtimes.nvidia.path must still point at kaalia_docker_shim. Do not run nvidia-ctk runtime configure on a Vast machine: it replaces that path with NVIDIA’s default runtime and client instances stop working. If the file differs from the above, restore it to this content and sudo systemctl restart docker.

Images and containers

Confirm the upgrade did not hide the image store:
The Vast test images and everything else from before the upgrade must be there.

Start the Vast daemon

Restore the unit file you backed up in step 3 and reload:
Then enable and start:
A restart-looping daemon also reads active most of the time, so read the uptime:
Run it again after a minute. ago must grow and Main PID must not change. The console shows Online within about 5 minutes. If Loaded: says masked, redo the start commands above. If the daemon keeps restarting or the console stays Offline after 5 minutes, follow the Offline Machine page from its step 2.

Self-test

The last line must be Test completed successfully.. On failure the output names the failing check; see How to self-test.

Re-lock

The daemon puts its holds back within the hour. Run its script now so the machine is never relisted unprotected:
Look for the set on hold lines and Data sent successfully.; the rest is diagnostics. Release the kernel hold from step 4 so the machine keeps getting kernel updates:
apt-cache policy docker-ce now shows a 28.x Candidate below your installed 29.x. That is the daemon’s pin at Pin-Priority: 999; apt only downgrades above 1000, so 29.x stays.

Relist

Relist from the Machines page or with your usual vastai list machine command. After 2 to 3 minutes:
A result row means the machine is listed.
New Docker, containerd and driver; every GPU visible on the host and in a container; daemon running; self-test passed; daemon holds back; kernel hold released; machine listed. A flag set before the upgrade can take a couple of hourly checks to clear.