Nahum Shalman

SmartOS on SmartOS in the JPC

What now?

We begin with Xzibit:

Okay, really, what?

  1. Log into the JPC portal
  2. Provision a CentOS 7 VM
    • Use any package that gives you more than 1 VCPU (try "High CPU 1.75")
    • Only give it one VNIC on the public internet (remove the usual private one)
    • Provision it.
  3. Log in to your new VM as root.
  4. Install some extraction tools: yum -y install qemu-img bzip2
  5. Download the SmartOS boot image and the specially tweaked zones pool image into RAM:
    • cd /dev/shm && wget http://us-east.manta.joyent.com/nahamu/public/smartos/testing/platform-20141230T180824Z.usb.bz2
    • cd /dev/shm && wget http://us-east.manta.joyent.com/nahamu/public/smartos/testing/smartos-in-jpc.qcow2
  6. Don't let Linux touch the disks any more:
    • umount /data ; swapoff -a
    • echo 1 > /proc/sys/kernel/sysrq ; echo u > /proc/sysrq-trigger
  7. Drop the images onto your virtual disks:
    • qemu-img convert -f qcow2 -O host_device /dev/shm/smartos-in-jpc.qcow2 /dev/vdb
    • bzcat < /dev/shm/platform-20141230T180824Z.usb.bz2 > /dev/vda
  8. Have Linux force reboot the machine:
    • echo 1 > /proc/sys/kernel/sysrq ; echo b > /proc/sysrq-trigger
    • Your ssh connection will hang. Kill it as you see fit.
  9. Delete your entry from ~.ssh/known_hosts for the machine.
  10. Ping the IP address until it comes back online.
  11. SSH back in as root. The password is "thanksnahum"
  12. Change the password: umount /etc/shadow; cp /usbkey/shadow /etc/shadow; passwd root; cp /etc/shadow /usbkey/shadow
  13. Run uname -a
  14. Have fun! (If you provision a zone with IP 172.16.0.0/24 on nic_tag "switch0", it should be NAT'd out to the internet... I haven't tested that yet, though...)
  15. Check out my code branches that are powering this awesomeness:
smartos