Total: 22
1 2 3 4 5


On the Source SmartOS Node:

zfs snapshot zones/d8944236-9d33-40ce-a112-5445cc40c412@migration
zfs snapshot zones/d8944236-9d33-40ce-a112-5445cc40c412-disk0@migration
zfs send zones/d8944236-9d33-40ce-a112-5445cc40c412@migration  | ssh root@ zfs recv zones/d8944236-9d33-40ce-a112-5445cc40c412
zfs send zones/d8944236-9d33-40ce-a112-5445cc40c412-disk0@migration  | ssh root@ zfs recv zones/d8944236-9d33-40ce-a112-5445cc40c412-disk0
scp /etc/zones/d8944236-9d33-40ce-a112-5445cc40c412.xml root@

On the Target SmartOS Node:

echo 'd8944236-9d33-40ce-a112-5445cc40c412:installed:/zones/d8944236-9d33-40ce-a112-5445cc40c412:d8944236-9d33-40ce-a112-5445cc40c412' >> /etc/zones/index
vmadm boot d8944236-9d33-40ce-a112-5445cc40c412


Non-Global Zone:

It's simple:

[root@]# vmadm send 1a666e33-f4ca-4c4e-a4c6-a47dd3d78096 | ssh vmadm receive

Successfully sent VM 1a666e33-f4ca-4c4e-a4c6-a47dd3d78096
Successfully received VM 1a666e33-f4ca-4c4e-a4c6-a47dd3d78096




Чт, 4 июня 2015, 15:54

Building an LXC Server

Building an LXC Server on Ubuntu with ZFS and a container with public IP address


First update Ubuntu


apt-get update

apt-get dist-upgrade


Setup ZFS


apt-add-repository ppa:zfs-native/stable

apt-get update

apt-get install ubuntu-zfs


Configure LXC


sudo apt-get install lxc


Configure ZFS


Create ZFS pool: 

sudo zpool create -f tank /dev/sdX


Keep in mind that deduplication takes much more memory and sometimes CPU.

The rule of Thumb says to have 1GB of Ram per TB of Data. For deduplicated ZPools you actually should have 5 GB of Ram for 1TB of Data. I don't use it.

zfs set dedup=on tank


Turn on compression and create fs:

zfs set compression=on tank

zpool set feature@lz4_compress=enabled tank

zfs set compression=lz4 tank


zfs create tank/lxc

zfs create tank/lxc/containers


To configure LXC to use ZFS as the backing store and set the default LXC path, add the following to /etc/lxc/lxc.conf:


lxc.lxcpath = /tank/lxc/containers

lxc.bdev.zfs.root = tank/lxc/containers



Creating a Container


Create the first container by doing:


lxc-create -t ubuntu -n -B zfs



Setup Bridged Network


apt-get install bridge-utils


Important Commands

Show bridge interfaces:


brctl show


Simple Bridge

This setup can be used to connect multiple network interfaces. The bridge acts as a switch: each additional network interface is directly connected to the physical network.


Edit /etc/network/interfaces, remove eth0, add br0. 


For dynamic IP:


#auto eth0

#iface eth0 inet dhcp

auto br0

iface br0 inet dhcp

bridge_ports eth0

bridge_stp off

bridge_fd 0

bridge_maxwait 0


For static IP:


auto br0

iface br0 inet static

bridge_ports eth0

bridge_stp off

bridge_fd 0

bridge_maxwait 0










reboot server

Is all OK?


Edit /tank/lxc/containers/ = veth = up = br0 = 00:16:3e:30:fa:4a



start the node:

lxc-start -n -d


connect to the node:

lxc-console -n


On the lxc node /etc/network/interfaces:


auto eth0

iface eth0 inet static









It's possible to use static IP address in node config and use dhcp inside the node, that works too. 

But IPv6 didn't work inside the node, I disabled it and then the node stopped receiving IP address at all. 

I had to use static IP.

I'm going to solve this problem later. 




Вт, 28 апреля 2015, 16:28

Installing FreeSWITCH on SmartOS

OK, I've got it and tested it!

freeswitch@freeswitch:8021@internal> version 

FreeSWITCH Version 1.5.15b+git~20150425T191526Z~3058709a92~64bit (git 3058709 2015-04-25 19:15:26Z 64bit)


Update system to the latest:

pkgin up

pkgin ug

Install the necessary software:

pkgin install git gcc47 gmake autoconf gettext gettext-m4 automake libtool pkg-config \

unixodbc speex libogg libvorbis libshout ldns editline libjpeg-turbo libpqxx yasm nasm

mkdir /opt/local/src

cd /opt/local/src

To build from the current release source code:

git clone -b v1.4

(or if you want to build from Master, the latest source code: git clone )

cd freeswitch

./ -j

 If you want to add or remove modules from the build, edit modules.conf

vi modules.conf 

./configure -C --prefix=/opt/local/freeswitch --enable-64 --enable-optimization --enable-core-pgsql-support


make install

make cd-sounds-install cd-moh-install

When finished, FreeSWITCH should be located under /opt/local/freeswitch


Enjoy and stay tuned!


Total: 22
1 2 3 4 5