-
Initialize the Development Environment
SSH into the sbnb Linux machine and start the development environment by executing:
sbnb-dev-env.sh
-
Prepare the Cloud-init Configuration
Create a
user-data
file for cloud-init. Replacetskey-auth-KEY
with your actual Tailscale key.cat > user-data << EOF #cloud-config runcmd: - ['sh', '-c', 'curl -fsSL https://tailscale.com/install.sh | sh'] - ['tailscale', 'up', '--ssh', '--auth-key=tskey-auth-KEY'] EOF
Next, create an empty
meta-data
file:touch meta-data
-
Generate a Configuration ISO
Use the following command to create a
seed.iso
file that will serve as the VM's configuration source:genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
-
Download and Prepare the Ubuntu VM Image
Download the Ubuntu 24.04 cloud image and create a working copy for the VM instance:
wget "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img" cp noble-server-cloudimg-amd64.img vm-instance.img
-
Launch the Virtual Machine
Start the VM using the downloaded image and generated ISO:
qemu-system-x86_64 \ -accel kvm \ -hda vm-instance.img \ -cdrom seed.iso \ -nographic \ -m 4G \ -smp 2 -cpu host
You can adjust the memory (
-m
) and vCPU count (-smp
) to suit your needs. -
Verify VM in Tailscale
Once the VM boots, it should appear as a new machine in your Tailscale device list. You can then SSH into it directly.