-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixbox 18.09 not on Vagrant Cloud #38
Comments
I ran into this as well, after using the instructions in the README, specifically: The solution, for now, seems to be to downgrade to one that is available: |
The main reason is that Hashicorp has stopped offering CI builders and other CIs don't support VirtualBox. On top of that I don't have VirtualBox installed on my system anymore. |
Does anyone know of a CI that offers support for VirtualBox? |
nixops supports deployment of virtualbox images. next question is, if it's a good idea, to create a chicken or the egg problem?... gitlab also seems to offer support for virtualbox images using packer: |
Following on that link, looks like GitLab stopped using packer to build images: https://gitlab.com/gitlab-org/gitlab-ce/issues/164#note_75698 Maybe we should just generate the images with Nix directly instead of using Packer, it's not that hard as well. The only difficult thing is to wrap the vagrant config properly on the output. With Nix it's possible to generate VirtualBox images without having VirtualBox installed on the host. |
Is there a solution for this issue? |
something like https://github.com/nix-community/nixos-generators could be a good replacement. What's left is to wrap the output in a format that Vagrant can understand. |
@zimbatm I have VirtualBox installed on my system, and I wouldn't mind supporting this effort for future versions of NixOS as well. Let me know what's involved in publishing these images to the https://app.vagrantup.com/nixos repo. |
Thanks for the offer @gurjeet. The best way forward would be to generate the images using Nix instead. Once that is done it will be possible to push them using the CI directly. The image would include the vagrant.nix nixos module and output a OVA file, which is then wrapped in a .tar.gz with the metadata packed with it. The package format is described over here: https://www.vagrantup.com/docs/boxes/format.html |
I just made a PR, hopefully it will be a bit clearer: nix-community/nixos-generators#22 If that works, then we can deprecate this project and then create a new one to periodically publish the Vagrant boxes |
@zimbatm I'm new to NixOS in general, and haven't used I am on macOS 10.13.6, and have nix(-darwin) installed. I have cloned the The next step is to provide a |
Yes that's a good start. The principle for testing would be to run Once you have that test phase working, download one of the original .box files, unpack it with tar and look at the differences. The metadata file needs to be completed, the .ova file name needs to be fixed I guess. Then open formats/vagrant.nix and fix the build instructions to match that. If that's too much low-level for you, ping me on IRC and I can walk you through it a bit more. |
@zimbatm serait-il possible d'enlever le postprocessor "vagrant-cloud" des fichiers json puisqu'apparemment cela ne sert plus à rien ? Si ok je peux pousser un tel changement. |
sounds good @PierreR |
fixed in dfc1bec |
@zimbatm you also want to remove the vagrant box post-processors ? It was useful for me to create a vagrant box compatible with virtualbox. |
The project is about creating vagrant boxes and adds all the cruft necessary for that to work like the vagrant users, a bunch of system packages... If all you want is to generate a VM image then it's probably better to use the nixos-generators project. |
I was just trying to point it out that dfc1bec is removing the creation of such a vagrant box |
woops, reverted. I don't see the vagrant-cloud post-processor |
... getting back to the ideal world I am trying to create for myself. The command you suggested fails with the following error. I had a look at the patch before running the command, and the contents of
EDIT: To clarify a bit more, the line 56 in that file is asserting this:
|
Oh right, the project doesn't cross-compile right now, it has to be executed on a linux machine |
Does anyone want to try out nix-community/nixos-generators#50 ? You will have to also checkout nixpkgs to the associated PR and then build the .box file |
This will ultimately replace the nix-community/nixbox project. Change the configuration.nix to not include the installation ISO to something like this: ```nix { config, lib, pkgs, modulesPath, ... }: { documentation.man.enable = false; documentation.nixos.enable = false; sound.enable = false; } ``` See nix-community/nixbox#38 Depends on NixOS/nixpkgs#76071
@zimbatm, I'd like to try that PR, but it's not clear to me how to do it. Is it enough to clone your |
Clone nix-community/nixos-generators#50 and NixOS/nixpkgs#76071 Then in the nixos-generators, override the
Finally run At the end if should give you a vbox file that you can import into virtualbox and try out. |
I'm getting this error
I'm running on a Mac, btw. |
thanks, fixed in NixOS/nixpkgs@686125d You will need a Linux remote builder to produce a compatible image. Do you know how to set that up? |
Do you mean I can only run the command on Linux? I could do it in a VM, if that's possible. |
You can run the command on macOS if you have a Linux remote builder machine setup. You will have to add |
I tried building inside a NixOS VM managed with VirtualBox and I got this error:
I think that's because the VM is managed by VirtualBox. Next, I tried on a DigitalOcean instance running Ubuntu. I got this error:
|
I'm afraid there are going to be many rounds to trial. For the first issue, I think giving more RAM to the VirtualBox VM should solve it. The second issue is because the Nix relies on KVM to build the image. Most hosting providers don't allow nested virtualization. I know Google Cloud or Azure do propose that option. |
I published a version of the image over here: https://app.vagrantup.com/nixos/boxes/nixos-20.03-test Virtualbox seems to be broken on NixOS at the moment so I am not able to test it unfortunately. |
I get this error when running Vagrantfile: https://gist.github.com/filalex77/dc3305055a3990494778177f7059effe#file-vagrantfile
|
From what I can tell, the command |
@LucianU The directory doesn't actually exist, yes. In |
That's strange. It shouldn't ask for your password, because it should normally log in with an SSH key. What does |
|
Strange. I tried your Also, I realized I misunderstood what you said about The user should have passwordless sudo, but the machine wasn't built that way. I think your only option at this point is to build your own machine with the tools in this repo. I did it in the past and it was straightforward. |
The nixos/nixos-20.03-test on Vagrant Cloud didn’t work for me. I got this error message during
and the machine is powered off. Fortunately current master branch works (I built it with Packer myself). By the way I guess #28 can be closed in favor of this? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/building-openstack-images-and-development-vms-from-a-macos-host/9522/1 |
Crossposting from the PR on nixpkgs: NixOS/nixpkgs#76071 (comment) The VBoxManage step failure can be worked around by letting vagrant create the VM, error out with that message, and then using the UUID in The problem with
The Fortunately there is now an option, |
This will ultimately replace the nix-community/nixbox project. See nix-community/nixbox#38 Depends on NixOS/nixpkgs#101120
This will ultimately replace the nix-community/nixbox project. See nix-community/nixbox#38 Depends on NixOS/nixpkgs#101120
This will ultimately replace the nix-community/nixbox project. See nix-community/nixbox#38 Depends on NixOS/nixpkgs#101120
see here: https://app.vagrantup.com/nixos
The text was updated successfully, but these errors were encountered: