Fish Touching🐟🎣

PVE

Jul 29, 2023

# Force Quit Vm

rm /var/lock/qemu-server/lock-1001.conf
qm unlock 1001
# then stop the vm

# perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

cat << EOF >> ~/.bashrc
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
EOF

# Power Consomption

# 下载编译
sudo apt install git
sudo apt install libpci-dev cmake gcc g++
git clone https://github.com/FlyGoat/RyzenAdj
cd RyzenAdj
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

# 查询功耗
sudo ./ryzenadj -i

# Cloud Init

# On host
# sudo apt update -y && sudo apt install libguestfs-tools -y
virt-customize -a debian-11-genericcloud-amd64.qcow2 --install qemu-guest-agent

# virt-customize -a debian-11-genericcloud-amd64.qcow2 --install qemu-guest-agent --append-line '/etc/apt/apt.conf.d/proxy:Acquire::http::Proxy "http://192.168.2.22:3142";'
qm create 1001 --name "debian-template" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
qm importdisk 1001 debian-11-genericcloud-amd64.qcow2 local-btrfs
qm set 1001 --scsihw virtio-scsi-single --scsi0 local-btrfs:vm-1001-disk-0
qm set 1001 --ide2 local-btrfs:cloudinit
qm set 1001 --boot c --bootdisk scsi0
qm set 1001 --serial0 socket --vga serial0
qm template 1001

# LXC

# pct resize <vmid> <disk> <size> [OPTIONS]
pct resize 1002 rootfs 108G

# QEMU

# qm resize <vmid> <disk> <size>
qm resize 1001 virtio0 +25G

# NFS

# Cache