SmartOS on SmartOS in the JPC
What now?
We begin with Xzibit:
Okay, really, what?
- Log into the JPC portal
- 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.
- Log in to your new VM as root.
- Install some extraction tools:
yum -y install qemu-img bzip2
- 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
- Don't let Linux touch the disks any more:
umount /data ; swapoff -a
echo 1 > /proc/sys/kernel/sysrq ; echo u > /proc/sysrq-trigger
- 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
- 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.
- Delete your entry from
~.ssh/known_hosts
for the machine. - Ping the IP address until it comes back online.
- SSH back in as root. The password is "thanksnahum"
- Change the password:
umount /etc/shadow; cp /usbkey/shadow /etc/shadow; passwd root; cp /etc/shadow /usbkey/shadow
- Run
uname -a
- 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...)
- Check out my code branches that are powering this awesomeness:
- Fixing admin_nic and NAT networking
- Tweaks to smartos-live
- Tweaks to sdc-platform -- This image is a proof of concept of how SmartOS and SDC could share a common platform image
- Tweaks to illumos-joyent