Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
It’s kind of fun to do the impossible.

Yves Hoppe yvesh

🚀
It’s kind of fun to do the impossible.
View GitHub Profile
@yvesh
yvesh / mongo-docker-dump.sh
Created Apr 5, 2020
Docker MongoDB Backup script for cronjobs on Docker Host
View mongo-docker-dump.sh
#!/usr/bin/env bash
username=""
password=""
database=""
auth_database="admin"
target="/backup/mongo-$(date +%Y-%m-%d-%H).archive"
docker exec mongo_db_container sh -c 'exec mongodump --username $username --password $password --authenticationDatabase $auth_database -d $database --archive' > "$target"
@yvesh
yvesh / proxmox-zfs-encryption.md
Last active Apr 25, 2020
Proxmox 6.1 ZFS native full disk (ZFS root) encryption.
View proxmox-zfs-encryption.md

Simple guide for fulldisk encryption with Proxmox and ZFS native encryption

Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).

If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.

Steps:

@yvesh
yvesh / gatsby.yml
Created Feb 22, 2020
[GitHub Action] Publish Gatsby website to an Linux SFTP (scp) server on PUSH
View gatsby.yml
name: Publish a gatsby project with SFTP
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build project
run: |
@yvesh
yvesh / proxmox-mac-os-gpu-passthrough.conf
Last active Dec 27, 2019
Proxmox 6.1 QEMU / KVM Mac OS Mojave Config with GPU Passthrough, uses ESP from macOS-Simple-KVM and patched pve-edk2-firmware
View proxmox-mac-os-gpu-passthrough.conf
args: -device isa-applesmc,osk="INSERT_KEY_HERE" -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2
balloon: 0
bios: ovmf
bootdisk: sata0
cores: 16
hostpci0: 42:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
memory: 32000
name: macOS
@yvesh
yvesh / gist:64ec1f64e3c7c26497282b776348f662
Created Dec 19, 2019
Proxmox LXC Arch Linux Container with passed through GPU, KVM, sound, keyboard etc. (Xorg with amdgpu working), Looking Glass Host - Linux Main OS in a container
View gist:64ec1f64e3c7c26497282b776348f662
arch: amd64
cores: 24
features: fuse=1,mount=nfs;cifs,nesting=1
hostname: archxorg
memory: 64000
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=XX:XX:XX:XX:XX.XX,ip=dhcp,type=veth
ostype: archlinux
rootfs: local-zfs:subvol-100-disk-0,size=500G
swap: 512
lxc.autodev: 1
@yvesh
yvesh / pxe-101.conf
Created Dec 19, 2019
Proxmox QEMU KVM Windows 10 Configuration with GPU PCI-Passthrough and looking-glass support. Binds non-tls spice port to 5930
View pxe-101.conf
agent: 1
args: -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M -device virtio-mouse-pci -device virtio-keyboard-pci -spice addr=0.0.0.0,port=5930,disable-ticketing
audio0: device=AC97,driver=spice
bios: ovmf
bootdisk: sata0
cores: 16
cpu: host,flags=+ibpb;+virt-ssbd
hostpci0: 42:00,pcie=1,x-vga=1
ide2: none,media=cdrom
machine: q35
@yvesh
yvesh / mac-os-mojave-gpu-pci-pass-through.xml
Last active Dec 27, 2019
MacOS 10.14 Mojave Hackintosh - libvirt / Qemu / KVM AMD ThreadRipper with GPU pass-through
View mac-os-mojave-gpu-pci-pass-through.xml
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>mac-os-mojave-gpu-pci-pass-through</name>
<uuid>b1899693-3cc4-4aa1-a891-5c4fe1f72cca</uuid>
<memory unit='KiB'>32817152</memory>
<currentMemory unit='KiB'>32817152</currentMemory>
<vcpu placement='static'>32</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-4.0.1'>hvm</type>
<loader readonly='yes' type='pflash'>/mnt/qemu/macos/firmware/OVMF_CODE.fd</loader>
<nvram>/mnt/qemu/macos/firmware/OVMF_VARS-1024x768.fd</nvram>
@yvesh
yvesh / win10-libvirt.xml
Created Apr 7, 2019
libvirt KVM AMD ThreadRipper GPU passthrough - CPU pinning, isolcpus, numactl and L3 cache
View win10-libvirt.xml
<domain type='kvm'>
<name>win10</name>
<uuid>8ba118e4-018b-46b9-b9b0-53a2567769fb</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
@yvesh
yvesh / win10-q35.xml
Created Apr 6, 2019
KVM / QEMU ThreadRipper 2970WX - Windows 10 with 8 Core (4 + 2), Q35, RX 580 passhtrough, cpu pinning, L3 cache, numatune, host-model
View win10-q35.xml
<domain type='kvm' id='3'>
<name>win10</name>
<uuid>8ba118e4-018b-46b9-b9b0-53a2567769fb</uuid>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<vcpu placement='static' cpuset='6-9,30-34'>8</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='6'/>
<vcpupin vcpu='1' cpuset='30'/>
<vcpupin vcpu='2' cpuset='7'/>
@yvesh
yvesh / win10.xml
Created Apr 6, 2019
KVM / QEMU ThreadRipper 2970WX - Windows 10 with 8 Core (4 + 2 Threads), pc-i440fx, RX 580 passhtrough, cpu pinning, L3 cache, numatune, host-model
View win10.xml
<domain type='kvm' id='10'>
<name>win10-3</name>
<uuid>c2e12168-4bb9-4953-95b3-a1cbc1b24be1</uuid>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<vcpu placement='static' cpuset='0-3,24-27'>8</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='24'/>
<vcpupin vcpu='2' cpuset='1'/>
You can’t perform that action at this time.