Skip to content
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

vmware: move from services to virtualisation and add support for paravirtual controller #54917

Merged
merged 1 commit into from Feb 20, 2019

Conversation

peterhoeg
Copy link
Member

Motivation for this change

Shuffle the vmware guest settings into virtualisation instead of services.

Also add the paravirtual controller.

Been using this for ages (part of "let's get local stuff upstream for the upcoming release")

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@peterhoeg peterhoeg changed the title vmware: move from servers to virtualisation where it belongs vmware: move from services to virtualisation where it belongs Jan 30, 2019
@@ -25,6 +23,8 @@ in
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}";
} ];

boot.initrd.kernelModules = [ "vmw_pvscsi" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is more than just renaming

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, technically, yes, you're right but this doesn't remove any functionality or change behavior. It only adds something which may be necessary to boot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the PR title to be better reflect this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterhoeg without having explicitly enabled vmw_pvscsi anywhere in my configuration.nix I see this module is loaded:

$ lsmod | grep vmw_pvscsi
vmw_pvscsi 28672 3
scsi_mod 225280 4 vmw_pvscsi,sd_mod,libata,sr_mod

What is the impact on a vmware client running NixOS that doesn't have this enabled? What is the impact if it is enabled?

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you did a normal install of NixOS, it would be auto-detected by the installer and placed in hardware-configuration.nix - did you check that file?

So as long as you run a local nixos-rebuild in the VM, this will not change anything. It becomes necessary when using something like nixops to push out changes where locally generated/installed .nix files are ignored.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterhoeg ah that makes sense now. I'm using nixops, but I had copied the contents of hardware-configuration.nix onto my nixops box which manages the machine. So I did add it via copy & paste as opposed to explicitly.

Are you deploying to vmware over ssh? If so, do you not copy relevant details of hardware-configuration.nix into your nixops server?

PS. sorry for thread hijacking...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you deploying to vmware over ssh?

Yes

If so, do you not copy relevant details of hardware-configuration.nix into your nixops server?

No, we just use a standard config.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterhoeg Could you please elaborate on this "standard config" point? Whenever I deploy a server with nixops to the "none" backend I have to fully specify hardware like fileSystems, boot.initrd.kernelModules, etc... Are you implying that you don't copy/paste hardware-configuration.nix from the target nixos machine onto your nixops machine and then deploy?

I would appreciate any details you could share as you're leaving me with the feeling i'm completely missing some very important concepts with nixops.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you implying that you don't copy/paste hardware-configuration.nix from the target nixos machine onto your nixops machine and then deploy?

That is correct.

I would appreciate any details you could share as you're leaving me with the feeling i'm completely missing some very important concepts with nixops.

It has nothing to do with any special nixops features but simply:

  1. Modularize as much as possible, and
  2. Convention over configuration

If the root FS always has the label "root", you can include a common profile like this (in this case called default_disk_layout.nix:

{ ... }:

{
  fileSystems."/" = {
    device = "/dev/disk/by-label/root";
    fsType = "btrfs";
    options = [ "subvol=nixos" "noatime" "compress=lzo" ];
  };
}

Pull in a shared profile for everything running on HyperV and another for everything running on ESX.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought there might have been some nixops magic I was missing, so thanks for clarifying!

@peterhoeg peterhoeg changed the title vmware: move from services to virtualisation where it belongs vmware: move from services to virtualisation and add support for paravirtual controller Jan 31, 2019
@peterhoeg
Copy link
Member Author

@FRidh, are you OK with this now that the title has been changed?

@aanderse
Copy link
Member

@FRidh ping as change freeze is coming up.

@FRidh
Copy link
Member

FRidh commented Feb 19, 2019

Yes, thanks.

@peterhoeg peterhoeg merged commit ecb3c50 into NixOS:master Feb 20, 2019
@peterhoeg peterhoeg deleted the f/vmware branch February 20, 2019 06:34
@peterhoeg peterhoeg restored the f/vmware branch February 20, 2019 11:59
@peterhoeg peterhoeg deleted the f/vmware branch March 18, 2019 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants