compared with
Current by Nahum Shalman
on Nov 01, 2017 20:42.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (7)

View Page History
h1. Getting Started

0) this worked on 2017-10-30
1) log into the SmartOS machine as user "root"
2) "imgadm avail" \| egrep lx; (I chose "e74a9cd0-f2d0-11e6-8b69-b3acf2ef87f7" from here "https://docs.joyent.com/public-cloud/instances/infrastructure/images/debian")
3) "imgadm import e74a9cd0-f2d0-11e6-8b69-b3acf2ef87f7" to download the snapshot and install in zones pool
4) "imgadm show e74a9cd0-f2d0-11e6-8b69-b3acf2ef87f7" to figure out the kernel version
5) this command will create a running virtual machine, complete with disc/memory/network/cpu:


{code}
vmadm create <<EOL
{
"brand": "lx",
"kernel_version": "3.16.0",
"image_uuid": "e74a9cd0-f2d0-11e6-8b69-b3acf2ef87f7",
"alias": "pg",
"hostname": "pg",
"max_physical_memory": 8192,
"quota": 3000,
"resolvers": ["192.168.180.1", "8.8.8.8"],
"nics": [
{
        "nic_tag": "v",
        "ip": "192.168.180.182",
        "netmask": "255.255.255.0",
        "gateway": "192.168.180.1",
        "vlan_id": 180
      }
 ]
}
EOL
{code}
6) "vmadm list" gave me the ID for my running instance:


{noformat}
UUID TYPE RAM STATE ALIAS
9f7dfe6d-d6ec-e108-d3be-ce1638b5a7c2 LX 8192 running pg
{noformat}
7) I had difficulty logging into that machine ("zlogin 9f7dfe6d-d6ec-e108-d3be-ce1638b5a7c2" should have worked, too), this is why I created this writeup in the first place.&nbsp; This is how you can get yourself into the newly created machine

{code}
   "cd /zones/9f7*/root/root/.ssh && cp ~/.ssh/id_pub.rsa authorized_keys"
{code}
8) ssh root@192.168.180.182
9) final note: my SmartOS machine was on vlan 180, if you don't do vlan, leave out the vlan_id line and preceding comma, probably your interface is called "admin"; change paramaters as desired



h2. Platform Version

Create a zone (replace the nic values with ones appropriate for your network)

{tip}If you're not sure what these values mean or what units they are in, check out the [vmadm man page|https://smartos.org/man/1m/vmadm]{tip}

{tip}
{code:language=javascript}
{
{
"nic_tag": "external",
"ips": ["dhcp"],
"primary": true
}
If debugging LX branded zones, first watch this video: [Debugging LX branded zones on SmartOS|https://www.youtube.com/watch?v=6oIBiWdh41c]




h2. DTrace

[Bryan's talk and demo of sdc-docker|https://www.joyent.com/developers/videos/docker-and-the-future-of-containers-in-production]




* [https://github.com/joyent/smartos-live/blob/master/src/dockerinit/README.md]
* [https://github.com/joyent/smartos-live/commit/06610676fc05aca2938eb7b8bb07485f3709e9e3]
# Move aside the directory named "platform" to e.g. "platform-orig"
# Rename "platform-<datestamp>" to "platform"
# Boot from your USB stick