Use cloud-init to configure cloud-images i.e. add SSH keys, set network settings, create users, install various packages
Cloud images are certified to run in public cloud services and as well Proxmox.
# SSH into Proxmox server
proxmox@proxmox:~#
Add the following to ~/.bashrc file: | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
#!/usr/bin/env bash | |
# ssh-multi : a script to ssh multiple servers over multiple tmux panes | |
# nomad-fr : https://github.com/nomad-fr/scripts-systems | |
# Based on D.Kovalov work : https://gist.github.com/dmytro/3984680 | |
# config | |
#user=$USER # user use for ssh connection | |
user=root | |
tmux_session_name="multi-ssh" |
# Install needed utilities | |
root@pve3:~# apt update; apt install xz-utils | |
# Download and unpack image | |
root@pve3:~# mkdir /var/lib/vz/template/qcow; cd /var/lib/vz/template/qcow; wget https://github.com/home-assistant/operating-system/releases/download/9.5/haos_ova-9.5.qcow2.xz -nH --cut-dirs=6 -r -P ./; unxz haos_ova-9.5.qcow2.xz | |
# Create VM in proxmox | |
root@pve3:~# qm create 200 --name home-assistant --memory 2048 --cores 2 --machine q35 --net0 virtio,bridge=vmbr0 --bios ovmf --efidisk0 local-lvm:0,pre-enrolled-keys=1,efitype=4m --boot order=scsi0 --scsihw virtio-scsi-pci --scsi0 local-lvm:0,import-from=/var/lib/vz/template/qcow/haos_ova-9.5.qcow2 | |
# Todo |