Notes on snapshots, images, and migrations
# Create zone
vmadm create <<EOL
{
"brand": "joyent",
.| assumes centos 7 host, typical configuration | |
| - disable selinux: SELINUX=permissive in /etc/sysconfig/selinux | |
| - disable auditd: systemctl disable auditd.service | |
| - enable journald persistence: `Storage=persistent` in /etc/systemd/journald.conf | |
| - mkdir /var/lib/container | |
| - yum -y --nogpg --releasever=7 --installroot=/var/lib/container/centos install systemd passwd yum vim-minimal openssh-server | |
| - systemd-nspawn -D /var/lib/container/centos | |
| - set root passwd, set ssh port (e.g. 2222) | |
| - set up systemd-nspawn service: |
| #!/usr/bin/env bash | |
| # Loads and mounts an ISO over SMB via the | |
| # SuperMicro IPMI web interface | |
| # | |
| # usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path> | |
| # e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso' | |
| set -x |
| class Sudoku | |
| SIZE = 9 | |
| NUMBERS = (1..9).to_a | |
| def initialize | |
| @board = Array.new(SIZE) { Array.new(SIZE, nil) } | |
| end | |
| def [](x, y) | |
| @board[y][x] |
| !function() { | |
| var doc = document, | |
| htm = doc.documentElement, | |
| lct = null, // last click target | |
| nearest = function(elm, tag) { | |
| while (elm && elm.nodeName != tag) { | |
| elm = elm.parentNode; | |
| } | |
| return elm; | |
| }; |