Archive for the ‘FreeBSD’ Category

Bhyve on FreeBSD 10.1

Friday, May 15th, 2015

I recently started a new series of videos on YouTube about my favorite operating system FreeBSD. Below are the commands used in the video to setup the bhyve hypervisor on FreeBSD 10.1 with a virtualized Ubuntu 15 server.

 

######## prerequisites for bhyve on FreeBSD ##########
pkg install grub2-bhyve
mkdir /virtual_machines
cd /virtual_machines
mkdir iso
cd iso
fetch http://releases.ubuntu.com/15.04/ubuntu-15.04-server-amd64.iso

######    Load kernel modules and set sysctl values ######
kldload if_tap
kldload if_bridge
kldload vmm
kldload nmdm
###### set sysctl values  #######3
sysctl net.link.tap.up_on_open=1
sysctl net.inet.ip.forwarding=1
echo “net.link.tap.up_on_open=1” >> /etc/sysctl.conf
echo “vm1:dv=/dev/nmdm1B:br#9600:pa=none:” >> /etc/remote
##### create interfaces needed for the vm  ########

ifconfig tap1 create
ifconfig bridge0 create
ifconfig bridge0 addm tap1 addm em0 up

##### create the config files and virtual disk  ########

truncate -s 10g vm1.img
vi device.map
(hd0) /virtual_machines/ubuntu_server/vm1.img
(cd0) /virtual_machines/iso/ubuntu15server.iso

####### Boot the virtual machines ###########
grub-bhyve -r cd0 -m /virtual_machines/ubuntu_server/device.map -M 1024 vm1

bhyve -c 1 -m 1024M -H -P -A \
-l com1,/dev/nmdm0A \
-s 0:0,hostbridge \
-s 1:0,lpc -s 2:0,virtio-net,tap1 \
-s 3,ahci-cd,/virtual_machines/iso/ubuntu15server.iso \
-s 4,virtio-blk,/virtual_machines/ubuntu_server/vm1.img vm1 &

########### boot into newly installed vm ################333

rub-bhyve -r hd0,msdos1 -m /virtual_machines/ubuntu_server/device.map -M 1024 vm1

bhyve -c 1 -m 1024M -H -P -A \
-l com1,/dev/nmdm0A \
-s 0:0,hostbridge \
-s 1:0,lpc -s 2:0,virtio-net,tap1 \
-s 4,virtio-blk,/virtual_machines/ubuntu_server/vm1.img vm1 &

#################3 bhyve commands and nice to haves ##########

kill running bhyve machines  bhyvectl –destroy –vm=name_of_vm
create bridge and tap interfaces to provision at system boot

Found This Funny Banner Today!

Monday, June 28th, 2010

Hacked Iphone goodness

Tuesday, October 30th, 2007

As promised here is some iPhone screenshots!!!.New Desktop theme (more…)

Iphone Fun

Monday, October 29th, 2007

I have spent the last couple weeks breaking the Iphone in every way possible. I Now have it running as a mail server. One of the great things about the iphone is that it is running mac os x leopard, which is just version 9 of the darwin kernel. That means that once you get out of the ch-rooted environment on the phone, you can install the BSD subsystem. The BSD subsystem basically just adds back all the unix tools we have come to know and love. After that it is just a matter of compiling an embedded version of apache or your web server of choice. Next you can use NFS shares to mount more available storage. I will post some pictures here of some interesting screen shots. The arm cpu in the phone is actually quite fast. This of course is all just for iphun ( pun intended) however it is nice to have shell access on the phone. I do a lot of networking for a living and it is nice to have ssh and telnet on my phone. This makes it much easier to program routers and do many other things

(more…)

IP Filter and FreeBSD

Monday, June 25th, 2007

IPF is a very robust firewall included in FreeBSD by default. This is a statefull firewall with logging capabilities that can also be used to NAT a local network in situations where the FreeBSD box is the router. The best way to get IPF working is to compile the kernel with support built in. Although the default kernel has support through the use of loadable modules, compiling the options into the kernel provide a more flexible and robust system.

(more…)

Categories
Support Our site