Those documents are obsolete, please use the Nethence Documentation
Installing a NetBSD/XEN paravirtualized guest
Preparing the guest skeleton
Prepare the installation and system kernels e.g.,
mkdir -p /data/guests/bsd64/
Create NetBSD guest's harddrive (assuming a linux dom0, which is sparse file capable with ext2/3/4),
dd if=/dev/zero of=bsd64.disk bs=1024k count=1 seek=10000
Create guest's configuration,
name = "bsd64"
memory = "512"
kernel = "/data/guests/bsd64/netbsd-INSTALL_XEN3_DOMU.gz"
#kernel = "/data/guests/bsd64/netbsd-XEN3_DOMU.gz"
disk = [ 'file:/data/guests/bsd64/bsd64.disk,xvda,w' ]
vif = [ 'vifname=vbsd64.0' ]
vcpus = "2"
Note. for routing instead of bridging,
vif = [ 'vifname=vbsd64.0,ip=XX.XX.XX.XX' ]
Note. if you have to define the mac address for restricted bridging, for example,
vif = [ 'vifname=vbsd64.0,mac=00:16:3e:00:00:fd' ]
Note. tap:aio: doesn't always work and is not recommended anyways
Note. if you want ISO image as installation media,
#disk = ['file:/data/guests/bsd64/bsd64.disk,xvda,w',\
and use 'xbd1a' as cdrom device within the installer.
Ready to go
Start the guest for 'sysinst',
xm create bsd64 -c
I had some network issue with previous versions of NetBSD on a Linux dom0 (even with NetBSD 5) but now with NetBSD 6 it's ok. Network works great (no tcp offloading enabled on the dom0, should try with it).
Note. You can always configure network manually first and then start sysinst,
ifconfig xennet0 inet XX.XX.XX.XX netmask 255.255.255.0 up
mount_nfs NFSSRV:/data/shared/netbsdx64/ /mnt2
check all sets but kernel, kernel modules (unless you want pygrub from pkgsrc) and X sets
Note. Eventually disable journaling (-o log) from the mount options if running a Linux dom0. Linux and NetBSD do not seem to share the same cash flush methods.
Note. harddrive will appear as 'xbd0'
Note. cdrom will eventually appear as 'xbd1' (use 'xbd1a')
Note. recent installer ramdisks are readonly, I can't mkdir anymore. vmstat is gone too.
When installation has finished,
exit install system
Switch to the normal kernel (and eventually remove the ISO image),
kernel = "/data/guests/bsd64/netbsd-XEN3_DOMU.gz"
You can now start the guest normally,
xm cr bsd64 -c
Disable offloading (optional)
On the dom0 (here Linux),
ethtool -K vbsd0 rx off
ethtool -K vbsd0 tx off
ethtool -K vbsd0 sg off
ethtool -K vbsd0 tso off
ethtool -K vbsd0 ufo off
ethtool -K vbsd0 gso off
ethtool -K vbsd0 gro off
ethtool -K vbsd0 lro off
Fixing minor errors
Beside your usual NetBSD post-installation procedure, the following prevents minors errors from showing up at startup. Disable wscons system drivers,
Disable virtual terminals,
ttyE1 "/usr/libexec/getty Pc" vt220 off secure
ttyE2 "/usr/libexec/getty Pc" vt220 off secure
ttyE3 "/usr/libexec/getty Pc" vt220 off secure
PyGRUB is also available from pkgsrc. To apply,
bootloader = "/usr/pkg/bin/pygrub"
Last update: Jan 19, 2013