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
Conversation
@@ -25,6 +23,8 @@ in | |||
message = "VMWare guest is not currently supported on ${pkgs.stdenv.system}"; | |||
} ]; | |||
|
|||
boot.initrd.kernelModules = [ "vmw_pvscsi" ]; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
- Modularize as much as possible, and
- 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.
There was a problem hiding this comment.
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!
@FRidh, are you OK with this now that the title has been changed? |
@FRidh ping as change freeze is coming up. |
Yes, thanks. |
Motivation for this change
Shuffle the vmware guest settings into
virtualisation
instead ofservices
.Also add the paravirtual controller.
Been using this for ages (part of "let's get local stuff upstream for the upcoming release")
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)