Notes on snapshots, images, and migrations
# Create zone
vmadm create <<EOL
{
"brand": "joyent",
.
!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; | |
}; |
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] |
#!/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 |
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: |
# curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.1-x86_64.iso | |
curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86/alpine-3.3.1-x86.iso | |
# create hdd image (8GB) | |
dd if=/dev/zero of=hdd.img bs=1g count=8 | |
# extract kernel and initramfs | |
brew install cdrtools | |
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/initramfs-grsec > initramfs-grsec | |
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/vmlinuz-grsec > vmlinuz-grsec |
::
is the list prepend operator in Elm.
3 :: 2 :: 1 :: []
is equivalent to
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare git@github.com:usi-systems/easytrace.git
cd /opt/local/artifacts/
vim zonemanifestBhyveFreeBSD.json
vmadm create < zonemanifestBhyveFreeBSD.json
curl -kLo /zones/UUID/root/FreeBSD-12.0-RC3-amd64-bootonly.iso
The following line is for KVM, not BHYVE, hence obsoleted for non-legacy boot options
cd /zones/<<UUID>>/root/