FreeBSD Guest Notes

From Proxmox VE
Revision as of 17:42, 25 January 2016 by Mariusz Handke (talk | contribs)
Jump to navigation Jump to search

Tweaks and tips for better performance with FreeBSD on KVM.

Note: This has been tested with FreeBSD 9.3 RELEASE (and patch levels). Some steps have been removed as they have been deprecated in newer FreeBSD versions.

Create VM

  • Download the FreeBSD 9.3-RELEASE-amd64 DVD ISO (from here) and transfer it to your VM server.
  • Create a new VM:
    • CPU: dual-socket or dual-core
      • IMPORTANT: As of current PVE releases, you may need to set your CPU to qemu64 rather than kvm64 for FreeBSD to be able to boot.
    • RAM: 2GB (minimum)
    • Network: Intel e1000 (bridged) or Virtio
    • Create a 32GB primary disk (scsi, qcow2) or Virtio
    • Add FreeBSD 9.3-RELEASE-amd64 DVD ISO as an optical drive (scsi).

Install FreeBSD

  • Power on the VM.
  • It should boot to the FreeBSD 9.3-RELEASE-amd64 DVD ISO.
  • System Components: Add "src".
  • Disks: Guided, use entire disk.
  • Network: Use ipv4 only (unless you also use ipv6).
  • Services: Add ntpd.
  • This should leave you with FreeBSD 9.3-RELEASE installed on the 32GB primary drive.
  • Shut down the VM after installation.
  • Remove the ISO from the VM's optical drive (set to empty).
  • Verify the VM's boot order is set to the primary hard disk first.

First Boot

  • Power on the VM and log in.

If you have choosen to use VirtIO devices you can check their existence with dmesg:

dmesg | egrep '(vtnet|vtblk)'
vtblk0: <VirtIO Block Adapter> on virtio_pci1
vtblk0: 16384MB (33554432 512 byte sectors)
vtnet0: <VirtIO Networking Adapter> on virtio_pci2
vtnet0: Ethernet address: b2:ae:f1:97:36:52
  • Set the time:
ntpdate -s pool.ntp.org
  • Update the system:
freebsd-update fetch
freebsd-update install
  • Reboot

Links