Monday, November 2, 2015

Notes RE: Smartos


I'm trying to figure out how to run SmartOS on kimsufi; ideally redirecting ports towards KVM instances. Don't have much now, but here's some links I'm getting:

SmartOS wiki:
https://wiki.smartos.org/display/DOC/Home

IRC log discussing setting up LX on Smartos:
http://echelog.com/logs/browse/smartos/1429567200

Single IP tips for SmartOS:
https://docu.blackdot.be/snipets/solaris/smartos-nat

Tips for using proxmox

I just got a server and one of the options was to run proxmox on it, so I chose that.

I found this guide on low-end talk which had some great tips on it. Most importantly was the interfaces entry and network info, which I'm gonna re-print here in the event that link dies.

Put this in /etc/networks/interfaces to create a working bridge entry:

auto vmbr2
iface vmbr2 inet static
address 192.168.0.254
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE


Then restart the server.

Use these settings when configuring VM networks:
ip : 192.168.0.1 to 192.168.0.250
subnet mask 255.255.255.0
gateway : 192.168.0.254 (ip vmbr2 on the host)
DNS: your server's DNS or google's (8.8.8.8, 8.8.4.4)

It's weird to delete proxmox virtual machines, what I do is:
ssh as root

1)delete the configuration file under /etc/pve/qemu-server
2)delete the disk image file under /var/lib/vz/images/

The web interface will refresh and the vm will be gone, as an added bonus you'll be able to re-use the node number for a new vm.

automating zfs mounts -a quick and very dirty script

 #!/bin/sh for x in obj xsrc src pkgsrc pkgsrc/distfiles pkgsrc/packages pkg         do zfs create ext/$x zfs set mountpoint=/usr/$x ext/$x ...