FreeBSD Guest Notes: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Category:HOWTO]]
[[Category:HOWTO]]
==Enable Virto==
'''WARNING: This part is currently in test - it may render your system un-bootable when you make changes to your <code>/etc/fstab</code>.'''
'''WARNING: This part is currently in test - it may render your system un-bootable when you make changes to your <code>/etc/fstab</code>.'''
This part is KVM specific, however, it is similar to installing VMWare Tools or [http://open-vm-tools.sourceforge.net/ Open VM Tools].
* Install virtio-kmod:
* Install virtio-kmod:
==Enable Virto==
<pre>
<pre>
cd /usr/ports/emulators/virtio-kmod && make clean install
cd /usr/ports/emulators/virtio-kmod && make clean install

Revision as of 20:41, 6 October 2012

Enable Virto

WARNING: This part is currently in test - it may render your system un-bootable when you make changes to your /etc/fstab.

  • Install virtio-kmod:
cd /usr/ports/emulators/virtio-kmod && make clean install
  • When prompted on each required package, accept defaults and OK.
  • Copy the virtio modules into /boot/kernel directory:
cp -Rp /usr/local/modules/* /boot/kernel/
kldxref /boot/kernel
  • Add the following to /boot/loader.conf:
virtio_load="YES"
virtio_pci_load="YES"
virtio_blk_load="YES"
if_vtnet_load="YES"
virtio_balloon_load="YES"
  • Enable virtio for disk by changing your /etc/fstab entries to use the vtbd prefix. Example:
# Device        Mountpoint      FStype  Options Dump    Pass#
/dev/vtbd0p2    /               ufs     rw      1       1
/dev/vtbd0p3    none            swap    sw      0       0
  • Enable virtio for network by changing the ifconfig_em0="DHCP" line in /etc/rc.conf to:
ifconfig_vtnet0="DHCP"
  • Shutdown the VM
shutdown -p now
  • Change network and disk drivers to virtio.
  • Power on the VM.
  • Verify that virtio is loading:
kldstat

Id Refs Address            Size     Name
 1   12 0xffffffff80200000 11cdab0  kernel
 2    5 0xffffffff813ce000 4ca0     virtio.ko
 3    1 0xffffffff813d3000 5880     virtio_pci.ko
 4    1 0xffffffff813d9000 5010     virtio_blk.ko
 5    1 0xffffffff813df000 aeb0     if_vtnet.ko
 6    1 0xffffffff813ea000 3210     virtio_balloon.ko