Difference between revisions of "FreeBSD Guest Notes"
Jump to navigation
Jump to search
(Update to FreeBSD 9.3, FreeBSD has now Virtio drivers, remoce deprecated Information) |
|||
Line 2: | Line 2: | ||
Tweaks and tips for better performance with FreeBSD on KVM. | Tweaks and tips for better performance with FreeBSD on KVM. | ||
− | :'''Note:''' This has been tested with FreeBSD 9. | + | :'''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== | ==Create VM== | ||
− | * Download the FreeBSD 9. | + | * Download the FreeBSD 9.3-RELEASE-amd64 DVD ISO (from [http://www.freebsd.org/where.html here]) and transfer it to your VM server. |
* Create a new VM: | * Create a new VM: | ||
** CPU: dual-socket or dual-core | ** 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. | *** '''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) | ** RAM: 2GB (minimum) | ||
− | ** Network: Intel e1000 (bridged) | + | ** Network: Intel e1000 (bridged) or Virtio |
− | ** Create a 32GB primary disk (scsi, qcow2) | + | ** Create a 32GB primary disk (scsi, qcow2) or Virtio |
** Add FreeBSD 9.1-RELEASE-amd64 DVD ISO as an optical drive (scsi). | ** Add FreeBSD 9.1-RELEASE-amd64 DVD ISO as an optical drive (scsi). | ||
Line 27: | Line 27: | ||
==First Boot== | ==First Boot== | ||
* Power on the VM and log in. | * Power on the VM and log in. | ||
+ | If you have choosed to use VirtIO devices you can check their existence with dmesg: | ||
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
* Set the time: | * Set the time: | ||
<pre> | <pre> | ||
Line 37: | Line 45: | ||
</pre> | </pre> | ||
* Reboot | * Reboot | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | == Links == |
− | |||
− | |||
− | |||
* [http://www.freebsd.org/doc/handbook/updating-upgrading-portsnap.html FreeBSD Handbook - Portsnap: a Ports Collection Update Tool] | * [http://www.freebsd.org/doc/handbook/updating-upgrading-portsnap.html FreeBSD Handbook - Portsnap: a Ports Collection Update Tool] | ||
* [http://www.freebsd.org/cgi/url.cgi?ports/ports-mgmt/portmaster/pkg-descr freebsd.org - Port description for ports-mgmt/portmaster] | * [http://www.freebsd.org/cgi/url.cgi?ports/ports-mgmt/portmaster/pkg-descr freebsd.org - Port description for ports-mgmt/portmaster] |
Revision as of 07:48, 4 August 2015
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.1-RELEASE-amd64 DVD ISO as an optical drive (scsi).
- CPU: dual-socket or dual-core
Install FreeBSD
- Power on the VM.
- It should boot to the FreeBSD 9.1-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.1-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 choosed 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