anchor.diff:  
   
     qemuCommandGeneric = ''
  -    qemu-system-x86_64 \
  +    ${kvm}/bin/qemu-system-x86_64 \
         -nographic -no-reboot \
         -smb $(pwd) -hda $diskImage \
         $QEMU_OPTS
  
positive.code:   '';
  
  
    vmRunCommand = qemuCommand: writeText "vm-run" ''
      export > saved-env
  
      PATH=${coreutils}/bin:${kvm}/bin
  
      diskImage=''${diskImage:-/dev/null}
  
      eval "$preVM"
  
      cat > smb.conf <<EOF
        [global]
          private dir=$TMPDIR
          smb ports=0
          socket address=127.0.0.1
          pid directory=$TMPDIR
          lock directory=$TMPDIR
          log file=$TMPDIR/log.smbd
          smb passwd file=$TMPDIR/smbpasswd
          security = share
        [qemu]
          path=/
          read only=no
          guest ok=yes
      EOF
  
      # Write the command to start the VM to a file so that the user can
      # debug inside the VM if the build fails (when Nix is called with
  
negative.code: 
  
    qemuCommandLinux = ''
      ${kvm}/bin/qemu-system-x86_64 \
        -nographic -no-reboot \
        -net nic,model=virtio \
        -chardev socket,id=samba,path=./samba \
        -net user,guestfwd=tcp:10.0.2.4:139-chardev:samba \
        -drive file=$diskImage,if=virtio,boot=on,cache=writeback,werror=report \
        -kernel ${kernel}/bzImage \
        -initrd ${initrd}/initrd \
  