Commit Graph

22 Commits

Author SHA1 Message Date
Ricardo M. Correia
af01fa71e0 nixos.libvirtd: fix broken VMs due to emulator path changes
This had already been fixed in f52f9bf7cd,
but the problem was reintroduced in
bce59a1a8b because the path to the XML
files changed.
2016-11-03 14:55:44 +01:00
Rickard Nilsson
7d67a4da99 nixos/libvirtd: Don't use the --daemon flag now that we use the 'notify' service type 2016-07-01 18:21:42 +02:00
Rickard Nilsson
a0c0f63811 nixos/libvirt: Syntactic-only refactoring 2016-06-27 13:32:24 +02:00
Rickard Nilsson
301b4e9018 nixos/libvirt: Add virtlogd and virtlockd systemd sockets and services 2016-06-27 13:32:21 +02:00
Rickard Nilsson
1b54e48561 nixos/libvirt: Adapt libvirtd.service to upstream sources 2016-06-27 13:04:52 +02:00
Rickard Nilsson
37f4889851 nixos/libvirt: Remove non-functional service libvirt-guests
It doesn't have a start script, so it hasn't worked at all in
a long time.
2016-06-27 10:34:29 +00:00
Tristan Helmich
bce59a1a8b libvirtd service: Move mutable configs to /var
Modifies libvirt package to search for configs in /var/lib and changes
libvirtd service to copy the default configs to the new location.

This enables the user to change e.g. the networking configuration with
virsh or virt-manager and keep those settings.
2016-01-15 14:26:20 +01:00
Robin Gloster
88292fdf09 jobs -> systemd.services 2016-01-07 06:39:06 +00:00
Bjørn Forsman
db991a4024 nixos/libvirtd: remove --verbose flag
Because it spams the log:

  .libvirtd-wrapp[1950]: OBJECT_UNREF: obj=0x7f5d900b4200
  .libvirtd-wrapp[1950]: EVENT_POLL_UPDATE_HANDLE: watch=874 events=13
  .libvirtd-wrapp[1950]: OBJECT_UNREF: obj=0x7f5d900b4200
  .libvirtd-wrapp[1950]: EVENT_POLL_RUN: nhandles=24 timeout=-1
  .libvirtd-wrapp[1950]: EVENT_POLL_DISPATCH_HANDLE: watch=874 events=1
  .libvirtd-wrapp[1950]: OBJECT_REF: obj=0x7f5d900b4200
  .libvirtd-wrapp[1950]: [137B blob data]
2015-05-20 12:14:18 +02:00
Bjørn Forsman
3d2d78cb39 nixos/libvirtd: add 'extraOptions' option
And move the '--verbose' flag to extraOptions, so that users can easily
disable it.
2015-05-20 12:14:18 +02:00
Bjørn Forsman
97875ac175 bridge-utils: align attrname with pkgname 2015-02-20 22:30:51 +01:00
Bjørn Forsman
0bfd27535f nixos/libvirtd: refresh LXC emulator path on startup
This fixes the issue when the LXC emulator binary is garbage collected
and breaks libvirtd containers, because libvirtd XML file still refers
to GC'ed store path.

We already have a fix for QEMU, this commit extends the fix to cover LXC
too.
2014-09-15 23:03:20 +02:00
Chris Farmiloe
08534000a4 Ensure libvirtd is started after vswitch and add ability to configure how libvirtd guests are shutdown 2014-09-02 01:48:50 +04:00
Chris Farmiloe
8ef11bb0ee add openvswitch package + basic nixos module to enable it 2014-09-02 01:48:50 +04:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Bjørn Forsman
8cd95471d7 nixos: add type definitions to virtualisation.libvirtd.* options 2014-04-07 21:31:29 +02:00
Bjørn Forsman
0856500f3e nixos/libvirtd-service: fix fail-to-start when no machines are configured
Don't fail to start the libvirtd service just because there are no files
that match the /etc/libvirt/qemu/*.xml pattern.
2013-12-09 19:41:44 +01:00
Bjørn Forsman
f52f9bf7cd nixos/libvirtd-service: fix for garbage collected emulator paths
libvirtd puts the full path of the emulator binary in the machine config
file. But this path can unfortunately be garbage collected while still
being used by the virtual machine. Then this happens:

Error starting domain: Cannot check QEMU binary /nix/store/z5c2xzk9x0pj6x511w0w4gy9xl5wljxy-qemu-1.5.2-x86-only/bin/qemu-kvm: No such file or directory

Fix by updating the emulator path on each service startup to something
valid (re-scan $PATH).
2013-11-27 23:09:57 +01:00
Bjørn Forsman
b9f5b880e7 nixos/libvirtd-service: fix for dnsmasq (dir perms 700 -> 755)
Fixes this:

Nov 09 16:18:54 nixos-laptop systemd[1]: Starting Libvirt Virtual Machine Management Daemon...
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: read /etc/hosts - 2 addresses
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: failed to load names from /var/lib/libvirt/dnsmasq/default.addnhosts: Permission denied
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: cannot read /var/lib/libvirt/dnsmasq/default.hostsfile: Permission denied
Nov 09 16:18:55 nixos-laptop systemd[1]: Started Libvirt Virtual Machine Management Daemon.

I don't understand the reason for the original 700 permission bits.
Apparently read-access is needed and Ubuntu also use 755 perms.

Use "chmod" instead of "mkdir -m" to set permissions because mkdir doesn't
modify permissions on existing directories.
2013-11-10 14:07:29 +01:00
Eelco Dolstra
c1159edc65 Remove remaining references to Upstart 2013-10-31 13:26:06 +01:00
Jaka Hudoklin
ad3a0dd8fb nixos/libvirtd: fix remote ssh managment by adding netcat-openbsd in system packages
Virsh/virt-manager uses ssh to connect to master, there it expects openbsd netcat(which
has support for unix sockets) to be avalible, to make a tunnel.

Close #1087.
2013-10-24 11:01:43 +03:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00