Skip to content

Instantly share code, notes, and snippets.

@sax
Last active February 23, 2016 20:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sax/9544100 to your computer and use it in GitHub Desktop.
Smartos / Vagrant
  1. Install Vagrant

  2. Install SmartOS guest detection

vagrant plugin install vagrant-smartos-guest
  1. Install zones support
vagrant plugin install vagrant-smartos-zones
  1. Get a Vagrantfile
cd ...someplace
curl -k https://raw.github.com/sax/vagrant-smartos-packager/master/Vagrantfile -O
  1. Spin up some zones!
vagrant up
vagrant ssh        # get into global zone
vagrant zones list
vagrant zones show [name]
vagrant zlogin [name]
@bixu
Copy link

bixu commented Mar 14, 2014

$ vagrant plugin install vagrant-smartos-guest
Installing the 'vagrant-smartos-guest' plugin. This can take a few minutes...
The plugin 'vagrant-smartos-guest' could not be found in local or remote
repositories. Please check the name of the plugin and try again.

looking into this further...

@bixu
Copy link

bixu commented Mar 14, 2014

Looks like Vagrant 1.5.1 is required.

@bixu
Copy link

bixu commented Mar 14, 2014

Also looks like we need to find a way to bundle the boot media in the box:

00:00:03.228244 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0023
00:00:03.228890 Guest Log: BIOS: CDROM boot failure code : 0003
00:00:03.229065 Guest Log: BIOS: Boot from CD-ROM failed
00:00:03.229273 Guest Log: BIOS: Boot : bseqnr=2, bootseq=0002
00:00:03.229583 Guest Log: BIOS: Boot from Hard Disk 0 failed
00:00:03.230337 Guest Log: No bootable medium found! System halted.

@bixu
Copy link

bixu commented Mar 14, 2014

After adding an ISO manually to the VM and then plugging/unplugging some Thunderbolt Ethernet, I got a panic! :D

I'm not too concerned (might be a VirtualBox bug), but I think this points to needing a lot of hands-on testers. Looking very promising otherwise.

Anonymous UUID:       FB99E975-68E6-1753-6FD4-5B178442BBE5

Fri Mar 14 17:51:13 2014
panic(cpu 0 caller 0xffffff80167ec352): assertion failed: igi->igi_version == IGMP_VERSION_3, file: /SourceCache/xnu/xnu-2422.90.20/bsd/netinet/igmp.c, line: 3720
Backtrace (CPU 0), Frame : Return Address
0xffffff8022dabdb0 : 0xffffff8016422fa9 
0xffffff8022dabe30 : 0xffffff80167ec352 
0xffffff8022dabe40 : 0xffffff80166a059a 
0xffffff8022dabf20 : 0xffffff801644a23a 
0xffffff8022dabfb0 : 0xffffff80164d6ff7 

BSD process name corresponding to current thread: kernel_task
Boot args: net.inet.ip.scopedroute=0

Mac OS version:
13C64

Kernel version:
Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64
Kernel UUID: 9FEA8EDC-B629-3ED2-A1A3-6521A1885953
Kernel slide:     0x0000000016200000
Kernel text base: 0xffffff8016400000
System model name: MacBookAir6,1 (Mac-35C1E88140C3E6CF)

