diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-08-29 14:08:54 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-08-29 14:08:54 +0000 |
commit | 74087918ff271c15646d00423e03700911c6a26f (patch) | |
tree | 0f5ceebf5c4d198142f1179247c55331eb4eee68 /pkgs/build-support | |
parent | 73d2e4f49d230e24cf912f6f6429071946ed1d4c (diff) |
* KVM updated to version 74. This one finally has good performance
for userspace networking / Samba again. * vmtools: use KVM 74 and Linux 2.6.26, and use virtio for networking / disk access. svn path=/nixpkgs/trunk/; revision=12768
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/vm/default.nix | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 3f6969aa124bc..3b6c878f2016e 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -5,12 +5,12 @@ with pkgs; rec { - inherit (kernelPackages) kernel klibcShrunk; + inherit (kernelPackages_2_6_26) kernel klibcShrunk; modulesClosure = makeModulesClosure { inherit kernel; - rootModules = ["cifs" "ne2k_pci" "nls_utf8" "ata_piix" "sd_mod"]; + rootModules = ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"]; }; @@ -78,8 +78,7 @@ rec { mknod /dev/null c 1 3 mknod /dev/zero c 1 5 mknod /dev/tty c 5 0 - mknod /dev/sda b 8 0 - mknod /dev/hda b 3 0 + mknod /dev/vda b 253 0 ipconfig 10.0.2.15:::::eth0:none @@ -88,7 +87,7 @@ rec { if test -z "$mountDisk"; then mount -t tmpfs none /fs else - mount -t ext2 /dev/sda /fs + mount -t ext2 /dev/vda /fs fi mkdir -p /fs/hostfs @@ -168,7 +167,8 @@ rec { qemuCommandLinux = '' qemu-system-x86_64 \ -nographic -no-reboot \ - -smb / -hda $diskImage \ + -net nic,model=virtio -net user -smb / \ + -drive file=$diskImage,if=virtio,boot=on \ -kernel ${kernel}/vmlinuz \ -initrd ${initrd}/initrd \ -append "console=ttyS0 panic=1 command=${stage2Init} tmpDir=$TMPDIR out=$out mountDisk=$mountDisk" \ @@ -221,8 +221,8 @@ rec { createRootFS = '' mkdir /mnt - ${e2fsprogs}/sbin/mke2fs -F /dev/sda - ${klibcShrunk}/bin/mount -t ext2 /dev/sda /mnt + ${e2fsprogs}/sbin/mke2fs -F /dev/vda + ${klibcShrunk}/bin/mount -t ext2 /dev/vda /mnt if test -e /mnt/.debug; then exec ${bash}/bin/sh |