Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Installing SmartOS on VMware (sandbox so you can play with it and learn)
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Installing SmartOS on VMware (sandbox so you can play with it and learn)

Intro to SmartOS

SmartOS is a Type-1 hypervisor developed by Joyent. It's based on OpenSolaris, and is therefore a UNIX operating system.

It's extremely small (boots off of a USB stick), consists of a single configuration file, and it lives in your server's RAM, yet, it is extremely powerful, and arguably the most cloud-ready operating system out there.

If you're interested in more details about it (or a bit of Sun Microsystems -> OpenSolaris -> Oracle -> SmartOS history), check it out here: http://docs.vrocket.io/pages/viewpage.action?pageId=557106.

In this tutorial I will show you How to Install SmartOS on VMware (Workstation or Fusion).

Step by Step Guide

1) Download the latest SmartOS VMware Image (~ 158MB)

2) Once downloaded, extract the bz2 file

  • On Windows you may want to download 7-Zip for this purpose
  • On OSX or Linux - just run tar -xjvf smartos-latest.vmwarevm.tar.bz2 to extract the .vmwarevm virtual machine image

3) Double click onto the SmartOS.vmwarevm file and it'll open in VMware Workstation or Fusion

4) When prompted to upgrade Virtual Hardware, choose Upgrade.

5) Then, when prompted where did the VM come from, choose I Copied It

6) Before starting up the Virtual Machine, head to Settings menu to configure the Processor & Memory option

  • You should increase your Processors Count to at least 2 cores, and memory to anything you feel like (1012MB and up). I'd recommend 8,192MB (if you have 16GB total) so that you can spin up a couple of VM's within SmartOS too while playing with it.

  • If you have one of the newer computers with Intel VT-x extensions (such as new MacBook Pro's for example), you can enable pass-through and allow nested virtualization capabilities of the SmartOS system, allowing you to run KVM as well within SmartOS even though it is a VMware Virtual Machine running (virtualization within virtualization - reminds me of Inception :)).

  • You may now exit the Settings dialog.

7) Start the Virtual Machine by clicking the large Play button in the SmartOS VM Console Window.

8) Now, we'll go through SmartOS initial configuration

  • Once your SmartOS Virtual Machine starts up you'll see the GRUB (boot) menu.
    We want to boot into top (default) option (SmartOS) which will happen automatically within 5 seconds.

  • On the first boot (or any other time the system boots but is not actually configured) you'll be prompted with the initial setup wizard.

  • First part of the setup process is to set up an AdminNetwork Tag.
    The way SmartOS networking works is that you create a network tag which "lives" on a physical NIC (or LAG). Virtual machines are created on top of a network tag (so instead of assigning Physical NIC's to a VM, you'll be assigning Network Tags to a Virtual NIC). Interesting to know is that you can have multiple network tags pointing to same NIC. While this is weird at first, if you try to think of network tags as "labels" for specific networks (say admin, public, internal, external) - it should make a bit more sense. All of these "networks" will actually transfer data (usually) over a same physical NIC.

Setting up DHCP in our VMware environment is recommended, as VMware will give the SmartOS an IP address on the correct network automatically. In production, you'd most likely want to use a Static IP to keep a better track of things.

  • As for Default Gateway, just choose none at this point. In production, you'd probably use a .1 address of your admin network subnet.
    You can leave the DNS servers to default 8.8.8.8 and 8.8.4.4 as prompted.
    Default DNS Search domain would be your domain name. In this tutorial we'll just choose smartos.local
    NTP Server hostname can stay as provided, unless you have your own you wish to use.

  • In the following step of the Setup Wizard you'll need to choose the physical disk(s) to be used for holding SmartOS local file system. You do not want to choose the default config as it will overwrite the c0t0d0 device (which is really what you're booting this VMware image from). Type manual so that we can manually configure our zones ZFS pool. You will immediately drop into SmartOS Shell.

  • Let's create the pool manually on t1 device -> type: zpool create zones c0t1d0

  • Now let's exit the config and continue with the setup wizard -> type: exit

In other tutorials will explain more about how devices are named in SmartOS (as you can see they are different from Linux systems you may be used seeing), but for this particular tutorial we'll just go on.

  • Set the desired root password for this SmartOS node, as well the hostname (we call ours node01.smartos.local here).

  • The very last step is simple. It is a summary of all information we entered. Simply confirm it with y.

  • The setup scripts will begin, and within a couple of seconds you'll be prompted to reboot your system. It's really that fast as SmartOS is extremely tiny.

  • Reboot the system.

9) After the reboot, you'll be greeted with the SmartOS login screen.
Use the root username and the password we set in the previous step.

Congratulations! You've successfully installed a SmartOS hypervisor within a VMware VM running right on your laptop or desktop computer. This is a great first step to building a nice little dev sandbox where you can play and learn SmartOS.

Based On

Next Steps

I'll post more SmartOS tutorials here shortly, but in the meantime - if interested:

If you made it this far - THANK YOU ;)

Please do post your comments or questions. I'm here to help.

Tapping the collective brain
  1. What else would you like to see first?16 votes
    1. Deeper intro into SmartOS and what makes it better?
        6.25%
    2. Comparison between SmartOS, KVM, XEN, VMware and other hypervisors.
      31.25%
    3. A post about how to run Virtual Machines (Zones) on it.
      12.50%
    4. A post about how to run useful apps (like Nginx, Apache, MySQL DB) on a SmartOS System.
      43.75%
    5. No more, please. This is enough!
        6.25%

Founder @ vRocket.io

Comments

Sign In or Register to comment.