Skip to content

Instantly share code, notes, and snippets.

@trentster
trentster / do-smartmachine-dataset.sh
Last active May 25, 2016 22:46
PURPOSE: turn a SmartOS zone vm into a dataset
#!/bin/bash
#
# SCRIPT: do-smartmachine-dataset.sh
# AUTHOR: Mark Slatem
# DATE: 16 January 2013
# REV: 1.0
#
# PLATFORM: SmartOS
# REQUIREMENTS: SmartOS
#
imgadm update
imgadm import fdea06b0-3f24-11e2-ac50-0b645575ce9d
imgadm list | grep fdea
vi setupfifo.json
vmadm create -f setupfifo.json
## In FiFo Zone ##
zlogin fifo
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
Created by Manifold
--><service_bundle type="manifest" name="spawn-fcgi">
<service name="site/spawn-fcgi" type="service" version="1">
<create_default_instance enabled="true"/>
[root@44caba55-3ff0-4bef-a689-412e25b77bdd ~]# tail -f /var/svc/log/site-spawn-fcgi:default.log
[ Jan 8 11:00:36 Executing start method ("/opt/local/bin/spawn-fcgi -u www -g www -a 127.0.0.1 -p 9000 -- /opt/rt4/sbin/rt-server.fcgi"). ]
spawn-fcgi: child exited with: 2
[ Jan 8 11:00:37 Method "start" exited with status 2. ]
[ Jan 8 11:00:37 Executing start method ("/opt/local/bin/spawn-fcgi -u www -g www -a 127.0.0.1 -p 9000 -- /opt/rt4/sbin/rt-server.fcgi"). ]
spawn-fcgi: child exited with: 2
[ Jan 8 11:00:37 Method "start" exited with status 2. ]
[ Jan 8 11:00:37 Executing start method ("/opt/local/bin/spawn-fcgi -u www -g www -a 127.0.0.1 -p 9000 -- /opt/rt4/sbin/rt-server.fcgi"). ]
spawn-fcgi: child exited with: 2
[ Jan 8 11:00:37 Method "start" exited with status 2. ]
____ _ ___ ___
/ ___| | ___ _ _ __| \ \ / (_)____
| | | |/ _ \| | | |/ _` |\ \ /\ / /| |_ /
| |___| | (_) | |_| | (_| | \ V V / | |/ /
\____|_|\___/ \__,_|\__,_| \_/\_/ |_/___|
SmartMachine (base64 1.8.4)
# SmartMachine (base64 1.8.4) #
vi /etc/motd # add above logo
[root@smartosn4 ~]# vmadm get 8dc9a6ac-e2a7-4a32-87c3-75a56688e5a2
{
"zonename": "8dc9a6ac-e2a7-4a32-87c3-75a56688e5a2",
"zonepath": "/zones/8dc9a6ac-e2a7-4a32-87c3-75a56688e5a2",
"autoboot": true,
"brand": "joyent",
"limit_priv": "default",
"create_timestamp": "2013-01-07T01:00:17.865Z",
"image_uuid": "fdea06b0-3f24-11e2-ac50-0b645575ce9d",
"cpu_shares": 1024,
esx-server-01-vmnet0 172.16.5.91
vm1: bakos vmnet0 priv-ip? pub-ip? ports?
vm2: petervm vmnet0 priv-ip? pub-ip? ports?
vm3: winsrvppp vmnet0 priv-ip? pub-ip? ports?
esx-server-01-vmnet1 10.50.0.102
vm4: name? vmnet1 priv-ip? pub-ip? ports?
vm5: name? vmnet1 priv-ip? pub-ip? ports?
esx-server-01-vmnet0 172.16.5.91
vm1: bakos vmnet0 ip?
vm2: petervm vmnet0 ip?
vm3: winsrvppp vmnet0 ip?
esx-server-01-vmnet1 10.50.0.102
vm1: name? vmnet1 ip?
vm2: name? vmnet1 ip?
Licenser
is now really off to bed
11:07
trentster
I think what joyent does is they ony give access to vnc console if you have access to the GZ which kind of emans you own the node
11:08
killfill
trentster: they have that on the joyent public cloud?
#!/bin/bash
#
# SCRIPT: do-smartsend.sh
# AUTHOR: Mark Slatem
# DATE: 11 APRIL 2012
# REV: 1.0.A
#
# PLATFORM: SmartOS
# REQUIREMENTS: SmartOS
#