From 397487c729f1ee6dc0c2421ed42425158fcd7b9f Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Fri, 4 Aug 2023 03:22:36 +0000 Subject: [PATCH] update --- scripts/buildct.sh | 2 +- scripts/buildct_onlyv6.sh | 4 ++-- scripts/buildvm.sh | 4 ++-- scripts/buildvm_extraip.sh | 6 +++--- scripts/buildvm_manual_ip.sh | 6 +++--- scripts/buildvm_onlyv6.sh | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/buildct.sh b/scripts/buildct.sh index 744df03..bcf774c 100644 --- a/scripts/buildct.sh +++ b/scripts/buildct.sh @@ -231,7 +231,7 @@ pct set $CTID --net0 name=eth0,ip=${user_ip}/24,bridge=vmbr1,gw=172.16.1.1 # else # : # fi -pct set $CTID --nameserver 8.8.8.8 --nameserver 8.8.4.4 +pct set $CTID --nameserver 8.8.8.8,2001:4860:4860::8888 --nameserver 8.8.4.4,2001:4860:4860::8844 sleep 3 if echo "$system" | grep -qiE "centos|almalinux|rockylinux"; then pct exec $CTID -- yum update -y diff --git a/scripts/buildct_onlyv6.sh b/scripts/buildct_onlyv6.sh index 1b4e8ce..8105135 100644 --- a/scripts/buildct_onlyv6.sh +++ b/scripts/buildct_onlyv6.sh @@ -205,8 +205,8 @@ else fi pct start $CTID pct set $CTID --hostname $CTID -pct set $CTID --net1 name=eth0,ip=${ipv6_address}/${ipv6_prefixlen},bridge=vmbr0,gw=${ipv6_gateway} -pct set $CTID --nameserver 8.8.8.8 --nameserver 8.8.4.4 +pct set $CTID --net0 name=eth0,ip6=${ipv6_address}/${ipv6_prefixlen},bridge=vmbr0,gw6=${ipv6_gateway} +pct set $CTID --nameserver 8.8.8.8,2001:4860:4860::8888 --nameserver 8.8.4.4,2001:4860:4860::8844 sleep 3 if echo "$system" | grep -qiE "centos|almalinux|rockylinux" >/dev/null 2>&1; then pct exec $CTID -- yum update -y diff --git a/scripts/buildvm.sh b/scripts/buildvm.sh index 288f208..bba50fc 100644 --- a/scripts/buildvm.sh +++ b/scripts/buildvm.sh @@ -244,8 +244,8 @@ qm set $vm_num --boot order=scsi0 qm set $vm_num --memory $memory # --swap 256 qm set $vm_num --ide2 ${storage}:cloudinit -qm set $vm_num --nameserver 8.8.8.8 -qm set $vm_num --searchdomain 8.8.4.4 +qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888 +qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844 user_ip="172.16.1.${num}" qm set $vm_num --ipconfig0 ip=${user_ip}/24,gw=172.16.1.1 # if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ] || [ "$ipv6_prefixlen" -gt 112 ]; then diff --git a/scripts/buildvm_extraip.sh b/scripts/buildvm_extraip.sh index f26087b..fd30103 100644 --- a/scripts/buildvm_extraip.sh +++ b/scripts/buildvm_extraip.sh @@ -289,12 +289,12 @@ qm set $vm_num --boot order=scsi0 qm set $vm_num --memory $memory # --swap 256 qm set $vm_num --ide2 ${storage}:cloudinit -qm set $vm_num --nameserver 8.8.8.8 -qm set $vm_num --searchdomain 8.8.4.4 +qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888 +qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844 if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ] || [ "$ipv6_prefixlen" -gt 112 ]; then qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway} else - qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway} --ipconfig1 ip=${ipv6_address}/${ipv6_prefixlen},gw=${ipv6_gateway} + qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway},ip6=${ipv6_address}/${ipv6_prefixlen},gw6=${ipv6_gateway} fi qm set $vm_num --cipassword $password --ciuser $user sleep 5 diff --git a/scripts/buildvm_manual_ip.sh b/scripts/buildvm_manual_ip.sh index 03b1644..7d90a53 100644 --- a/scripts/buildvm_manual_ip.sh +++ b/scripts/buildvm_manual_ip.sh @@ -294,12 +294,12 @@ qm set $vm_num --boot order=scsi0 qm set $vm_num --memory $memory # --swap 256 qm set $vm_num --ide2 ${storage}:cloudinit -qm set $vm_num --nameserver 8.8.8.8 -qm set $vm_num --searchdomain 8.8.4.4 +qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888 +qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844 if [ -z "$ipv6_address" ] || [ -z "$ipv6_prefixlen" ] || [ -z "$ipv6_gateway" ] || [ "$ipv6_prefixlen" -gt 112 ]; then qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway} else - qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway} --ipconfig1 ip=${ipv6_address}/${ipv6_prefixlen},gw=${ipv6_gateway} + qm set $vm_num --ipconfig0 ip=${user_ip}/${user_ip_range},gw=${gateway},ip6=${ipv6_address}/${ipv6_prefixlen},gw6=${ipv6_gateway} fi qm set $vm_num --cipassword $password --ciuser $user sleep 5 diff --git a/scripts/buildvm_onlyv6.sh b/scripts/buildvm_onlyv6.sh index 726591d..7b0aa7b 100644 --- a/scripts/buildvm_onlyv6.sh +++ b/scripts/buildvm_onlyv6.sh @@ -224,9 +224,9 @@ qm set $vm_num --boot order=scsi0 qm set $vm_num --memory $memory # --swap 256 qm set $vm_num --ide2 ${storage}:cloudinit -qm set $vm_num --nameserver 8.8.8.8 -qm set $vm_num --searchdomain 8.8.4.4 -qm set $vm_num --ipconfig1 ip=${ipv6_address}/${ipv6_prefixlen},gw=${ipv6_gateway} +qm set $vm_num --nameserver 8.8.8.8,2001:4860:4860::8888 +qm set $vm_num --searchdomain 8.8.4.4,2001:4860:4860::8844 +qm set $vm_num --ipconfig0 ip6=${ipv6_address}/${ipv6_prefixlen},gw6=${ipv6_gateway} qm set $vm_num --cipassword $password --ciuser $user sleep 5 qm resize $vm_num scsi0 ${disk}G