At host machine
- install nfs-common, nfs-kernel-server
sudo apt-get install nfs-common nfs-kernel-server
- configure nfs server (nfs dir: for example /srv/nfs)
- start nfs server
sudo service nfs-server start
- start qemu machine .... with some specific options:
qemu-system-i386 -no-reboot -kernel vmlinux-2.6.32-5-686 -hda debian_squeeze_i386_standard.qcow2 -append "root=/dev/sda1 console=tty0" -initrd initrd.img-2.6.32-5-686 -redir tcp:2222::22
At virtual machine
mkdir /tmp/t
mount 10.0.2.2:/srv/nfs /tmp/t
ls /tmp/t