-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
make creating initial vbox disks work with nixops 35ac0208 #28
make creating initial vbox disks work with nixops 35ac0208 #28
Conversation
_eval_flags and nix_exprs are undefined in nixops 35ac0208
I'm facing the same issue while using
|
Why is this not merged? Still an issue. |
Just ran into this issue today, it would be great if this could be merged |
Pre-merge nix-community/nixops-vbox#27 and update the plugin. Since we now have 2 PRs merged (includes nix-community/nixops-vbox#28 as before), I switched the strategy: pull package from origin master and add PRs as patches. @moduon MT-904
The patch is incomplete. By not calling
Which basically means that |
Without this fix, the virtualbox disk may not exist when creating the machine. The error is: ``` machine-1.> VBoxManage: error: Could not find file for the medium '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk' (VERR_FILE_NOT_FOUND) machine-1.> VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports machine-1.> VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 187 of file VBoxManageDisk.cpp Traceback (most recent call last): File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/parallel.py", line 70, in thread_fun work_result = (worker_fun(t), None, t.name) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/deployment.py", line 1207, in worker r.create( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixopsvbox/backends/virtualbox.py", line 409, in create self._logged_exec( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/backends/__init__.py", line 582, in _logged_exec return nixops.util.logged_exec(command, self.logger, **kwargs) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/util.py", line 372, in logged_exec raise CommandFailed(err, res) nixops.util.CommandFailed: command ‘['VBoxManage', 'clonehd', '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk', '/var/home/yajo/VirtualBox VMs/nixops-94a4598f-fdde-11ec-968b-b025aa45f949-k3s-agent-1/disk1.vdi', '--format', 'VDI']’ failed on machine ‘k3s-agent-1’ (exit code 1) ``` See nix-community#28 (comment). @moduon MT-904
Plugins might need to call this function to actually build something in the nix store. See nix-community/nixops-vbox#28 (comment) for example. We need a way to tell eval to do a build. Here it is. @moduon MT-904
Without this fix, the virtualbox disk may not exist when creating the machine. The error is: ``` machine-1.> VBoxManage: error: Could not find file for the medium '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk' (VERR_FILE_NOT_FOUND) machine-1.> VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports machine-1.> VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 187 of file VBoxManageDisk.cpp Traceback (most recent call last): File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/parallel.py", line 70, in thread_fun work_result = (worker_fun(t), None, t.name) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/deployment.py", line 1207, in worker r.create( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixopsvbox/backends/virtualbox.py", line 409, in create self._logged_exec( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/backends/__init__.py", line 582, in _logged_exec return nixops.util.logged_exec(command, self.logger, **kwargs) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/util.py", line 372, in logged_exec raise CommandFailed(err, res) nixops.util.CommandFailed: command ‘['VBoxManage', 'clonehd', '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk', '/var/home/yajo/VirtualBox VMs/nixops-94a4598f-fdde-11ec-968b-b025aa45f949-k3s-agent-1/disk1.vdi', '--format', 'VDI']’ failed on machine ‘k3s-agent-1’ (exit code 1) ``` See nix-community#28 (comment). For this to work, we need a patch TODO LINK. @moduon MT-904
Plugins might need to call this function to actually build something in the nix store. See nix-community/nixops-vbox#28 (comment) for example. We need a way to tell eval to do a build. Here it is. @moduon MT-904
Plugins might need to call this function to actually build something in the nix store. See nix-community/nixops-vbox#28 (comment) for example. We need a way to tell eval to do a build. Here it is. @moduon MT-904
Plugins might need to call this function to actually build something in the nix store. See nix-community/nixops-vbox#28 (comment) for example. We need a way to tell eval to do a build. Here it is. @moduon MT-904
Without this fix, the virtualbox disk may not exist when creating the machine. The error is: ``` machine-1.> VBoxManage: error: Could not find file for the medium '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk' (VERR_FILE_NOT_FOUND) machine-1.> VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports machine-1.> VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 187 of file VBoxManageDisk.cpp Traceback (most recent call last): File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/parallel.py", line 70, in thread_fun work_result = (worker_fun(t), None, t.name) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/deployment.py", line 1207, in worker r.create( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixopsvbox/backends/virtualbox.py", line 409, in create self._logged_exec( File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/backends/__init__.py", line 582, in _logged_exec return nixops.util.logged_exec(command, self.logger, **kwargs) File "/nix/store/ywh9crwf21xbhgw31fy5zpcc4z9p9gzb-python3-3.8.9-env/lib/python3.8/site-packages/nixops/util.py", line 372, in logged_exec raise CommandFailed(err, res) nixops.util.CommandFailed: command ‘['VBoxManage', 'clonehd', '/nix/store/7xgrcfcmcbhwb1bjcs4nq4dr2lh3mi3n-virtualbox-nixops-22.05.vmdk', '/var/home/yajo/VirtualBox VMs/nixops-94a4598f-fdde-11ec-968b-b025aa45f949-k3s-agent-1/disk1.vdi', '--format', 'VDI']’ failed on machine ‘k3s-agent-1’ (exit code 1) ``` See #28 (comment). For this to work, we need NixOS/nixops#1529. @moduon MT-904
Please @Uthar merge https://github.com/Uthar/nixops-vbox/pull/1 so this PR is complete. It depends on NixOS/nixops#1529 being merged and fixes the problem from #28 (comment). |
For nixops master and nixops-vbox to work, as of today, we need: - NixOS/nixops#1529 - nix-community/nixops-vbox#27 - nix-community/nixops-vbox#28 (as before) - https://github.com/Uthar/nixops-vbox/pull/1 Since we now have more PRs merged, I switched the strategy: pull package from origin master and add PRs as patches. @moduon MT-904
Plugins might need to call this function to actually build something in the nix store. See nix-community/nixops-vbox#28 (comment) for example. We need a way to tell eval to do a build. Here it is. @moduon MT-904
fix: force building base image
Thank you @yajo - I merged https://github.com/Uthar/nixops-vbox/pull/1 |
So, can this PR be merged now that dependencies are in place? |
Is there anything left to do here? Is help needed? I would love to try out nixops with virtualbox? |
AFAIK this just needs to be merged. |
Any chance we got this merged @AmineChikhaoui ? I'm still stumbling on this in 2023, this fix would be more than welcome. |
Sorry I didn't check nixops notifications that much since I haven't been using it for a while. |
_eval_flags
andnix_exprs
are undefined in nixops 35ac0208, which causes an error when deploying withtargetEnv="virtualbox"
- one can usenixops.evaluation.eval
instead to make it work.full trace: