NetBSD 5 on KVM

From ezUnix
Jump to: navigation, search
                                    pdf_icon.png Download this article as a single PDF document 


So you want to test the next release of NetBSD but you don`t have any spare hardware to test it on?
Then why not try to virtualize it?
If you don't want to install Xen you can try KVM but you must go in depth if you want something functional.

A friend named Twisla from GCU gave me the magic potion to make it work.


This HowTo was successfully tested on Ubuntu 8.10 with NetBSD 5.1 as the guest OS.


  • Create the nest for the bird

Create 4G image file to use it as a "hard drive" for your installation.

# qemu-img create -f qcow nbsd5.img 4G

  • Get the right ISO for your arch, for instance for 64-bit AMD NetBSD 5.1

  • Launch the magic command
# sudo kvm nbsd5.img \
  -net nic,macaddr=DE:AD:BE:EF:29:14,model=ne2k_pci \
  -net tap,script=/home/zat/kvm.if-up \
  -m 512 \
  -no-acpi \
  -localtime \
  -no-kvm-irqchip \
  -std-vga \
  -tdf \
  -curses \
  -cdrom amd64cd-5.1.iso
  -boot d

(don't forget to remove last line after installation & amd64cd-5.1.iso)

Choose to install NetBSD with options : No ACPI, No SMP.

When NetBSD is installed, boot without ACPI and SMP as well.

Modify /boot.cfg and change the default value defaut=1 to defaut=4

Enjoy :-)


<comments />

MTecknology said ...
08:43, 21 November 2010 (CET)
-cdrom myimage.iso

^ Typo - missing the trailing \

Otherwise - Many thanks. I'm doanloading the cd image now. I grabbed it instead from