Skip to content

Instantly share code, notes, and snippets.

View scyto's full-sized avatar

scyto

  • Seattle, WA, USA
  • 20:25 (UTC -07:00)
View GitHub Profile
@scyto
scyto / 001-README.md
Created August 20, 2023 21:33 — forked from shbatm/001-README.md
Home Assistant USBIP Z-Wave Setup w/ More Robust Restart Management
@scyto
scyto / hyperv-migration-win.md
Last active September 24, 2024 10:01
Migrating Windows Gen2 VMs from Hyper-V

How To migrate Gen2 Windows VM from Hyper-V

This assumes you have Windows Server 2022 Gen2 VM running on hyper-v that uses gen2 with UEFI and Secure Boot - it should work for win11 but i haven't tested that. This has only tested with a vanilla windows server 2022 VM so far (three times to write guide). I will comment this gist when i manage to move one of my domain controllers.

I suggest creating a fresh test windows VM and use this procedure on that test VM long before you try this on a production VM. And repeat after me 'i will backup all VMs with snapshots AND will backup with backup application before i do this`... ok...

this gist is part of this series

VM preparation

Configuring CephFS to store ISOs for VMs and Templates for Containers

This gist assume you have setup Ceph as per earlier gist in this sequence

I found it annoying to upload ISO to each node in the cluster, download CT templates to each node.
I thought setting up cedph for these would be a great idea (and it is).

this gist is part of this series

create cephfs pools

  1. In the gui navigate to Datcenter > node name > ceph

Enable & Using vGPU Passthrough

This gist is almost entirely not unlike Derek Seaman's awesome blog:

Proxmox VE 8: Windows 11 vGPU (VT-d) Passthrough with Intel Alder Lake

As such please refer to that for pictures, here i will capture the command lines I used as i sequence the commands a little differently so it makes more logic to me.

This gists assumes you are not running ZFS and are not passing any other PCIE devices (as both of these can require addtional steps - see Derek's blog for more info)

This gist assumes you are not running proxmox in UEFI Secure boot - if you are please refer entirely to dereks blog.

Setup HTTPS Certs with ACME

I use Cloudflare as my external DNS provider and will be using this for my challenge, if you don't use cloudlfare adjust accordingly.

this gist is part of this series

Create Account

  1. navigate to Datcenter > ACME
  2. under accounts click add
  3. the account name is anything useful to you - i recommend using something like <mydomain>-<tld>-acme where mydomain is your DNS domain prefix and tld is the suffice (like com or net etc) so mydomain-com-acme
  4. enter your email
@scyto
scyto / proxmox-backup.md
Last active May 12, 2025 23:34
setup promox backup server and synology as data store over SMB

Proxmox Backup

At this time proxmox backup only backs up VM and Containers - ths guide covers that.

What i didn't realize is the backup job is still defined on the cluster and PBS provides a new storage type that dedupes and managed all the vzdump files created - which is cool.

I decided to run proxmox backup on my Synology NAS where it has more reliable connection to the NAS (i.e. via memory) for doing deduple, garbage collection, prune, verification etc. However the steps here generally remain true.

Once again i used one of Derek Seaman's Awesome Blogs for the basis of this - but with my own tweaks (like using SMB instead of CIFS. As of 9/21 my tweaks are signifcnant, in the original blog it is missing steps to enable encoding acceleration in CTs and VMs.

this gist is part of this series

Azure Active Directory (AAD) Auth

This gist assumes a working Azure AD (not Azure AD-DS is already up and fully configured) This gist assumes working DNS / name resolution on your internal network.

this gist is part of this series

Create App Registrations

All of these steps will be done in the Azure Portal AAD UI

  1. Select App Registration from the nav bar

Postfix M365 (Office 365) relay as LXC

The purposes of this gist:

  1. setup an smtp smarthost/relay that can send mail to Exchange Online 365 Office Outlook M365 (they keep renaming it)
  2. setup postfix each proxmox host and backup server to use this relay
  3. require the relay does authentications from devices like pve and pbs - having an open SMTP relay inside the network is not something i can bring myself to do
  4. And incidentally document the istall of a HA LXC based on debian

Also i am aware i probably over engineered this - after i had done this i realized postfix as shipped in PVE and PBS was attmepting to contact a variety of servers in my network based on DNS - i still haven't figured the logic out for that.... maybe all i needed was a relay and an MX record (and no config on PVE and PBS?)

TODO

Don't be like scyto

Don't do all the restoring crap below

Only reason vhdx import wouldn't work is becuause i mis-documented the command as qm import.. when it is qm disk import

I could easily have imported the vhdx all along.... learn my lesson padawan

original gist content

Random Notes (stream of real-time conciousness) on Migrating Windows Server Core 2019 based AD domain controler

tl;dr it worked - but due to an issue with the disk I had to use the synology bare metal restore into the VM and then use the disk shuffle approach i outlined in the parent gist to this one

@scyto
scyto / proxmox-migrating-dc1.md
Last active September 22, 2023 23:18
Notes on Migrating DC1

Don't be like scyto

Don't do all the backup and restoring crap below

Only reason vhdx import wouldn't work is becuause i mis-documented the command as qm import.. when it is qm disk import

I could easily have imported the vhdx all along.... learn my lesson padawan

original gist content

Migrating Domain Controller 1 from Hyper-V to Proxmox by using Synology Backup

Why? Well it turns out long lived VHDX's often error on import with qm and never import.