Skip to content

Instantly share code, notes, and snippets.

View bjornbouetsmith's full-sized avatar

Bjørn Smith bjornbouetsmith

View GitHub Profile
@bjornbouetsmith
bjornbouetsmith / start_ts3_docker.sh
Last active November 23, 2018 15:14
docker start command - devalx/docker-teamspeak3
#
#Assumes you have created a docker volume named ts3data
#docker volume create ts3data
docker run --name=ts3 --restart=unless-stopped -p 10011:10011/tcp -p 9987:9987/udp -p 30033:30033/tcp -e TS3SERVER_LICENSE=accept -v ts3data:/home/ts3/data -d devalx/docker-teamspeak3
@bjornbouetsmith
bjornbouetsmith / add_hba_passthrough.ps1
Last active March 9, 2024 14:33
Hyper-V PCIe Passthrough
#Find pci devices:
(Get-PnpDevice).Where{$_.Class -like '*SCSI*'}|Select-Object -Property FriendlyName,InstanceId
FriendlyName InstanceId
------------ ----------
Microsoft iSCSI Initiator ROOT\ISCSIPRT\0000
Microsoft Storage Spaces Controller ROOT\SPACEPORT\0000
Dell PERC H200 Adapter PCI\VEN_1000&DEV_0072&SUBSYS_1F1D1028&REV_03\4&866E9CF&0&0010
Dell 6Gbps SAS HBA PCI\VEN_1000&DEV_0072&SUBSYS_1F1C1028&REV_03\4&37CB7C8E&0&0018
@bjornbouetsmith
bjornbouetsmith / update_hdparm.sh
Last active November 23, 2018 18:00
Ubuntu update disk configuration via hdparm to disable power management to prevent sleep
#!/bin/sh
#Updates /etc/hdparm.conf to prevent spindown of disks
file=/etc/hdparm.conf
cmd=$1
add_disk()
{
echo "$1 {" >> $file
@bjornbouetsmith
bjornbouetsmith / vsphere-vcenter-ca-update.txt
Created November 29, 2018 12:50
Replace Certicate Auth on VSPHERE/VCENTER with own custom certificate
upload your CA certificate + key to the vcenter server
i.e.
scp ./yourca.crt root@vcenter.server.host:/
scp ./yourca.key root@vcenter.server.host:/
ssh to vcenter server
run /usr/lib/vmware-vmca/bin/certificate-manager
@bjornbouetsmith
bjornbouetsmith / install_guide.txt
Last active February 13, 2019 16:28
Ubuntu MAAS VVWare installation
IMPORTANT!!!!
Remember to set _ALL_ virtual machines to only boot from the network. As soon as the machine boots the first time and MAAS commissions it,
vmware will set the boot device to the first harddrive. You need to change this back to network boot, otherwise MAAS installations will
not work as expected.
Edit Virtual Machine, Goto VM Options, Expand Boot Options, put a check mark in "The next time the virtual machine boots, force entry into the BIOS setup screen."
Start the VM, and enter the BIOS Screen, goto Boot, and move the Local harddrive below the network devices.
Save and exit.
@bjornbouetsmith
bjornbouetsmith / juju_commands.txt
Created February 14, 2019 12:22
juju commands v. 2.5.0
actions List actions defined for an application.
add-cloud Adds a cloud definition to Juju.
add-credential Adds or replaces credentials for a cloud, stored locally on this client.
add-k8s Adds a k8s endpoint and credential to Juju.
add-machine Start a new, empty machine and optionally a container, or add a container to a machine.
add-model Adds a hosted model.
add-relation Add a relation between two application endpoints.
add-space Add a new network space.
add-ssh-key Adds a public SSH key to a model.
add-storage Adds unit storage dynamically.
@bjornbouetsmith
bjornbouetsmith / gist:2b211f1ee376b25e3a7c89a1286a5cd6
Last active February 14, 2019 20:56
vsphere openstack installation
add extra disk to all the machines that host ceph-osd then run
juju run-action ceph-osd/0 add-disk osd-devices=/dev/sdb
for each ceph-osd changing ceph-osd/0 to /1 /2 etc.
* Remember to add at least 4GB of ram to each machine, otherwise lxd and other services will fail to launch
@bjornbouetsmith
bjornbouetsmith / gist:b15c9e511816d448dd0e0747e3a408d8
Created February 22, 2019 19:56
Option 121 for DHCP static routes pfsense
Default gateway = 192.168.0.1
Route network 192.168.0.0/24 -> 192.168.0.1
Route network 192.168.1.0/24 -> 192.168.0.250
Convert to hex, separated with :
First part is netmask /24 = 18
18
@bjornbouetsmith
bjornbouetsmith / nuget.service
Created March 8, 2019 18:00
BaGet NuGet Server linux service file
[Unit]
Description=NuGet Server
After=network.target
[Service]
WorkingDirectory=/root/nuget
ExecStart=/usr/bin/dotnet /root/nuget/BaGet.dll
Restart=never
#on-failure
@bjornbouetsmith
bjornbouetsmith / gist:95220a43bd0929086d17a84be6368d69
Last active March 4, 2024 12:08
ESXI intel c602 SATA controller pass through
SSH to esxi host
Run lspci|grep Wells
Which should give two lines similar to:
0000:00:11.4 Mass storage controller: Intel Corporation Wellsburg AHCI Controller [vmhba0]
0000:00:1f.2 Mass storage controller: Intel Corporation Wellsburg AHCI Controller [vmhba1]
Run lspci -n|grep vmhba