Replies: 1 comment 1 reply
-
It shouldn't contain that information, at least not before you
I'd suggest providing some concrete steps that reproduce your error first. To me it looks like you might be supplying the same disk image to the
Looks like a valid use-case, you might consider creating an issue for this. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for this project! I've been looking for something like this that's CI-oriented, rather than focused on interactive use, for awhile.
I'd like to use Tart to run NixOS VMs. Unlike the case with most other Linux distros, it's relatively easy to create a custom NixOS disk image in a variety of formats. In particular, https://github.com/nix-community/nixos-generators makes it just a few extra lines of configuration on top of an existing NixOS config, and then you can create, say, a raw EFI image configured precisely like you want, like so:
From what I can gather (e.g., #171 (comment)),
Virtualization.Framework
expects a Linux VM's disk image to be just a raw disk image, and supports EFI layouts, so in theory, it should be possible to usenixos-generate
to create NixOS VM images that are ready to use with Tart in a single step, obviating the need to use Packer or a manual installation process from an ISO.As an experiment, I built a minimal raw EFI image using
nixos-generate
. In my particular case, it came out to about 4.6GiB, and thefile
command on macOS says the following about it:I then created a new VM using
tart create --linux nixos
, and replaced the empty disk image that Tart created with the NixOS image I created usingnixos-generate
. Unfortunately, when I try to run the VM, I get the following error:I don't know much about
Virtualization.Framework
, so I'm flying blind here, but my first hunch is that perhaps thenvram.bin
file created by Tart contains the expected disk size, which doesn't match the size of the image thatnixos-generate
created. To test this theory, I tried to configure my NixOS image to be precisely the same size as the image that Tart created, but unfortunately, I ran into a bug in the NixOS raw image generation that prevents me from doing this.Before I look into that, I wanted to check with the Tart team to see whether I'm barking up the wrong tree. Perhaps there's another explanation for this error? Is there any reason to expect that this wouldn't work? I think that, irrespective of NixOS, it would be a nice feature to be able to hand Tart an existing raw (EFI) image, without depending on a specific packaging tool like Packer.
Beta Was this translation helpful? Give feedback.
All reactions