NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.59k stars 13.74k forks source link

Unable to install vmware guest additions on aarch64 #258983

Closed thomasdziedzic-calmwave closed 4 weeks ago

thomasdziedzic-calmwave commented 12 months ago

Describe the bug

Let me start off by saying that I'm completely new to nixos (this is my first install that I did today) so there might be something obvious that I don't see yet.

I'm installing nixos in vmware fusion on macos and I'm trying to enable vmware guest additions in nixos. I enabled: virtualisation.vmware.guest.enable = true; and got an error say that it's unavailable on the hostPlatform "aarch64-unknown-linux-gnu".

Steps To Reproduce

Steps to reproduce the behavior:

  1. install nixos 23.05 (minimal) in vmware fusion on macos
  2. try to enable vmware guest additions.
  3. get error

Expected behavior

It should configure nixos for vmware.

Screenshots

Screenshot 2023-10-04 at 6 22 02 AM

Additional context

I found https://github.com/NixOS/nixpkgs/issues/147650 which makes me think this should be supported.

I noticed that aarch64 isn't listed under https://search.nixos.org/packages?channel=23.05&show=xorg.xf86inputvmmouse&from=0&size=50&sort=relevance&type=packages

Notify maintainers

There don't seem to be any maintainers for xf86-input-vmmouse

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[dev@nixos:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 6.1.55, NixOS, 23.05 (Stoat), 23.05.4065.3b79cc4bcdc`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.5`
 - channels(dev): `""`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
MichaelPachec0 commented 12 months ago

if you enable headless mode ( ie virtualisation.vmware.guest.headless = true ) this should work, with the caveat is that this will install the headless version of open-vm-tools. AFAICT xf86-input-vmmouse is not supported on aarch64 (there is no other distro that ships a aarch64 package and the configure.ac for it does not reference aarch64). Ill see about sending a PR to fix this case, just need to set an env where i can test this. (where you want xserver installed and you enable virtualization tools).

lloeki commented 6 months ago

headless comments out some stuff that's actually not problematic at all on Aarch64, since only the ps2 mouse thing is, and ps2 is not even useful these days:

I'm thinking just this part should be conditioned by !Aarch64 (or maybe x86_64): https://github.com/NixOS/nixpkgs/blob/0c34530a34d6c45ba4eb20bdedfe72c5e04fc5a2/nixos/modules/virtualisation/vmware-guest.nix#L68-L77