# MicroVM cloud-hypervisor graphical example - Rust dependecies failing to build

**URL:** https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185
**Category:** Uncategorized
**Created:** [September 22, 2026, 8:08am UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185 "2026-09-22T08:08:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rocky-rose](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rocky-rose/32/33780_2.png) [@rocky-rose](https://discourse.nixos.org/u/rocky-rose)
#### Post date: [September 22, 2026, 8:08am UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/1 "2026-09-22T08:08:08Z")

</div>

I’m trying to use the MicroVM library to run a graphical `cloud-hypervisor` virtual machine with just the packages `cage` and `vlc`. I have a configuration to set this up locally, but I though I’d focus on the `nix run microvm#graphics` which is producing the exact same results.

When I run:

```auto
nix run microvm#graphics
/nix/store/[hash]-run-graphics vlc

```

I get errors like:

```auto
evaluation warning: cloud-hypervisor supports systemd-notify via vsock, but `microvm.vsock.cid` must be set to enable this.
error: Cannot build '/nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/2skg6s6l4k6bqn6anr0wgkqwh614yp51-cargo-deps-vendor-staging
       Last 15 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/vixyacvra255sbi3qkz0sy3i7xz1nk66-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/291drdqbl10kwr02fz9brjymkkmfvczv-musl-1.2.6.patch
       > patching file virtio-devices/src/seccomp_filters.rs
       > patching file vmm/src/seccomp_filters.rs
       > applying patch /nix/store/v4sbhcbm6ijzbl9knpfh3rwhapgm08d5-0001-build-use-local-vhost.patch
       > patching file Cargo.lock
       > Hunk #1 FAILED at 2304.
       > Hunk #2 FAILED at 2317.
       > 2 out of 2 hunks FAILED -- saving rejects to file Cargo.lock.rej
       > patching file Cargo.toml
       > Hunk #1 FAILED at 55.
       > 1 out of 1 hunk FAILED -- saving rejects to file Cargo.toml.rej
       For full logs, run:
         nix log /nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv
error: Cannot build '/nix/store/rlpmifbpxh7xdxrwp8xd27l59sd8p852-cargo-deps-vendor.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/0kzrnimrvgs72ryp6jjldm73y2zbb6j7-cargo-deps-vendor
error: Cannot build '/nix/store/ah1lfh59p34h94ihkxxy1djj00f9x5l0-cloud-hypervisor-53.0.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/i1gg47hzrhm6jr4ssjv4czb9pwclknma-cloud-hypervisor-53.0
         /nix/store/r1bz6bhsf52ybvbjw7wf2vh4qi79cx5j-cloud-hypervisor-53.0-debug
error: Cannot build '/nix/store/kllyy2l206jdihfrr71lgrjf2qhixngk-microvm-graphical-microvm-microvm-balloon.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/xzrfa5kphwnikqkns7p950g9dk6cvwli-microvm-graphical-microvm-microvm-balloon
error: Cannot build '/nix/store/vnkp49v6mhrp961mg4d1kll5smj4n5ab-microvm-cloud-hypervisor-graphical-microvm.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/zfy4lpmkg5bif9p9lkq5gfa69l94wyp2-microvm-cloud-hypervisor-graphical-microvm

```

For packages that looks like Rust packages.

I’m running NixOS unstable.

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [September 22, 2026, 5:17pm UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/2 "2026-09-22T17:17:40Z")

</div>

Hmm..  
I get

```auto
error: builder for '/nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv' failed with exit code 1;
       last 15 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/vixyacvra255sbi3qkz0sy3i7xz1nk66-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/291drdqbl10kwr02fz9brjymkkmfvczv-musl-1.2.6.patch
       > patching file virtio-devices/src/seccomp_filters.rs
       > patching file vmm/src/seccomp_filters.rs
       > applying patch /nix/store/v4sbhcbm6ijzbl9knpfh3rwhapgm08d5-0001-build-use-local-vhost.patch
       > patching file Cargo.lock
       > Hunk #1 FAILED at 2304.
       > Hunk #2 FAILED at 2317.
       > 2 out of 2 hunks FAILED -- saving rejects to file Cargo.lock.rej
       > patching file Cargo.toml
       > Hunk #1 FAILED at 55.
       > 1 out of 1 hunk FAILED -- saving rejects to file Cargo.toml.rej
       For full logs, run:
         nix log /nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv
error: 1 dependencies of derivation '/nix/store/rlpmifbpxh7xdxrwp8xd27l59sd8p852-cargo-deps-vendor.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ah1lfh59p34h94ihkxxy1djj00f9x5l0-cloud-hypervisor-53.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9gkngqwmr3xd3963fw9jg41in1y5sfva-microvm-graphical-microvm-microvm-run.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kllyy2l206jdihfrr71lgrjf2qhixngk-microvm-graphical-microvm-microvm-balloon.drv' failed to build
error: 2 dependencies of derivation '/nix/store/vnkp49v6mhrp961mg4d1kll5smj4n5ab-microvm-cloud-hypervisor-graphical-microvm.drv' failed to build

```

when I try to do that (with `github:microvm-nix/microvm.nix#graphics` replacing `microvm#graphics`), but I don’t get `Cannot build`, which is usually either caused by a hash mismatch or a deeper issue with your Nix store.

---

<div class="post-metadata">

### Author: ![rocky-rose](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rocky-rose/32/33780_2.png) [@rocky-rose](https://discourse.nixos.org/u/rocky-rose)
#### Post date: [September 23, 2026, 7:06am UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/3 "2026-09-23T07:06:31Z")

</div>

Huh, interesting. I’ve updated the output of the command to the full, exact output. In the meantime, I can try running that command that repairs the Nix store.

---

<div class="post-metadata">

### Author: ![rocky-rose](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rocky-rose/32/33780_2.png) [@rocky-rose](https://discourse.nixos.org/u/rocky-rose)
#### Post date: [September 23, 2026, 7:19am UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/4 "2026-09-23T07:19:33Z")

</div>

The store repair command did not work, but it was worth a try.

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [September 23, 2026, 4:39pm UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/5 "2026-09-23T16:39:14Z")

</div>

> [@rocky-rose](#):
>
> ```auto
> evaluation warning: cloud-hypervisor supports systemd-notify via vsock, but `microvm.vsock.cid` must be set to enable this.
> error: Cannot build '/nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv'.
> Reason: builder failed with exit code 1.
> Output paths:
> /nix/store/2skg6s6l4k6bqn6anr0wgkqwh614yp51-cargo-deps-vendor-staging
> Last 15 log lines:
> > Running phase: unpackPhase
> > unpacking source archive /nix/store/vixyacvra255sbi3qkz0sy3i7xz1nk66-source
> > source root is source
> > Running phase: patchPhase
> > applying patch /nix/store/291drdqbl10kwr02fz9brjymkkmfvczv-musl-1.2.6.patch
> > patching file virtio-devices/src/seccomp_filters.rs
> > patching file vmm/src/seccomp_filters.rs
> > applying patch /nix/store/v4sbhcbm6ijzbl9knpfh3rwhapgm08d5-0001-build-use-local-vhost.patch
> > patching file Cargo.lock
> > Hunk #1 FAILED at 2304.
> > Hunk #2 FAILED at 2317.
> > 2 out of 2 hunks FAILED -- saving rejects to file Cargo.lock.rej
> > patching file Cargo.toml
> > Hunk #1 FAILED at 55.
> > 1 out of 1 hunk FAILED -- saving rejects to file Cargo.toml.rej
> For full logs, run:
> nix log /nix/store/4h33mcpbgs2xkhsvk4l6pp1zc0mp0mia-cargo-deps-vendor-staging.drv
> 
> ```

Ah, that’s the same error, but for some reason your Nix is outputting lines like:

> [@rocky-rose](#):
>
> ```auto
> error: Cannot build '/nix/store/vnkp49v6mhrp961mg4d1kll5smj4n5ab-microvm-cloud-hypervisor-graphical-microvm.drv'.
> Reason: 1 dependency failed.
> Output paths:
> /nix/store/zfy4lpmkg5bif9p9lkq5gfa69l94wyp2-microvm-cloud-hypervisor-graphical-microvm
> 
> ```

Either way, there is an issue with how `microvm.nix` patches `cloud-hypervisor`. `microvm.nix` uses the packaging in [Spectrum](https://spectrum-os.org/git/spectrum/tree/pkgs/cloud-hypervisor) to get a build of `cloud-hypervisor` with graphical acceleration patches. See:

> <https://github.com/microvm-nix/microvm.nix/issues/506#issuecomment-4957712449>
>
> \`\`\`
> ~
> % nix run github:microvm-nix/microvm.nix#graphics neverball
> Do you want to… allow configuration setting 'extra-substituters' to be set to 'https://microvm.cachix.org'?
> This may allow the flake to gain root, see the nix.conf manual page (yes/no/No to all) n
> warning: you can set 'accept-flake-config' to 'false' to automatically reject configuration options supplied by flakes
> do you want to permanently (in /home/s/.local/share/nix/trusted-settings.json) mark this value as untrusted? (y/N) n
> warning: ignoring untrusted flake configuration setting 'extra-substituters', pass '--accept-flake-config' to trust it (may allow the flake to gain root, see the nix.conf manual page)
> Do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'microvm.cachix.org-1:oXnBc6hRE3eX5rSYdRyMYXnfzcCxC7yKPTbZXALsqys='?
> This may allow the flake to gain root, see the nix.conf manual page (yes/no/No to all) n
> warning: you can set 'accept-flake-config' to 'false' to automatically reject configuration options supplied by flakes
> do you want to permanently (in /home/s/.local/share/nix/trusted-settings.json) mark this value as untrusted? (y/N) n
> warning: ignoring untrusted flake configuration setting 'extra-trusted-public-keys', pass '--accept-flake-config' to trust it (may allow the flake to gain root, see the nix.conf manual page)
> evaluation warning: cloud-hypervisor supports systemd-notify via vsock, but \`microvm.vsock.cid\` must be set to enable this.
> error: hash mismatch in fixed-output derivation '/nix/store/17n0sf4rn4rk9p8ic63951b7fygygm97-cargo-deps-vendor-staging.drv':
> likely URL: (unknown)
> specified: sha256-wGtsyKDg1z1QK9mJ1Q43NSjoPbm3m81p++DoD8ipIUI=
> got: sha256-YYrzd44DbaRT3jieclHrGoDLT14vTzTtNwIRLCtv3Ko=
> expected path: /nix/store/2skg6s6l4k6bqn6anr0wgkqwh614yp51-cargo-deps-vendor-staging
> got path: /nix/store/jhrfa4cjg2nvyf99kfkls9n3swkfcp6q-cargo-deps-vendor-staging
> error: 1 dependencies of derivation '/nix/store/77ral3n67cw68igmmri2l5kpp7xfivk0-cargo-deps-vendor.drv' failed to build
> error: 1 dependencies of derivation '/nix/store/fzx1dfzdpjwiybr5v48j13xy1lz9ap61-cloud-hypervisor-51.1.drv' failed to build
> error: 1 dependencies of derivation '/nix/store/n2hncsqsaqjkpa7nrxyk98d1ic5wndp0-microvm-graphical-microvm-microvm-balloon.drv' failed to build
> error: 1 dependencies of derivation '/nix/store/wm777bvjkbsl4a0shjrb7hnyi9rj8rhl-microvm-graphical-microvm-microvm-run.drv' failed to build
> error (ignored): error: failed to read compressed data (Lzma library error: No progress is possible)
> error: 2 dependencies of derivation '/nix/store/gfy963wgayfw915svrwlp9nv1fyy4ccv-microvm-cloud-hypervisor-graphical-microvm.drv' failed to build
> \`\`\`

---

<div class="post-metadata">

### Author: ![rocky-rose](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rocky-rose/32/33780_2.png) [@rocky-rose](https://discourse.nixos.org/u/rocky-rose)
#### Post date: [September 23, 2026, 6:13pm UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/6 "2026-09-23T18:13:02Z")

</div>

Ah, so I override `cloud-hypervisor` with that patch?

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [September 23, 2026, 6:31pm UTC](https://discourse.nixos.org/t/microvm-cloud-hypervisor-graphical-example-rust-dependecies-failing-to-build/80185/7 "2026-09-23T18:31:40Z")

</div>

Unfortunately I don’t see a version of the graphical acceleration patches for cloud-hypervisor 53.0.

> **[Cloud Hypervisor with virtio-gpu support](https://spectrum-os.org/software/cloud-hypervisor/)**

You can try rebasing them by hand if you’re really interested enough, but I don’t know how much work that would be. Or if any other `microvm.nix` backends support graphics.

Either way, this is worth filing as an issue with `microvm.nix`.
