Merge pull request #36850 from teto/virtualisation

Virtualisation
This commit is contained in:
Michael Raskin 2018-03-13 13:40:33 +00:00 committed by GitHub
commit bfbc4951a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -382,6 +382,6 @@ fi
if [ "$action" = build-vm ]; then if [ "$action" = build-vm ]; then
cat >&2 <<EOF cat >&2 <<EOF
Done. The virtual machine can be started by running $(echo $pathToConfig/bin/run-*-vm). Done. The virtual machine can be started by running $(echo $pathToConfig/bin/run-*-vm)
EOF EOF
fi fi

View File

@ -182,7 +182,7 @@ sub GrubFs {
# Based on the type pull in the identifier from the system # Based on the type pull in the identifier from the system
my ($status, @devInfo) = runCommand("@utillinux@/bin/blkid -o export @{[$fs->device]}"); my ($status, @devInfo) = runCommand("@utillinux@/bin/blkid -o export @{[$fs->device]}");
if ($status != 0) { if ($status != 0) {
die "Failed to get blkid info for @{[$fs->mount]} on @{[$fs->device]}"; die "Failed to get blkid info (returned $status) for @{[$fs->mount]} on @{[$fs->device]}";
} }
my @matches = join("", @devInfo) =~ m/@{[uc $fsIdentifier]}=([^\n]*)/; my @matches = join("", @devInfo) =~ m/@{[uc $fsIdentifier]}=([^\n]*)/;
if ($#matches != 0) { if ($#matches != 0) {

View File

@ -319,8 +319,8 @@ in
networkingOptions = networkingOptions =
mkOption { mkOption {
default = [ default = [
"-net nic,vlan=0,model=virtio" "-net nic,netdev=user.0,model=virtio"
"-net user,vlan=0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}" "-netdev user,id=user.0,\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
]; ];
type = types.listOf types.str; type = types.listOf types.str;
description = '' description = ''
@ -436,7 +436,7 @@ in
# FIXME: Figure out how to make this work on non-x86 # FIXME: Figure out how to make this work on non-x86
virtualisation.qemu.options = virtualisation.qemu.options =
mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ "-vga std" "-usbdevice tablet" ]; mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ "-vga std" "-usb" "-device usb-tablet,bus=usb-bus.0" ];
# Mount the host filesystem via 9P, and bind-mount the Nix store # Mount the host filesystem via 9P, and bind-mount the Nix store
# of the host into our own filesystem. We use mkVMOverride to # of the host into our own filesystem. We use mkVMOverride to