Skip to content

Instantly share code, notes, and snippets.

View mgerdts's full-sized avatar

Mike Gerdts mgerdts

View GitHub Profile
@mgerdts
mgerdts / no-666.patch
Last active December 31, 2017 05:10
OS-XXX sdev plugin should not force number of the beast
commit efd2c605947a09c8c641ec66ec327082fa62f239
Author: Mike Gerdts <[email protected]>
Date: Sat Dec 30 05:18:57 2017 +0000
OS-XXX sdev plugin should not force number of the beast
diff --git a/usr/src/uts/common/fs/dev/sdev_plugin.c b/usr/src/uts/common/fs/dev/sdev_plugin.c
index dd81a52..58f7256 100644
--- a/usr/src/uts/common/fs/dev/sdev_plugin.c
+++ b/usr/src/uts/common/fs/dev/sdev_plugin.c
@mgerdts
mgerdts / b2.md
Created January 6, 2018 18:22
bhyve tantalizer
[root@emy-17 ~]# zoneadm -z b2 halt
[root@emy-17 ~]# zonecfg -z b2 info brand
brand: bhyve
[root@emy-17 ~]# uname -a
SunOS emy-17 5.11 joyent_20171230T062027Z i86pc i386 i86pc
[root@emy-17 ~]# zoneadm -z b2 boot; zlogin -C b2

Then grub appears

@mgerdts
mgerdts / zonecfg.md
Created January 23, 2018 23:50
bhyve zone config
create -b
set zonepath=/zones/b2
set brand=bhyve
set autoboot=false
set limitpriv=default
set ip-type=exclusive
set uuid=fc0fbfdb-dbf6-c26d-9a5e-b20099b5ecf7
add net
set allowed-address=172.26.17.202
@mgerdts
mgerdts / README.md
Last active September 17, 2024 13:05
bhyve on SmartOS

Introduction

The following options that aren't in the kvm brand should work:

  • com1, com2
    • Can be set to tty-like devices or socket,/some/path.
    • If both are unset, com1 defaults to /dev/zconsole and com2 defaults to /tmp/vm.ttyb.
  • bootrom
    • Should be set to /usr/share/bhyve/BHYVE_UEFI.fd or /usr/share/bhyve/BHYVE_UEFI_CSM.fd
  • Defaults to /usr/share/bhyve/BHYVE_UEFI_CSM.fd
@mgerdts
mgerdts / README.md
Created January 25, 2018 19:35
nvlist from xml
@mgerdts
mgerdts / README.md
Last active February 2, 2018 17:53
cloud-init 1746605 DataSourceSmartOS needs locking and retries

Pass

A successful run generates a bit of noise due to killing the child process. I'm not sure, what, if anything to do about that.

test_all_keys (tests.unittests.test_datasource.test_smartos.TestSerialConcurrency) ... Cloud-init 17.2 received SIGTERM, exiting...
  Filename: /usr/lib64/python2.7/subprocess.py
  Function: _eintr_retry_call
  Line number: 478
    Filename: /usr/lib64/python2.7/subprocess.py
@mgerdts
mgerdts / reopen.patch
Created February 7, 2018 12:33
cloud-init retry serial open
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py
index 32655131..b1676f92 100644
--- a/cloudinit/sources/DataSourceSmartOS.py
+++ b/cloudinit/sources/DataSourceSmartOS.py
@@ -28,6 +29,7 @@ import os
import random
import re
import socket
+import time
@mgerdts
mgerdts / README.md
Last active February 22, 2018 05:18
false sharing

Baseline

  • Non-debug
  • dev-bhyve branch with this as last commit:
    commit dc994c4720f1b6cbd88011c5de076e580a8deeab
    Author: Mike Gerdts <[email protected]>
    Date:   Thu Feb 15 21:40:29 2018 +0000
    
        OS-6558 cleanup to match master push
    
@mgerdts
mgerdts / README.md
Created March 7, 2018 22:19
In process brand hooks
@mgerdts
mgerdts / plan.md
Last active August 27, 2018 18:51
bhyve ring buffer

Current implementation

The current vmm trace ring buffer implementation is in vmm_sol_dev.c. There is one global ring buffer with a maximum size of 1 MB. Each message in the ring buffer is 280 bytes, allowing 3744 messages in the buffer.

> ::sizeof vmm_trace_dmsg_t |=D
                280
> ::print -t vmm_trace_dmsg_t
vmm_trace_dmsg_t {
 timespec_t timestamp {