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

add disk type storage to libvirt #24822

Merged
merged 2 commits into from Apr 14, 2017
Merged

add disk type storage to libvirt #24822

merged 2 commits into from Apr 14, 2017

Conversation

techhazard
Copy link
Contributor

Motivation for this change

libvirt is currently compiled without support for the disk type storage resulting in an error when attempting to add one (the option is still available in virt-manager).

This adds a flag to the compile steps (i.e. to ./configure) to enable the disk storage type. Since this requires parted, I've also added that. (try running this without parted in the arguments list, you'll see).

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS:
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@techhazard, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fpletz, @rickynils and @volth to be potential reviewers.

@techhazard
Copy link
Contributor Author

techhazard commented Apr 11, 2017

I was not yet able to test the finished build. How would I make my current version of virt-manager use the newly built libvirt?
A new version would be fine as well

@bjornfor
Copy link
Contributor

You can build your system from a nixpkgs working tree:

$ sudo nixos-rebuild switch -I nixpkgs=$PWD

@@ -4,7 +4,7 @@
, iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext
, libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor
, dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages
, curl, libiconv, gmp, xen, zfs
, curl, libiconv, gmp, xen, zfs, parted
Copy link
Member

Choose a reason for hiding this comment

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

You forgot to add parted to buildInputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, my bad 😅

@techhazard
Copy link
Contributor Author

I tried building on OSX but that requires setting { allowBroken = true; } in ~/.config/nixpkgs/config.nix due to something else being broken. Is it safe to assume libvirt works on linux only?

@bjornfor I'll probably test it tonight

@techhazard
Copy link
Contributor Author

techhazard commented Apr 12, 2017

I tested it last night, and it seems to work. I did have to reformat the pool manually in virsh with pool-create-as hdd disk --source-dev /dev/sda --target /dev --overwrite because my old pool was corrupt. After that it worked!

@techhazard
Copy link
Contributor Author

@volth should I add that to this PR?

@benley benley merged commit cdbcaa5 into NixOS:master Apr 14, 2017
@techhazard
Copy link
Contributor Author

Awesome!

@techhazard techhazard deleted the add-disk-storage-to-libvirt branch April 28, 2017 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants