0%

pve

pve_source

1
wget -q -O /root/pve_source.tar.gz 'https://bbs.x86pi.cn/file/topic/2024-01-06/file/24f723efc6ab4913b1f99c97a1d1a472b2.gz' && tar zxvf /root/pve_source.tar.gz && /root/./pve_source

创建 ipv4 虚拟机

1
2
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extra_ip.sh -o buildvm_extra_ip.sh && chmod +x buildvm_extra_ip.sh
./buildvm_extra_ip.sh 100 root 123456 2 4096 20 debian12 local N

创建 nat 虚拟机

1
2
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh
./buildvm.sh 100 root 123456 1 1024 10 50022 50080 50443 50500 50900 debian12 local Y

创建 windows 虚拟机

1
2
chmod +x buildvm_windows_server_2022.sh
./buildvm_windows_server_2022.sh 100

删除虚拟机

1
2
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh
./pve_delete.sh 100

硬盘直通

1
2
ls /dev/disk/by-id/
qm set 100 --scsi1 /dev/disk/by-id/ata-ST1000DM010-2EP102_W9AHV3Q3

qemu-guest-agent

1
2
3
apt install qemu-guest-agent -y
systemctl enable qemu-guest-agent
systemctl start qemu-guest-agent