System uptime in nanoseconds: 762189688972426
last loaded kext at 762038755628151: com.apple.iokit.AppleBCM5701Ethernet   3.8.1b2 (addr 0xffffff7f98606000, size 233472)
last unloaded kext at 754716067433689: com.apple.driver.AppleIntelMCEReporter   104 (addr 0xffffff7f985fa000, size 32768)
loaded kexts:
org.virtualbox.kext.VBoxNetAdp  4.3.6
org.virtualbox.kext.VBoxNetFlt  4.3.6
org.virtualbox.kext.VBoxUSB 4.3.6
org.virtualbox.kext.VBoxDrv 4.3.6
com.apple.iokit.AppleBCM5701Ethernet    3.8.1b2
com.apple.driver.AppleMikeyHIDDriver    124
com.apple.driver.AppleUSBEthernet   2.4.6
com.apple.filesystems.smbfs 2.0.1
com.apple.filesystems.afpfs 11.1
com.apple.nke.asp-tcp   8.0.1
com.apple.nke.l2tp  1.9
com.apple.iokit.IOBluetoothSerialManager    4.2.3f10
com.apple.filesystems.autofs    3.0
com.apple.driver.AudioAUUC  1.60
com.apple.driver.AppleUpstreamUserClient    3.5.13
com.apple.driver.ApplePlatformEnabler   2.0.9d1
com.apple.driver.AGPM   100.14.15
com.apple.driver.X86PlatformShim    1.0.0
com.apple.iokit.IOUserEthernet  1.0.0d1
com.apple.Dont_Steal_Mac_OS_X   7.0.0
com.apple.driver.AppleHWAccess  1
com.apple.driver.AppleHDA   2.6.0f1
com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport 4.2.3f10
com.apple.driver.AppleLPC   1.7.0
com.apple.driver.AppleCameraInterface   4.26.0
com.apple.driver.AppleThunderboltIP 1.1.2
com.apple.driver.AppleSMCLMU    2.0.4d1
com.apple.driver.AppleBacklight 170.3.5
com.apple.driver.AppleMCCSControl   1.1.12
com.apple.driver.AppleIntelHD5000Graphics   8.2.4
com.apple.driver.AppleIntelFramebufferAzul  8.2.4
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 35
com.apple.driver.AppleUSBHub    666.4.0
com.apple.driver.AppleTopCaseHIDEventDriver 10.21
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCIBlockStorage  2.5.1
com.apple.driver.AppleAHCIPort  3.0.0
com.apple.driver.AirPort.Brcm4360   831.21.63
com.apple.driver.AppleUSBXHCI   670.4.0
com.apple.driver.AppleSmartBatteryManager   161.0.0
com.apple.driver.AppleRTC   2.0
com.apple.driver.AppleACPIButtons   2.0
com.apple.driver.AppleHPET  1.8
com.apple.driver.AppleSMBIOS    2.1
com.apple.driver.AppleACPIEC    2.0
com.apple.driver.AppleAPIC  1.7
com.apple.nke.applicationfirewall   153
com.apple.security.quarantine   3
com.apple.iokit.IOEthernetAVBController 1.0.3b4
com.apple.driver.AppleThunderboltPCIUpAdapter   1.4.5
com.apple.security.SecureRemotePassword 1.0
com.apple.nke.ppp   1.9
com.apple.iokit.IOSerialFamily  10.0.7
com.apple.kext.triggers 1.0
com.apple.iokit.IOSCSIArchitectureModelFamily   3.6.6
com.apple.iokit.IOBluetoothFamily   4.2.3f10
com.apple.driver.DspFuncLib 2.6.0f1
com.apple.vecLib.kext   1.0.0
com.apple.iokit.IOAudioFamily   1.9.5fc2
com.apple.kext.OSvKernDSPLib    1.14
com.apple.iokit.IOBluetoothHostControllerUSBTransport   4.2.3f10
com.apple.driver.X86PlatformPlugin  1.0.0
com.apple.driver.IOPlatformPluginFamily 5.7.0d10
com.apple.driver.AppleSMC   3.1.8
com.apple.driver.AppleHDAController 2.6.0f1
com.apple.iokit.IOHDAFamily 2.6.0f1
com.apple.driver.AppleBacklightExpert   1.0.4
com.apple.driver.AppleSMBusController   1.0.11d1
com.apple.iokit.IOSurface   91
com.apple.iokit.IONDRVSupport   2.4.1
com.apple.AppleGraphicsDeviceControl    3.4.35
com.apple.iokit.IOAcceleratorFamily2    98.14
com.apple.iokit.IOGraphicsFamily    2.4.1
com.apple.driver.AppleUSBMergeNub   650.4.0
com.apple.driver.AppleUSBComposite  656.4.1
com.apple.driver.AppleThunderboltDPInAdapter    3.1.7
com.apple.driver.AppleThunderboltDPAdapterFamily    3.1.7
com.apple.driver.AppleThunderboltPCIDownAdapter 1.4.5
com.apple.driver.CoreStorage    380
com.apple.iokit.IOUSBUserClient 660.4.2
com.apple.driver.AppleHIDKeyboard   170.15
com.apple.driver.AppleHSSPIHIDDriver    24
com.apple.driver.AppleMultitouchDriver  245.13
com.apple.iokit.IOAHCIFamily    2.6.5
com.apple.driver.AppleThunderboltNHI    2.0.1
com.apple.iokit.IOThunderboltFamily 3.2.7
com.apple.iokit.IO80211Family   630.35
com.apple.driver.mDNSOffloadUserClient  1.0.1b5
com.apple.iokit.IONetworkingFamily  3.2
com.apple.driver.AppleHSSPISupport  24
com.apple.driver.AppleIntelLpssSpiController    2.0.34
com.apple.driver.AppleIntelLpssGspi 2.0.34
com.apple.driver.AppleIntelLpssDmac 2.0.34
com.apple.iokit.IOUSBFamily 675.4.0
com.apple.driver.AppleEFINVRAM  2.0
com.apple.driver.AppleEFIRuntime    2.0
com.apple.iokit.IOHIDFamily 2.0.0
com.apple.iokit.IOSMBusFamily   1.1
com.apple.security.sandbox  278.11
com.apple.kext.AppleMatch   1.0.0d1
com.apple.security.TMSafetyNet  7
com.apple.driver.AppleKeyStore  2
com.apple.driver.DiskImages 371.1
com.apple.iokit.IOStorageFamily 1.9
com.apple.iokit.IOReportFamily  23
com.apple.driver.AppleFDEKeyStore   28.30
com.apple.driver.AppleACPIPlatform  2.0
com.apple.iokit.IOPCIFamily 2.9
com.apple.iokit.IOACPIFamily    1.4
com.apple.kec.pthread   1
com.apple.kec.corecrypto    1.0
Model: MacBookAir6,1, BootROM MBA61.0099.B07, 2 processors, Intel Core i7, 1.7 GHz, 8 GB, SMC 2.12f135
Graphics: Intel HD Graphics 5000, Intel HD Graphics 5000, Built-In, 1024 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x483943434E4E4E384A544D4C41522D4E544D
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x483943434E4E4E384A544D4C41522D4E544D
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (6.30.223.154.63)
Bluetooth: Version 4.2.3f10 13477, 3 services, 15 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD TS0256F, 251 GB
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 23.6

@sax
Copy link
Author

sax commented Mar 15, 2014

Yeah... I was worried about that. The global zone box itself (without any image installed) is 3MB. Waaaaay too good to be true.

I'll look at my box creation scripts and see if I can get the ISO into the box.

@sax
Copy link
Author

sax commented Mar 15, 2014

I think I can pull in this some stuff from https://github.com/groundwater/vagrant-smartos/blob/master/aszeszo/prepare-smartos-box.sh to include the boot media.

@wolstena
Copy link

wolstena commented May 7, 2014

I'm getting a connection timeout. I've seen this reported elsewhere where it has been associated with Virtualization
Technology being disabled in the bios. I've checked. It is enabled on my box with a Xeon W3530.

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'livinginthepast/smartos-base64-13.4.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment