Annotation of wikisrc/tutorials/how_to_setup_virtio_scsi_with_qemu.mdwn, revision 1.3

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:
1.2       wiki        5: 
1.3     ! wiki        6:         virtio* at pci? dev ? function ?        # Virtio PCI device
        !             7:         vioscsi* at virtio?                     # Virtio SCSI device
1.2       wiki        8: 
1.1       wiki        9: ## QEmu setup
                     10: 1. Create 2 files one for the installation, and one for the test SCSI drive:
1.2       wiki       11: 
1.1       wiki       12:         dd if=/dev/zero of=install.img seek=10m count=1
                     13:         dd if=/dev/zero of=test.img seek=10m count=1
1.2       wiki       14: 
1.1       wiki       15: 2. Start QEmu pointing it to your installation serial console cdrom:
1.2       wiki       16: 
1.1       wiki       17:         qemu-system-x86_64 \
                     18:             -m 1024 \
                     19:             -nographic \
                     20:             -drive file=install.img,media=disk,snapshot=off,format=raw \
                     21:             -drive file=boot-com.iso,media=cdrom
1.2       wiki       22: 
1.1       wiki       23:    Install as usual, choosing serial boot blocks
1.2       wiki       24: 
1.1       wiki       25: 3. Once you are done installing you can boot QEmu from your install.img
                     26:    you just populated in step 2, and the test.img you created on step 1
                     27:    as your virtio sd0 disk as follows:
1.2       wiki       28: 
1.1       wiki       29:         qemu-system-x86_64 \
                     30:             -m 1024 \
                     31:             -k en-us \
                     32:             -nographic \
                     33:             -drive file=install.img,media=disk,snapshot=off,format=raw \
                     34:             -device virtio-scsi-pci,id=scsi \
                     35:             -device scsi-hd,drive=hd \
                     36:             -drive if=none,id=hd,file=test.img,format=raw \
                     37:             -net nic,macaddr=ba:be:00:fa:ce:01,model=virtio \
                     38:             -net user,hostfwd=tcp::2003-:22 \
                     39:             -boot c
                     40: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb