Annotation of wikisrc/tutorials/how_to_setup_virtio_scsi_with_qemu.mdwn, revision 1.1
1.1 ! wiki 1: You need NetBSD-current post 2015-10-30 to use VirtIO SCSI.
! 2:
! 3: ## Kernel configuration
! 4: Make sure you have the following lines in your kernel configuration:
! 5: virtio* at pci? dev ? function ? # Virtio PCI device
! 6: vioscsi* at virtio? # Virtio SCSI device
! 7: ## QEmu setup
! 8: 1. Create 2 files one for the installation, and one for the test SCSI drive:
! 9: dd if=/dev/zero of=install.img seek=10m count=1
! 10: dd if=/dev/zero of=test.img seek=10m count=1
! 11: 2. Start QEmu pointing it to your installation serial console cdrom:
! 12: qemu-system-x86_64 \
! 13: -m 1024 \
! 14: -nographic \
! 15: -drive file=install.img,media=disk,snapshot=off,format=raw \
! 16: -drive file=boot-com.iso,media=cdrom
! 17: Install as usual, choosing serial boot blocks
! 18: 3. Once you are done installing you can boot QEmu from your install.img
! 19: you just populated in step 2, and the test.img you created on step 1
! 20: as your virtio sd0 disk as follows:
! 21: qemu-system-x86_64 \
! 22: -m 1024 \
! 23: -k en-us \
! 24: -nographic \
! 25: -drive file=install.img,media=disk,snapshot=off,format=raw \
! 26: -device virtio-scsi-pci,id=scsi \
! 27: -device scsi-hd,drive=hd \
! 28: -drive if=none,id=hd,file=test.img,format=raw \
! 29: -net nic,macaddr=ba:be:00:fa:ce:01,model=virtio \
! 30: -net user,hostfwd=tcp::2003-:22 \
! 31: -boot c
! 32:
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb