Skip to content

Instantly share code, notes, and snippets.

@citrus-it
Created February 12, 2019 14:01
Show Gist options
  • Select an option

  • Save citrus-it/1496c929dcf3c9e6a6f9784bcac2b2d1 to your computer and use it in GitHub Desktop.

Select an option

Save citrus-it/1496c929dcf3c9e6a6f9784bcac2b2d1 to your computer and use it in GitHub Desktop.
bloody# zonecfg -z test info
zonename: test
zonepath: /data/zone/test
brand: pkgsrc
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid:
fs-allowed:
net:
        address not specified
        allowed-address: 172.27.10.100/24
        defrouter: 172.27.10.254
        global-nic not specified
        mac-addr not specified
        physical: test0
        vlan-id not specified
attr:
        name: resolvers
        type: string
        value: 1.1.1.1,1.0.0.1
attr:
        name: dns-domain
        type: string
        value: omnios.org
bloody# zoneadm -z test install
A ZFS file system has been created for this zone.

       Image: Preparing at /data/zone/test/root.
Sanity Check: Looking for 'entire' incorporation.
   Publisher: Using omnios (https://pkg.omniosce.org/bloody/core/).
   Publisher: Using omnios (https://us-east.mirror.omniosce.org/).
   Publisher: Using extra.omnios (https://pkg.omniosce.org/bloody/extra/).
       Cache: Using /var/pkg/publisher.
  Installing: Packages (output follows)
Packages to install: 197
Mediators to change:   3
 Services to change:   5

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            197/197     1292/1292      4.5/4.5      --

PHASE                                          ITEMS
Installing new actions                     5639/5639
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
 Postinstall: Copying SMF seed repository ... done.
Downloading pkgsrc bootstrap...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23.0M  100 23.0M    0     0   606k      0  0:00:38  0:00:38 --:--:--  854k
Installing pkgsrc bootstrap...
        Done: Installation completed in 47.986 seconds.
bloody# zoneadm -z test boot
bloody# zlogin test
[Connected to zone 'test' pts/3]
OmniOS 5.11     omnios-master-a7bf5f222a        February 2019

root@test:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
test0/_a          from-gz  ok           172.27.10.100/24
lo0/v6            static   ok           ::1/128

root@test:~# cat /etc/resolv.conf
# Auto-generated from zone configuration
domain omnios.org
nameserver 1.1.1.1
nameserver 1.0.0.1

root@test:~# grep hosts: /etc/nsswitch.conf
# "hosts:" and "services:" in this file are used only if the
hosts:      files dns mdns

root@test:~# getent hosts google.com
216.58.204.14   google.com
root@test:~# crontab -l
10 3 * * * /usr/sbin/logadm
15 3 * * 0 [ -x /usr/lib/fs/nfs/nfsfind ] && /usr/lib/fs/nfs/nfsfind
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
0 5 * * * /opt/local/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
root@test:~# pkgin update
reading local summary...
processing local summary...
processing remote summary (https://pkgsrc.joyent.com/packages/SmartOS/trunk/x86_64/All)...
pkg_summary.xz                                100% 2281KB 380.2KB/s   00:06
root@test:~# pkgin upgrade
calculating dependencies...done.

18 packages to refresh:
  pkg_install-20180425 pkg_install-info-4.5nb3 ncurses-6.1nb3 zlib-1.2.11
  xz-5.2.4 bzip2-1.0.6nb1 readline-7.0 libarchive-3.3.2
  bootstrap-mk-files-20180901 openssl-1.0.2p pkg_alternatives-1.6
  nbsed-20120308 cwrappers-20180325 bmake-20150505 pkgsrc-gnupg-keys-20170418
  mozilla-rootcerts-1.0.20180111 nawk-20121220nb1 bsdinstall-20160108

3 packages to upgrade:
  sqlite3-3.26.0nb1 gcc7-libs-7.4.0nb1 pkgin-0.11.6nb1

18 to refresh, 3 to upgrade, 0 to install
23M to download, -121K to install

proceed ? [Y/n] y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment