diff --git a/404.html b/404.html index 7521bcd946..ad58973b14 100644 --- a/404.html +++ b/404.html @@ -9,7 +9,7 @@ - + @@ -20,7 +20,7 @@
- + \ No newline at end of file diff --git a/assets/app.D4kLJnX4.js b/assets/app.CZdDprd4.js similarity index 71% rename from assets/app.D4kLJnX4.js rename to assets/app.CZdDprd4.js index 5f65d00de9..2ad11de38c 100644 --- a/assets/app.D4kLJnX4.js +++ b/assets/app.CZdDprd4.js @@ -1 +1 @@ -import{t as p}from"./chunks/theme.DJQtrHna.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.CSeR4K32.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; +import{R as p}from"./chunks/theme._10rLZ6c.js";import{R as s,a3 as i,a4 as u,a5 as c,a6 as l,a7 as f,a8 as d,a9 as m,aa as h,ab as g,ac as A,d as v,u as R,v as w,s as y,ad as C,ae as P,af as b,a2 as E}from"./chunks/framework.QPV3Ar9-.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=R();return w(()=>{y(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),P(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/assets/case_case1.md.B_L677aD.js b/assets/case_case1.md.B_L677aD.js new file mode 100644 index 0000000000..da2f16e043 --- /dev/null +++ b/assets/case_case1.md.B_L677aD.js @@ -0,0 +1,77 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"ECS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1772424525000}'),e={name:"case/case1.md"};function h(l,s,p,k,r,d){return n(),a("div",null,s[0]||(s[0]=[t(`

ECS

Build and Release

FOSSA Status

Hits Downloads

融合怪测评项目 - GO版本

(仅环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)

如有问题请 issues 反馈。

Go 版本:https://github.com/oneclickvirt/ecs

Shell 版本:https://github.com/spiritLHLS/ecs


适配系统和架构

编译与测试支持情况

编译支持的架构测试支持的架构编译支持的系统测试支持的系统
amd64amd64LinuxLinux
arm64arm64WindowsWindows
armMacOS(Darwin)MacOS
386FreeBSD
mips,mipsleAndroid
mips64,mips64le
ppc64,ppc64le
s390xs390x
riscv64

更多架构与系统请自行测试或编译,如有问题请开 issues。

待支持的系统

系统说明
OpenBSD/NetBSD部分Goalng的官方库未支持本系统(尤其是net相关项目)

功能

本项目初次使用建议查看说明:跳转


使用说明

Linux/FreeBSD/MacOS

一键命令

一键命令将默认不安装依赖,默认不更新包管理器,默认非互动模式

如果需要测试更准确,请按照下面的详细说明进行安装,添加非必需的依赖

详细说明

以下命令可控制是否安装依赖是否更新包管理器互动模式和非交互模式

展开查看详细说明
  1. 下载脚本

    国际用户无加速:

    bash
    curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国际/国内使用 CDN 加速:

    bash
    curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国内用户使用 CNB 加速:

    bash
    curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh
  2. 更新包管理器(可选择)并安装环境

    bash
    ./goecs.sh env

    非互动模式:

    bash
    export noninteractive=true && ./goecs.sh env
  3. 安装 goecs 本体(仅下载二进制文件无依赖安装)

    bash
    ./goecs.sh install
  4. 升级 goecs 本体

    bash
    ./goecs.sh upgrade
  5. 卸载 goecs 本体

    bash
    ./goecs.sh uninstall
  6. 帮助命令

    bash
    ./goecs.sh -h
  7. 唤起菜单

    bash
    goecs

命令参数化

展开查看各参数说明
bash
Usage: goecs [options]
+  -backtrace
+        Enable/Disable backtrace test (in 'en' language or on windows it always false) (default true)
+  -basic
+        Enable/Disable basic test (default true)
+  -ut
+        Enable/Disable unlock media test (default true)
+  -cpu
+        Enable/Disable CPU test (default true)
+  -cpum string
+        Set CPU test method (supported: sysbench, geekbench, winsat) (default "sysbench")
+  -cpu-method string
+        Set CPU test method (supported: sysbench, geekbench, winsat) (default "sysbench")
+  -cput string
+        Set CPU test thread mode (supported: single, multi) (default "multi")
+  -cpu-thread string
+        Set CPU test thread mode (supported: single, multi) (default "multi")
+  -disk
+        Enable/Disable disk test (default true)
+  -diskm string
+        Set disk test method (supported: fio, dd, winsat) (default "fio")
+  -disk-method string
+        Set disk test method (supported: fio, dd, winsat) (default "fio")
+  -diskmc
+        Enable/Disable multiple disk checks, e.g., -diskmc=false
+  -diskp string
+        Set disk test path, e.g., -diskp /root
+  -email
+        Enable/Disable email port test (default true)
+  -h    Show help information
+  -help
+        Show help information
+  -l string
+        Set language (supported: en, zh) (default "zh")
+  -lang string
+        Set language (supported: en, zh) (default "zh")
+  -log
+        Enable/Disable logging in the current path
+  -memory
+        Enable/Disable memory test (default true)
+  -memorym string
+        Set memory test method (supported: stream, sysbench, dd, winsat, auto) (default "stream")
+  -memory-method string
+        Set memory test method (supported: stream, sysbench, dd, winsat, auto) (default "stream")
+  -menu
+        Enable/Disable menu mode, disable example: -menu=false (default true)
+  -nt3
+        Enable/Disable NT3 test (in 'en' language or on windows it always false) (default true)
+  -nt3loc string
+        Specify NT3 test location (supported: GZ, SH, BJ, CD, ALL for Guangzhou, Shanghai, Beijing, Chengdu and all) (default "GZ")
+  -nt3-location string
+        Specify NT3 test location (supported: GZ, SH, BJ, CD, ALL for Guangzhou, Shanghai, Beijing, Chengdu and all) (default "GZ")
+  -nt3t string
+        Set NT3 test type (supported: both, ipv4, ipv6) (default "ipv4")
+  -nt3-type string
+        Set NT3 test type (supported: both, ipv4, ipv6) (default "ipv4")
+  -ping
+        Enable/Disable ping test
+  -security
+        Enable/Disable security test (default true)
+  -speed
+        Enable/Disable speed test (default true)
+  -spnum int
+        Set the number of servers per operator for speed test (default 2)
+  -tgdc
+        Enable/Disable Telegram DC test
+  -upload
+        Enable/Disable upload the result (default true)
+  -v    Display version information
+  -version
+        Display version information
+  -web
+        Enable/Disable popular websites test

Windows

  1. 下载带 exe 文件的压缩包:Releases
  2. 解压后,右键以管理员模式运行。

PS:如果是虚拟机环境,不以管理员模式运行也行,因为虚拟机无原生的测试工具,将自动启用替代方法测试。 PPS: 暂时不要下载带GUI标签的exe文件,未完整适配,CI版本的压缩包是没问题的。


Docker

展开查看使用说明

国际镜像地址:https://hub.docker.com/r/spiritlhl/goecs

请确保执行下述命令前本机已安装Docker

特权模式+host网络

shell
docker run --rm --privileged --network host spiritlhl/goecs:latest -menu=false -l zh

非特权模式+非host网络

shell
docker run --rm spiritlhl/goecs:latest -menu=false -l zh

使用Docker执行测试,硬件测试会有一些偏差和虚拟化架构判断失效,还是推荐直接测试而不使用Docker测试。

国内阿里云镜像加速

请确保执行下述命令前本机已安装Docker

特权模式+host网络

shell
docker run --rm --privileged --network host crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh

非特权模式+非host网络

shell
docker run --rm crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh

实际上还有CNB镜像地址 https://cnb.cool/oneclickvirt/ecs/-/packages/docker/ecs 但很可惜组织空间不足无法推送了,更推荐使用阿里云镜像加速


从源码进行编译

展开查看编译说明
  1. 克隆仓库的 public 分支(不含私有依赖)
bash
git clone -b public https://github.com/oneclickvirt/ecs.git
+cd ecs
  1. 安装 Go 环境(如已安装可跳过)

选择 go 1.25.3 的版本进行安装

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/go.sh -o go.sh && chmod +x go.sh && bash go.sh
  1. 编译
bash
go build -o goecs
  1. 运行测试
bash
./goecs -menu=false -l zh

支持的编译参数:

跨平台编译示例:

bash
# 编译 Windows 版本
+GOOS=windows GOARCH=amd64 go build -o goecs.exe
+# 编译 MacOS 版本
+GOOS=darwin GOARCH=amd64 go build -o goecs_darwin

QA

Q: 为什么默认使用sysbench而不是geekbench

A: 比较二者特点

比较项sysbenchgeekbench
适用范围轻量级,几乎可在任何服务器上运行重量级,小型机器无法运行
测试要求无需网络,无特殊硬件需求需联网,IPV4环境,至少1G内存
开源情况基于LUA,开源,可自行编译各架构版本官方二进制闭源代码,不支持自行编译
测试稳定性核心测试组件10年以上未变每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU)
测试内容仅测试计算性能覆盖多种性能测试,分数加权计算,但部分测试实际不常用
适用场景适合快速测试,仅测试计算性能适合综合全面的测试
排行榜sysbench.spiritlhl.netbrowser.geekbench.com

goecs测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求

Q: 为什么使用Golang而不是Rust重构

A: 因为网络相关的项目目前以Golang语言为趋势,大多组件有开源生态维护,Rust很多得自己手搓,我懒得搞我没那个技术力

Q: 为什么不继续开发Shell版本而是选择重构

A: 因为太多千奇百怪的环境问题了,还是提前编译好测试的二进制文件比较容易解决环境问题(泛化性更好)

Q: 每个测试项目的说明有吗?

A: 每个测试项目有对应的维护仓库,自行点击查看仓库说明

Q: 测试进行到一半如何手动终止?

A: 按ctrl键和c键终止程序,终止后依然会在当前目录下生成goecs.txt文件和分享链接,里面是已经测试到的信息。

Q: 非Root环境如何进行测试?

A: 手动执行安装命令,实在装不上也没问题,直接在release中下载对应架构的压缩包解压后执行即可,只要你能执行的了文件。或者你能使用docker的话用docker执行。

致谢

感谢 DKLYDataHub - IP Geolocation Datahe.net bgp.tools ipinfo.io maxmind.com cloudflare.com ip.sb scamalytics.com abuseipdb.com ip2location.com ip-api.com ipregistry.co ipdata.co ipgeolocation.io ipwhois.io ipapi.com ipapi.is ipqualityscore.com bigdatacloud.com virustotal.com ipfighter.com getipintel.net fraudlogix.com 等网站提供的API进行检测,感谢互联网各网站提供的查询资源

感谢

h501

提供的免费托管支持本开源项目的共享测试结果存储

同时感谢以下平台提供编辑和测试支持

golandibmzmto

History Usage

goecs

Stargazers over time

Stargazers over time

License

FOSSA Status

`,74)]))}const o=i(e,[["render",h]]);export{g as __pageData,o as default}; diff --git a/assets/case_case1.md.B_L677aD.lean.js b/assets/case_case1.md.B_L677aD.lean.js new file mode 100644 index 0000000000..0db62ac630 --- /dev/null +++ b/assets/case_case1.md.B_L677aD.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"ECS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1772424525000}'),e={name:"case/case1.md"};function h(l,s,p,k,r,d){return n(),a("div",null,s[0]||(s[0]=[t("",74)]))}const o=i(e,[["render",h]]);export{g as __pageData,o as default}; diff --git a/assets/case_case1.md.BkNyEjyq.js b/assets/case_case1.md.BkNyEjyq.js deleted file mode 100644 index 42d23ba113..0000000000 --- a/assets/case_case1.md.BkNyEjyq.js +++ /dev/null @@ -1,77 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"ECS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1772422214000}'),n={name:"case/case1.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[h(`

ECS

Build and Release

FOSSA Status

Hits Downloads

融合怪测评项目 - GO版本

(仅环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)

如有问题请 issues 反馈。

Go 版本:https://github.com/oneclickvirt/ecs

Shell 版本:https://github.com/spiritLHLS/ecs


适配系统和架构

编译与测试支持情况

编译支持的架构测试支持的架构编译支持的系统测试支持的系统
amd64amd64LinuxLinux
arm64arm64WindowsWindows
armMacOS(Darwin)MacOS
386FreeBSD
mips,mipsleAndroid
mips64,mips64le
ppc64,ppc64le
s390xs390x
riscv64

更多架构与系统请自行测试或编译,如有问题请开 issues。

待支持的系统

系统说明
OpenBSD/NetBSD部分Goalng的官方库未支持本系统(尤其是net相关项目)

功能

本项目初次使用建议查看说明:跳转


使用说明

Linux/FreeBSD/MacOS

一键命令

一键命令将默认不安装依赖,默认不更新包管理器,默认非互动模式

如果需要测试更准确,请按照下面的详细说明进行安装,添加非必需的依赖

详细说明

以下命令可控制是否安装依赖是否更新包管理器互动模式和非交互模式

展开查看详细说明
  1. 下载脚本

    国际用户无加速:

    bash
    curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国际/国内使用 CDN 加速:

    bash
    curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国内用户使用 CNB 加速:

    bash
    curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh
  2. 更新包管理器(可选择)并安装环境

    bash
    ./goecs.sh env

    非互动模式:

    bash
    export noninteractive=true && ./goecs.sh env
  3. 安装 goecs 本体(仅下载二进制文件无依赖安装)

    bash
    ./goecs.sh install
  4. 升级 goecs 本体

    bash
    ./goecs.sh upgrade
  5. 卸载 goecs 本体

    bash
    ./goecs.sh uninstall
  6. 帮助命令

    bash
    ./goecs.sh -h
  7. 唤起菜单

    bash
    goecs

命令参数化

展开查看各参数说明
bash
Usage: goecs [options]
-  -backtrace
-        Enable/Disable backtrace test (in 'en' language or on windows it always false) (default true)
-  -basic
-        Enable/Disable basic test (default true)
-  -ut
-        Enable/Disable unlock media test (default true)
-  -cpu
-        Enable/Disable CPU test (default true)
-  -cpum string
-        Set CPU test method (supported: sysbench, geekbench, winsat) (default "sysbench")
-  -cpu-method string
-        Set CPU test method (supported: sysbench, geekbench, winsat) (default "sysbench")
-  -cput string
-        Set CPU test thread mode (supported: single, multi) (default "multi")
-  -cpu-thread string
-        Set CPU test thread mode (supported: single, multi) (default "multi")
-  -disk
-        Enable/Disable disk test (default true)
-  -diskm string
-        Set disk test method (supported: fio, dd, winsat) (default "fio")
-  -disk-method string
-        Set disk test method (supported: fio, dd, winsat) (default "fio")
-  -diskmc
-        Enable/Disable multiple disk checks, e.g., -diskmc=false
-  -diskp string
-        Set disk test path, e.g., -diskp /root
-  -email
-        Enable/Disable email port test (default true)
-  -h    Show help information
-  -help
-        Show help information
-  -l string
-        Set language (supported: en, zh) (default "zh")
-  -lang string
-        Set language (supported: en, zh) (default "zh")
-  -log
-        Enable/Disable logging in the current path
-  -memory
-        Enable/Disable memory test (default true)
-  -memorym string
-        Set memory test method (supported: stream, sysbench, dd, winsat, auto) (default "stream")
-  -memory-method string
-        Set memory test method (supported: stream, sysbench, dd, winsat, auto) (default "stream")
-  -menu
-        Enable/Disable menu mode, disable example: -menu=false (default true)
-  -nt3
-        Enable/Disable NT3 test (in 'en' language or on windows it always false) (default true)
-  -nt3loc string
-        Specify NT3 test location (supported: GZ, SH, BJ, CD, ALL for Guangzhou, Shanghai, Beijing, Chengdu and all) (default "GZ")
-  -nt3-location string
-        Specify NT3 test location (supported: GZ, SH, BJ, CD, ALL for Guangzhou, Shanghai, Beijing, Chengdu and all) (default "GZ")
-  -nt3t string
-        Set NT3 test type (supported: both, ipv4, ipv6) (default "ipv4")
-  -nt3-type string
-        Set NT3 test type (supported: both, ipv4, ipv6) (default "ipv4")
-  -ping
-        Enable/Disable ping test
-  -security
-        Enable/Disable security test (default true)
-  -speed
-        Enable/Disable speed test (default true)
-  -spnum int
-        Set the number of servers per operator for speed test (default 2)
-  -tgdc
-        Enable/Disable Telegram DC test
-  -upload
-        Enable/Disable upload the result (default true)
-  -v    Display version information
-  -version
-        Display version information
-  -web
-        Enable/Disable popular websites test

Windows

  1. 下载带 exe 文件的压缩包:Releases
  2. 解压后,右键以管理员模式运行。

PS:如果是虚拟机环境,不以管理员模式运行也行,因为虚拟机无原生的测试工具,将自动启用替代方法测试。 PPS: 暂时不要下载带GUI标签的exe文件,未完整适配,CI版本的压缩包是没问题的。


Docker

展开查看使用说明

国际镜像地址:https://hub.docker.com/r/spiritlhl/goecs

请确保执行下述命令前本机已安装Docker

特权模式+host网络

shell
docker run --rm --privileged --network host spiritlhl/goecs:latest -menu=false -l zh

非特权模式+非host网络

shell
docker run --rm spiritlhl/goecs:latest -menu=false -l zh

使用Docker执行测试,硬件测试会有一些偏差和虚拟化架构判断失效,还是推荐直接测试而不使用Docker测试。

国内阿里云镜像加速

请确保执行下述命令前本机已安装Docker

特权模式+host网络

shell
docker run --rm --privileged --network host crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh

非特权模式+非host网络

shell
docker run --rm crpi-8tmognxgyb86bm61.cn-guangzhou.personal.cr.aliyuncs.com/oneclickvirt/ecs:latest -menu=false -l zh

实际上还有CNB镜像地址 https://cnb.cool/oneclickvirt/ecs/-/packages/docker/ecs 但很可惜组织空间不足无法推送了,更推荐使用阿里云镜像加速


从源码进行编译

展开查看编译说明
  1. 克隆仓库的 public 分支(不含私有依赖)
bash
git clone -b public https://github.com/oneclickvirt/ecs.git
-cd ecs
  1. 安装 Go 环境(如已安装可跳过)

选择 go 1.25.3 的版本进行安装

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/go.sh -o go.sh && chmod +x go.sh && bash go.sh
  1. 编译
bash
go build -o goecs
  1. 运行测试
bash
./goecs -menu=false -l zh

支持的编译参数:

跨平台编译示例:

bash
# 编译 Windows 版本
-GOOS=windows GOARCH=amd64 go build -o goecs.exe
-# 编译 MacOS 版本
-GOOS=darwin GOARCH=amd64 go build -o goecs_darwin

QA

Q: 为什么默认使用sysbench而不是geekbench

A: 比较二者特点

比较项sysbenchgeekbench
适用范围轻量级,几乎可在任何服务器上运行重量级,小型机器无法运行
测试要求无需网络,无特殊硬件需求需联网,IPV4环境,至少1G内存
开源情况基于LUA,开源,可自行编译各架构版本官方二进制闭源代码,不支持自行编译
测试稳定性核心测试组件10年以上未变每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU)
测试内容仅测试计算性能覆盖多种性能测试,分数加权计算,但部分测试实际不常用
适用场景适合快速测试,仅测试计算性能适合综合全面的测试
排行榜sysbench.spiritlhl.netbrowser.geekbench.com

goecs测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求

Q: 为什么使用Golang而不是Rust重构

A: 因为网络相关的项目目前以Golang语言为趋势,大多组件有开源生态维护,Rust很多得自己手搓,我懒得搞我没那个技术力

Q: 为什么不继续开发Shell版本而是选择重构

A: 因为太多千奇百怪的环境问题了,还是提前编译好测试的二进制文件比较容易解决环境问题(泛化性更好)

Q: 每个测试项目的说明有吗?

A: 每个测试项目有对应的维护仓库,自行点击查看仓库说明

Q: 测试进行到一半如何手动终止?

A: 按ctrl键和c键终止程序,终止后依然会在当前目录下生成goecs.txt文件和分享链接,里面是已经测试到的信息。

Q: 非Root环境如何进行测试?

A: 手动执行安装命令,实在装不上也没问题,直接在release中下载对应架构的压缩包解压后执行即可,只要你能执行的了文件。或者你能使用docker的话用docker执行。

致谢

感谢 DKLYDataHub - IP Geolocation Datahe.net bgp.tools ipinfo.io maxmind.com cloudflare.com ip.sb scamalytics.com abuseipdb.com ip2location.com ip-api.com ipregistry.co ipdata.co ipgeolocation.io ipwhois.io ipapi.com ipapi.is ipqualityscore.com bigdatacloud.com virustotal.com ipfighter.com getipintel.net fraudlogix.com 等网站提供的API进行检测,感谢互联网各网站提供的查询资源

感谢

h501

提供的免费托管支持本开源项目的共享测试结果存储

同时感谢以下平台提供编辑和测试支持

golandibmzmto

History Usage

goecs

Stargazers over time

Stargazers over time

License

FOSSA Status

`,74)]))}const o=i(n,[["render",e]]);export{g as __pageData,o as default}; diff --git a/assets/case_case1.md.BkNyEjyq.lean.js b/assets/case_case1.md.BkNyEjyq.lean.js deleted file mode 100644 index 9a23b16d44..0000000000 --- a/assets/case_case1.md.BkNyEjyq.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"ECS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1772422214000}'),n={name:"case/case1.md"};function e(l,s,k,p,r,d){return t(),a("div",null,s[0]||(s[0]=[h("",74)]))}const o=i(n,[["render",e]]);export{g as __pageData,o as default}; diff --git a/assets/case_case2.md.Bi2RYIdT.js b/assets/case_case2.md.Bi2RYIdT.js new file mode 100644 index 0000000000..8db884b66e --- /dev/null +++ b/assets/case_case2.md.Bi2RYIdT.js @@ -0,0 +1,36 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1772424525000}'),l={name:"case/case2.md"};function t(p,s,h,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e(`

仓库

https://github.com/spiritLHLS/one-click-installation-script

Hits

所有脚本如需在国内服务器使用,请在链接前加上https://ghproxy.com/确保命令可以下载本仓库的shell脚本执行

一键修复脚本

运行所有一键修复脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键尝试修复apt源

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/package.sh -o package.sh && chmod +x package.sh && bash package.sh

一键尝试修复系统时间

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/modify_time.sh -o modify_time.sh && chmod +x modify_time.sh && bash modify_time.sh

一键尝试修复sudo警告

不要在生产环境上使用该脚本,否则容易造成网络hosts配置错误,配置的host名字不在外网IP上反而在内网IP(127.0.0.1)上

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/check_sudo.sh -o check_sudo.sh && chmod +x check_sudo.sh && bash check_sudo.sh

一键修改系统自带的journal日志记录大小释放系统盘空间

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/resize_journal.sh -o resize_journal.sh && chmod +x resize_journal.sh && bash resize_journal.sh

一键尝试修复网络

该脚本轻易勿要使用,请确保运行时服务器无重要文件或程序,出现运行bug后续可能需要重装系统

一定要在screen中执行该脚本,否则可能导致修改过程中ssh断链接而修改失败卡住最终SSH无法连接!不在screen中执行后果自负!

bash
curl -L https://cdn.spiritlhl.workers.dev/https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/network.sh -o network.sh && chmod +x network.sh && bash network.sh

如果是纯V6的也可以不使用上面脚本的nat64,使用warp添加V4网络

比如:https://github.com/fscarmen/warp

bash
wget -N https://raw.githubusercontent.com/fscarmen/warp/main/menu.sh && bash menu.sh [option] [lisence]

非纯V6的,带V4切换优先级到IPV4可用以下命令

bash
sudo sed -i 's/.*precedence ::ffff:0:0\\/96.*/precedence ::ffff:0:0\\/96  100/g' /etc/gai.conf && sudo systemctl restart networking

一键环境安装脚本

只推荐在新服务器上安装,环境不纯净不保证不出bug

运行所有一键环境安装脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键安装jupyter环境

原始用途是方便快捷的在按小时计费的超大型服务器上部署python环境进行科学计算,充分利用时间别浪费在构建环境上。

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/jupyter.sh -o jupyter.sh && chmod +x jupyter.sh && bash jupyter.sh

一键安装R语言环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/R.sh -o R.sh && chmod +x R.sh && bash R.sh

一键安装rust环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/rust.sh -o rust.sh && chmod +x rust.sh && bash rust.sh

一键安装C环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/cplusplus.sh -o cplusplus.sh && chmod +x cplusplus.sh && bash cplusplus.sh

一键安装vnstat环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/vnstat.sh -o vnstat.sh && chmod +x vnstat.sh && bash vnstat.sh

一键升级低版本debian为debian11

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/todebian11.sh -o todebian11.sh && chmod +x todebian11.sh && bash todebian11.sh

一键升级低版本ubuntu为ubuntu22

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/toubuntu22.sh -o toubuntu22.sh && chmod +x toubuntu22.sh && bash toubuntu22.sh

一键安装zipline平台

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/zipline.sh -o zipline.sh && chmod +x zipline.sh && bash zipline.sh

如果需要删除0字节文件,打开/root/zipline文件夹,执行

docker-compose exec zipline yarn scripts:clear-zero-byte

按照提示操作

一键安装filebrowser平台

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/filebrowser.sh -o filebrowser.sh && chmod +x filebrowser.sh && bash filebrowser.sh

一键删除平台监控

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/dlm.sh -o dlm.sh && chmod +x dlm.shh && bash dlm.sh

部分手动命令

一键开启root登陆并替换密码

bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

一键屏蔽邮件端口避免被恶意程序使用

bash
iptables -A INPUT -p tcp --dport 25 -j DROP
+iptables -A OUTPUT -p tcp --dport 25 -j DROP
+/sbin/iptables-save

设置语言包

bash
sudo apt-get update
+sudo apt-get install language-pack-en-base
+sudo locale-gen en_US.UTF-8

下载UTF-8的环境,生成UTF-8的包,然后重启服务器

bash
locale -a
+export LC_ALL=en_US.UTF-8

查看并设置语言包

language-pack-en-base 在debian中好像没有,只有Ubuntu有好像,不知道是不是个例,有问题再说

ubuntu更新源被锁

bash
sudo rm -rf /var/cache/apt/archives/lock
+sudo pkill apt
+sudo rm /var/lib/dpkg/lock-frontend
+sudo rm /var/lib/apt/lists/lock
+sudo rm /var/cache/apt/archives/lock
+sudo rm /var/lib/dpkg/lock
+sudo dpkg --configure -a

然后重启系统

debian缺失公钥

bash
apt-get install debian-keyring debian-archive-keyring -y

ubuntu或debian缺失公钥

后续这块有计划整理为一个一键脚本

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 公钥

centos换源

bash
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
+sudo sed -i 's/^mirrorlist=http/mirrorlist=https/' /etc/yum.repos.d/CentOS-Base.repo

安装gitea

Ubuntu 20无问题,Ubuntu 22好像不行

https://gitlab.com/packaging/gitea

卸载aapanel

bash
apt install sysv-rc-conf -y && service bt stop && sysv-rc-conf bt off && rm -f /etc/init.d/bt && rm -rf /www/server/panel

安装docker和docker-compose

bash
curl -sSL https://get.docker.com/ | sh
+curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
+chmod +x /usr/local/bin/docker-compose
+docker-compose --version

卸载所有docker镜像和容器

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

通过docker安装code-server

安装

shell
mkdir -p ~/.config
+docker run --restart=always --name code-server -p 0.0.0.0:8886:8080 \\
+  -v "$HOME/.config:/home/coder/.config" \\
+  -v "$PWD:/home/coder/project" \\
+  -u "$(id -u):$(id -g)" \\
+  -e "DOCKER_USER=$USER" \\
+  codercom/code-server:latest

新窗口

shell
docker exec code-server cat /root/.config/code-server/config.yaml

curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
+sudo systemctl enable --now code-server@root
+sed -i '1s/127.0.0.1:8080/0.0.0.0:8536/' ~/.config/code-server/config.yaml
+sudo systemctl restart code-server@root
+cat .config/code-server/config.yaml

卸载需要

sudo systemctl stop code-server@root
+sudo systemctl disable code-server@root
+rm -rf ~/.cache/coder
+sudo apt remove coder -y

curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
+sudo systemctl enable --now code-server@root
+sed -i '1s/127.0.0.1:8080/0.0.0.0:8536/' ~/.config/code-server/config.yaml
+sudo systemctl restart code-server@root
+cat .config/code-server/config.yaml

卸载需要

sudo systemctl stop code-server@root
+sudo systemctl disable code-server@root
+rm -rf ~/.cache/coder
+sudo apt remove coder -y
`,109)]))}const F=i(l,[["render",t]]);export{c as __pageData,F as default}; diff --git a/assets/case_case2.md.Bi2RYIdT.lean.js b/assets/case_case2.md.Bi2RYIdT.lean.js new file mode 100644 index 0000000000..512d05463a --- /dev/null +++ b/assets/case_case2.md.Bi2RYIdT.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1772424525000}'),l={name:"case/case2.md"};function t(p,s,h,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e("",109)]))}const F=i(l,[["render",t]]);export{c as __pageData,F as default}; diff --git a/assets/case_case2.md.D7kWT-NZ.js b/assets/case_case2.md.D7kWT-NZ.js deleted file mode 100644 index f91fb2ef9b..0000000000 --- a/assets/case_case2.md.D7kWT-NZ.js +++ /dev/null @@ -1,36 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1772422214000}'),h={name:"case/case2.md"};function l(e,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

仓库

https://github.com/spiritLHLS/one-click-installation-script

Hits

所有脚本如需在国内服务器使用,请在链接前加上https://ghproxy.com/确保命令可以下载本仓库的shell脚本执行

一键修复脚本

运行所有一键修复脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键尝试修复apt源

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/package.sh -o package.sh && chmod +x package.sh && bash package.sh

一键尝试修复系统时间

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/modify_time.sh -o modify_time.sh && chmod +x modify_time.sh && bash modify_time.sh

一键尝试修复sudo警告

不要在生产环境上使用该脚本,否则容易造成网络hosts配置错误,配置的host名字不在外网IP上反而在内网IP(127.0.0.1)上

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/check_sudo.sh -o check_sudo.sh && chmod +x check_sudo.sh && bash check_sudo.sh

一键修改系统自带的journal日志记录大小释放系统盘空间

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/resize_journal.sh -o resize_journal.sh && chmod +x resize_journal.sh && bash resize_journal.sh

一键尝试修复网络

该脚本轻易勿要使用,请确保运行时服务器无重要文件或程序,出现运行bug后续可能需要重装系统

一定要在screen中执行该脚本,否则可能导致修改过程中ssh断链接而修改失败卡住最终SSH无法连接!不在screen中执行后果自负!

bash
curl -L https://cdn.spiritlhl.workers.dev/https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/network.sh -o network.sh && chmod +x network.sh && bash network.sh

如果是纯V6的也可以不使用上面脚本的nat64,使用warp添加V4网络

比如:https://github.com/fscarmen/warp

bash
wget -N https://raw.githubusercontent.com/fscarmen/warp/main/menu.sh && bash menu.sh [option] [lisence]

非纯V6的,带V4切换优先级到IPV4可用以下命令

bash
sudo sed -i 's/.*precedence ::ffff:0:0\\/96.*/precedence ::ffff:0:0\\/96  100/g' /etc/gai.conf && sudo systemctl restart networking

一键环境安装脚本

只推荐在新服务器上安装,环境不纯净不保证不出bug

运行所有一键环境安装脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键安装jupyter环境

原始用途是方便快捷的在按小时计费的超大型服务器上部署python环境进行科学计算,充分利用时间别浪费在构建环境上。

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/jupyter.sh -o jupyter.sh && chmod +x jupyter.sh && bash jupyter.sh

一键安装R语言环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/R.sh -o R.sh && chmod +x R.sh && bash R.sh

一键安装rust环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/rust.sh -o rust.sh && chmod +x rust.sh && bash rust.sh

一键安装C环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/cplusplus.sh -o cplusplus.sh && chmod +x cplusplus.sh && bash cplusplus.sh

一键安装vnstat环境

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/vnstat.sh -o vnstat.sh && chmod +x vnstat.sh && bash vnstat.sh

一键升级低版本debian为debian11

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/todebian11.sh -o todebian11.sh && chmod +x todebian11.sh && bash todebian11.sh

一键升级低版本ubuntu为ubuntu22

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/toubuntu22.sh -o toubuntu22.sh && chmod +x toubuntu22.sh && bash toubuntu22.sh

一键安装zipline平台

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/zipline.sh -o zipline.sh && chmod +x zipline.sh && bash zipline.sh

如果需要删除0字节文件,打开/root/zipline文件夹,执行

docker-compose exec zipline yarn scripts:clear-zero-byte

按照提示操作

一键安装filebrowser平台

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/filebrowser.sh -o filebrowser.sh && chmod +x filebrowser.sh && bash filebrowser.sh

一键删除平台监控

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/dlm.sh -o dlm.sh && chmod +x dlm.shh && bash dlm.sh

部分手动命令

一键开启root登陆并替换密码

bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

一键屏蔽邮件端口避免被恶意程序使用

bash
iptables -A INPUT -p tcp --dport 25 -j DROP
-iptables -A OUTPUT -p tcp --dport 25 -j DROP
-/sbin/iptables-save

设置语言包

bash
sudo apt-get update
-sudo apt-get install language-pack-en-base
-sudo locale-gen en_US.UTF-8

下载UTF-8的环境,生成UTF-8的包,然后重启服务器

bash
locale -a
-export LC_ALL=en_US.UTF-8

查看并设置语言包

language-pack-en-base 在debian中好像没有,只有Ubuntu有好像,不知道是不是个例,有问题再说

ubuntu更新源被锁

bash
sudo rm -rf /var/cache/apt/archives/lock
-sudo pkill apt
-sudo rm /var/lib/dpkg/lock-frontend
-sudo rm /var/lib/apt/lists/lock
-sudo rm /var/cache/apt/archives/lock
-sudo rm /var/lib/dpkg/lock
-sudo dpkg --configure -a

然后重启系统

debian缺失公钥

bash
apt-get install debian-keyring debian-archive-keyring -y

ubuntu或debian缺失公钥

后续这块有计划整理为一个一键脚本

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 公钥

centos换源

bash
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
-sudo sed -i 's/^mirrorlist=http/mirrorlist=https/' /etc/yum.repos.d/CentOS-Base.repo

安装gitea

Ubuntu 20无问题,Ubuntu 22好像不行

https://gitlab.com/packaging/gitea

卸载aapanel

bash
apt install sysv-rc-conf -y && service bt stop && sysv-rc-conf bt off && rm -f /etc/init.d/bt && rm -rf /www/server/panel

安装docker和docker-compose

bash
curl -sSL https://get.docker.com/ | sh
-curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
-chmod +x /usr/local/bin/docker-compose
-docker-compose --version

卸载所有docker镜像和容器

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

通过docker安装code-server

安装

shell
mkdir -p ~/.config
-docker run --restart=always --name code-server -p 0.0.0.0:8886:8080 \\
-  -v "$HOME/.config:/home/coder/.config" \\
-  -v "$PWD:/home/coder/project" \\
-  -u "$(id -u):$(id -g)" \\
-  -e "DOCKER_USER=$USER" \\
-  codercom/code-server:latest

新窗口

shell
docker exec code-server cat /root/.config/code-server/config.yaml

curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
-sudo systemctl enable --now code-server@root
-sed -i '1s/127.0.0.1:8080/0.0.0.0:8536/' ~/.config/code-server/config.yaml
-sudo systemctl restart code-server@root
-cat .config/code-server/config.yaml

卸载需要

sudo systemctl stop code-server@root
-sudo systemctl disable code-server@root
-rm -rf ~/.cache/coder
-sudo apt remove coder -y

curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run
-sudo systemctl enable --now code-server@root
-sed -i '1s/127.0.0.1:8080/0.0.0.0:8536/' ~/.config/code-server/config.yaml
-sudo systemctl restart code-server@root
-cat .config/code-server/config.yaml

卸载需要

sudo systemctl stop code-server@root
-sudo systemctl disable code-server@root
-rm -rf ~/.cache/coder
-sudo apt remove coder -y
`,109)]))}const c=i(h,[["render",l]]);export{F as __pageData,c as default}; diff --git a/assets/case_case2.md.D7kWT-NZ.lean.js b/assets/case_case2.md.D7kWT-NZ.lean.js deleted file mode 100644 index 129888c325..0000000000 --- a/assets/case_case2.md.D7kWT-NZ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1772422214000}'),h={name:"case/case2.md"};function l(e,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n("",109)]))}const c=i(h,[["render",l]]);export{F as __pageData,c as default}; diff --git a/assets/case_case3.md.BGFYk11b.js b/assets/case_case3.md.BGFYk11b.js deleted file mode 100644 index 5f391a4f25..0000000000 --- a/assets/case_case3.md.BGFYk11b.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as s,o as a,ag as p}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1772422214000}'),i={name:"case/case3.md"};function n(c,e,r,h,l,d){return a(),s("div",null,e[0]||(e[0]=[p('

仓库

https://github.com/spiritLHLS/ecsspeed

Hits

ecsspeed

自动更新测速服务器节点列表的网络基准测试脚本

Network benchmarking script that automatically updates the list of speed measurement server nodes

说明

所有组件以及数据均来源于平台或已有的开源项目,无非开源部分,放心食用

对应 speedtest.net 的自动更新测速服务器ID的测速脚本

日常推荐使用

bash <(wget -qO- bash.spiritlhl.net/ecs-net)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-net.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-net.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表大概每7天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

当官方CLI安装失败(如罕见的架构或者官方网站访问失败时)自动使用 speedtest-go 作为替代品测速

对应 speedtest.cn 的自动更新测速服务器ID的测速脚本

单线程测速

bash <(wget -qO- bash.spiritlhl.net/ecs-cn)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-cn.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-cn.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表每天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

自动更新测试服务器列表的三网延迟测试脚本

平均耗时10~15秒

bash <(wget -qO- bash.spiritlhl.net/ecs-ping)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-ping.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-ping.sh)

效果图

图片

功能

.cn数据

仓库:https://github.com/spiritLHLS/speedtest.cn-CN-ID

.net数据

仓库:https://github.com/spiritLHLS/speedtest.net-CN-ID

',44)]))}const b=t(i,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/case_case3.md.BGFYk11b.lean.js b/assets/case_case3.md.BGFYk11b.lean.js deleted file mode 100644 index 6d6edc06c3..0000000000 --- a/assets/case_case3.md.BGFYk11b.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as s,o as a,ag as p}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1772422214000}'),i={name:"case/case3.md"};function n(c,e,r,h,l,d){return a(),s("div",null,e[0]||(e[0]=[p("",44)]))}const b=t(i,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/case_case3.md.BvrVU5SJ.js b/assets/case_case3.md.BvrVU5SJ.js new file mode 100644 index 0000000000..4254bf5301 --- /dev/null +++ b/assets/case_case3.md.BvrVU5SJ.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const b=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1772424525000}'),p={name:"case/case3.md"};function n(r,e,l,c,d,h){return t(),a("div",null,e[0]||(e[0]=[i('

仓库

https://github.com/spiritLHLS/ecsspeed

Hits

ecsspeed

自动更新测速服务器节点列表的网络基准测试脚本

Network benchmarking script that automatically updates the list of speed measurement server nodes

说明

所有组件以及数据均来源于平台或已有的开源项目,无非开源部分,放心食用

对应 speedtest.net 的自动更新测速服务器ID的测速脚本

日常推荐使用

bash <(wget -qO- bash.spiritlhl.net/ecs-net)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-net.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-net.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表大概每7天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

当官方CLI安装失败(如罕见的架构或者官方网站访问失败时)自动使用 speedtest-go 作为替代品测速

对应 speedtest.cn 的自动更新测速服务器ID的测速脚本

单线程测速

bash <(wget -qO- bash.spiritlhl.net/ecs-cn)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-cn.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-cn.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表每天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

自动更新测试服务器列表的三网延迟测试脚本

平均耗时10~15秒

bash <(wget -qO- bash.spiritlhl.net/ecs-ping)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-ping.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-ping.sh)

效果图

图片

功能

.cn数据

仓库:https://github.com/spiritLHLS/speedtest.cn-CN-ID

.net数据

仓库:https://github.com/spiritLHLS/speedtest.net-CN-ID

',44)]))}const u=s(p,[["render",n]]);export{b as __pageData,u as default}; diff --git a/assets/case_case3.md.BvrVU5SJ.lean.js b/assets/case_case3.md.BvrVU5SJ.lean.js new file mode 100644 index 0000000000..366f5970e9 --- /dev/null +++ b/assets/case_case3.md.BvrVU5SJ.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const b=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1772424525000}'),p={name:"case/case3.md"};function n(r,e,l,c,d,h){return t(),a("div",null,e[0]||(e[0]=[i("",44)]))}const u=s(p,[["render",n]]);export{b as __pageData,u as default}; diff --git a/assets/case_case4.md.4Hf1xsK2.js b/assets/case_case4.md.4Hf1xsK2.js new file mode 100644 index 0000000000..5c0bd89ebd --- /dev/null +++ b/assets/case_case4.md.4Hf1xsK2.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as r,ag as c}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1772424525000}'),i={name:"case/case4.md"};function s(l,a,n,h,o,b){return r(),t("div",null,a[0]||(a[0]=[c('

仓库

https://github.com/oneclickvirt/backtrace

Hits

backtrace

三网回程路由线路测试

基于 https://github.com/zhanghanyun/backtrace 的重构和优化,与原版存在很大不同

路由的线路判断最终还是得人工判断的才准确,本项目测试结果仅供参考

功能

使用

shell
curl https://raw.githubusercontent.com/oneclickvirt/backtrace/main/backtrace_install.sh -sSf | sh

更多架构请查看 https://github.com/oneclickvirt/backtrace/releases/tag/output

概览图

图片

图片

图片

',16)]))}const d=e(i,[["render",s]]);export{k as __pageData,d as default}; diff --git a/assets/case_case4.md.4Hf1xsK2.lean.js b/assets/case_case4.md.4Hf1xsK2.lean.js new file mode 100644 index 0000000000..faf3691927 --- /dev/null +++ b/assets/case_case4.md.4Hf1xsK2.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as r,ag as c}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1772424525000}'),i={name:"case/case4.md"};function s(l,a,n,h,o,b){return r(),t("div",null,a[0]||(a[0]=[c("",16)]))}const d=e(i,[["render",s]]);export{k as __pageData,d as default}; diff --git a/assets/case_case4.md.BKl5HH1A.js b/assets/case_case4.md.BKl5HH1A.js deleted file mode 100644 index 3a24c4fe1a..0000000000 --- a/assets/case_case4.md.BKl5HH1A.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as r,ag as c}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1772422214000}'),i={name:"case/case4.md"};function s(h,a,l,n,o,b){return r(),t("div",null,a[0]||(a[0]=[c('

仓库

https://github.com/oneclickvirt/backtrace

Hits

backtrace

三网回程路由线路测试

基于 https://github.com/zhanghanyun/backtrace 的重构和优化,与原版存在很大不同

路由的线路判断最终还是得人工判断的才准确,本项目测试结果仅供参考

功能

使用

shell
curl https://raw.githubusercontent.com/oneclickvirt/backtrace/main/backtrace_install.sh -sSf | sh

更多架构请查看 https://github.com/oneclickvirt/backtrace/releases/tag/output

概览图

图片

图片

图片

',16)]))}const d=e(i,[["render",s]]);export{k as __pageData,d as default}; diff --git a/assets/case_case4.md.BKl5HH1A.lean.js b/assets/case_case4.md.BKl5HH1A.lean.js deleted file mode 100644 index bd2afc5b70..0000000000 --- a/assets/case_case4.md.BKl5HH1A.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as r,ag as c}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1772422214000}'),i={name:"case/case4.md"};function s(h,a,l,n,o,b){return r(),t("div",null,a[0]||(a[0]=[c("",16)]))}const d=e(i,[["render",s]]);export{k as __pageData,d as default}; diff --git a/assets/case_case5.md.C9Hkf8fm.js b/assets/case_case5.md.C9Hkf8fm.js deleted file mode 100644 index 2f110b36c5..0000000000 --- a/assets/case_case5.md.C9Hkf8fm.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1772422214000}'),r={name:"case/case5.md"};function l(p,e,c,o,n,h){return s(),t("div",null,e[0]||(e[0]=[i('

仓库

https://github.com/spiritLHLS/Oracle-server-keep-alive-script

Hits

Oracle-server-keep-alive-script

实际不止可以在甲骨文服务器上使用,也可以使用在任意ARM或X86_64架构的系统,用作资源占用

甲骨文服务器保活脚本

适配系统:已在Ubuntu 20+,Debian 10+, Centos 7+, Oracle linux 8+,AlmaLinux 8.5+

上述系统验证无问题,别的主流系统应该也没有问题

可选占用:CPU,内存,带宽

安装完毕后如果有问题请卸载脚本反馈问题(重复卸载也没问题)

所有资源(除了CPU)可选默认配置则动态占用,实时调整,避免服务器有别的任何资源已经超过限额了仍然再占用资源

为避免GitHub的CDN抽风加载不了新内容,所有新更新已使用Gitlab仓库

由于speedtest-go的release依赖于GitHub,所以请检查 www.githubstatus.com ,有问题时无法安装带宽占用

基础开发完毕,测试中,有问题请在issues中反馈

选项1安装,选项2卸载,选项3更新安装引导脚本,选项4退出脚本

安装过程中无脑回车则全部可选的占用都占用,不需要什么占用输入n再回车

如果选择带宽占用,会询问使用speedtest-go占用还是使用wget占用,按照提示进行选择即可

有询问是否需要带宽占用的参数自定义,这时候默认选项就是n,回车就使用默认配置,输入y再回车则需要按照提示自定义参数

curl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh && chmod +x oalive.sh && bash oalive.sh

bash oalive.sh

bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)

说明

如若不希望一键的,希望自定义设置时间的,请查看README_CRON.md自行设置定时任务

',26)]))}const b=a(r,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/case_case5.md.C9Hkf8fm.lean.js b/assets/case_case5.md.C9Hkf8fm.lean.js deleted file mode 100644 index c85f6af822..0000000000 --- a/assets/case_case5.md.C9Hkf8fm.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1772422214000}'),r={name:"case/case5.md"};function l(p,e,c,o,n,h){return s(),t("div",null,e[0]||(e[0]=[i("",26)]))}const b=a(r,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/case_case5.md.UbZQYOkk.js b/assets/case_case5.md.UbZQYOkk.js new file mode 100644 index 0000000000..c9943c0197 --- /dev/null +++ b/assets/case_case5.md.UbZQYOkk.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1772424525000}'),r={name:"case/case5.md"};function l(p,e,n,c,o,d){return i(),s("div",null,e[0]||(e[0]=[t('

仓库

https://github.com/spiritLHLS/Oracle-server-keep-alive-script

Hits

Oracle-server-keep-alive-script

实际不止可以在甲骨文服务器上使用,也可以使用在任意ARM或X86_64架构的系统,用作资源占用

甲骨文服务器保活脚本

适配系统:已在Ubuntu 20+,Debian 10+, Centos 7+, Oracle linux 8+,AlmaLinux 8.5+

上述系统验证无问题,别的主流系统应该也没有问题

可选占用:CPU,内存,带宽

安装完毕后如果有问题请卸载脚本反馈问题(重复卸载也没问题)

所有资源(除了CPU)可选默认配置则动态占用,实时调整,避免服务器有别的任何资源已经超过限额了仍然再占用资源

为避免GitHub的CDN抽风加载不了新内容,所有新更新已使用Gitlab仓库

由于speedtest-go的release依赖于GitHub,所以请检查 www.githubstatus.com ,有问题时无法安装带宽占用

基础开发完毕,测试中,有问题请在issues中反馈

选项1安装,选项2卸载,选项3更新安装引导脚本,选项4退出脚本

安装过程中无脑回车则全部可选的占用都占用,不需要什么占用输入n再回车

如果选择带宽占用,会询问使用speedtest-go占用还是使用wget占用,按照提示进行选择即可

有询问是否需要带宽占用的参数自定义,这时候默认选项就是n,回车就使用默认配置,输入y再回车则需要按照提示自定义参数

curl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh && chmod +x oalive.sh && bash oalive.sh

bash oalive.sh

bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)

说明

如若不希望一键的,希望自定义设置时间的,请查看README_CRON.md自行设置定时任务

',26)]))}const b=a(r,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/case_case5.md.UbZQYOkk.lean.js b/assets/case_case5.md.UbZQYOkk.lean.js new file mode 100644 index 0000000000..7ff034cdfa --- /dev/null +++ b/assets/case_case5.md.UbZQYOkk.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1772424525000}'),r={name:"case/case5.md"};function l(p,e,n,c,o,d){return i(),s("div",null,e[0]||(e[0]=[t("",26)]))}const b=a(r,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/case_case6.md.C5orQXMk.js b/assets/case_case6.md.C5orQXMk.js new file mode 100644 index 0000000000..19840c23c3 --- /dev/null +++ b/assets/case_case6.md.C5orQXMk.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1772424525000}'),t={name:"case/case6.md"};function h(n,s,l,r,d,k){return e(),i("div",null,s[0]||(s[0]=[p('

仓库

https://github.com/spiritLHLS/addswap

addswap

为openvz、kvm虚拟化的linux服务器增加swap分区(虚拟内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

已增加openvz架构重启swap自动添加的

openvz这个添加=掩耳盗铃,实际受到虚拟化限制应该是无法添加的,只能由虚拟化的宿主机控制,同理LXC虚拟化的也只能由宿主机控制,都无法自主添加虚拟内存SWAP

因此,该项目不再更新,除非另有需求

单位换算:输入 1024 产生 1G SWAP内存

致谢

kvm分区原版脚本源自 https://www.moerats.com/

bash
curl -L https://www.moerats.com/usr/shell/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

openVZ分区原版脚本源自

http://linux-problem-solver.blogspot.com/2013/08/create-fake-swap-in-openvz-vps-if-you-get-swapon-failed-operation-not-permitted-error.html

感谢 @fscarmen 提供优化建议

',18)]))}const F=a(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/case_case6.md.C5orQXMk.lean.js b/assets/case_case6.md.C5orQXMk.lean.js new file mode 100644 index 0000000000..988d74aa7c --- /dev/null +++ b/assets/case_case6.md.C5orQXMk.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1772424525000}'),t={name:"case/case6.md"};function h(n,s,l,r,d,k){return e(),i("div",null,s[0]||(s[0]=[p("",18)]))}const F=a(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/case_case6.md.DJPhPJrF.js b/assets/case_case6.md.DJPhPJrF.js deleted file mode 100644 index 5ccc4a13e4..0000000000 --- a/assets/case_case6.md.DJPhPJrF.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1772422214000}'),e={name:"case/case6.md"};function h(n,s,l,r,k,d){return t(),i("div",null,s[0]||(s[0]=[p('

仓库

https://github.com/spiritLHLS/addswap

addswap

为openvz、kvm虚拟化的linux服务器增加swap分区(虚拟内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

已增加openvz架构重启swap自动添加的

openvz这个添加=掩耳盗铃,实际受到虚拟化限制应该是无法添加的,只能由虚拟化的宿主机控制,同理LXC虚拟化的也只能由宿主机控制,都无法自主添加虚拟内存SWAP

因此,该项目不再更新,除非另有需求

单位换算:输入 1024 产生 1G SWAP内存

致谢

kvm分区原版脚本源自 https://www.moerats.com/

bash
curl -L https://www.moerats.com/usr/shell/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

openVZ分区原版脚本源自

http://linux-problem-solver.blogspot.com/2013/08/create-fake-swap-in-openvz-vps-if-you-get-swapon-failed-operation-not-permitted-error.html

感谢 @fscarmen 提供优化建议

',18)]))}const F=a(e,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/case_case6.md.DJPhPJrF.lean.js b/assets/case_case6.md.DJPhPJrF.lean.js deleted file mode 100644 index c26bb0459f..0000000000 --- a/assets/case_case6.md.DJPhPJrF.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1772422214000}'),e={name:"case/case6.md"};function h(n,s,l,r,k,d){return t(),i("div",null,s[0]||(s[0]=[p("",18)]))}const F=a(e,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/case_case7.md.DVSYzN_4.js b/assets/case_case7.md.DVSYzN_4.js deleted file mode 100644 index 9cd0dc4b44..0000000000 --- a/assets/case_case7.md.DVSYzN_4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1772422214000}'),e={name:"case/case7.md"};function p(l,a,r,n,d,k){return t(),i("div",null,a[0]||(a[0]=[h('

仓库

https://github.com/spiritLHLS/addzram

addzram

为linux服务器启用zram(压缩内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

类同前面的addswap项目

同样是给机器优化内存占用的东西,只不过zram是压缩内存占用,swap是附加虚拟内存增加内存空间,二者都会占用CPU资源,zram在CPU性能冗余的机器上使用更优

(理论上zram会比swap的性能占用低,但未实际测试过)

单位换算:输入 1024 产生 1G 的 zram 设备压缩内存,zram 设备大小不能大于实际内存大小

致谢

感谢 @Ella-Alinda 提供优化建议

',14)]))}const m=s(e,[["render",p]]);export{c as __pageData,m as default}; diff --git a/assets/case_case7.md.DVSYzN_4.lean.js b/assets/case_case7.md.DVSYzN_4.lean.js deleted file mode 100644 index ee548461f7..0000000000 --- a/assets/case_case7.md.DVSYzN_4.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1772422214000}'),e={name:"case/case7.md"};function p(l,a,r,n,d,k){return t(),i("div",null,a[0]||(a[0]=[h("",14)]))}const m=s(e,[["render",p]]);export{c as __pageData,m as default}; diff --git a/assets/case_case7.md.agWU4t_A.js b/assets/case_case7.md.agWU4t_A.js new file mode 100644 index 0000000000..9454147fe0 --- /dev/null +++ b/assets/case_case7.md.agWU4t_A.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1772424525000}'),h={name:"case/case7.md"};function p(n,a,r,l,d,k){return t(),i("div",null,a[0]||(a[0]=[e('

仓库

https://github.com/spiritLHLS/addzram

addzram

为linux服务器启用zram(压缩内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

类同前面的addswap项目

同样是给机器优化内存占用的东西,只不过zram是压缩内存占用,swap是附加虚拟内存增加内存空间,二者都会占用CPU资源,zram在CPU性能冗余的机器上使用更优

(理论上zram会比swap的性能占用低,但未实际测试过)

单位换算:输入 1024 产生 1G 的 zram 设备压缩内存,zram 设备大小不能大于实际内存大小

致谢

感谢 @Ella-Alinda 提供优化建议

',14)]))}const c=s(h,[["render",p]]);export{m as __pageData,c as default}; diff --git a/assets/case_case7.md.agWU4t_A.lean.js b/assets/case_case7.md.agWU4t_A.lean.js new file mode 100644 index 0000000000..0d18aba595 --- /dev/null +++ b/assets/case_case7.md.agWU4t_A.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1772424525000}'),h={name:"case/case7.md"};function p(n,a,r,l,d,k){return t(),i("div",null,a[0]||(a[0]=[e("",14)]))}const c=s(h,[["render",p]]);export{m as __pageData,c as default}; diff --git a/assets/case_index.md.VmbMjto7.js b/assets/case_index.md.D4MQty_c.js similarity index 85% rename from assets/case_index.md.VmbMjto7.js rename to assets/case_index.md.D4MQty_c.js index e1f29abf6a..3e38f2cfaf 100644 --- a/assets/case_index.md.VmbMjto7.js +++ b/assets/case_index.md.D4MQty_c.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","description":"","frontmatter":{"layout":"home","title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","hero":{"name":"其他实用项目","text":"与Linux相关的其他实用项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"实用性","details":"仁者见仁智者见智。"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1772422214000}'),n={name:"case/index.md"};function s(i,o,r,c,l,p){return a(),t("div")}const h=e(n,[["render",s]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","description":"","frontmatter":{"layout":"home","title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","hero":{"name":"其他实用项目","text":"与Linux相关的其他实用项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"实用性","details":"仁者见仁智者见智。"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1772424525000}'),n={name:"case/index.md"};function s(i,o,r,c,l,p){return a(),t("div")}const h=e(n,[["render",s]]);export{m as __pageData,h as default}; diff --git a/assets/case_index.md.VmbMjto7.lean.js b/assets/case_index.md.D4MQty_c.lean.js similarity index 85% rename from assets/case_index.md.VmbMjto7.lean.js rename to assets/case_index.md.D4MQty_c.lean.js index e1f29abf6a..3e38f2cfaf 100644 --- a/assets/case_index.md.VmbMjto7.lean.js +++ b/assets/case_index.md.D4MQty_c.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","description":"","frontmatter":{"layout":"home","title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","hero":{"name":"其他实用项目","text":"与Linux相关的其他实用项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"实用性","details":"仁者见仁智者见智。"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1772422214000}'),n={name:"case/index.md"};function s(i,o,r,c,l,p){return a(),t("div")}const h=e(n,[["render",s]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","description":"","frontmatter":{"layout":"home","title":"其他实用项目","titleTemplate":"与Linux相关的其他实用项目","hero":{"name":"其他实用项目","text":"与Linux相关的其他实用项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"实用性","details":"仁者见仁智者见智。"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1772424525000}'),n={name:"case/index.md"};function s(i,o,r,c,l,p){return a(),t("div")}const h=e(n,[["render",s]]);export{m as __pageData,h as default}; diff --git a/assets/chunks/VPAlgoliaSearchBox.BlguZ0-2.js b/assets/chunks/VPAlgoliaSearchBox.NIHP5tU5.js similarity index 99% rename from assets/chunks/VPAlgoliaSearchBox.BlguZ0-2.js rename to assets/chunks/VPAlgoliaSearchBox.NIHP5tU5.js index f904cfee6c..8809da9275 100644 --- a/assets/chunks/VPAlgoliaSearchBox.BlguZ0-2.js +++ b/assets/chunks/VPAlgoliaSearchBox.NIHP5tU5.js @@ -1,4 +1,4 @@ -import{d as pi,ah as vi,J as hi,v as di,q as yi,P as _i,c as gi,o as bi}from"./framework.CSeR4K32.js";import{u as Si}from"./theme.DJQtrHna.js";/*! @docsearch/js 3.8.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t2&&(a.children=arguments.length>3?Wt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Et(e,a,n,o,null)}function Et(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++So,__i:-1,__u:0};return o==null&&H.vnode!=null&&H.vnode(i),i}function Re(e){return e.children}function Ce(e,t){this.props=e,this.context=t}function ct(e,t){if(t==null)return e.__?ct(e.__,e.__i+1):null;for(var r;tt&&Ge.sort(Ur));dr.__r=0}function Io(e,t,r,n,o,i,a,c,f,m,b){var l,v,s,S,g,y=n&&n.__k||Eo,_=t.length;for(r.__d=f,function(h,p,d){var P,E,C,N,I,x=p.length,k=d.length,U=k,z=0;for(h.__k=[],P=0;P0?Et(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E).__=h,E.__b=h.__b+1,C=null,(I=E.__i=wi(E,d,N,U))!==-1&&(U--,(C=d[I])&&(C.__u|=131072)),C==null||C.__v===null?(I==-1&&z--,typeof E.type!="function"&&(E.__u|=65536)):I!==N&&(I==N-1?z--:I==N+1?z++:(I>N?z--:z++,E.__u|=65536))):E=h.__k[P]=null;if(U)for(P=0;P(f==null||131072&f.__u?0:1))for(;a>=0||c=0){if((f=t[a])&&!(131072&f.__u)&&o==f.key&&i===f.type)return a;a--}if(c2&&(c.children=arguments.length>3?Wt.call(arguments,2):r),Et(e.type,c,n||e.key,o||e.ref,null)}Wt=Eo.slice,H={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(c){e=c}throw e}},So=0,Ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Te({},this.state),typeof e=="function"&&(e=e(Te({},r),this.props)),e&&Te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vr(this))},Ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vr(this))},Ce.prototype.render=Re,Ge=[],Oo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ur=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,en=0,Fr=bn(!1),Br=bn(!0),wo=0;var Be,Z,Dr,Sn,lt=0,Ao=[],Y=H,On=Y.__b,wn=Y.__r,En=Y.diffed,jn=Y.__c,Pn=Y.unmount,In=Y.__;function st(e,t){Y.__h&&Y.__h(Z,e,lt||t),lt=0;var r=Z.__H||(Z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function zt(e){return lt=1,nn(Ho,e)}function nn(e,t,r){var n=st(Be++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ho(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],m=n.t(f,c);f!==m&&(n.__N=[m,n.__[1]],n.__c.setState({}))}],n.__c=Z,!Z.u)){var o=function(c,f,m){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(v){return!!v.__c});if(b.every(function(v){return!v.__N}))return!i||i.call(this,c,f,m);var l=!1;return b.forEach(function(v){if(v.__N){var s=v.__[0];v.__=v.__N,v.__N=void 0,s!==v.__[0]&&(l=!0)}}),!(!l&&n.__c.props===c)&&(!i||i.call(this,c,f,m))};Z.u=!0;var i=Z.shouldComponentUpdate,a=Z.componentWillUpdate;Z.componentWillUpdate=function(c,f,m){if(this.__e){var b=i;i=void 0,o(c,f,m),i=b}a&&a.call(this,c,f,m)},Z.shouldComponentUpdate=o}return n.__N||n.__}function Jt(e,t){var r=st(Be++,3);!Y.__s&&on(r.__H,t)&&(r.__=e,r.i=t,Z.__H.__h.push(r))}function Qt(e,t){var r=st(Be++,4);!Y.__s&&on(r.__H,t)&&(r.__=e,r.i=t,Z.__h.push(r))}function No(e){return lt=5,_r(function(){return{current:e}},[])}function To(e,t,r){lt=6,Qt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function _r(e,t){var r=st(Be++,7);return on(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Ro(e,t){return lt=8,_r(function(){return e},t)}function Lo(e){var t=Z.context[e.__c],r=st(Be++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(Z)),t.props.value):e.__}function qo(e,t){Y.useDebugValue&&Y.useDebugValue(t?t(e):e)}function Mo(){var e=st(Be++,11);if(!e.__){for(var t=Z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ii(){for(var e;e=Ao.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mr),e.__H.__h.forEach(Kr),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}Y.__b=function(e){Z=null,On&&On(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),In&&In(e,t)},Y.__r=function(e){wn&&wn(e),Be=0;var t=(Z=e.__c).__H;t&&(Dr===Z?(t.__h=[],Z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(mr),t.__h.forEach(Kr),t.__h=[],Be=0)),Dr=Z},Y.diffed=function(e){En&&En(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ao.push(t)!==1&&Sn===Y.requestAnimationFrame||((Sn=Y.requestAnimationFrame)||ki)(Ii)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Dr=Z=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(mr),r.__h=r.__h.filter(function(n){return!n.__||Kr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Y.__e(n,r.__v)}}),jn&&jn(e,t)},Y.unmount=function(e){Pn&&Pn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{mr(n)}catch(o){t=o}}),r.__H=void 0,t&&Y.__e(t,r.__v))};var kn=typeof requestAnimationFrame=="function";function ki(e){var t,r=function(){clearTimeout(n),kn&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);kn&&(t=requestAnimationFrame(r))}function mr(e){var t=Z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Z=t}function Kr(e){var t=Z;e.__c=e.__(),Z=t}function on(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ho(e,t){return typeof t=="function"?t(e):t}function Wr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function zr(e,t){this.props=e,this.context=t}(zr.prototype=new Ce).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(e,t){return Wr(this.props,e)||Wr(this.state,t)};var Dn=H.__b;H.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Dn&&Dn(e)};var Di=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Cn=function(e,t){return e==null?null:Le(Le(e).map(t))},Ci={map:Cn,forEach:Cn,count:function(e){return e?Le(e).length:0},only:function(e){var t=Le(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Le},xi=H.__e;H.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}xi(e,t,r,n)};var xn=H.unmount;function Uo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=function(n,o){for(var i in o)n[i]=o[i];return n}({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uo(n,t,r)})),e}function Fo(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Fo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function pr(){this.__u=0,this.t=null,this.__b=null}function Bo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ot(){this.u=null,this.o=null}H.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),xn&&xn(e)},(pr.prototype=new Ce).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Bo(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(c):c())};r.__R=a;var c=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Fo(f,f.__c.__P,f.__c.__O)}var m;for(n.setState({__a:n.__b=null});m=n.t.pop();)m.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},pr.prototype.componentWillUnmount=function(){this.t=[]},pr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&De(Re,null,e.fallback);return o&&(o.__u&=-33),[De(Re,null,t.__a?null:e.children),o]};var An=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),Ft(De(Ai,{context:t.context},e.__v),t.l)}function Vo(e,t){var r=De(Ni,{__v:e,i:t});return r.containerInfo=t,r}(Ot.prototype=new Ce).__a=function(e){var t=this,r=Bo(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),An(t,e,n)):o()};r?r(i):i()}},Ot.prototype.render=function(e){this.u=null,this.o=new Map;var t=Le(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Ot.prototype.componentDidUpdate=Ot.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){An(e,r,t)})};var Ko=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ti=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ri=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Li=/[A-Z0-9]/g,qi=typeof document<"u",Mi=function(e){return(typeof Symbol<"u"&&A(Symbol())=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Wo(e,t,r){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof r=="function"&&r(),e?e.__c:null}Ce.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ce.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Nn=H.event;function Hi(){}function Ui(){return this.cancelBubble}function Fi(){return this.defaultPrevented}H.event=function(e){return Nn&&(e=Nn(e)),e.persist=Hi,e.isPropagationStopped=Ui,e.isDefaultPrevented=Fi,e.nativeEvent=e};var an,Bi={enumerable:!1,configurable:!0,get:function(){return this.class}},Tn=H.vnode;H.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var a in r){var c=r[a];if(!(a==="value"&&"defaultValue"in r&&c==null||qi&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var f=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&c===!0?c="":f==="translate"&&c==="no"?c=!1:f[0]==="o"&&f[1]==="n"?f==="ondoubleclick"?a="ondblclick":f!=="onchange"||n!=="input"&&n!=="textarea"||Mi(r.type)?f==="onfocus"?a="onfocusin":f==="onblur"?a="onfocusout":Ri.test(a)&&(a=f):f=a="oninput":i&&Ti.test(a)?a=a.replace(Li,"-$&").toLowerCase():c===null&&(c=void 0),f==="oninput"&&o[a=f]&&(a="oninputCapture"),o[a]=c}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.value.indexOf(m.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.multiple?o.defaultValue.indexOf(m.props.value)!=-1:o.defaultValue==m.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Bi)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Ko,Tn&&Tn(e)};var Rn=H.__r;H.__r=function(e){Rn&&Rn(e),an=e.__c};var Ln=H.diffed;H.diffed=function(e){Ln&&Ln(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),an=null};var Vi={ReactCurrentDispatcher:{current:{readContext:function(e){return an.__n[e.__c].props.value},useCallback:Ro,useContext:Lo,useDebugValue:qo,useDeferredValue:Jo,useEffect:Jt,useId:Mo,useImperativeHandle:To,useInsertionEffect:$o,useLayoutEffect:Qt,useMemo:_r,useReducer:nn,useRef:No,useState:zt,useSyncExternalStore:Zo,useTransition:Qo}}};function rr(e){return!!e&&e.$$typeof===Ko}function zo(e){e()}function Jo(e){return e}function Qo(){return[!1,zo]}var $o=Qt;function Zo(e,t){var r=t(),n=zt({h:{__:r,v:t}}),o=n[0].h,i=n[1];return Qt(function(){o.__=r,o.v=t,Cr(o)&&i({h:o})},[e,r,t]),Jt(function(){return Cr(o)&&i({h:o}),e(function(){Cr(o)&&i({h:o})})},[e]),r}function Cr(e){var t,r,n=e.v,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var u={useState:zt,useId:Mo,useReducer:nn,useEffect:Jt,useLayoutEffect:Qt,useInsertionEffect:$o,useTransition:Qo,useDeferredValue:Jo,useSyncExternalStore:Zo,startTransition:zo,useRef:No,useImperativeHandle:To,useMemo:_r,useCallback:Ro,useContext:Lo,useDebugValue:qo,version:"18.3.1",Children:Ci,render:Wo,hydrate:function(e,t,r){return xo(e,t),typeof r=="function"&&r(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Ft(null,e),!0)},createPortal:Vo,createElement:De,createContext:function(e,t){var r={__c:t="__cC"+wo++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=new Set,(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.forEach(function(c){c.__e=!0,Vr(c)})},this.sub=function(a){o.add(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),c&&c.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(e){return De.bind(null,e)},cloneElement:function(e){return rr(e)?Pi.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Re,isValidElement:rr,isElement:rr,isFragment:function(e){return rr(e)&&e.type===Re},isMemo:function(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:Ce,PureComponent:zr,memo:function(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Wr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,De(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(e){function t(r){if(!("ref"in r))return e(r,null);var n=r.ref;delete r.ref;var o=e(r,n);return r.ref=n,o}return t.$$typeof=Di,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Re,Suspense:pr,SuspenseList:Ot,lazy:function(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return De(r,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vi};function Jr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--R){var D=this.tryEntries[R],L=D.completion;if(D.tryLoc==="root")return j("end");if(D.tryLoc<=this.prev){var W=n.call(D,"catchLoc"),K=n.call(D,"finallyLoc");if(W&&K){if(this.prev=0;--j){var R=this.tryEntries[j];if(R.tryLoc<=this.prev&&n.call(R,"finallyLoc")&&this.prev=0;--w){var j=this.tryEntries[w];if(j.finallyLoc===O)return this.complete(j.completion,j.afterLoc),z(j),y}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var j=this.tryEntries[w];if(j.tryLoc===O){var R=j.completion;if(R.type==="throw"){var D=R.arg;z(j)}return D}}throw Error("illegal catch attempt")},delegateYield:function(O,w,j){return this.delegate={iterator:oe(O),resultName:w,nextLoc:j},this.method==="next"&&(this.arg=e),y}},t}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Vt(e,t)}function he(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c,f,m=[],b=!0,l=!1;try{if(c=(o=o.call(r)).next,n===0){if(Object(o)!==o)return;b=!1}else for(;!(b=(i=c.call(o)).done)&&(m.push(i.value),m.length!==n);b=!0);}catch(v){l=!0,a=v}finally{try{if(!b&&o.return!=null&&(f=o.return(),Object(f)!==f))return}finally{if(l)throw a}}return m}}(e,t)||Go(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +import{d as pi,ah as vi,J as hi,v as di,q as yi,P as _i,c as gi,o as bi}from"./framework.QPV3Ar9-.js";import{u as Si}from"./theme._10rLZ6c.js";/*! @docsearch/js 3.8.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t2&&(a.children=arguments.length>3?Wt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Et(e,a,n,o,null)}function Et(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++So,__i:-1,__u:0};return o==null&&H.vnode!=null&&H.vnode(i),i}function Re(e){return e.children}function Ce(e,t){this.props=e,this.context=t}function ct(e,t){if(t==null)return e.__?ct(e.__,e.__i+1):null;for(var r;tt&&Ge.sort(Ur));dr.__r=0}function Io(e,t,r,n,o,i,a,c,f,m,b){var l,v,s,S,g,y=n&&n.__k||Eo,_=t.length;for(r.__d=f,function(h,p,d){var P,E,C,N,I,x=p.length,k=d.length,U=k,z=0;for(h.__k=[],P=0;P0?Et(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E).__=h,E.__b=h.__b+1,C=null,(I=E.__i=wi(E,d,N,U))!==-1&&(U--,(C=d[I])&&(C.__u|=131072)),C==null||C.__v===null?(I==-1&&z--,typeof E.type!="function"&&(E.__u|=65536)):I!==N&&(I==N-1?z--:I==N+1?z++:(I>N?z--:z++,E.__u|=65536))):E=h.__k[P]=null;if(U)for(P=0;P(f==null||131072&f.__u?0:1))for(;a>=0||c=0){if((f=t[a])&&!(131072&f.__u)&&o==f.key&&i===f.type)return a;a--}if(c2&&(c.children=arguments.length>3?Wt.call(arguments,2):r),Et(e.type,c,n||e.key,o||e.ref,null)}Wt=Eo.slice,H={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(c){e=c}throw e}},So=0,Ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Te({},this.state),typeof e=="function"&&(e=e(Te({},r),this.props)),e&&Te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vr(this))},Ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vr(this))},Ce.prototype.render=Re,Ge=[],Oo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ur=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,en=0,Fr=bn(!1),Br=bn(!0),wo=0;var Be,Z,Dr,Sn,lt=0,Ao=[],Y=H,On=Y.__b,wn=Y.__r,En=Y.diffed,jn=Y.__c,Pn=Y.unmount,In=Y.__;function st(e,t){Y.__h&&Y.__h(Z,e,lt||t),lt=0;var r=Z.__H||(Z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function zt(e){return lt=1,nn(Ho,e)}function nn(e,t,r){var n=st(Be++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ho(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],m=n.t(f,c);f!==m&&(n.__N=[m,n.__[1]],n.__c.setState({}))}],n.__c=Z,!Z.u)){var o=function(c,f,m){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(v){return!!v.__c});if(b.every(function(v){return!v.__N}))return!i||i.call(this,c,f,m);var l=!1;return b.forEach(function(v){if(v.__N){var s=v.__[0];v.__=v.__N,v.__N=void 0,s!==v.__[0]&&(l=!0)}}),!(!l&&n.__c.props===c)&&(!i||i.call(this,c,f,m))};Z.u=!0;var i=Z.shouldComponentUpdate,a=Z.componentWillUpdate;Z.componentWillUpdate=function(c,f,m){if(this.__e){var b=i;i=void 0,o(c,f,m),i=b}a&&a.call(this,c,f,m)},Z.shouldComponentUpdate=o}return n.__N||n.__}function Jt(e,t){var r=st(Be++,3);!Y.__s&&on(r.__H,t)&&(r.__=e,r.i=t,Z.__H.__h.push(r))}function Qt(e,t){var r=st(Be++,4);!Y.__s&&on(r.__H,t)&&(r.__=e,r.i=t,Z.__h.push(r))}function No(e){return lt=5,_r(function(){return{current:e}},[])}function To(e,t,r){lt=6,Qt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function _r(e,t){var r=st(Be++,7);return on(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Ro(e,t){return lt=8,_r(function(){return e},t)}function Lo(e){var t=Z.context[e.__c],r=st(Be++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(Z)),t.props.value):e.__}function qo(e,t){Y.useDebugValue&&Y.useDebugValue(t?t(e):e)}function Mo(){var e=st(Be++,11);if(!e.__){for(var t=Z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ii(){for(var e;e=Ao.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mr),e.__H.__h.forEach(Kr),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}Y.__b=function(e){Z=null,On&&On(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),In&&In(e,t)},Y.__r=function(e){wn&&wn(e),Be=0;var t=(Z=e.__c).__H;t&&(Dr===Z?(t.__h=[],Z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(mr),t.__h.forEach(Kr),t.__h=[],Be=0)),Dr=Z},Y.diffed=function(e){En&&En(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ao.push(t)!==1&&Sn===Y.requestAnimationFrame||((Sn=Y.requestAnimationFrame)||ki)(Ii)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Dr=Z=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(mr),r.__h=r.__h.filter(function(n){return!n.__||Kr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Y.__e(n,r.__v)}}),jn&&jn(e,t)},Y.unmount=function(e){Pn&&Pn(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{mr(n)}catch(o){t=o}}),r.__H=void 0,t&&Y.__e(t,r.__v))};var kn=typeof requestAnimationFrame=="function";function ki(e){var t,r=function(){clearTimeout(n),kn&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);kn&&(t=requestAnimationFrame(r))}function mr(e){var t=Z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Z=t}function Kr(e){var t=Z;e.__c=e.__(),Z=t}function on(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ho(e,t){return typeof t=="function"?t(e):t}function Wr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function zr(e,t){this.props=e,this.context=t}(zr.prototype=new Ce).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(e,t){return Wr(this.props,e)||Wr(this.state,t)};var Dn=H.__b;H.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Dn&&Dn(e)};var Di=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Cn=function(e,t){return e==null?null:Le(Le(e).map(t))},Ci={map:Cn,forEach:Cn,count:function(e){return e?Le(e).length:0},only:function(e){var t=Le(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Le},xi=H.__e;H.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}xi(e,t,r,n)};var xn=H.unmount;function Uo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=function(n,o){for(var i in o)n[i]=o[i];return n}({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Uo(n,t,r)})),e}function Fo(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Fo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function pr(){this.__u=0,this.t=null,this.__b=null}function Bo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ot(){this.u=null,this.o=null}H.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),xn&&xn(e)},(pr.prototype=new Ce).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Bo(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(c):c())};r.__R=a;var c=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Fo(f,f.__c.__P,f.__c.__O)}var m;for(n.setState({__a:n.__b=null});m=n.t.pop();)m.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},pr.prototype.componentWillUnmount=function(){this.t=[]},pr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Uo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&De(Re,null,e.fallback);return o&&(o.__u&=-33),[De(Re,null,t.__a?null:e.children),o]};var An=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(n)}}),Ft(De(Ai,{context:t.context},e.__v),t.l)}function Vo(e,t){var r=De(Ni,{__v:e,i:t});return r.containerInfo=t,r}(Ot.prototype=new Ce).__a=function(e){var t=this,r=Bo(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),An(t,e,n)):o()};r?r(i):i()}},Ot.prototype.render=function(e){this.u=null,this.o=new Map;var t=Le(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},Ot.prototype.componentDidUpdate=Ot.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){An(e,r,t)})};var Ko=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ti=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ri=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Li=/[A-Z0-9]/g,qi=typeof document<"u",Mi=function(e){return(typeof Symbol<"u"&&A(Symbol())=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Wo(e,t,r){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof r=="function"&&r(),e?e.__c:null}Ce.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ce.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Nn=H.event;function Hi(){}function Ui(){return this.cancelBubble}function Fi(){return this.defaultPrevented}H.event=function(e){return Nn&&(e=Nn(e)),e.persist=Hi,e.isPropagationStopped=Ui,e.isDefaultPrevented=Fi,e.nativeEvent=e};var an,Bi={enumerable:!1,configurable:!0,get:function(){return this.class}},Tn=H.vnode;H.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var a in r){var c=r[a];if(!(a==="value"&&"defaultValue"in r&&c==null||qi&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var f=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&c===!0?c="":f==="translate"&&c==="no"?c=!1:f[0]==="o"&&f[1]==="n"?f==="ondoubleclick"?a="ondblclick":f!=="onchange"||n!=="input"&&n!=="textarea"||Mi(r.type)?f==="onfocus"?a="onfocusin":f==="onblur"?a="onfocusout":Ri.test(a)&&(a=f):f=a="oninput":i&&Ti.test(a)?a=a.replace(Li,"-$&").toLowerCase():c===null&&(c=void 0),f==="oninput"&&o[a=f]&&(a="oninputCapture"),o[a]=c}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.value.indexOf(m.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.multiple?o.defaultValue.indexOf(m.props.value)!=-1:o.defaultValue==m.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Bi)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Ko,Tn&&Tn(e)};var Rn=H.__r;H.__r=function(e){Rn&&Rn(e),an=e.__c};var Ln=H.diffed;H.diffed=function(e){Ln&&Ln(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),an=null};var Vi={ReactCurrentDispatcher:{current:{readContext:function(e){return an.__n[e.__c].props.value},useCallback:Ro,useContext:Lo,useDebugValue:qo,useDeferredValue:Jo,useEffect:Jt,useId:Mo,useImperativeHandle:To,useInsertionEffect:$o,useLayoutEffect:Qt,useMemo:_r,useReducer:nn,useRef:No,useState:zt,useSyncExternalStore:Zo,useTransition:Qo}}};function rr(e){return!!e&&e.$$typeof===Ko}function zo(e){e()}function Jo(e){return e}function Qo(){return[!1,zo]}var $o=Qt;function Zo(e,t){var r=t(),n=zt({h:{__:r,v:t}}),o=n[0].h,i=n[1];return Qt(function(){o.__=r,o.v=t,Cr(o)&&i({h:o})},[e,r,t]),Jt(function(){return Cr(o)&&i({h:o}),e(function(){Cr(o)&&i({h:o})})},[e]),r}function Cr(e){var t,r,n=e.v,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var u={useState:zt,useId:Mo,useReducer:nn,useEffect:Jt,useLayoutEffect:Qt,useInsertionEffect:$o,useTransition:Qo,useDeferredValue:Jo,useSyncExternalStore:Zo,startTransition:zo,useRef:No,useImperativeHandle:To,useMemo:_r,useCallback:Ro,useContext:Lo,useDebugValue:qo,version:"18.3.1",Children:Ci,render:Wo,hydrate:function(e,t,r){return xo(e,t),typeof r=="function"&&r(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Ft(null,e),!0)},createPortal:Vo,createElement:De,createContext:function(e,t){var r={__c:t="__cC"+wo++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=new Set,(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.forEach(function(c){c.__e=!0,Vr(c)})},this.sub=function(a){o.add(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),c&&c.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(e){return De.bind(null,e)},cloneElement:function(e){return rr(e)?Pi.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Re,isValidElement:rr,isElement:rr,isFragment:function(e){return rr(e)&&e.type===Re},isMemo:function(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:Ce,PureComponent:zr,memo:function(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Wr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,De(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(e){function t(r){if(!("ref"in r))return e(r,null);var n=r.ref;delete r.ref;var o=e(r,n);return r.ref=n,o}return t.$$typeof=Di,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Re,Suspense:pr,SuspenseList:Ot,lazy:function(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return De(r,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vi};function Jr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--R){var D=this.tryEntries[R],L=D.completion;if(D.tryLoc==="root")return j("end");if(D.tryLoc<=this.prev){var W=n.call(D,"catchLoc"),K=n.call(D,"finallyLoc");if(W&&K){if(this.prev=0;--j){var R=this.tryEntries[j];if(R.tryLoc<=this.prev&&n.call(R,"finallyLoc")&&this.prev=0;--w){var j=this.tryEntries[w];if(j.finallyLoc===O)return this.complete(j.completion,j.afterLoc),z(j),y}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var j=this.tryEntries[w];if(j.tryLoc===O){var R=j.completion;if(R.type==="throw"){var D=R.arg;z(j)}return D}}throw Error("illegal catch attempt")},delegateYield:function(O,w,j){return this.delegate={iterator:oe(O),resultName:w,nextLoc:j},this.method==="next"&&(this.arg=e),y}},t}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Vt(e,t)}function he(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c,f,m=[],b=!0,l=!1;try{if(c=(o=o.call(r)).next,n===0){if(Object(o)!==o)return;b=!1}else for(;!(b=(i=c.call(o)).done)&&(m.push(i.value),m.length!==n);b=!0);}catch(v){l=!0,a=v}finally{try{if(!b&&o.return!=null&&(f=o.return(),Object(f)!==f))return}finally{if(l)throw a}}return m}}(e,t)||Go(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jt(e){return function(t){if(Array.isArray(t))return Jr(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Go(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Go(e,t){if(e){if(typeof e=="string")return Jr(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jr(e,t):void 0}}function Qr(e){var t=typeof Map=="function"?new Map:void 0;return Qr=function(r){if(r===null||!function(o){try{return Function.toString.call(o).indexOf("[native code]")!==-1}catch{return typeof o=="function"}}(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return function(o,i,a){if(un())return Reflect.construct.apply(null,arguments);var c=[null];c.push.apply(c,i);var f=new(o.bind.apply(o,c));return a&&Vt(f,a.prototype),f}(r,arguments,Bt(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Vt(n,r)},Qr(e)}function Ki(){return u.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},u.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Yo(){return u.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},u.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Wi=["translations"],Ar="Ctrl",zi=u.forwardRef(function(e,t){var r=e.translations,n=r===void 0?{}:r,o=xe(e,Wi),i=n.buttonText,a=i===void 0?"Search":i,c=n.buttonAriaLabel,f=c===void 0?"Search":c,m=he(zt(null),2),b=m[0],l=m[1];Jt(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?l("⌘"):l(Ar))},[]);var v=he(b===Ar?[Ar,"Ctrl",u.createElement(Ki,null)]:["Meta","Command",b],3),s=v[0],S=v[1],g=v[2];return u.createElement("button",le({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(f," (").concat(S,"+K)")},o,{ref:t}),u.createElement("span",{className:"DocSearch-Button-Container"},u.createElement(Yo,null),u.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),u.createElement("span",{className:"DocSearch-Button-Keys"},b!==null&&u.createElement(u.Fragment,null,u.createElement(Hn,{reactsToKey:s},g),u.createElement(Hn,{reactsToKey:"k"},"K"))))});function Hn(e){var t=e.reactsToKey,r=e.children,n=he(zt(!1),2),o=n[0],i=n[1];return Jt(function(){if(t)return window.addEventListener("keydown",a),window.addEventListener("keyup",c),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",c)};function a(f){f.key===t&&i(!0)}function c(f){f.key!==t&&f.key!=="Meta"||i(!1)}},[t]),u.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},r)}function Xo(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(b[f]=a[f]);return b}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;te})}catch{}const fo=Os?e=>Os.createHTML(e):e=>e,Ic="http://www.w3.org/2000/svg",Lc="http://www.w3.org/1998/Math/MathML",qe=typeof document<"u"?document:null,Sr=qe&&qe.createElement("template"),Nc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?qe.createElementNS(Ic,e):t==="mathml"?qe.createElementNS(Lc,e):n?qe.createElement(e,{is:n}):qe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>qe.createTextNode(e),createComment:e=>qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Sr.innerHTML=fo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Sr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},et="transition",$t="animation",Qt=Symbol("_vtc"),uo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fc=de({},Ti,uo),Hc=e=>(e.displayName="Transition",e.props=Fc,e),Cf=Hc((e,{slots:t})=>Rs(Ml,Dc(e),t)),ut=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},xr=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function Dc(e){const t={};for(const b in e)b in uo||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,x=$c(r),_=x&&x[0],V=x&&x[1],{onBeforeEnter:L,onEnter:D,onEnterCancelled:p,onLeave:g,onLeaveCancelled:P,onBeforeAppear:U=L,onAppear:O=D,onAppearCancelled:B=p}=t,C=(b,F,Y,re)=>{b._enterCancelled=re,dt(b,F?a:l),dt(b,F?f:o),Y&&Y()},I=(b,F)=>{b._isLeaving=!1,dt(b,h),dt(b,y),dt(b,v),F&&F()},A=b=>(F,Y)=>{const re=b?O:D,k=()=>C(F,b,Y);ut(re,[F,k]),Er(()=>{dt(F,b?c:i),Ke(F,b?a:l),xr(re)||Tr(F,s,_,k)})};return de(t,{onBeforeEnter(b){ut(L,[b]),Ke(b,i),Ke(b,o)},onBeforeAppear(b){ut(U,[b]),Ke(b,c),Ke(b,f)},onEnter:A(!1),onAppear:A(!0),onLeave(b,F){b._isLeaving=!0;const Y=()=>I(b,F);Ke(b,h),b._enterCancelled?(Ke(b,v),Rr()):(Rr(),Ke(b,v)),Er(()=>{b._isLeaving&&(dt(b,h),Ke(b,y),xr(g)||Tr(b,s,V,Y))}),ut(g,[b,Y])},onEnterCancelled(b){C(b,!1,void 0,!0),ut(p,[b])},onAppearCancelled(b){C(b,!0,void 0,!0),ut(B,[b])},onLeaveCancelled(b){I(b),ut(P,[b])}})}function $c(e){if(e==null)return null;if(se(e))return[ss(e.enter),ss(e.leave)];{const t=ss(e);return[t,t]}}function ss(e){return Fo(e)}function Ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Qt]||(e[Qt]=new Set)).add(t)}function dt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Qt];n&&(n.delete(t),n.size||(e[Qt]=void 0))}function Er(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let jc=0;function Tr(e,t,n,s){const r=e._endId=++jc,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=Vc(e,t);if(!o)return s();const f=o+"end";let a=0;const h=()=>{e.removeEventListener(f,v),i()},v=y=>{y.target===e&&++a>=c&&h()};setTimeout(()=>{a(n[x]||"").split(", "),r=s(`${et}Delay`),i=s(`${et}Duration`),o=Cr(r,i),l=s(`${$t}Delay`),c=s(`${$t}Duration`),f=Cr(l,c);let a=null,h=0,v=0;t===et?o>0&&(a=et,h=o,v=i.length):t===$t?f>0&&(a=$t,h=f,v=c.length):(h=Math.max(o,f),a=h>0?o>f?et:$t:null,v=a?a===et?i.length:c.length:0);const y=a===et&&/\b(transform|all)(,|$)/.test(s(`${et}Property`).toString());return{type:a,timeout:h,propCount:v,hasTransform:y}}function Cr(e,t){for(;e.lengthAr(n)+Ar(e[s])))}function Ar(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Rr(){return document.body.offsetHeight}function kc(e,t,n){const s=e[Qt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Or=Symbol("_vod"),Uc=Symbol("_vsh"),Wc=Symbol(""),Bc=/(^|;)\s*display\s*:/;function Kc(e,t,n){const s=e.style,r=oe(n);let i=!1;if(n&&!r){if(t)if(oe(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&wn(s,l,"")}else for(const o in t)n[o]==null&&wn(s,o,"");for(const o in n)o==="display"&&(i=!0),wn(s,o,n[o])}else if(r){if(t!==n){const o=s[Wc];o&&(n+=";"+o),s.cssText=n,i=Bc.test(n)}}else t&&e.removeAttribute("style");Or in e&&(e[Or]=i?s.display:"",e[Uc]&&(s.display="none"))}const Mr=/\s*!important$/;function wn(e,t,n){if(K(n))n.forEach(s=>wn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=qc(e,t);Mr.test(n)?e.setProperty(ct(s),n.replace(Mr,""),"important"):e[s]=n}}const Pr=["Webkit","Moz","ms"],rs={};function qc(e,t){const n=rs[t];if(n)return n;let s=Ne(t);if(s!=="filter"&&s in e)return rs[t]=s;s=Ln(s);for(let r=0;ris||(Jc.then(()=>is=0),is=Date.now());function Zc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;De(ea(s,n.value),t,5,[s])};return n.value=e,n.attached=Qc(),n}function ea(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Dr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ta=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?kc(e,s,o):t==="style"?Kc(e,n,s):Zt(t)?Ps(t)||Yc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):na(e,t,s,o))?(Nr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!oe(s))?Nr(e,Ne(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Lr(e,t,s,o))};function na(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Dr(t)&&G(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Dr(t)&&oe(n)?!1:t in e}const sa=["ctrl","shift","alt","meta"],ra={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sa.some(n=>e[`${n}Key`]&&!t.includes(n))},Af=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ct(r.key);if(t.some(o=>o===i||ia[o]===i))return e(r)})},oa=de({patchProp:ta},Nc);let os,$r=!1;function la(){return os=$r?os:cc(oa),$r=!0,os}const Of=(...e)=>{const t=la().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=aa(s);if(r)return n(r,!0,ca(r))},t};function ca(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function aa(e){return oe(e)?document.querySelector(e):e}const fa=window.__VP_SITE_DATA__;function ho(e){return si()?(Bo(e),!0):!1}const ls=new WeakMap,ua=(...e)=>{var t;const n=e[0],s=(t=sn())==null?void 0:t.proxy;if(s==null&&!ji())throw new Error("injectLocal must be called in setup");return s&&ls.has(s)&&n in ls.get(s)?ls.get(s)[n]:bt(...e)},po=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const da=Object.prototype.toString,ha=e=>da.call(e)==="[object Object]",St=()=>{},jr=pa();function pa(){var e,t;return po&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function zs(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const go=e=>e();function ga(e,t={}){let n,s,r=St;const i=c=>{clearTimeout(c),r(),r=St};let o;return c=>{const f=le(e),a=le(t.maxWait);return n&&i(n),f<=0||a!==void 0&&a<=0?(s&&(i(s),s=null),Promise.resolve(c())):new Promise((h,v)=>{r=t.rejectOnCancel?v:h,o=c,a&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,h(o())},a)),n=setTimeout(()=>{s&&i(s),s=null,h(c())},f)})}}function ma(...e){let t=0,n,s=!0,r=St,i,o,l,c,f;!ue(e[0])&&typeof e[0]=="object"?{delay:o,trailing:l=!0,leading:c=!0,rejectOnCancel:f=!1}=e[0]:[o,l=!0,c=!0,f=!1]=e;const a=()=>{n&&(clearTimeout(n),n=void 0,r(),r=St)};return v=>{const y=le(o),x=Date.now()-t,_=()=>i=v();return a(),y<=0?(t=Date.now(),_()):(x>y&&(c||!s)?(t=Date.now(),_()):l&&(i=new Promise((V,L)=>{r=f?L:V,n=setTimeout(()=>{t=Date.now(),s=!0,V(_()),a()},Math.max(0,y-x))})),!c&&!n&&(n=setTimeout(()=>s=!0,y)),s=!1,i)}}function va(e=go,t={}){const{initialState:n="active"}=t,s=Js(n==="active");function r(){s.value=!1}function i(){s.value=!0}const o=(...l)=>{s.value&&e(...l)};return{isActive:Dn(s),pause:r,resume:i,eventFilter:o}}function Vr(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ya(e){return sn()}function cs(e){return Array.isArray(e)?e:[e]}function Js(...e){if(e.length!==1)return vl(...e);const t=e[0];return typeof t=="function"?Dn(pl(()=>({get:t,set:St}))):We(t)}function ba(e,t=200,n={}){return zs(ga(t,n),e)}function _a(e,t=200,n=!1,s=!0,r=!1){return zs(ma(t,n,s,r),e)}function wa(e,t,n={}){const{eventFilter:s=go,...r}=n;return Le(e,zs(s,t),r)}function Sa(e,t,n={}){const{eventFilter:s,initialState:r="active",...i}=n,{eventFilter:o,pause:l,resume:c,isActive:f}=va(s,{initialState:r});return{stop:wa(e,t,{...i,eventFilter:o}),pause:l,resume:c,isActive:f}}function Wn(e,t=!0,n){ya()?Nt(e,n):t?e():$n(e)}function xa(e,t,n){return Le(e,t,{...n,immediate:!0})}const ze=po?window:void 0;function Qs(e){var t;const n=le(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Je(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},s=(l,c,f,a)=>(l.addEventListener(c,f,a),()=>l.removeEventListener(c,f,a)),r=ie(()=>{const l=cs(le(e[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=xa(()=>{var l,c;return[(c=(l=r.value)==null?void 0:l.map(f=>Qs(f)))!=null?c:[ze].filter(f=>f!=null),cs(le(r.value?e[1]:e[0])),cs(Us(r.value?e[2]:e[1])),le(r.value?e[3]:e[2])]},([l,c,f,a])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(f!=null&&f.length))return;const h=ha(a)?{...a}:a;t.push(...l.flatMap(v=>c.flatMap(y=>f.map(x=>s(v,y,x,h)))))},{flush:"post"}),o=()=>{i(),n()};return ho(n),o}function Ea(){const e=Ie(!1),t=sn();return t&&Nt(()=>{e.value=!0},t),e}function Ta(e){const t=Ea();return ie(()=>(t.value,!!e()))}function Ca(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Mf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=ze,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=Ca(t);return Je(r,i,a=>{a.repeat&&le(l)||c(a)&&n(a)},o)}const Aa=Symbol("vueuse-ssr-width");function Ra(){const e=ji()?ua(Aa,null):null;return typeof e=="number"?e:void 0}function mo(e,t={}){const{window:n=ze,ssrWidth:s=Ra()}=t,r=Ta(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=Ie(typeof s=="number"),o=Ie(),l=Ie(!1),c=f=>{l.value=f.matches};return Ji(()=>{if(i.value){i.value=!r.value;const f=le(e).split(",");l.value=f.some(a=>{const h=a.includes("not all"),v=a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),y=a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let x=!!(v||y);return v&&x&&(x=s>=Vr(v[1])),y&&x&&(x=s<=Vr(y[1])),h?!x:x});return}r.value&&(o.value=n.matchMedia(le(e)),l.value=o.value.matches)}),Je(o,"change",c,{passive:!0}),ie(()=>l.value)}const pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gn="__vueuse_ssr_handlers__",Oa=Ma();function Ma(){return gn in pn||(pn[gn]=pn[gn]||{}),pn[gn]}function vo(e,t){return Oa[e]||t}function yo(e){return mo("(prefers-color-scheme: dark)",e)}function Pa(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ia={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},kr="vueuse-storage";function La(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:h=ze,eventFilter:v,onError:y=A=>{console.error(A)},initOnMounted:x}=s,_=(a?Ie:We)(typeof t=="function"?t():t),V=ie(()=>le(e));if(!n)try{n=vo("getDefaultStorage",()=>{var A;return(A=ze)==null?void 0:A.localStorage})()}catch(A){y(A)}if(!n)return _;const L=le(t),D=Pa(L),p=(r=s.serializer)!=null?r:Ia[D],{pause:g,resume:P}=Sa(_,()=>O(_.value),{flush:i,deep:o,eventFilter:v});Le(V,()=>C(),{flush:i}),h&&l&&Wn(()=>{n instanceof Storage?Je(h,"storage",C,{passive:!0}):Je(h,kr,I),x&&C()}),x||C();function U(A,b){if(h){const F={key:V.value,oldValue:A,newValue:b,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(kr,{detail:F}))}}function O(A){try{const b=n.getItem(V.value);if(A==null)U(b,null),n.removeItem(V.value);else{const F=p.write(A);b!==F&&(n.setItem(V.value,F),U(b,F))}}catch(b){y(b)}}function B(A){const b=A?A.newValue:n.getItem(V.value);if(b==null)return c&&L!=null&&n.setItem(V.value,p.write(L)),L;if(!A&&f){const F=p.read(b);return typeof f=="function"?f(F,L):D==="object"&&!Array.isArray(F)?{...L,...F}:F}else return typeof b!="string"?b:p.read(b)}function C(A){if(!(A&&A.storageArea!==n)){if(A&&A.key==null){_.value=L;return}if(!(A&&A.key!==V.value)){g();try{(A==null?void 0:A.newValue)!==p.write(_.value)&&(_.value=B(A))}catch(b){y(b)}finally{A?$n(P):P()}}}}function I(A){C(A.detail)}return _}const Na="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Fa(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=ze,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},v=yo({window:r}),y=ie(()=>v.value?"dark":"light"),x=c||(o==null?Js(s):La(o,s,i,{window:r,listenToStorageChanges:l})),_=ie(()=>x.value==="auto"?y.value:x.value),V=vo("updateHTMLAttrs",(g,P,U)=>{const O=typeof g=="string"?r==null?void 0:r.document.querySelector(g):Qs(g);if(!O)return;const B=new Set,C=new Set;let I=null;if(P==="class"){const b=U.split(/\s/g);Object.values(h).flatMap(F=>(F||"").split(/\s/g)).filter(Boolean).forEach(F=>{b.includes(F)?B.add(F):C.add(F)})}else I={key:P,value:U};if(B.size===0&&C.size===0&&I===null)return;let A;a&&(A=r.document.createElement("style"),A.appendChild(document.createTextNode(Na)),r.document.head.appendChild(A));for(const b of B)O.classList.add(b);for(const b of C)O.classList.remove(b);I&&O.setAttribute(I.key,I.value),a&&(r.getComputedStyle(A).opacity,document.head.removeChild(A))});function L(g){var P;V(t,n,(P=h[g])!=null?P:g)}function D(g){e.onChanged?e.onChanged(g,L):L(g)}Le(_,D,{flush:"post",immediate:!0}),Wn(()=>D(_.value));const p=ie({get(){return f?x.value:_.value},set(g){x.value=g}});return Object.assign(p,{store:x,system:y,state:_})}function Ha(e={}){const{valueDark:t="dark",valueLight:n=""}=e,s=Fa({...e,onChanged:(o,l)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,o==="dark",l,o):l(o)},modes:{dark:t,light:n}}),r=ie(()=>s.system.value);return ie({get(){return s.value==="dark"},set(o){const l=o?"dark":"light";r.value===l?s.value="auto":s.value=l}})}function as(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const Ur=1;function Da(e,t={}){const{throttle:n=0,idle:s=200,onStop:r=St,onScroll:i=St,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:f=ze,onError:a=O=>{console.error(O)}}=t,h=Ie(0),v=Ie(0),y=ie({get(){return h.value},set(O){_(O,void 0)}}),x=ie({get(){return v.value},set(O){_(void 0,O)}});function _(O,B){var C,I,A,b;if(!f)return;const F=le(e);if(!F)return;(A=F instanceof Document?f.document.body:F)==null||A.scrollTo({top:(C=le(B))!=null?C:x.value,left:(I=le(O))!=null?I:y.value,behavior:le(c)});const Y=((b=F==null?void 0:F.document)==null?void 0:b.documentElement)||(F==null?void 0:F.documentElement)||F;y!=null&&(h.value=Y.scrollLeft),x!=null&&(v.value=Y.scrollTop)}const V=Ie(!1),L=It({left:!0,right:!1,top:!0,bottom:!1}),D=It({left:!1,right:!1,top:!1,bottom:!1}),p=O=>{V.value&&(V.value=!1,D.left=!1,D.right=!1,D.top=!1,D.bottom=!1,r(O))},g=ba(p,n+s),P=O=>{var B;if(!f)return;const C=((B=O==null?void 0:O.document)==null?void 0:B.documentElement)||(O==null?void 0:O.documentElement)||Qs(O),{display:I,flexDirection:A,direction:b}=getComputedStyle(C),F=b==="rtl"?-1:1,Y=C.scrollLeft;D.left=Yh.value;const re=Math.abs(Y*F)<=(o.left||0),k=Math.abs(Y*F)+C.clientWidth>=C.scrollWidth-(o.right||0)-Ur;I==="flex"&&A==="row-reverse"?(L.left=k,L.right=re):(L.left=re,L.right=k),h.value=Y;let X=C.scrollTop;O===f.document&&!X&&(X=f.document.body.scrollTop),D.top=Xv.value;const $=Math.abs(X)<=(o.top||0),ae=Math.abs(X)+C.clientHeight>=C.scrollHeight-(o.bottom||0)-Ur;I==="flex"&&A==="column-reverse"?(L.top=ae,L.bottom=$):(L.top=$,L.bottom=ae),v.value=X},U=O=>{var B;if(!f)return;const C=(B=O.target.documentElement)!=null?B:O.target;P(C),V.value=!0,g(O),i(O)};return Je(e,"scroll",n?_a(U,n,!0,!1):U,l),Wn(()=>{try{const O=le(e);if(!O)return;P(O)}catch(O){a(O)}}),Je(e,"scrollend",p,l),{x:y,y:x,isScrolling:V,arrivedState:L,directions:D,measure(){const O=le(e);f&&O&&P(O)}}}function bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const fs=new WeakMap;function Pf(e,t=!1){const n=Ie(t);let s=null,r="";Le(Js(e),l=>{const c=as(le(l));if(c){const f=c;if(fs.get(f)||fs.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=as(le(e));!l||n.value||(jr&&(s=Je(l,"touchmove",c=>{$a(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=as(le(e));!l||!n.value||(jr&&(s==null||s()),l.style.overflow=r,fs.delete(l),n.value=!1)};return ho(o),ie({get(){return n.value},set(l){l?i():o()}})}function If(e={}){const{window:t=ze,...n}=e;return Da(t,n)}function Lf(e={}){const{window:t=ze,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=Ie(n),c=Ie(s),f=()=>{if(t)if(o==="outer")l.value=t.outerWidth,c.value=t.outerHeight;else if(o==="visual"&&t.visualViewport){const{width:h,height:v,scale:y}=t.visualViewport;l.value=Math.round(h*y),c.value=Math.round(v*y)}else i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};f(),Wn(f);const a={passive:!0};if(Je("resize",f,a),t&&o==="visual"&&t.visualViewport&&Je(t.visualViewport,"resize",f,a),r){const h=mo("(orientation: portrait)");Le(h,()=>f())}return{width:l,height:c}}const us={};var ds={};const _o=/^(?:[a-z]+:|\/\/)/i,ja="vitepress-theme-appearance",Va=/#.*$/,ka=/[?#].*$/,Ua=/(?:(^|\/)index)?\.(?:md|html)$/,ye=typeof document<"u",wo={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function Wa(e,t,n=!1){if(t===void 0)return!1;if(e=Wr(`/${e}`),n)return new RegExp(t).test(e);if(Wr(t)!==e)return!1;const s=t.match(Va);return s?(ye?location.hash:"")===s[0]:!0}function Wr(e){return decodeURI(e).replace(ka,"").replace(Ua,"$1")}function Ba(e){return _o.test(e)}function Ka(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!Ba(n)&&Wa(t,`/${n}/`,!0))||"root"}function qa(e,t){var s,r,i,o,l,c,f;const n=Ka(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:xo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function So(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=Ga(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function Ga(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Xa(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function xo(e,t){return[...e.filter(n=>!Xa(t,n)),...t]}const Ya=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,za=/^[a-z]:/i;function Br(e){const t=za.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Ya,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const hs=new Set;function Ja(e){if(hs.size===0){const n=typeof process=="object"&&(ds==null?void 0:ds.VITE_EXTRA_EXTENSIONS)||(us==null?void 0:us.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>hs.add(s))}const t=e.split(".").pop();return t==null||!hs.has(t.toLowerCase())}const Qa=Symbol(),wt=Ie(fa);function Nf(e){const t=ie(()=>qa(wt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?We(!0):n==="force-auto"?yo():n?Ha({storageKey:ja,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):We(!1),r=We(ye?location.hash:"");return ye&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Le(()=>e.data,()=>{r.value=ye?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>So(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function Za(){const e=bt(Qa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function ef(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Kr(e){return _o.test(e)||!e.startsWith("/")?e:ef(wt.value.base,e)}function tf(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),ye){const n="/";t=Br(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${Br(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Sn=[];function Ff(e){Sn.push(e),Vn(()=>{Sn=Sn.filter(t=>t!==e)})}function nf(){let e=wt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=qr(e,n);else if(Array.isArray(e))for(const s of e){const r=qr(s,n);if(r){t=r;break}}return t}function qr(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const sf=Symbol(),Eo="http://a.com",rf=()=>({path:"/",component:null,data:wo});function Hf(e,t){const n=It(rf()),s={route:n,go:r};async function r(l=ye?location.href:"/"){var c,f;l=ps(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(ye&&l!==ps(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(l)))}let i=null;async function o(l,c=0,f=!1){var v,y;if(await((v=s.onBeforePageLoad)==null?void 0:v.call(s,l))===!1)return;const a=new URL(l,Eo),h=i=a.pathname;try{let x=await e(h);if(!x)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:_,__pageData:V}=x;if(!_)throw new Error(`Invalid route component: ${_}`);await((y=s.onAfterPageLoad)==null?void 0:y.call(s,l)),n.path=ye?h:Kr(h),n.component=bn(_),n.data=bn(V),ye&&$n(()=>{let L=wt.value.base+V.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!wt.value.cleanUrls&&!L.endsWith("/")&&(L+=".html"),L!==a.pathname&&(a.pathname=L,l=L+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let D=null;try{D=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if(D){Gr(D,a.hash);return}}window.scrollTo(0,c)})}}catch(x){if(!/fetch|Page not found/.test(x.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(x),!f)try{const _=await fetch(wt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await _.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=ye?h:Kr(h),n.component=t?bn(t):null;const _=ye?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...wo,relativePath:_}}}}return ye&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:h,pathname:v,hash:y,search:x}=new URL(f,c.baseURI),_=new URL(location.href);h===_.origin&&Ja(v)&&(l.preventDefault(),v===_.pathname&&x===_.search?(y!==_.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:_.href,newURL:a}))),y?Gr(c,y,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var f;if(l.state===null)return;const c=ps(location.href);await o(c,l.state&&l.state.scrollPosition||0),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(c))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function of(){const e=bt(sf);if(!e)throw new Error("useRouter() is called without provider.");return e}function To(){return of().route}function Gr(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-nf()+i;requestAnimationFrame(r)}}function ps(e){const t=new URL(e,Eo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),wt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const mn=()=>Sn.forEach(e=>e()),Df=Bs({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=To(),{frontmatter:n,site:s}=Za();return Le(n,mn,{deep:!0,flush:"post"}),()=>Rs(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?Rs(t.component,{onVnodeMounted:mn,onVnodeUpdated:mn,onVnodeUnmounted:mn}):"404 Page Not Found"])}}),$f=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},lf="modulepreload",cf=function(e){return"/"+e},Xr={},jf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=cf(c),c in Xr)return;Xr[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":lf,f||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((v,y)=>{h.addEventListener("load",v),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Vf=Bs({setup(e,{slots:t}){const n=We(!1);return Nt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function kf(){ye&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function Uf(){if(ye){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),af(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function af(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function Wf(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=gs(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(gs);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Ji(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=So(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==a&&h.setAttribute("content",a):gs(["meta",{name:"description",content:a}]),r(xo(o.head,uf(c)))})}function gs([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function ff(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function uf(e){return e.filter(t=>!ff(t))}const ms=new Set,Co=()=>document.createElement("link"),df=e=>{const t=Co();t.rel="prefetch",t.href=e,document.head.appendChild(t)},hf=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let vn;const pf=ye&&(vn=Co())&&vn.relList&&vn.relList.supports&&vn.relList.supports("prefetch")?df:hf;function Bf(){if(!ye||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!ms.has(c)){ms.add(c);const f=tf(c);f&&pf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):ms.add(l))})})};Nt(s);const r=To();Le(()=>r.path,s),Vn(()=>{n&&n.disconnect()})}export{Pi as $,nf as A,yf as B,mf as C,Ie as D,Ff as E,Se as F,ce as G,vf as H,_o as I,To as J,Sc as K,bt as L,Lf as M,Ns as N,Mf as O,$n as P,If as Q,ye as R,Dn as S,Cf as T,gf as U,jf as V,Pf as W,tc as X,_f as Y,Rf as Z,$f as _,oo as a,Af as a0,wf as a1,Wf as a2,sf as a3,Nf as a4,Qa as a5,Df as a6,Vf as a7,wt as a8,Hf as a9,tf as aa,Of as ab,Bf as ac,Uf as ad,kf as ae,Rs as af,Ef as ag,of as ah,Cs as b,xf as c,Bs as d,Tf as e,Ja as f,Kr as g,ie as h,Ba as i,io as j,Us as k,Wa as l,mo as m,Fs as n,Ts as o,We as p,Le as q,bf as r,Ji as s,Uo as t,Za as u,Nt as v,Cl as w,Vn as x,Sf as y,kl as z}; +**/let Os;const wr=typeof window<"u"&&window.trustedTypes;if(wr)try{Os=wr.createPolicy("vue",{createHTML:e=>e})}catch{}const fo=Os?e=>Os.createHTML(e):e=>e,Ic="http://www.w3.org/2000/svg",Lc="http://www.w3.org/1998/Math/MathML",qe=typeof document<"u"?document:null,Sr=qe&&qe.createElement("template"),Nc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?qe.createElementNS(Ic,e):t==="mathml"?qe.createElementNS(Lc,e):n?qe.createElement(e,{is:n}):qe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>qe.createTextNode(e),createComment:e=>qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Sr.innerHTML=fo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Sr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},et="transition",$t="animation",Qt=Symbol("_vtc"),uo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fc=de({},Ti,uo),Hc=e=>(e.displayName="Transition",e.props=Fc,e),Cf=Hc((e,{slots:t})=>Rs(Ml,Dc(e),t)),ut=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},xr=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function Dc(e){const t={};for(const b in e)b in uo||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,x=$c(r),_=x&&x[0],V=x&&x[1],{onBeforeEnter:L,onEnter:D,onEnterCancelled:p,onLeave:g,onLeaveCancelled:P,onBeforeAppear:U=L,onAppear:O=D,onAppearCancelled:B=p}=t,C=(b,F,Y,re)=>{b._enterCancelled=re,dt(b,F?a:l),dt(b,F?f:o),Y&&Y()},I=(b,F)=>{b._isLeaving=!1,dt(b,h),dt(b,y),dt(b,v),F&&F()},A=b=>(F,Y)=>{const re=b?O:D,k=()=>C(F,b,Y);ut(re,[F,k]),Er(()=>{dt(F,b?c:i),Ke(F,b?a:l),xr(re)||Tr(F,s,_,k)})};return de(t,{onBeforeEnter(b){ut(L,[b]),Ke(b,i),Ke(b,o)},onBeforeAppear(b){ut(U,[b]),Ke(b,c),Ke(b,f)},onEnter:A(!1),onAppear:A(!0),onLeave(b,F){b._isLeaving=!0;const Y=()=>I(b,F);Ke(b,h),b._enterCancelled?(Ke(b,v),Rr()):(Rr(),Ke(b,v)),Er(()=>{b._isLeaving&&(dt(b,h),Ke(b,y),xr(g)||Tr(b,s,V,Y))}),ut(g,[b,Y])},onEnterCancelled(b){C(b,!1,void 0,!0),ut(p,[b])},onAppearCancelled(b){C(b,!0,void 0,!0),ut(B,[b])},onLeaveCancelled(b){I(b),ut(P,[b])}})}function $c(e){if(e==null)return null;if(se(e))return[ss(e.enter),ss(e.leave)];{const t=ss(e);return[t,t]}}function ss(e){return Fo(e)}function Ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Qt]||(e[Qt]=new Set)).add(t)}function dt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Qt];n&&(n.delete(t),n.size||(e[Qt]=void 0))}function Er(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let jc=0;function Tr(e,t,n,s){const r=e._endId=++jc,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=Vc(e,t);if(!o)return s();const f=o+"end";let a=0;const h=()=>{e.removeEventListener(f,v),i()},v=y=>{y.target===e&&++a>=c&&h()};setTimeout(()=>{a(n[x]||"").split(", "),r=s(`${et}Delay`),i=s(`${et}Duration`),o=Cr(r,i),l=s(`${$t}Delay`),c=s(`${$t}Duration`),f=Cr(l,c);let a=null,h=0,v=0;t===et?o>0&&(a=et,h=o,v=i.length):t===$t?f>0&&(a=$t,h=f,v=c.length):(h=Math.max(o,f),a=h>0?o>f?et:$t:null,v=a?a===et?i.length:c.length:0);const y=a===et&&/\b(transform|all)(,|$)/.test(s(`${et}Property`).toString());return{type:a,timeout:h,propCount:v,hasTransform:y}}function Cr(e,t){for(;e.lengthAr(n)+Ar(e[s])))}function Ar(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Rr(){return document.body.offsetHeight}function kc(e,t,n){const s=e[Qt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Or=Symbol("_vod"),Uc=Symbol("_vsh"),Wc=Symbol(""),Bc=/(^|;)\s*display\s*:/;function Kc(e,t,n){const s=e.style,r=oe(n);let i=!1;if(n&&!r){if(t)if(oe(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&wn(s,l,"")}else for(const o in t)n[o]==null&&wn(s,o,"");for(const o in n)o==="display"&&(i=!0),wn(s,o,n[o])}else if(r){if(t!==n){const o=s[Wc];o&&(n+=";"+o),s.cssText=n,i=Bc.test(n)}}else t&&e.removeAttribute("style");Or in e&&(e[Or]=i?s.display:"",e[Uc]&&(s.display="none"))}const Mr=/\s*!important$/;function wn(e,t,n){if(K(n))n.forEach(s=>wn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=qc(e,t);Mr.test(n)?e.setProperty(ct(s),n.replace(Mr,""),"important"):e[s]=n}}const Pr=["Webkit","Moz","ms"],rs={};function qc(e,t){const n=rs[t];if(n)return n;let s=Ne(t);if(s!=="filter"&&s in e)return rs[t]=s;s=Ln(s);for(let r=0;ris||(Jc.then(()=>is=0),is=Date.now());function Zc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;De(ea(s,n.value),t,5,[s])};return n.value=e,n.attached=Qc(),n}function ea(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Dr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ta=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?kc(e,s,o):t==="style"?Kc(e,n,s):Zt(t)?Ps(t)||Yc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):na(e,t,s,o))?(Nr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Lr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!oe(s))?Nr(e,Ne(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Lr(e,t,s,o))};function na(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Dr(t)&&G(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Dr(t)&&oe(n)?!1:t in e}const sa=["ctrl","shift","alt","meta"],ra={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>sa.some(n=>e[`${n}Key`]&&!t.includes(n))},Af=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ct(r.key);if(t.some(o=>o===i||ia[o]===i))return e(r)})},oa=de({patchProp:ta},Nc);let os,$r=!1;function la(){return os=$r?os:cc(oa),$r=!0,os}const Of=(...e)=>{const t=la().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=aa(s);if(r)return n(r,!0,ca(r))},t};function ca(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function aa(e){return oe(e)?document.querySelector(e):e}const fa=window.__VP_SITE_DATA__;function ho(e){return si()?(Bo(e),!0):!1}const ls=new WeakMap,ua=(...e)=>{var t;const n=e[0],s=(t=sn())==null?void 0:t.proxy;if(s==null&&!ji())throw new Error("injectLocal must be called in setup");return s&&ls.has(s)&&n in ls.get(s)?ls.get(s)[n]:bt(...e)},po=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const da=Object.prototype.toString,ha=e=>da.call(e)==="[object Object]",St=()=>{},jr=pa();function pa(){var e,t;return po&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function zs(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const go=e=>e();function ga(e,t={}){let n,s,r=St;const i=c=>{clearTimeout(c),r(),r=St};let o;return c=>{const f=le(e),a=le(t.maxWait);return n&&i(n),f<=0||a!==void 0&&a<=0?(s&&(i(s),s=null),Promise.resolve(c())):new Promise((h,v)=>{r=t.rejectOnCancel?v:h,o=c,a&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,h(o())},a)),n=setTimeout(()=>{s&&i(s),s=null,h(c())},f)})}}function ma(...e){let t=0,n,s=!0,r=St,i,o,l,c,f;!ue(e[0])&&typeof e[0]=="object"?{delay:o,trailing:l=!0,leading:c=!0,rejectOnCancel:f=!1}=e[0]:[o,l=!0,c=!0,f=!1]=e;const a=()=>{n&&(clearTimeout(n),n=void 0,r(),r=St)};return v=>{const y=le(o),x=Date.now()-t,_=()=>i=v();return a(),y<=0?(t=Date.now(),_()):(x>y&&(c||!s)?(t=Date.now(),_()):l&&(i=new Promise((V,L)=>{r=f?L:V,n=setTimeout(()=>{t=Date.now(),s=!0,V(_()),a()},Math.max(0,y-x))})),!c&&!n&&(n=setTimeout(()=>s=!0,y)),s=!1,i)}}function va(e=go,t={}){const{initialState:n="active"}=t,s=Js(n==="active");function r(){s.value=!1}function i(){s.value=!0}const o=(...l)=>{s.value&&e(...l)};return{isActive:Dn(s),pause:r,resume:i,eventFilter:o}}function Vr(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function ya(e){return sn()}function cs(e){return Array.isArray(e)?e:[e]}function Js(...e){if(e.length!==1)return vl(...e);const t=e[0];return typeof t=="function"?Dn(pl(()=>({get:t,set:St}))):We(t)}function ba(e,t=200,n={}){return zs(ga(t,n),e)}function _a(e,t=200,n=!1,s=!0,r=!1){return zs(ma(t,n,s,r),e)}function wa(e,t,n={}){const{eventFilter:s=go,...r}=n;return Le(e,zs(s,t),r)}function Sa(e,t,n={}){const{eventFilter:s,initialState:r="active",...i}=n,{eventFilter:o,pause:l,resume:c,isActive:f}=va(s,{initialState:r});return{stop:wa(e,t,{...i,eventFilter:o}),pause:l,resume:c,isActive:f}}function Wn(e,t=!0,n){ya()?Nt(e,n):t?e():$n(e)}function xa(e,t,n){return Le(e,t,{...n,immediate:!0})}const ze=po?window:void 0;function Qs(e){var t;const n=le(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Je(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},s=(l,c,f,a)=>(l.addEventListener(c,f,a),()=>l.removeEventListener(c,f,a)),r=ie(()=>{const l=cs(le(e[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=xa(()=>{var l,c;return[(c=(l=r.value)==null?void 0:l.map(f=>Qs(f)))!=null?c:[ze].filter(f=>f!=null),cs(le(r.value?e[1]:e[0])),cs(Us(r.value?e[2]:e[1])),le(r.value?e[3]:e[2])]},([l,c,f,a])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(f!=null&&f.length))return;const h=ha(a)?{...a}:a;t.push(...l.flatMap(v=>c.flatMap(y=>f.map(x=>s(v,y,x,h)))))},{flush:"post"}),o=()=>{i(),n()};return ho(n),o}function Ea(){const e=Ie(!1),t=sn();return t&&Nt(()=>{e.value=!0},t),e}function Ta(e){const t=Ea();return ie(()=>(t.value,!!e()))}function Ca(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Mf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=ze,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=Ca(t);return Je(r,i,a=>{a.repeat&&le(l)||c(a)&&n(a)},o)}const Aa=Symbol("vueuse-ssr-width");function Ra(){const e=ji()?ua(Aa,null):null;return typeof e=="number"?e:void 0}function mo(e,t={}){const{window:n=ze,ssrWidth:s=Ra()}=t,r=Ta(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=Ie(typeof s=="number"),o=Ie(),l=Ie(!1),c=f=>{l.value=f.matches};return Ji(()=>{if(i.value){i.value=!r.value;const f=le(e).split(",");l.value=f.some(a=>{const h=a.includes("not all"),v=a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),y=a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let x=!!(v||y);return v&&x&&(x=s>=Vr(v[1])),y&&x&&(x=s<=Vr(y[1])),h?!x:x});return}r.value&&(o.value=n.matchMedia(le(e)),l.value=o.value.matches)}),Je(o,"change",c,{passive:!0}),ie(()=>l.value)}const pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gn="__vueuse_ssr_handlers__",Oa=Ma();function Ma(){return gn in pn||(pn[gn]=pn[gn]||{}),pn[gn]}function vo(e,t){return Oa[e]||t}function yo(e){return mo("(prefers-color-scheme: dark)",e)}function Pa(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ia={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},kr="vueuse-storage";function La(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:h=ze,eventFilter:v,onError:y=A=>{console.error(A)},initOnMounted:x}=s,_=(a?Ie:We)(typeof t=="function"?t():t),V=ie(()=>le(e));if(!n)try{n=vo("getDefaultStorage",()=>{var A;return(A=ze)==null?void 0:A.localStorage})()}catch(A){y(A)}if(!n)return _;const L=le(t),D=Pa(L),p=(r=s.serializer)!=null?r:Ia[D],{pause:g,resume:P}=Sa(_,()=>O(_.value),{flush:i,deep:o,eventFilter:v});Le(V,()=>C(),{flush:i}),h&&l&&Wn(()=>{n instanceof Storage?Je(h,"storage",C,{passive:!0}):Je(h,kr,I),x&&C()}),x||C();function U(A,b){if(h){const F={key:V.value,oldValue:A,newValue:b,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(kr,{detail:F}))}}function O(A){try{const b=n.getItem(V.value);if(A==null)U(b,null),n.removeItem(V.value);else{const F=p.write(A);b!==F&&(n.setItem(V.value,F),U(b,F))}}catch(b){y(b)}}function B(A){const b=A?A.newValue:n.getItem(V.value);if(b==null)return c&&L!=null&&n.setItem(V.value,p.write(L)),L;if(!A&&f){const F=p.read(b);return typeof f=="function"?f(F,L):D==="object"&&!Array.isArray(F)?{...L,...F}:F}else return typeof b!="string"?b:p.read(b)}function C(A){if(!(A&&A.storageArea!==n)){if(A&&A.key==null){_.value=L;return}if(!(A&&A.key!==V.value)){g();try{(A==null?void 0:A.newValue)!==p.write(_.value)&&(_.value=B(A))}catch(b){y(b)}finally{A?$n(P):P()}}}}function I(A){C(A.detail)}return _}const Na="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Fa(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=ze,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},v=yo({window:r}),y=ie(()=>v.value?"dark":"light"),x=c||(o==null?Js(s):La(o,s,i,{window:r,listenToStorageChanges:l})),_=ie(()=>x.value==="auto"?y.value:x.value),V=vo("updateHTMLAttrs",(g,P,U)=>{const O=typeof g=="string"?r==null?void 0:r.document.querySelector(g):Qs(g);if(!O)return;const B=new Set,C=new Set;let I=null;if(P==="class"){const b=U.split(/\s/g);Object.values(h).flatMap(F=>(F||"").split(/\s/g)).filter(Boolean).forEach(F=>{b.includes(F)?B.add(F):C.add(F)})}else I={key:P,value:U};if(B.size===0&&C.size===0&&I===null)return;let A;a&&(A=r.document.createElement("style"),A.appendChild(document.createTextNode(Na)),r.document.head.appendChild(A));for(const b of B)O.classList.add(b);for(const b of C)O.classList.remove(b);I&&O.setAttribute(I.key,I.value),a&&(r.getComputedStyle(A).opacity,document.head.removeChild(A))});function L(g){var P;V(t,n,(P=h[g])!=null?P:g)}function D(g){e.onChanged?e.onChanged(g,L):L(g)}Le(_,D,{flush:"post",immediate:!0}),Wn(()=>D(_.value));const p=ie({get(){return f?x.value:_.value},set(g){x.value=g}});return Object.assign(p,{store:x,system:y,state:_})}function Ha(e={}){const{valueDark:t="dark",valueLight:n=""}=e,s=Fa({...e,onChanged:(o,l)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,o==="dark",l,o):l(o)},modes:{dark:t,light:n}}),r=ie(()=>s.system.value);return ie({get(){return s.value==="dark"},set(o){const l=o?"dark":"light";r.value===l?s.value="auto":s.value=l}})}function as(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const Ur=1;function Da(e,t={}){const{throttle:n=0,idle:s=200,onStop:r=St,onScroll:i=St,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:f=ze,onError:a=O=>{console.error(O)}}=t,h=Ie(0),v=Ie(0),y=ie({get(){return h.value},set(O){_(O,void 0)}}),x=ie({get(){return v.value},set(O){_(void 0,O)}});function _(O,B){var C,I,A,b;if(!f)return;const F=le(e);if(!F)return;(A=F instanceof Document?f.document.body:F)==null||A.scrollTo({top:(C=le(B))!=null?C:x.value,left:(I=le(O))!=null?I:y.value,behavior:le(c)});const Y=((b=F==null?void 0:F.document)==null?void 0:b.documentElement)||(F==null?void 0:F.documentElement)||F;y!=null&&(h.value=Y.scrollLeft),x!=null&&(v.value=Y.scrollTop)}const V=Ie(!1),L=It({left:!0,right:!1,top:!0,bottom:!1}),D=It({left:!1,right:!1,top:!1,bottom:!1}),p=O=>{V.value&&(V.value=!1,D.left=!1,D.right=!1,D.top=!1,D.bottom=!1,r(O))},g=ba(p,n+s),P=O=>{var B;if(!f)return;const C=((B=O==null?void 0:O.document)==null?void 0:B.documentElement)||(O==null?void 0:O.documentElement)||Qs(O),{display:I,flexDirection:A,direction:b}=getComputedStyle(C),F=b==="rtl"?-1:1,Y=C.scrollLeft;D.left=Yh.value;const re=Math.abs(Y*F)<=(o.left||0),k=Math.abs(Y*F)+C.clientWidth>=C.scrollWidth-(o.right||0)-Ur;I==="flex"&&A==="row-reverse"?(L.left=k,L.right=re):(L.left=re,L.right=k),h.value=Y;let X=C.scrollTop;O===f.document&&!X&&(X=f.document.body.scrollTop),D.top=Xv.value;const $=Math.abs(X)<=(o.top||0),ae=Math.abs(X)+C.clientHeight>=C.scrollHeight-(o.bottom||0)-Ur;I==="flex"&&A==="column-reverse"?(L.top=ae,L.bottom=$):(L.top=$,L.bottom=ae),v.value=X},U=O=>{var B;if(!f)return;const C=(B=O.target.documentElement)!=null?B:O.target;P(C),V.value=!0,g(O),i(O)};return Je(e,"scroll",n?_a(U,n,!0,!1):U,l),Wn(()=>{try{const O=le(e);if(!O)return;P(O)}catch(O){a(O)}}),Je(e,"scrollend",p,l),{x:y,y:x,isScrolling:V,arrivedState:L,directions:D,measure(){const O=le(e);f&&O&&P(O)}}}function bo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const fs=new WeakMap;function Pf(e,t=!1){const n=Ie(t);let s=null,r="";Le(Js(e),l=>{const c=as(le(l));if(c){const f=c;if(fs.get(f)||fs.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=as(le(e));!l||n.value||(jr&&(s=Je(l,"touchmove",c=>{$a(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=as(le(e));!l||!n.value||(jr&&(s==null||s()),l.style.overflow=r,fs.delete(l),n.value=!1)};return ho(o),ie({get(){return n.value},set(l){l?i():o()}})}function If(e={}){const{window:t=ze,...n}=e;return Da(t,n)}function Lf(e={}){const{window:t=ze,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=Ie(n),c=Ie(s),f=()=>{if(t)if(o==="outer")l.value=t.outerWidth,c.value=t.outerHeight;else if(o==="visual"&&t.visualViewport){const{width:h,height:v,scale:y}=t.visualViewport;l.value=Math.round(h*y),c.value=Math.round(v*y)}else i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};f(),Wn(f);const a={passive:!0};if(Je("resize",f,a),t&&o==="visual"&&t.visualViewport&&Je(t.visualViewport,"resize",f,a),r){const h=mo("(orientation: portrait)");Le(h,()=>f())}return{width:l,height:c}}const us={};var ds={};const _o=/^(?:[a-z]+:|\/\/)/i,ja="vitepress-theme-appearance",Va=/#.*$/,ka=/[?#].*$/,Ua=/(?:(^|\/)index)?\.(?:md|html)$/,ye=typeof document<"u",wo={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function Wa(e,t,n=!1){if(t===void 0)return!1;if(e=Wr(`/${e}`),n)return new RegExp(t).test(e);if(Wr(t)!==e)return!1;const s=t.match(Va);return s?(ye?location.hash:"")===s[0]:!0}function Wr(e){return decodeURI(e).replace(ka,"").replace(Ua,"$1")}function Ba(e){return _o.test(e)}function Ka(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!Ba(n)&&Wa(t,`/${n}/`,!0))||"root"}function qa(e,t){var s,r,i,o,l,c,f;const n=Ka(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:xo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function So(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=Ga(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function Ga(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Xa(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function xo(e,t){return[...e.filter(n=>!Xa(t,n)),...t]}const Ya=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,za=/^[a-z]:/i;function Br(e){const t=za.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Ya,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const hs=new Set;function Ja(e){if(hs.size===0){const n=typeof process=="object"&&(ds==null?void 0:ds.VITE_EXTRA_EXTENSIONS)||(us==null?void 0:us.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>hs.add(s))}const t=e.split(".").pop();return t==null||!hs.has(t.toLowerCase())}const Qa=Symbol(),wt=Ie(fa);function Nf(e){const t=ie(()=>qa(wt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?We(!0):n==="force-auto"?yo():n?Ha({storageKey:ja,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):We(!1),r=We(ye?location.hash:"");return ye&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Le(()=>e.data,()=>{r.value=ye?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>So(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function Za(){const e=bt(Qa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function ef(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Kr(e){return _o.test(e)||!e.startsWith("/")?e:ef(wt.value.base,e)}function tf(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),ye){const n="/";t=Br(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${Br(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Sn=[];function Ff(e){Sn.push(e),Vn(()=>{Sn=Sn.filter(t=>t!==e)})}function nf(){let e=wt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=qr(e,n);else if(Array.isArray(e))for(const s of e){const r=qr(s,n);if(r){t=r;break}}return t}function qr(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const sf=Symbol(),Eo="http://a.com",rf=()=>({path:"/",component:null,data:wo});function Hf(e,t){const n=It(rf()),s={route:n,go:r};async function r(l=ye?location.href:"/"){var c,f;l=ps(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(ye&&l!==ps(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(l)))}let i=null;async function o(l,c=0,f=!1){var v,y;if(await((v=s.onBeforePageLoad)==null?void 0:v.call(s,l))===!1)return;const a=new URL(l,Eo),h=i=a.pathname;try{let x=await e(h);if(!x)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:_,__pageData:V}=x;if(!_)throw new Error(`Invalid route component: ${_}`);await((y=s.onAfterPageLoad)==null?void 0:y.call(s,l)),n.path=ye?h:Kr(h),n.component=bn(_),n.data=bn(V),ye&&$n(()=>{let L=wt.value.base+V.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!wt.value.cleanUrls&&!L.endsWith("/")&&(L+=".html"),L!==a.pathname&&(a.pathname=L,l=L+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let D=null;try{D=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if(D){Gr(D,a.hash);return}}window.scrollTo(0,c)})}}catch(x){if(!/fetch|Page not found/.test(x.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(x),!f)try{const _=await fetch(wt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await _.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=ye?h:Kr(h),n.component=t?bn(t):null;const _=ye?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...wo,relativePath:_}}}}return ye&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:h,pathname:v,hash:y,search:x}=new URL(f,c.baseURI),_=new URL(location.href);h===_.origin&&Ja(v)&&(l.preventDefault(),v===_.pathname&&x===_.search?(y!==_.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:_.href,newURL:a}))),y?Gr(c,y,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var f;if(l.state===null)return;const c=ps(location.href);await o(c,l.state&&l.state.scrollPosition||0),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(c))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function of(){const e=bt(sf);if(!e)throw new Error("useRouter() is called without provider.");return e}function To(){return of().route}function Gr(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-nf()+i;requestAnimationFrame(r)}}function ps(e){const t=new URL(e,Eo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),wt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const mn=()=>Sn.forEach(e=>e()),Df=Bs({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=To(),{frontmatter:n,site:s}=Za();return Le(n,mn,{deep:!0,flush:"post"}),()=>Rs(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?Rs(t.component,{onVnodeMounted:mn,onVnodeUpdated:mn,onVnodeUnmounted:mn}):"404 Page Not Found"])}}),$f=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},lf="modulepreload",cf=function(e){return"/"+e},Xr={},jf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=cf(c),c in Xr)return;Xr[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":lf,f||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),f)return new Promise((v,y)=>{h.addEventListener("load",v),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Vf=Bs({setup(e,{slots:t}){const n=We(!1);return Nt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function kf(){ye&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function Uf(){if(ye){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),af(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function af(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function Wf(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=gs(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(gs);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Ji(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=So(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==a&&h.setAttribute("content",a):gs(["meta",{name:"description",content:a}]),r(xo(o.head,uf(c)))})}function gs([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function ff(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function uf(e){return e.filter(t=>!ff(t))}const ms=new Set,Co=()=>document.createElement("link"),df=e=>{const t=Co();t.rel="prefetch",t.href=e,document.head.appendChild(t)},hf=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let vn;const pf=ye&&(vn=Co())&&vn.relList&&vn.relList.supports&&vn.relList.supports("prefetch")?df:hf;function Bf(){if(!ye||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!ms.has(c)){ms.add(c);const f=tf(c);f&&pf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):ms.add(l))})})};Nt(s);const r=To();Le(()=>r.path,s),Vn(()=>{n&&n.disconnect()})}export{Pi as $,nf as A,yf as B,mf as C,Ie as D,Ff as E,Se as F,ce as G,vf as H,_o as I,To as J,Sc as K,bt as L,Lf as M,Ns as N,Mf as O,$n as P,If as Q,ye as R,Dn as S,Cf as T,gf as U,jf as V,Pf as W,tc as X,_f as Y,Rf as Z,$f as _,oo as a,Af as a0,wf as a1,Rs as a2,Wf as a3,sf as a4,Nf as a5,Qa as a6,Df as a7,Vf as a8,wt as a9,Hf as aa,tf as ab,Of as ac,Bf as ad,Uf as ae,kf as af,Ef as ag,of as ah,Cs as b,xf as c,Bs as d,Tf as e,Ja as f,Kr as g,ie as h,Ba as i,io as j,Us as k,Wa as l,mo as m,Fs as n,Ts as o,We as p,Le as q,bf as r,Ji as s,Uo as t,Za as u,Nt as v,Cl as w,Vn as x,Sf as y,kl as z}; diff --git a/assets/chunks/theme.DJQtrHna.js b/assets/chunks/theme.DJQtrHna.js deleted file mode 100644 index ec8f83c73d..0000000000 --- a/assets/chunks/theme.DJQtrHna.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPAlgoliaSearchBox.BlguZ0-2.js","assets/chunks/framework.CSeR4K32.js"])))=>i.map(i=>d[i]); -import{d as m,c as u,r as c,n as I,o as a,a as z,t as M,b as k,w as f,T as ue,e as h,_ as b,u as Ae,i as He,f as Be,g as de,h as g,j as d,k as r,l as K,m as re,p as w,q as D,s as Y,v as j,x as Q,y as ve,z as Ee,A as Fe,F as A,B as H,C as W,D as ge,E as Z,G as _,H as E,I as $e,J as x,K as U,L as ee,M as De,N as ye,O as Oe,P as Pe,Q as Le,R as te,S as Ge,U as Ue,V as je,W as Ve,X as Se,Y as ze,Z as Ke,$ as We,a0 as qe,a1 as Re}from"./framework.CSeR4K32.js";const Je=m({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(s){return(e,t)=>(a(),u("span",{class:I(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[z(M(e.text),1)])],2))}}),Xe={key:0,class:"VPBackdrop"},Ye=m({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(s){return(e,t)=>(a(),k(ue,{name:"fade"},{default:f(()=>[e.show?(a(),u("div",Xe)):h("",!0)]),_:1}))}}),Qe=b(Ye,[["__scopeId","data-v-c79a1216"]]),V=Ae;function Ze(s,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(s,e):(s(),(o=!0)&&setTimeout(()=>o=!1,e))}}function ie(s){return s.startsWith("/")?s:`/${s}`}function pe(s){const{pathname:e,search:t,hash:o,protocol:n}=new URL(s,"http://a.com");if(He(s)||s.startsWith("#")||!n.startsWith("http")||!Be(e))return s;const{site:i}=V(),l=e.endsWith("/")||e.endsWith(".html")?s:s.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${o}`);return de(l)}function R({correspondingLink:s=!1}={}){const{site:e,localeIndex:t,page:o,theme:n,hash:i}=V(),l=g(()=>{var p,$;return{label:(p=e.value.locales[t.value])==null?void 0:p.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:g(()=>Object.entries(e.value.locales).flatMap(([p,$])=>l.value.label===$.label?[]:{text:$.label,link:xe($.link||(p==="root"?"/":`/${p}/`),n.value.i18nRouting!==!1&&s,o.value.relativePath.slice(l.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:l}}function xe(s,e,t,o){return e?s.replace(/\/$/,"")+ie(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,o?".html":"")):s}const et={class:"NotFound"},tt={class:"code"},nt={class:"title"},ot={class:"quote"},st={class:"action"},at=["href","aria-label"],rt=m({__name:"NotFound",setup(s){const{theme:e}=V(),{currentLang:t}=R();return(o,n)=>{var i,l,v,p,$;return a(),u("div",et,[d("p",tt,M(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),d("h1",nt,M(((l=r(e).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),n[0]||(n[0]=d("div",{class:"divider"},null,-1)),d("blockquote",ot,M(((v=r(e).notFound)==null?void 0:v.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",st,[d("a",{class:"link",href:r(de)(r(t).link),"aria-label":((p=r(e).notFound)==null?void 0:p.linkLabel)??"go to home"},M((($=r(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,at)])])}}}),it=b(rt,[["__scopeId","data-v-d6be1790"]]);function Te(s,e){if(Array.isArray(s))return J(s);if(s==null)return[];e=ie(e);const t=Object.keys(s).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(ie(n))),o=t?s[t]:[];return Array.isArray(o)?J(o):J(o.items,o.base)}function lt(s){const e=[];let t=0;for(const o in s){const n=s[o];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function ct(s){const e=[];function t(o){for(const n of o)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(s),e}function le(s,e){return Array.isArray(e)?e.some(t=>le(s,t)):K(s,e.link)?!0:e.items?le(s,e.items):!1}function J(s,e){return[...s].map(t=>{const o={...t},n=o.base||e;return n&&o.link&&(o.link=n+o.link),o.items&&(o.items=J(o.items,n)),o})}function O(){const{frontmatter:s,page:e,theme:t}=V(),o=re("(min-width: 960px)"),n=w(!1),i=g(()=>{const C=t.value.sidebar,N=e.value.relativePath;return C?Te(C,N):[]}),l=w(i.value);D(i,(C,N)=>{JSON.stringify(C)!==JSON.stringify(N)&&(l.value=i.value)});const v=g(()=>s.value.sidebar!==!1&&l.value.length>0&&s.value.layout!=="home"),p=g(()=>$?s.value.aside==null?t.value.aside==="left":s.value.aside==="left":!1),$=g(()=>s.value.layout==="home"?!1:s.value.aside!=null?!!s.value.aside:t.value.aside!==!1),S=g(()=>v.value&&o.value),y=g(()=>v.value?lt(l.value):[]);function P(){n.value=!0}function T(){n.value=!1}function L(){n.value?T():P()}return{isOpen:n,sidebar:l,sidebarGroups:y,hasSidebar:v,hasAside:$,leftAside:p,isSidebarEnabled:S,open:P,close:T,toggle:L}}function ut(s,e){let t;Y(()=>{t=s.value?document.activeElement:void 0}),j(()=>{window.addEventListener("keyup",o)}),Q(()=>{window.removeEventListener("keyup",o)});function o(n){n.key==="Escape"&&s.value&&(e(),t==null||t.focus())}}function dt(s){const{page:e,hash:t}=V(),o=w(!1),n=g(()=>s.value.collapsed!=null),i=g(()=>!!s.value.link),l=w(!1),v=()=>{l.value=K(e.value.relativePath,s.value.link)};D([e,s,t],v),j(v);const p=g(()=>l.value?!0:s.value.items?le(e.value.relativePath,s.value.items):!1),$=g(()=>!!(s.value.items&&s.value.items.length));Y(()=>{o.value=!!(n.value&&s.value.collapsed)}),ve(()=>{(l.value||p.value)&&(o.value=!1)});function S(){n.value&&(o.value=!o.value)}return{collapsed:o,collapsible:n,isLink:i,isActiveLink:l,hasActiveLink:p,hasChildren:$,toggle:S}}function vt(){const{hasSidebar:s}=O(),e=re("(min-width: 960px)"),t=re("(min-width: 1280px)");return{isAsideEnabled:g(()=>!t.value&&!e.value?!1:s.value?t.value:e.value)}}const pt=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,ce=[];function Ne(s){return typeof s.outline=="object"&&!Array.isArray(s.outline)&&s.outline.label||s.outlineTitle||"On this page"}function fe(s){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const o=Number(t.tagName[1]);return{element:t,title:ft(t),link:"#"+t.id,level:o}});return ht(e,s)}function ft(s){let e="";for(const t of s.childNodes)if(t.nodeType===1){if(pt.test(t.className))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function ht(s,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[o,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return kt(s,o,n)}function mt(s,e){const{isAsideEnabled:t}=vt(),o=Ze(i,100);let n=null;j(()=>{requestAnimationFrame(i),window.addEventListener("scroll",o)}),Ee(()=>{l(location.hash)}),Q(()=>{window.removeEventListener("scroll",o)});function i(){if(!t.value)return;const v=window.scrollY,p=window.innerHeight,$=document.body.offsetHeight,S=Math.abs(v+p-$)<1,y=ce.map(({element:T,link:L})=>({link:L,top:_t(T)})).filter(({top:T})=>!Number.isNaN(T)).sort((T,L)=>T.top-L.top);if(!y.length){l(null);return}if(v<1){l(null);return}if(S){l(y[y.length-1].link);return}let P=null;for(const{link:T,top:L}of y){if(L>v+Fe()+4)break;P=T}l(P)}function l(v){n&&n.classList.remove("active"),v==null?n=null:n=s.value.querySelector(`a[href="${decodeURIComponent(v)}"]`);const p=n;p?(p.classList.add("active"),e.value.style.top=p.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function _t(s){let e=0;for(;s!==document.body;){if(s===null)return NaN;e+=s.offsetTop,s=s.offsetParent}return e}function kt(s,e,t){ce.length=0;const o=[],n=[];return s.forEach(i=>{const l={...i,children:[]};let v=n[n.length-1];for(;v&&v.level>=l.level;)n.pop(),v=n[n.length-1];if(l.element.classList.contains("ignore-header")||v&&"shouldIgnore"in v){n.push({level:l.level,shouldIgnore:!0});return}l.level>t||l.level{const n=W("VPDocOutlineItem",!0);return a(),u("ul",{class:I(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),u(A,null,H(t.headers,({children:i,link:l,title:v})=>(a(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:e,title:v},M(v),9,bt),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):h("",!0)]))),256))],2)}}}),we=b(gt,[["__scopeId","data-v-b933a997"]]),$t={class:"content"},yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Pt=m({__name:"VPDocAsideOutline",setup(s){const{frontmatter:e,theme:t}=V(),o=ge([]);Z(()=>{o.value=fe(e.value.outline??t.value.outline)});const n=w(),i=w();return mt(n,i),(l,v)=>(a(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:I(["VPDocAsideOutline",{"has-outline":o.value.length>0}]),ref_key:"container",ref:n},[d("div",$t,[d("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),d("div",yt,M(r(Ne)(r(t))),1),_(we,{headers:o.value,root:!0},null,8,["headers"])])],2))}}),Lt=b(Pt,[["__scopeId","data-v-a5bbad30"]]),Vt={class:"VPDocAsideCarbonAds"},St=m({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(s){const e=()=>null;return(t,o)=>(a(),u("div",Vt,[_(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Tt={class:"VPDocAside"},Nt=m({__name:"VPDocAside",setup(s){const{theme:e}=V();return(t,o)=>(a(),u("div",Tt,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),_(Lt),c(t.$slots,"aside-outline-after",{},void 0,!0),o[0]||(o[0]=d("div",{class:"spacer"},null,-1)),c(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(St,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):h("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}}),wt=b(Nt,[["__scopeId","data-v-3f215769"]]);function It(){const{theme:s,page:e}=V();return g(()=>{const{text:t="Edit this page",pattern:o=""}=s.value.editLink||{};let n;return typeof o=="function"?n=o(e.value):n=o.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function Mt(){const{page:s,theme:e,frontmatter:t}=V();return g(()=>{var $,S,y,P,T,L,C,N;const o=Te(e.value.sidebar,s.value.relativePath),n=ct(o),i=Ct(n,B=>B.link.replace(/[?#].*$/,"")),l=i.findIndex(B=>K(s.value.relativePath,B.link)),v=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((S=e.value.docFooter)==null?void 0:S.next)===!1&&!t.value.next||t.value.next===!1;return{prev:v?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[l-1])==null?void 0:y.docFooterText)??((P=i[l-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((T=i[l-1])==null?void 0:T.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((L=i[l+1])==null?void 0:L.docFooterText)??((C=i[l+1])==null?void 0:C.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((N=i[l+1])==null?void 0:N.link)}}})}function Ct(s,e){const t=new Set;return s.filter(o=>{const n=e(o);return t.has(n)?!1:t.add(n)})}const F=m({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(s){const e=s,t=g(()=>e.tag??(e.href?"a":"span")),o=g(()=>e.href&&$e.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(E(t.value),{class:I(["VPLink",{link:n.href,"vp-external-link-icon":o.value,"no-icon":n.noIcon}]),href:n.href?r(pe)(n.href):void 0,target:n.target??(o.value?"_blank":void 0),rel:n.rel??(o.value?"noreferrer":void 0)},{default:f(()=>[c(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),At={class:"VPLastUpdated"},Ht=["datetime"],Bt=m({__name:"VPDocFooterLastUpdated",setup(s){const{theme:e,page:t,lang:o}=V(),n=g(()=>new Date(t.value.lastUpdated)),i=g(()=>n.value.toISOString()),l=w("");return j(()=>{Y(()=>{var v,p,$;l.value=new Intl.DateTimeFormat((p=(v=e.value.lastUpdated)==null?void 0:v.formatOptions)!=null&&p.forceLocale?o.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(v,p)=>{var $;return a(),u("p",At,[z(M((($=r(e).lastUpdated)==null?void 0:$.text)||r(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:i.value},M(l.value),9,Ht)])}}}),Et=b(Bt,[["__scopeId","data-v-e98dd255"]]),Ft={key:0,class:"VPDocFooter"},Dt={key:0,class:"edit-info"},Ot={key:0,class:"edit-link"},Gt={key:1,class:"last-updated"},Ut={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},jt={class:"pager"},zt=["innerHTML"],Kt=["innerHTML"],Wt={class:"pager"},qt=["innerHTML"],Rt=["innerHTML"],Jt=m({__name:"VPDocFooter",setup(s){const{theme:e,page:t,frontmatter:o}=V(),n=It(),i=Mt(),l=g(()=>e.value.editLink&&o.value.editLink!==!1),v=g(()=>t.value.lastUpdated),p=g(()=>l.value||v.value||i.value.prev||i.value.next);return($,S)=>{var y,P,T,L;return p.value?(a(),u("footer",Ft,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||v.value?(a(),u("div",Dt,[l.value?(a(),u("div",Ot,[_(F,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:f(()=>[S[0]||(S[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),z(" "+M(r(n).text),1)]),_:1,__:[0]},8,["href"])])):h("",!0),v.value?(a(),u("div",Gt,[_(Et)])):h("",!0)])):h("",!0),(y=r(i).prev)!=null&&y.link||(P=r(i).next)!=null&&P.link?(a(),u("nav",Ut,[S[1]||(S[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",jt,[(T=r(i).prev)!=null&&T.link?(a(),k(F,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:f(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.prev)||"Previous page"},null,8,zt),d("span",{class:"title",innerHTML:r(i).prev.text},null,8,Kt)]}),_:1},8,["href"])):h("",!0)]),d("div",Wt,[(L=r(i).next)!=null&&L.link?(a(),k(F,{key:0,class:"pager-link next",href:r(i).next.link},{default:f(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.next)||"Next page"},null,8,qt),d("span",{class:"title",innerHTML:r(i).next.text},null,8,Rt)]}),_:1},8,["href"])):h("",!0)])])):h("",!0)])):h("",!0)}}}),Xt=b(Jt,[["__scopeId","data-v-e257564d"]]),Yt={class:"container"},Qt={class:"aside-container"},Zt={class:"aside-content"},xt={class:"content"},en={class:"content-container"},tn={class:"main"},nn=m({__name:"VPDoc",setup(s){const{theme:e}=V(),t=x(),{hasSidebar:o,hasAside:n,leftAside:i}=O(),l=g(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(v,p)=>{const $=W("Content");return a(),u("div",{class:I(["VPDoc",{"has-sidebar":r(o),"has-aside":r(n)}])},[c(v.$slots,"doc-top",{},void 0,!0),d("div",Yt,[r(n)?(a(),u("div",{key:0,class:I(["aside",{"left-aside":r(i)}])},[p[0]||(p[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Qt,[d("div",Zt,[_(wt,null,{"aside-top":f(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):h("",!0),d("div",xt,[d("div",en,[c(v.$slots,"doc-before",{},void 0,!0),d("main",tn,[_($,{class:I(["vp-doc",[l.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),_(Xt,null,{"doc-footer-before":f(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(v.$slots,"doc-after",{},void 0,!0)])])]),c(v.$slots,"doc-bottom",{},void 0,!0)],2)}}}),on=b(nn,[["__scopeId","data-v-39a288b8"]]),sn=m({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(s){const e=s,t=g(()=>e.href&&$e.test(e.href)),o=g(()=>e.tag||(e.href?"a":"button"));return(n,i)=>(a(),k(E(o.value),{class:I(["VPButton",[n.size,n.theme]]),href:n.href?r(pe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[z(M(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),an=b(sn,[["__scopeId","data-v-fa7799d5"]]),rn=["src","alt"],ln=m({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(s){return(e,t)=>{const o=W("VPImage",!0);return e.image?(a(),u(A,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),u("img",U({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,rn)):(a(),u(A,{key:1},[_(o,U({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),_(o,U({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):h("",!0)}}}),X=b(ln,[["__scopeId","data-v-8426fc1a"]]),cn={class:"container"},un={class:"main"},dn={class:"heading"},vn=["innerHTML"],pn=["innerHTML"],fn=["innerHTML"],hn={key:0,class:"actions"},mn={key:0,class:"image"},_n={class:"image-container"},kn=m({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(s){const e=ee("hero-image-slot-exists");return(t,o)=>(a(),u("div",{class:I(["VPHero",{"has-image":t.image||r(e)}])},[d("div",cn,[d("div",un,[c(t.$slots,"home-hero-info-before",{},void 0,!0),c(t.$slots,"home-hero-info",{},()=>[d("h1",dn,[t.name?(a(),u("span",{key:0,innerHTML:t.name,class:"name clip"},null,8,vn)):h("",!0),t.text?(a(),u("span",{key:1,innerHTML:t.text,class:"text"},null,8,pn)):h("",!0)]),t.tagline?(a(),u("p",{key:0,innerHTML:t.tagline,class:"tagline"},null,8,fn)):h("",!0)],!0),c(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),u("div",hn,[(a(!0),u(A,null,H(t.actions,n=>(a(),u("div",{key:n.link,class:"action"},[_(an,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):h("",!0),c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),u("div",mn,[d("div",_n,[o[0]||(o[0]=d("div",{class:"image-bg"},null,-1)),c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):h("",!0)],!0)])])):h("",!0)])],2))}}),bn=b(kn,[["__scopeId","data-v-4f9c455b"]]),gn=m({__name:"VPHomeHero",setup(s){const{frontmatter:e}=V();return(t,o)=>r(e).hero?(a(),k(bn,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":f(()=>[c(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[c(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[c(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[c(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):h("",!0)}}),$n={class:"box"},yn={key:0,class:"icon"},Pn=["innerHTML"],Ln=["innerHTML"],Vn=["innerHTML"],Sn={key:4,class:"link-text"},Tn={class:"link-text-value"},Nn=m({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(s){return(e,t)=>(a(),k(F,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[d("article",$n,[typeof e.icon=="object"&&e.icon.wrap?(a(),u("div",yn,[_(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Pn)):h("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Ln),e.details?(a(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,Vn)):h("",!0),e.linkText?(a(),u("div",Sn,[d("p",Tn,[z(M(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):h("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),wn=b(Nn,[["__scopeId","data-v-a3976bdc"]]),In={key:0,class:"VPFeatures"},Mn={class:"container"},Cn={class:"items"},An=m({__name:"VPFeatures",props:{features:{}},setup(s){const e=s,t=g(()=>{const o=e.features.length;if(o){if(o===2)return"grid-2";if(o===3)return"grid-3";if(o%3===0)return"grid-6";if(o>3)return"grid-4"}else return});return(o,n)=>o.features?(a(),u("div",In,[d("div",Mn,[d("div",Cn,[(a(!0),u(A,null,H(o.features,i=>(a(),u("div",{key:i.title,class:I(["item",[t.value]])},[_(wn,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):h("",!0)}}),Hn=b(An,[["__scopeId","data-v-a6181336"]]),Bn=m({__name:"VPHomeFeatures",setup(s){const{frontmatter:e}=V();return(t,o)=>r(e).features?(a(),k(Hn,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):h("",!0)}}),En=m({__name:"VPHomeContent",setup(s){const{width:e}=De({initialWidth:0,includeScrollbar:!1});return(t,o)=>(a(),u("div",{class:"vp-doc container",style:ye(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[c(t.$slots,"default",{},void 0,!0)],4))}}),Fn=b(En,[["__scopeId","data-v-8e2d4988"]]),Dn=m({__name:"VPHome",setup(s){const{frontmatter:e,theme:t}=V();return(o,n)=>{const i=W("Content");return a(),u("div",{class:I(["VPHome",{"external-link-icon-enabled":r(t).externalLinkIcon}])},[c(o.$slots,"home-hero-before",{},void 0,!0),_(gn,null,{"home-hero-info-before":f(()=>[c(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(o.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(o.$slots,"home-hero-after",{},void 0,!0),c(o.$slots,"home-features-before",{},void 0,!0),_(Bn),c(o.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(Fn,{key:0},{default:f(()=>[_(i)]),_:1})):(a(),k(i,{key:1}))],2)}}}),On=b(Dn,[["__scopeId","data-v-8b561e3d"]]),Gn={},Un={class:"VPPage"};function jn(s,e){const t=W("Content");return a(),u("div",Un,[c(s.$slots,"page-top"),_(t),c(s.$slots,"page-bottom")])}const zn=b(Gn,[["render",jn]]),Kn=m({__name:"VPContent",setup(s){const{page:e,frontmatter:t}=V(),{hasSidebar:o}=O();return(n,i)=>(a(),u("div",{class:I(["VPContent",{"has-sidebar":r(o),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?c(n.$slots,"not-found",{key:0},()=>[_(it)],!0):r(t).layout==="page"?(a(),k(zn,{key:1},{"page-top":f(()=>[c(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[c(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(On,{key:2},{"home-hero-before":f(()=>[c(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[c(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[c(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[c(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[c(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(E(r(t).layout),{key:3})):(a(),k(on,{key:4},{"doc-top":f(()=>[c(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[c(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[c(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[c(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[c(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[c(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[c(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[c(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Wn=b(Kn,[["__scopeId","data-v-1428d186"]]),qn={class:"container"},Rn=["innerHTML"],Jn=["innerHTML"],Xn=m({__name:"VPFooter",setup(s){const{theme:e,frontmatter:t}=V(),{hasSidebar:o}=O();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),u("footer",{key:0,class:I(["VPFooter",{"has-sidebar":r(o)}])},[d("div",qn,[r(e).footer.message?(a(),u("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,Rn)):h("",!0),r(e).footer.copyright?(a(),u("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,Jn)):h("",!0)])],2)):h("",!0)}}),Yn=b(Xn,[["__scopeId","data-v-e315a0ad"]]);function Qn(){const{theme:s,frontmatter:e}=V(),t=ge([]),o=g(()=>t.value.length>0);return Z(()=>{t.value=fe(e.value.outline??s.value.outline)}),{headers:t,hasLocalNav:o}}const Zn={class:"menu-text"},xn={class:"header"},eo={class:"outline"},to=m({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(s){const e=s,{theme:t}=V(),o=w(!1),n=w(0),i=w(),l=w();function v(y){var P;(P=i.value)!=null&&P.contains(y.target)||(o.value=!1)}D(o,y=>{if(y){document.addEventListener("click",v);return}document.removeEventListener("click",v)}),Oe("Escape",()=>{o.value=!1}),Z(()=>{o.value=!1});function p(){o.value=!o.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(y){y.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Pe(()=>{o.value=!1}))}function S(){o.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,P)=>(a(),u("div",{class:"VPLocalNavOutlineDropdown",style:ye({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),u("button",{key:0,onClick:p,class:I({open:o.value})},[d("span",Zn,M(r(Ne)(r(t))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(a(),u("button",{key:1,onClick:S},M(r(t).returnToTopLabel||"Return to top"),1)),_(ue,{name:"flyout"},{default:f(()=>[o.value?(a(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",xn,[d("a",{class:"top-link",href:"#",onClick:S},M(r(t).returnToTopLabel||"Return to top"),1)]),d("div",eo,[_(we,{headers:y.headers},null,8,["headers"])])],512)):h("",!0)]),_:1})],4))}}),no=b(to,[["__scopeId","data-v-8a42e2b4"]]),oo={class:"container"},so=["aria-expanded"],ao={class:"menu-text"},ro=m({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(s){const{theme:e,frontmatter:t}=V(),{hasSidebar:o}=O(),{headers:n}=Qn(),{y:i}=Le(),l=w(0);j(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Z(()=>{n.value=fe(t.value.outline??e.value.outline)});const v=g(()=>n.value.length===0),p=g(()=>v.value&&!o.value),$=g(()=>({VPLocalNav:!0,"has-sidebar":o.value,empty:v.value,fixed:p.value}));return(S,y)=>r(t).layout!=="home"&&(!p.value||r(i)>=l.value)?(a(),u("div",{key:0,class:I($.value)},[d("div",oo,[r(o)?(a(),u("button",{key:0,class:"menu","aria-expanded":S.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=P=>S.$emit("open-menu"))},[y[1]||(y[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",ao,M(r(e).sidebarMenuLabel||"Menu"),1)],8,so)):h("",!0),_(no,{headers:r(n),navHeight:l.value},null,8,["headers","navHeight"])])],2)):h("",!0)}}),io=b(ro,[["__scopeId","data-v-a6f0e41e"]]);function lo(){const s=w(!1);function e(){s.value=!0,window.addEventListener("resize",n)}function t(){s.value=!1,window.removeEventListener("resize",n)}function o(){s.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=x();return D(()=>i.path,t),{isScreenOpen:s,openScreen:e,closeScreen:t,toggleScreen:o}}const co={},uo={class:"VPSwitch",type:"button",role:"switch"},vo={class:"check"},po={key:0,class:"icon"};function fo(s,e){return a(),u("button",uo,[d("span",vo,[s.$slots.default?(a(),u("span",po,[c(s.$slots,"default",{},void 0,!0)])):h("",!0)])])}const ho=b(co,[["render",fo],["__scopeId","data-v-1d5665e3"]]),mo=m({__name:"VPSwitchAppearance",setup(s){const{isDark:e,theme:t}=V(),o=ee("toggle-appearance",()=>{e.value=!e.value}),n=w("");return ve(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,l)=>(a(),k(ho,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(o)},{default:f(()=>l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1,__:[0]},8,["title","aria-checked","onClick"]))}}),he=b(mo,[["__scopeId","data-v-5337faa4"]]),_o={key:0,class:"VPNavBarAppearance"},ko=m({__name:"VPNavBarAppearance",setup(s){const{site:e}=V();return(t,o)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",_o,[_(he)])):h("",!0)}}),bo=b(ko,[["__scopeId","data-v-6c893767"]]),me=w();let Ie=!1,ae=0;function go(s){const e=w(!1);if(te){!Ie&&$o(),ae++;const t=D(me,o=>{var n,i,l;o===s.el.value||(n=s.el.value)!=null&&n.contains(o)?(e.value=!0,(i=s.onFocus)==null||i.call(s)):(e.value=!1,(l=s.onBlur)==null||l.call(s))});Q(()=>{t(),ae--,ae||yo()})}return Ge(e)}function $o(){document.addEventListener("focusin",Me),Ie=!0,me.value=document.activeElement}function yo(){document.removeEventListener("focusin",Me)}function Me(){me.value=document.activeElement}const Po={class:"VPMenuLink"},Lo=["innerHTML"],Vo=m({__name:"VPMenuLink",props:{item:{}},setup(s){const{page:e}=V();return(t,o)=>(a(),u("div",Po,[_(F,{class:I({active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Lo)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),ne=b(Vo,[["__scopeId","data-v-35975db6"]]),So={class:"VPMenuGroup"},To={key:0,class:"title"},No=m({__name:"VPMenuGroup",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",So,[e.text?(a(),u("p",To,M(e.text),1)):h("",!0),(a(!0),u(A,null,H(e.items,o=>(a(),u(A,null,["link"in o?(a(),k(ne,{key:0,item:o},null,8,["item"])):h("",!0)],64))),256))]))}}),wo=b(No,[["__scopeId","data-v-69e747b5"]]),Io={class:"VPMenu"},Mo={key:0,class:"items"},Co=m({__name:"VPMenu",props:{items:{}},setup(s){return(e,t)=>(a(),u("div",Io,[e.items?(a(),u("div",Mo,[(a(!0),u(A,null,H(e.items,o=>(a(),u(A,{key:JSON.stringify(o)},["link"in o?(a(),k(ne,{key:0,item:o},null,8,["item"])):"component"in o?(a(),k(E(o.component),U({key:1,ref_for:!0},o.props),null,16)):(a(),k(wo,{key:2,text:o.text,items:o.items},null,8,["text","items"]))],64))),128))])):h("",!0),c(e.$slots,"default",{},void 0,!0)]))}}),Ao=b(Co,[["__scopeId","data-v-b98bc113"]]),Ho=["aria-expanded","aria-label"],Bo={key:0,class:"text"},Eo=["innerHTML"],Fo={key:1,class:"vpi-more-horizontal icon"},Do={class:"menu"},Oo=m({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(s){const e=w(!1),t=w();go({el:t,onBlur:o});function o(){e.value=!1}return(n,i)=>(a(),u("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=l=>e.value=!0),onMouseleave:i[2]||(i[2]=l=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=l=>e.value=!e.value)},[n.button||n.icon?(a(),u("span",Bo,[n.icon?(a(),u("span",{key:0,class:I([n.icon,"option-icon"])},null,2)):h("",!0),n.button?(a(),u("span",{key:1,innerHTML:n.button},null,8,Eo)):h("",!0),i[3]||(i[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(a(),u("span",Fo))],8,Ho),d("div",Do,[_(Ao,{items:n.items},{default:f(()=>[c(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),_e=b(Oo,[["__scopeId","data-v-cf11d7a2"]]),Go=["href","aria-label","innerHTML"],Uo=m({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(s){const e=s,t=w();j(async()=>{var i;await Pe();const n=(i=t.value)==null?void 0:i.children[0];n instanceof HTMLElement&&n.className.startsWith("vpi-social-")&&(getComputedStyle(n).maskImage||getComputedStyle(n).webkitMaskImage)==="none"&&n.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const o=g(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,i)=>(a(),u("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:o.value},null,8,Go))}}),jo=b(Uo,[["__scopeId","data-v-bd121fe5"]]),zo={class:"VPSocialLinks"},Ko=m({__name:"VPSocialLinks",props:{links:{}},setup(s){return(e,t)=>(a(),u("div",zo,[(a(!0),u(A,null,H(e.links,({link:o,icon:n,ariaLabel:i})=>(a(),k(jo,{key:o,icon:n,link:o,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),ke=b(Ko,[["__scopeId","data-v-7bc22406"]]),Wo={key:0,class:"group translations"},qo={class:"trans-title"},Ro={key:1,class:"group"},Jo={class:"item appearance"},Xo={class:"label"},Yo={class:"appearance-action"},Qo={key:2,class:"group"},Zo={class:"item social-links"},xo=m({__name:"VPNavBarExtra",setup(s){const{site:e,theme:t}=V(),{localeLinks:o,currentLang:n}=R({correspondingLink:!0}),i=g(()=>o.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(l,v)=>i.value?(a(),k(_e,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[r(o).length&&r(n).label?(a(),u("div",Wo,[d("p",qo,M(r(n).label),1),(a(!0),u(A,null,H(r(o),p=>(a(),k(ne,{key:p.link,item:p},null,8,["item"]))),128))])):h("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Ro,[d("div",Jo,[d("p",Xo,M(r(t).darkModeSwitchLabel||"Appearance"),1),d("div",Yo,[_(he)])])])):h("",!0),r(t).socialLinks?(a(),u("div",Qo,[d("div",Zo,[_(ke,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):h("",!0)]),_:1})):h("",!0)}}),es=b(xo,[["__scopeId","data-v-bb2aa2f0"]]),ts=["aria-expanded"],ns=m({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(s){return(e,t)=>(a(),u("button",{type:"button",class:I(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=o=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,ts))}}),os=b(ns,[["__scopeId","data-v-e5dd9c1c"]]),ss=["innerHTML"],as=m({__name:"VPNavBarMenuLink",props:{item:{}},setup(s){const{page:e}=V();return(t,o)=>(a(),k(F,{class:I({VPNavBarMenuLink:!0,active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,ss)]),_:1},8,["class","href","target","rel","no-icon"]))}}),rs=b(as,[["__scopeId","data-v-e56f3d57"]]),is=m({__name:"VPNavBarMenuGroup",props:{item:{}},setup(s){const e=s,{page:t}=V(),o=i=>"component"in i?!1:"link"in i?K(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(o),n=g(()=>o(e.item));return(i,l)=>(a(),k(_e,{class:I({VPNavBarMenuGroup:!0,active:r(K)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),ls={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},cs=m({__name:"VPNavBarMenu",setup(s){const{theme:e}=V();return(t,o)=>r(e).nav?(a(),u("nav",ls,[o[0]||(o[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(a(!0),u(A,null,H(r(e).nav,n=>(a(),u(A,{key:JSON.stringify(n)},["link"in n?(a(),k(rs,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props),null,16)):(a(),k(is,{key:2,item:n},null,8,["item"]))],64))),128))])):h("",!0)}}),us=b(cs,[["__scopeId","data-v-dc692963"]]);function ds(s){const{localeIndex:e,theme:t}=V();function o(n){var L,C,N;const i=n.split("."),l=(L=t.value.search)==null?void 0:L.options,v=l&&typeof l=="object",p=v&&((N=(C=l.locales)==null?void 0:C[e.value])==null?void 0:N.translations)||null,$=v&&l.translations||null;let S=p,y=$,P=s;const T=i.pop();for(const B of i){let G=null;const q=P==null?void 0:P[B];q&&(G=P=q);const oe=y==null?void 0:y[B];oe&&(G=y=oe);const se=S==null?void 0:S[B];se&&(G=S=se),q||(P=G),oe||(y=G),se||(S=G)}return(S==null?void 0:S[T])??(y==null?void 0:y[T])??(P==null?void 0:P[T])??""}return o}const vs=["aria-label"],ps={class:"DocSearch-Button-Container"},fs={class:"DocSearch-Button-Placeholder"},be=m({__name:"VPNavBarSearchButton",setup(s){const t=ds({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(o,n)=>(a(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[d("span",ps,[n[0]||(n[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",fs,M(r(t)("button.buttonText")),1)]),n[1]||(n[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,vs))}}),hs={class:"VPNavBarSearch"},ms={id:"local-search"},_s={key:1,id:"docsearch"},ks=m({__name:"VPNavBarSearch",setup(s){const e=()=>null,t=Ue(()=>je(()=>import("./VPAlgoliaSearchBox.BlguZ0-2.js"),__vite__mapDeps([0,1]))),{theme:o}=V(),n=w(!1),i=w(!1),l=()=>{const P="VPAlgoliaPreconnect";(window.requestIdleCallback||setTimeout)(()=>{var C;const L=document.createElement("link");L.id=P,L.rel="preconnect",L.href=`https://${(((C=o.value.search)==null?void 0:C.options)??o.value.algolia).appId}-dsn.algolia.net`,L.crossOrigin="",document.head.appendChild(L)})};j(()=>{l();const P=L=>{(L.key.toLowerCase()==="k"&&(L.metaKey||L.ctrlKey)||!$(L)&&L.key==="/")&&(L.preventDefault(),v(),T())},T=()=>{window.removeEventListener("keydown",P)};window.addEventListener("keydown",P),Q(T)});function v(){n.value||(n.value=!0,setTimeout(p,16))}function p(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||p()},16)}function $(P){const T=P.target,L=T.tagName;return T.isContentEditable||L==="INPUT"||L==="SELECT"||L==="TEXTAREA"}const S=w(!1),y="algolia";return(P,T)=>{var L;return a(),u("div",hs,[r(y)==="local"?(a(),u(A,{key:0},[S.value?(a(),k(r(e),{key:0,onClose:T[0]||(T[0]=C=>S.value=!1)})):h("",!0),d("div",ms,[_(be,{onClick:T[1]||(T[1]=C=>S.value=!0)})])],64)):r(y)==="algolia"?(a(),u(A,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((L=r(o).search)==null?void 0:L.options)??r(o).algolia,onVnodeBeforeMount:T[2]||(T[2]=C=>i.value=!0)},null,8,["algolia"])):h("",!0),i.value?h("",!0):(a(),u("div",_s,[_(be,{onClick:v})]))],64)):h("",!0)])}}}),bs=m({__name:"VPNavBarSocialLinks",setup(s){const{theme:e}=V();return(t,o)=>r(e).socialLinks?(a(),k(ke,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),gs=b(bs,[["__scopeId","data-v-0394ad82"]]),$s=["href","rel","target"],ys=["innerHTML"],Ps={key:2},Ls=m({__name:"VPNavBarTitle",setup(s){const{site:e,theme:t}=V(),{hasSidebar:o}=O(),{currentLang:n}=R(),i=g(()=>{var p;return typeof t.value.logoLink=="string"?t.value.logoLink:(p=t.value.logoLink)==null?void 0:p.link}),l=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.rel}),v=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.target});return(p,$)=>(a(),u("div",{class:I(["VPNavBarTitle",{"has-sidebar":r(o)}])},[d("a",{class:"title",href:i.value??r(pe)(r(n).link),rel:l.value,target:v.value},[c(p.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(X,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):h("",!0),r(t).siteTitle?(a(),u("span",{key:1,innerHTML:r(t).siteTitle},null,8,ys)):r(t).siteTitle===void 0?(a(),u("span",Ps,M(r(e).title),1)):h("",!0),c(p.$slots,"nav-bar-title-after",{},void 0,!0)],8,$s)],2))}}),Vs=b(Ls,[["__scopeId","data-v-1168a8e4"]]),Ss={class:"items"},Ts={class:"title"},Ns=m({__name:"VPNavBarTranslations",setup(s){const{theme:e}=V(),{localeLinks:t,currentLang:o}=R({correspondingLink:!0});return(n,i)=>r(t).length&&r(o).label?(a(),k(_e,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:f(()=>[d("div",Ss,[d("p",Ts,M(r(o).label),1),(a(!0),u(A,null,H(r(t),l=>(a(),k(ne,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):h("",!0)}}),ws=b(Ns,[["__scopeId","data-v-88af2de4"]]),Is={class:"wrapper"},Ms={class:"container"},Cs={class:"title"},As={class:"content"},Hs={class:"content-body"},Bs=m({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(s){const e=s,{y:t}=Le(),{hasSidebar:o}=O(),{frontmatter:n}=V(),i=w({});return ve(()=>{i.value={"has-sidebar":o.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(l,v)=>(a(),u("div",{class:I(["VPNavBar",i.value])},[d("div",Is,[d("div",Ms,[d("div",Cs,[_(Vs,null,{"nav-bar-title-before":f(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",As,[d("div",Hs,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),_(ks,{class:"search"}),_(us,{class:"menu"}),_(ws,{class:"translations"}),_(bo,{class:"appearance"}),_(gs,{class:"social-links"}),_(es,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),_(os,{class:"hamburger",active:l.isScreenOpen,onClick:v[0]||(v[0]=p=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),v[1]||(v[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),Es=b(Bs,[["__scopeId","data-v-6aa21345"]]),Fs={key:0,class:"VPNavScreenAppearance"},Ds={class:"text"},Os=m({__name:"VPNavScreenAppearance",setup(s){const{site:e,theme:t}=V();return(o,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Fs,[d("p",Ds,M(r(t).darkModeSwitchLabel||"Appearance"),1),_(he)])):h("",!0)}}),Gs=b(Os,[["__scopeId","data-v-b44890b2"]]),Us=["innerHTML"],js=m({__name:"VPNavScreenMenuLink",props:{item:{}},setup(s){const e=ee("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Us)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),zs=b(js,[["__scopeId","data-v-df37e6dd"]]),Ks=["innerHTML"],Ws=m({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(s){const e=ee("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,Ks)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ce=b(Ws,[["__scopeId","data-v-3e9c20e4"]]),qs={class:"VPNavScreenMenuGroupSection"},Rs={key:0,class:"title"},Js=m({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",qs,[e.text?(a(),u("p",Rs,M(e.text),1)):h("",!0),(a(!0),u(A,null,H(e.items,o=>(a(),k(Ce,{key:o.text,item:o},null,8,["item"]))),128))]))}}),Xs=b(Js,[["__scopeId","data-v-8133b170"]]),Ys=["aria-controls","aria-expanded"],Qs=["innerHTML"],Zs=["id"],xs={key:0,class:"item"},ea={key:1,class:"item"},ta={key:2,class:"group"},na=m({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(s){const e=s,t=w(!1),o=g(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,l)=>(a(),u("div",{class:I(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":o.value,"aria-expanded":t.value,onClick:n},[d("span",{class:"button-text",innerHTML:i.text},null,8,Qs),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,Ys),d("div",{id:o.value,class:"items"},[(a(!0),u(A,null,H(i.items,v=>(a(),u(A,{key:JSON.stringify(v)},["link"in v?(a(),u("div",xs,[_(Ce,{item:v},null,8,["item"])])):"component"in v?(a(),u("div",ea,[(a(),k(E(v.component),U({ref_for:!0},v.props,{"screen-menu":""}),null,16))])):(a(),u("div",ta,[_(Xs,{text:v.text,items:v.items},null,8,["text","items"])]))],64))),128))],8,Zs)],2))}}),oa=b(na,[["__scopeId","data-v-b9ab8c58"]]),sa={key:0,class:"VPNavScreenMenu"},aa=m({__name:"VPNavScreenMenu",setup(s){const{theme:e}=V();return(t,o)=>r(e).nav?(a(),u("nav",sa,[(a(!0),u(A,null,H(r(e).nav,n=>(a(),u(A,{key:JSON.stringify(n)},["link"in n?(a(),k(zs,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(oa,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):h("",!0)}}),ra=m({__name:"VPNavScreenSocialLinks",setup(s){const{theme:e}=V();return(t,o)=>r(e).socialLinks?(a(),k(ke,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),ia={class:"list"},la=m({__name:"VPNavScreenTranslations",setup(s){const{localeLinks:e,currentLang:t}=R({correspondingLink:!0}),o=w(!1);function n(){o.value=!o.value}return(i,l)=>r(e).length&&r(t).label?(a(),u("div",{key:0,class:I(["VPNavScreenTranslations",{open:o.value}])},[d("button",{class:"title",onClick:n},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),z(" "+M(r(t).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",ia,[(a(!0),u(A,null,H(r(e),v=>(a(),u("li",{key:v.link,class:"item"},[_(F,{class:"link",href:v.link},{default:f(()=>[z(M(v.text),1)]),_:2},1032,["href"])]))),128))])],2)):h("",!0)}}),ca=b(la,[["__scopeId","data-v-858fe1a4"]]),ua={class:"container"},da=m({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(s){const e=w(null),t=Ve(te?document.body:null);return(o,n)=>(a(),k(ue,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:f(()=>[o.open?(a(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",ua,[c(o.$slots,"nav-screen-content-before",{},void 0,!0),_(aa,{class:"menu"}),_(ca,{class:"translations"}),_(Gs,{class:"appearance"}),_(ra,{class:"social-links"}),c(o.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):h("",!0)]),_:3}))}}),va=b(da,[["__scopeId","data-v-f2779853"]]),pa={key:0,class:"VPNav"},fa=m({__name:"VPNav",setup(s){const{isScreenOpen:e,closeScreen:t,toggleScreen:o}=lo(),{frontmatter:n}=V(),i=g(()=>n.value.navbar!==!1);return Se("close-screen",t),Y(()=>{te&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(l,v)=>i.value?(a(),u("header",pa,[_(Es,{"is-screen-open":r(e),onToggleScreen:r(o)},{"nav-bar-title-before":f(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),_(va,{open:r(e)},{"nav-screen-content-before":f(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):h("",!0)}}),ha=b(fa,[["__scopeId","data-v-ae24b3ad"]]),ma=["role","tabindex"],_a={key:1,class:"items"},ka=m({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(s){const e=s,{collapsed:t,collapsible:o,isLink:n,isActiveLink:i,hasActiveLink:l,hasChildren:v,toggle:p}=dt(g(()=>e.item)),$=g(()=>v.value?"section":"div"),S=g(()=>n.value?"a":"div"),y=g(()=>v.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=g(()=>n.value?void 0:"button"),T=g(()=>[[`level-${e.depth}`],{collapsible:o.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":l.value}]);function L(N){"key"in N&&N.key!=="Enter"||!e.item.link&&p()}function C(){e.item.link&&p()}return(N,B)=>{const G=W("VPSidebarItem",!0);return a(),k(E($.value),{class:I(["VPSidebarItem",T.value])},{default:f(()=>[N.item.text?(a(),u("div",U({key:0,class:"item",role:P.value},ze(N.item.items?{click:L,keydown:L}:{},!0),{tabindex:N.item.items&&0}),[B[1]||(B[1]=d("div",{class:"indicator"},null,-1)),N.item.link?(a(),k(F,{key:0,tag:S.value,class:"link",href:N.item.link,rel:N.item.rel,target:N.item.target},{default:f(()=>[(a(),k(E(y.value),{class:"text",innerHTML:N.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(E(y.value),{key:1,class:"text",innerHTML:N.item.text},null,8,["innerHTML"])),N.item.collapsed!=null&&N.item.items&&N.item.items.length?(a(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:C,onKeydown:Ke(C,["enter"]),tabindex:"0"},B[0]||(B[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):h("",!0)],16,ma)):h("",!0),N.item.items&&N.item.items.length?(a(),u("div",_a,[N.depth<5?(a(!0),u(A,{key:0},H(N.item.items,q=>(a(),k(G,{key:q.text,item:q,depth:N.depth+1},null,8,["item","depth"]))),128)):h("",!0)])):h("",!0)]),_:1},8,["class"])}}}),ba=b(ka,[["__scopeId","data-v-b3fd67f8"]]),ga=m({__name:"VPSidebarGroup",props:{items:{}},setup(s){const e=w(!0);let t=null;return j(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),We(()=>{t!=null&&(clearTimeout(t),t=null)}),(o,n)=>(a(!0),u(A,null,H(o.items,i=>(a(),u("div",{key:i.text,class:I(["group",{"no-transition":e.value}])},[_(ba,{item:i,depth:0},null,8,["item"])],2))),128))}}),$a=b(ga,[["__scopeId","data-v-c40bc020"]]),ya={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Pa=m({__name:"VPSidebar",props:{open:{type:Boolean}},setup(s){const{sidebarGroups:e,hasSidebar:t}=O(),o=s,n=w(null),i=Ve(te?document.body:null);D([o,n],()=>{var v;o.open?(i.value=!0,(v=n.value)==null||v.focus()):i.value=!1},{immediate:!0,flush:"post"});const l=w(0);return D(e,()=>{l.value+=1},{deep:!0}),(v,p)=>r(t)?(a(),u("aside",{key:0,class:I(["VPSidebar",{open:v.open}]),ref_key:"navEl",ref:n,onClick:p[0]||(p[0]=qe(()=>{},["stop"]))},[p[2]||(p[2]=d("div",{class:"curtain"},null,-1)),d("nav",ya,[p[1]||(p[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(v.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k($a,{items:r(e),key:l.value},null,8,["items"])),c(v.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):h("",!0)}}),La=b(Pa,[["__scopeId","data-v-319d5ca6"]]),Va=m({__name:"VPSkipLink",setup(s){const{theme:e}=V(),t=x(),o=w();D(()=>t.path,()=>o.value.focus());function n({target:i}){const l=document.getElementById(decodeURIComponent(i.hash).slice(1));if(l){const v=()=>{l.removeAttribute("tabindex"),l.removeEventListener("blur",v)};l.setAttribute("tabindex","-1"),l.addEventListener("blur",v),l.focus(),window.scrollTo(0,0)}}return(i,l)=>(a(),u(A,null,[d("span",{ref_key:"backToTop",ref:o,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:n},M(r(e).skipToContentLabel||"Skip to content"),1)],64))}}),Sa=b(Va,[["__scopeId","data-v-0b0ada53"]]),Ta=m({__name:"Layout",setup(s){const{isOpen:e,open:t,close:o}=O(),n=x();D(()=>n.path,o),ut(e,o);const{frontmatter:i}=V(),l=Re(),v=g(()=>!!l["home-hero-image"]);return Se("hero-image-slot-exists",v),(p,$)=>{const S=W("Content");return r(i).layout!==!1?(a(),u("div",{key:0,class:I(["Layout",r(i).pageClass])},[c(p.$slots,"layout-top",{},void 0,!0),_(Sa),_(Qe,{class:"backdrop",show:r(e),onClick:r(o)},null,8,["show","onClick"]),_(ha,null,{"nav-bar-title-before":f(()=>[c(p.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(p.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[c(p.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[c(p.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[c(p.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[c(p.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),_(io,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),_(La,{open:r(e)},{"sidebar-nav-before":f(()=>[c(p.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[c(p.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),_(Wn,null,{"page-top":f(()=>[c(p.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[c(p.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[c(p.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[c(p.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[c(p.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(p.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(p.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(p.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(p.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[c(p.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[c(p.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[c(p.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[c(p.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[c(p.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[c(p.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[c(p.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[c(p.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[c(p.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[c(p.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[c(p.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(p.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(p.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(p.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),_(Yn),c(p.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(S,{key:1}))}}}),Na=b(Ta,[["__scopeId","data-v-5d98c3a5"]]),Ia={Layout:Na,enhanceApp:({app:s})=>{s.component("Badge",Je)}};export{Ia as t,V as u}; diff --git a/assets/chunks/theme._10rLZ6c.js b/assets/chunks/theme._10rLZ6c.js new file mode 100644 index 0000000000..183c61cf7b --- /dev/null +++ b/assets/chunks/theme._10rLZ6c.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPAlgoliaSearchBox.NIHP5tU5.js","assets/chunks/framework.QPV3Ar9-.js"])))=>i.map(i=>d[i]); +import{d as m,c as u,r as c,n as I,o as a,a as z,t as M,b as k,w as f,T as ue,e as h,_ as b,u as Be,i as Ee,f as Fe,g as de,h as g,j as d,k as r,l as K,m as re,p as w,q as D,s as X,v as j,x as Q,y as ve,z as De,A as Oe,F as A,B as H,C as W,D as ye,E as Z,G as _,H as E,I as Pe,J as x,K as U,L as ee,M as Ge,N as Le,O as Ue,P as Ve,Q as Se,R as te,S as je,U as ze,V as Ke,W as Te,X as Ne,Y as We,Z as qe,$ as Re,a0 as Je,a1 as Ye,a2 as be}from"./framework.QPV3Ar9-.js";const Xe=m({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(s){return(e,t)=>(a(),u("span",{class:I(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[z(M(e.text),1)])],2))}}),Qe={key:0,class:"VPBackdrop"},Ze=m({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(s){return(e,t)=>(a(),k(ue,{name:"fade"},{default:f(()=>[e.show?(a(),u("div",Qe)):h("",!0)]),_:1}))}}),xe=b(Ze,[["__scopeId","data-v-c79a1216"]]),V=Be;function et(s,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(s,e):(s(),(o=!0)&&setTimeout(()=>o=!1,e))}}function ie(s){return s.startsWith("/")?s:`/${s}`}function pe(s){const{pathname:e,search:t,hash:o,protocol:n}=new URL(s,"http://a.com");if(Ee(s)||s.startsWith("#")||!n.startsWith("http")||!Fe(e))return s;const{site:i}=V(),l=e.endsWith("/")||e.endsWith(".html")?s:s.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${o}`);return de(l)}function R({correspondingLink:s=!1}={}){const{site:e,localeIndex:t,page:o,theme:n,hash:i}=V(),l=g(()=>{var p,$;return{label:(p=e.value.locales[t.value])==null?void 0:p.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:g(()=>Object.entries(e.value.locales).flatMap(([p,$])=>l.value.label===$.label?[]:{text:$.label,link:tt($.link||(p==="root"?"/":`/${p}/`),n.value.i18nRouting!==!1&&s,o.value.relativePath.slice(l.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:l}}function tt(s,e,t,o){return e?s.replace(/\/$/,"")+ie(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,o?".html":"")):s}const nt={class:"NotFound"},ot={class:"code"},st={class:"title"},at={class:"quote"},rt={class:"action"},it=["href","aria-label"],lt=m({__name:"NotFound",setup(s){const{theme:e}=V(),{currentLang:t}=R();return(o,n)=>{var i,l,v,p,$;return a(),u("div",nt,[d("p",ot,M(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),d("h1",st,M(((l=r(e).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),n[0]||(n[0]=d("div",{class:"divider"},null,-1)),d("blockquote",at,M(((v=r(e).notFound)==null?void 0:v.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",rt,[d("a",{class:"link",href:r(de)(r(t).link),"aria-label":((p=r(e).notFound)==null?void 0:p.linkLabel)??"go to home"},M((($=r(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,it)])])}}}),ct=b(lt,[["__scopeId","data-v-d6be1790"]]);function we(s,e){if(Array.isArray(s))return J(s);if(s==null)return[];e=ie(e);const t=Object.keys(s).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(ie(n))),o=t?s[t]:[];return Array.isArray(o)?J(o):J(o.items,o.base)}function ut(s){const e=[];let t=0;for(const o in s){const n=s[o];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function dt(s){const e=[];function t(o){for(const n of o)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(s),e}function le(s,e){return Array.isArray(e)?e.some(t=>le(s,t)):K(s,e.link)?!0:e.items?le(s,e.items):!1}function J(s,e){return[...s].map(t=>{const o={...t},n=o.base||e;return n&&o.link&&(o.link=n+o.link),o.items&&(o.items=J(o.items,n)),o})}function O(){const{frontmatter:s,page:e,theme:t}=V(),o=re("(min-width: 960px)"),n=w(!1),i=g(()=>{const C=t.value.sidebar,N=e.value.relativePath;return C?we(C,N):[]}),l=w(i.value);D(i,(C,N)=>{JSON.stringify(C)!==JSON.stringify(N)&&(l.value=i.value)});const v=g(()=>s.value.sidebar!==!1&&l.value.length>0&&s.value.layout!=="home"),p=g(()=>$?s.value.aside==null?t.value.aside==="left":s.value.aside==="left":!1),$=g(()=>s.value.layout==="home"?!1:s.value.aside!=null?!!s.value.aside:t.value.aside!==!1),S=g(()=>v.value&&o.value),y=g(()=>v.value?ut(l.value):[]);function P(){n.value=!0}function T(){n.value=!1}function L(){n.value?T():P()}return{isOpen:n,sidebar:l,sidebarGroups:y,hasSidebar:v,hasAside:$,leftAside:p,isSidebarEnabled:S,open:P,close:T,toggle:L}}function vt(s,e){let t;X(()=>{t=s.value?document.activeElement:void 0}),j(()=>{window.addEventListener("keyup",o)}),Q(()=>{window.removeEventListener("keyup",o)});function o(n){n.key==="Escape"&&s.value&&(e(),t==null||t.focus())}}function pt(s){const{page:e,hash:t}=V(),o=w(!1),n=g(()=>s.value.collapsed!=null),i=g(()=>!!s.value.link),l=w(!1),v=()=>{l.value=K(e.value.relativePath,s.value.link)};D([e,s,t],v),j(v);const p=g(()=>l.value?!0:s.value.items?le(e.value.relativePath,s.value.items):!1),$=g(()=>!!(s.value.items&&s.value.items.length));X(()=>{o.value=!!(n.value&&s.value.collapsed)}),ve(()=>{(l.value||p.value)&&(o.value=!1)});function S(){n.value&&(o.value=!o.value)}return{collapsed:o,collapsible:n,isLink:i,isActiveLink:l,hasActiveLink:p,hasChildren:$,toggle:S}}function ft(){const{hasSidebar:s}=O(),e=re("(min-width: 960px)"),t=re("(min-width: 1280px)");return{isAsideEnabled:g(()=>!t.value&&!e.value?!1:s.value?t.value:e.value)}}const ht=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,ce=[];function Ie(s){return typeof s.outline=="object"&&!Array.isArray(s.outline)&&s.outline.label||s.outlineTitle||"On this page"}function fe(s){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const o=Number(t.tagName[1]);return{element:t,title:mt(t),link:"#"+t.id,level:o}});return _t(e,s)}function mt(s){let e="";for(const t of s.childNodes)if(t.nodeType===1){if(ht.test(t.className))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function _t(s,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[o,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return gt(s,o,n)}function kt(s,e){const{isAsideEnabled:t}=ft(),o=et(i,100);let n=null;j(()=>{requestAnimationFrame(i),window.addEventListener("scroll",o)}),De(()=>{l(location.hash)}),Q(()=>{window.removeEventListener("scroll",o)});function i(){if(!t.value)return;const v=window.scrollY,p=window.innerHeight,$=document.body.offsetHeight,S=Math.abs(v+p-$)<1,y=ce.map(({element:T,link:L})=>({link:L,top:bt(T)})).filter(({top:T})=>!Number.isNaN(T)).sort((T,L)=>T.top-L.top);if(!y.length){l(null);return}if(v<1){l(null);return}if(S){l(y[y.length-1].link);return}let P=null;for(const{link:T,top:L}of y){if(L>v+Oe()+4)break;P=T}l(P)}function l(v){n&&n.classList.remove("active"),v==null?n=null:n=s.value.querySelector(`a[href="${decodeURIComponent(v)}"]`);const p=n;p?(p.classList.add("active"),e.value.style.top=p.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function bt(s){let e=0;for(;s!==document.body;){if(s===null)return NaN;e+=s.offsetTop,s=s.offsetParent}return e}function gt(s,e,t){ce.length=0;const o=[],n=[];return s.forEach(i=>{const l={...i,children:[]};let v=n[n.length-1];for(;v&&v.level>=l.level;)n.pop(),v=n[n.length-1];if(l.element.classList.contains("ignore-header")||v&&"shouldIgnore"in v){n.push({level:l.level,shouldIgnore:!0});return}l.level>t||l.level{const n=W("VPDocOutlineItem",!0);return a(),u("ul",{class:I(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),u(A,null,H(t.headers,({children:i,link:l,title:v})=>(a(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:e,title:v},M(v),9,$t),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):h("",!0)]))),256))],2)}}}),Me=b(yt,[["__scopeId","data-v-b933a997"]]),Pt={class:"content"},Lt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Vt=m({__name:"VPDocAsideOutline",setup(s){const{frontmatter:e,theme:t}=V(),o=ye([]);Z(()=>{o.value=fe(e.value.outline??t.value.outline)});const n=w(),i=w();return kt(n,i),(l,v)=>(a(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:I(["VPDocAsideOutline",{"has-outline":o.value.length>0}]),ref_key:"container",ref:n},[d("div",Pt,[d("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),d("div",Lt,M(r(Ie)(r(t))),1),_(Me,{headers:o.value,root:!0},null,8,["headers"])])],2))}}),St=b(Vt,[["__scopeId","data-v-a5bbad30"]]),Tt={class:"VPDocAsideCarbonAds"},Nt=m({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(s){const e=()=>null;return(t,o)=>(a(),u("div",Tt,[_(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),wt={class:"VPDocAside"},It=m({__name:"VPDocAside",setup(s){const{theme:e}=V();return(t,o)=>(a(),u("div",wt,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),_(St),c(t.$slots,"aside-outline-after",{},void 0,!0),o[0]||(o[0]=d("div",{class:"spacer"},null,-1)),c(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(Nt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):h("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Mt=b(It,[["__scopeId","data-v-3f215769"]]);function Ct(){const{theme:s,page:e}=V();return g(()=>{const{text:t="Edit this page",pattern:o=""}=s.value.editLink||{};let n;return typeof o=="function"?n=o(e.value):n=o.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function At(){const{page:s,theme:e,frontmatter:t}=V();return g(()=>{var $,S,y,P,T,L,C,N;const o=we(e.value.sidebar,s.value.relativePath),n=dt(o),i=Ht(n,B=>B.link.replace(/[?#].*$/,"")),l=i.findIndex(B=>K(s.value.relativePath,B.link)),v=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((S=e.value.docFooter)==null?void 0:S.next)===!1&&!t.value.next||t.value.next===!1;return{prev:v?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[l-1])==null?void 0:y.docFooterText)??((P=i[l-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((T=i[l-1])==null?void 0:T.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((L=i[l+1])==null?void 0:L.docFooterText)??((C=i[l+1])==null?void 0:C.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((N=i[l+1])==null?void 0:N.link)}}})}function Ht(s,e){const t=new Set;return s.filter(o=>{const n=e(o);return t.has(n)?!1:t.add(n)})}const F=m({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(s){const e=s,t=g(()=>e.tag??(e.href?"a":"span")),o=g(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(E(t.value),{class:I(["VPLink",{link:n.href,"vp-external-link-icon":o.value,"no-icon":n.noIcon}]),href:n.href?r(pe)(n.href):void 0,target:n.target??(o.value?"_blank":void 0),rel:n.rel??(o.value?"noreferrer":void 0)},{default:f(()=>[c(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Bt={class:"VPLastUpdated"},Et=["datetime"],Ft=m({__name:"VPDocFooterLastUpdated",setup(s){const{theme:e,page:t,lang:o}=V(),n=g(()=>new Date(t.value.lastUpdated)),i=g(()=>n.value.toISOString()),l=w("");return j(()=>{X(()=>{var v,p,$;l.value=new Intl.DateTimeFormat((p=(v=e.value.lastUpdated)==null?void 0:v.formatOptions)!=null&&p.forceLocale?o.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(v,p)=>{var $;return a(),u("p",Bt,[z(M((($=r(e).lastUpdated)==null?void 0:$.text)||r(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:i.value},M(l.value),9,Et)])}}}),Dt=b(Ft,[["__scopeId","data-v-e98dd255"]]),Ot={key:0,class:"VPDocFooter"},Gt={key:0,class:"edit-info"},Ut={key:0,class:"edit-link"},jt={key:1,class:"last-updated"},zt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Kt={class:"pager"},Wt=["innerHTML"],qt=["innerHTML"],Rt={class:"pager"},Jt=["innerHTML"],Yt=["innerHTML"],Xt=m({__name:"VPDocFooter",setup(s){const{theme:e,page:t,frontmatter:o}=V(),n=Ct(),i=At(),l=g(()=>e.value.editLink&&o.value.editLink!==!1),v=g(()=>t.value.lastUpdated),p=g(()=>l.value||v.value||i.value.prev||i.value.next);return($,S)=>{var y,P,T,L;return p.value?(a(),u("footer",Ot,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||v.value?(a(),u("div",Gt,[l.value?(a(),u("div",Ut,[_(F,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:f(()=>[S[0]||(S[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),z(" "+M(r(n).text),1)]),_:1,__:[0]},8,["href"])])):h("",!0),v.value?(a(),u("div",jt,[_(Dt)])):h("",!0)])):h("",!0),(y=r(i).prev)!=null&&y.link||(P=r(i).next)!=null&&P.link?(a(),u("nav",zt,[S[1]||(S[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",Kt,[(T=r(i).prev)!=null&&T.link?(a(),k(F,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:f(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.prev)||"Previous page"},null,8,Wt),d("span",{class:"title",innerHTML:r(i).prev.text},null,8,qt)]}),_:1},8,["href"])):h("",!0)]),d("div",Rt,[(L=r(i).next)!=null&&L.link?(a(),k(F,{key:0,class:"pager-link next",href:r(i).next.link},{default:f(()=>{var C;return[d("span",{class:"desc",innerHTML:((C=r(e).docFooter)==null?void 0:C.next)||"Next page"},null,8,Jt),d("span",{class:"title",innerHTML:r(i).next.text},null,8,Yt)]}),_:1},8,["href"])):h("",!0)])])):h("",!0)])):h("",!0)}}}),Qt=b(Xt,[["__scopeId","data-v-e257564d"]]),Zt={class:"container"},xt={class:"aside-container"},en={class:"aside-content"},tn={class:"content"},nn={class:"content-container"},on={class:"main"},sn=m({__name:"VPDoc",setup(s){const{theme:e}=V(),t=x(),{hasSidebar:o,hasAside:n,leftAside:i}=O(),l=g(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(v,p)=>{const $=W("Content");return a(),u("div",{class:I(["VPDoc",{"has-sidebar":r(o),"has-aside":r(n)}])},[c(v.$slots,"doc-top",{},void 0,!0),d("div",Zt,[r(n)?(a(),u("div",{key:0,class:I(["aside",{"left-aside":r(i)}])},[p[0]||(p[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",xt,[d("div",en,[_(Mt,null,{"aside-top":f(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):h("",!0),d("div",tn,[d("div",nn,[c(v.$slots,"doc-before",{},void 0,!0),d("main",on,[_($,{class:I(["vp-doc",[l.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),_(Qt,null,{"doc-footer-before":f(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(v.$slots,"doc-after",{},void 0,!0)])])]),c(v.$slots,"doc-bottom",{},void 0,!0)],2)}}}),an=b(sn,[["__scopeId","data-v-39a288b8"]]),rn=m({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(s){const e=s,t=g(()=>e.href&&Pe.test(e.href)),o=g(()=>e.tag||(e.href?"a":"button"));return(n,i)=>(a(),k(E(o.value),{class:I(["VPButton",[n.size,n.theme]]),href:n.href?r(pe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:f(()=>[z(M(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),ln=b(rn,[["__scopeId","data-v-fa7799d5"]]),cn=["src","alt"],un=m({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(s){return(e,t)=>{const o=W("VPImage",!0);return e.image?(a(),u(A,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),u("img",U({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,cn)):(a(),u(A,{key:1},[_(o,U({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),_(o,U({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):h("",!0)}}}),Y=b(un,[["__scopeId","data-v-8426fc1a"]]),dn={class:"container"},vn={class:"main"},pn={class:"heading"},fn=["innerHTML"],hn=["innerHTML"],mn=["innerHTML"],_n={key:0,class:"actions"},kn={key:0,class:"image"},bn={class:"image-container"},gn=m({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(s){const e=ee("hero-image-slot-exists");return(t,o)=>(a(),u("div",{class:I(["VPHero",{"has-image":t.image||r(e)}])},[d("div",dn,[d("div",vn,[c(t.$slots,"home-hero-info-before",{},void 0,!0),c(t.$slots,"home-hero-info",{},()=>[d("h1",pn,[t.name?(a(),u("span",{key:0,innerHTML:t.name,class:"name clip"},null,8,fn)):h("",!0),t.text?(a(),u("span",{key:1,innerHTML:t.text,class:"text"},null,8,hn)):h("",!0)]),t.tagline?(a(),u("p",{key:0,innerHTML:t.tagline,class:"tagline"},null,8,mn)):h("",!0)],!0),c(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),u("div",_n,[(a(!0),u(A,null,H(t.actions,n=>(a(),u("div",{key:n.link,class:"action"},[_(ln,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):h("",!0),c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),u("div",kn,[d("div",bn,[o[0]||(o[0]=d("div",{class:"image-bg"},null,-1)),c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(Y,{key:0,class:"image-src",image:t.image},null,8,["image"])):h("",!0)],!0)])])):h("",!0)])],2))}}),$n=b(gn,[["__scopeId","data-v-4f9c455b"]]),yn=m({__name:"VPHomeHero",setup(s){const{frontmatter:e}=V();return(t,o)=>r(e).hero?(a(),k($n,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":f(()=>[c(t.$slots,"home-hero-info-before")]),"home-hero-info":f(()=>[c(t.$slots,"home-hero-info")]),"home-hero-info-after":f(()=>[c(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":f(()=>[c(t.$slots,"home-hero-actions-after")]),"home-hero-image":f(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):h("",!0)}}),Pn={class:"box"},Ln={key:0,class:"icon"},Vn=["innerHTML"],Sn=["innerHTML"],Tn=["innerHTML"],Nn={key:4,class:"link-text"},wn={class:"link-text-value"},In=m({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(s){return(e,t)=>(a(),k(F,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:f(()=>[d("article",Pn,[typeof e.icon=="object"&&e.icon.wrap?(a(),u("div",Ln,[_(Y,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(Y,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Vn)):h("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Sn),e.details?(a(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,Tn)):h("",!0),e.linkText?(a(),u("div",Nn,[d("p",wn,[z(M(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):h("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Mn=b(In,[["__scopeId","data-v-a3976bdc"]]),Cn={key:0,class:"VPFeatures"},An={class:"container"},Hn={class:"items"},Bn=m({__name:"VPFeatures",props:{features:{}},setup(s){const e=s,t=g(()=>{const o=e.features.length;if(o){if(o===2)return"grid-2";if(o===3)return"grid-3";if(o%3===0)return"grid-6";if(o>3)return"grid-4"}else return});return(o,n)=>o.features?(a(),u("div",Cn,[d("div",An,[d("div",Hn,[(a(!0),u(A,null,H(o.features,i=>(a(),u("div",{key:i.title,class:I(["item",[t.value]])},[_(Mn,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):h("",!0)}}),En=b(Bn,[["__scopeId","data-v-a6181336"]]),Fn=m({__name:"VPHomeFeatures",setup(s){const{frontmatter:e}=V();return(t,o)=>r(e).features?(a(),k(En,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):h("",!0)}}),Dn=m({__name:"VPHomeContent",setup(s){const{width:e}=Ge({initialWidth:0,includeScrollbar:!1});return(t,o)=>(a(),u("div",{class:"vp-doc container",style:Le(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[c(t.$slots,"default",{},void 0,!0)],4))}}),On=b(Dn,[["__scopeId","data-v-8e2d4988"]]),Gn=m({__name:"VPHome",setup(s){const{frontmatter:e,theme:t}=V();return(o,n)=>{const i=W("Content");return a(),u("div",{class:I(["VPHome",{"external-link-icon-enabled":r(t).externalLinkIcon}])},[c(o.$slots,"home-hero-before",{},void 0,!0),_(yn,null,{"home-hero-info-before":f(()=>[c(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(o.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(o.$slots,"home-hero-after",{},void 0,!0),c(o.$slots,"home-features-before",{},void 0,!0),_(Fn),c(o.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(On,{key:0},{default:f(()=>[_(i)]),_:1})):(a(),k(i,{key:1}))],2)}}}),Un=b(Gn,[["__scopeId","data-v-8b561e3d"]]),jn={},zn={class:"VPPage"};function Kn(s,e){const t=W("Content");return a(),u("div",zn,[c(s.$slots,"page-top"),_(t),c(s.$slots,"page-bottom")])}const Wn=b(jn,[["render",Kn]]),qn=m({__name:"VPContent",setup(s){const{page:e,frontmatter:t}=V(),{hasSidebar:o}=O();return(n,i)=>(a(),u("div",{class:I(["VPContent",{"has-sidebar":r(o),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?c(n.$slots,"not-found",{key:0},()=>[_(ct)],!0):r(t).layout==="page"?(a(),k(Wn,{key:1},{"page-top":f(()=>[c(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[c(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(Un,{key:2},{"home-hero-before":f(()=>[c(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[c(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[c(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[c(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[c(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(E(r(t).layout),{key:3})):(a(),k(an,{key:4},{"doc-top":f(()=>[c(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[c(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":f(()=>[c(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[c(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[c(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":f(()=>[c(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":f(()=>[c(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":f(()=>[c(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Rn=b(qn,[["__scopeId","data-v-1428d186"]]),Jn={class:"container"},Yn=["innerHTML"],Xn=["innerHTML"],Qn=m({__name:"VPFooter",setup(s){const{theme:e,frontmatter:t}=V(),{hasSidebar:o}=O();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),u("footer",{key:0,class:I(["VPFooter",{"has-sidebar":r(o)}])},[d("div",Jn,[r(e).footer.message?(a(),u("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,Yn)):h("",!0),r(e).footer.copyright?(a(),u("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,Xn)):h("",!0)])],2)):h("",!0)}}),Zn=b(Qn,[["__scopeId","data-v-e315a0ad"]]);function xn(){const{theme:s,frontmatter:e}=V(),t=ye([]),o=g(()=>t.value.length>0);return Z(()=>{t.value=fe(e.value.outline??s.value.outline)}),{headers:t,hasLocalNav:o}}const eo={class:"menu-text"},to={class:"header"},no={class:"outline"},oo=m({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(s){const e=s,{theme:t}=V(),o=w(!1),n=w(0),i=w(),l=w();function v(y){var P;(P=i.value)!=null&&P.contains(y.target)||(o.value=!1)}D(o,y=>{if(y){document.addEventListener("click",v);return}document.removeEventListener("click",v)}),Ue("Escape",()=>{o.value=!1}),Z(()=>{o.value=!1});function p(){o.value=!o.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(y){y.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Ve(()=>{o.value=!1}))}function S(){o.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,P)=>(a(),u("div",{class:"VPLocalNavOutlineDropdown",style:Le({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),u("button",{key:0,onClick:p,class:I({open:o.value})},[d("span",eo,M(r(Ie)(r(t))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(a(),u("button",{key:1,onClick:S},M(r(t).returnToTopLabel||"Return to top"),1)),_(ue,{name:"flyout"},{default:f(()=>[o.value?(a(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",to,[d("a",{class:"top-link",href:"#",onClick:S},M(r(t).returnToTopLabel||"Return to top"),1)]),d("div",no,[_(Me,{headers:y.headers},null,8,["headers"])])],512)):h("",!0)]),_:1})],4))}}),so=b(oo,[["__scopeId","data-v-8a42e2b4"]]),ao={class:"container"},ro=["aria-expanded"],io={class:"menu-text"},lo=m({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(s){const{theme:e,frontmatter:t}=V(),{hasSidebar:o}=O(),{headers:n}=xn(),{y:i}=Se(),l=w(0);j(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Z(()=>{n.value=fe(t.value.outline??e.value.outline)});const v=g(()=>n.value.length===0),p=g(()=>v.value&&!o.value),$=g(()=>({VPLocalNav:!0,"has-sidebar":o.value,empty:v.value,fixed:p.value}));return(S,y)=>r(t).layout!=="home"&&(!p.value||r(i)>=l.value)?(a(),u("div",{key:0,class:I($.value)},[d("div",ao,[r(o)?(a(),u("button",{key:0,class:"menu","aria-expanded":S.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=P=>S.$emit("open-menu"))},[y[1]||(y[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",io,M(r(e).sidebarMenuLabel||"Menu"),1)],8,ro)):h("",!0),_(so,{headers:r(n),navHeight:l.value},null,8,["headers","navHeight"])])],2)):h("",!0)}}),co=b(lo,[["__scopeId","data-v-a6f0e41e"]]);function uo(){const s=w(!1);function e(){s.value=!0,window.addEventListener("resize",n)}function t(){s.value=!1,window.removeEventListener("resize",n)}function o(){s.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=x();return D(()=>i.path,t),{isScreenOpen:s,openScreen:e,closeScreen:t,toggleScreen:o}}const vo={},po={class:"VPSwitch",type:"button",role:"switch"},fo={class:"check"},ho={key:0,class:"icon"};function mo(s,e){return a(),u("button",po,[d("span",fo,[s.$slots.default?(a(),u("span",ho,[c(s.$slots,"default",{},void 0,!0)])):h("",!0)])])}const _o=b(vo,[["render",mo],["__scopeId","data-v-1d5665e3"]]),ko=m({__name:"VPSwitchAppearance",setup(s){const{isDark:e,theme:t}=V(),o=ee("toggle-appearance",()=>{e.value=!e.value}),n=w("");return ve(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,l)=>(a(),k(_o,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(o)},{default:f(()=>l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1,__:[0]},8,["title","aria-checked","onClick"]))}}),he=b(ko,[["__scopeId","data-v-5337faa4"]]),bo={key:0,class:"VPNavBarAppearance"},go=m({__name:"VPNavBarAppearance",setup(s){const{site:e}=V();return(t,o)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",bo,[_(he)])):h("",!0)}}),$o=b(go,[["__scopeId","data-v-6c893767"]]),me=w();let Ce=!1,ae=0;function yo(s){const e=w(!1);if(te){!Ce&&Po(),ae++;const t=D(me,o=>{var n,i,l;o===s.el.value||(n=s.el.value)!=null&&n.contains(o)?(e.value=!0,(i=s.onFocus)==null||i.call(s)):(e.value=!1,(l=s.onBlur)==null||l.call(s))});Q(()=>{t(),ae--,ae||Lo()})}return je(e)}function Po(){document.addEventListener("focusin",Ae),Ce=!0,me.value=document.activeElement}function Lo(){document.removeEventListener("focusin",Ae)}function Ae(){me.value=document.activeElement}const Vo={class:"VPMenuLink"},So=["innerHTML"],To=m({__name:"VPMenuLink",props:{item:{}},setup(s){const{page:e}=V();return(t,o)=>(a(),u("div",Vo,[_(F,{class:I({active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,So)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),ne=b(To,[["__scopeId","data-v-35975db6"]]),No={class:"VPMenuGroup"},wo={key:0,class:"title"},Io=m({__name:"VPMenuGroup",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",No,[e.text?(a(),u("p",wo,M(e.text),1)):h("",!0),(a(!0),u(A,null,H(e.items,o=>(a(),u(A,null,["link"in o?(a(),k(ne,{key:0,item:o},null,8,["item"])):h("",!0)],64))),256))]))}}),Mo=b(Io,[["__scopeId","data-v-69e747b5"]]),Co={class:"VPMenu"},Ao={key:0,class:"items"},Ho=m({__name:"VPMenu",props:{items:{}},setup(s){return(e,t)=>(a(),u("div",Co,[e.items?(a(),u("div",Ao,[(a(!0),u(A,null,H(e.items,o=>(a(),u(A,{key:JSON.stringify(o)},["link"in o?(a(),k(ne,{key:0,item:o},null,8,["item"])):"component"in o?(a(),k(E(o.component),U({key:1,ref_for:!0},o.props),null,16)):(a(),k(Mo,{key:2,text:o.text,items:o.items},null,8,["text","items"]))],64))),128))])):h("",!0),c(e.$slots,"default",{},void 0,!0)]))}}),Bo=b(Ho,[["__scopeId","data-v-b98bc113"]]),Eo=["aria-expanded","aria-label"],Fo={key:0,class:"text"},Do=["innerHTML"],Oo={key:1,class:"vpi-more-horizontal icon"},Go={class:"menu"},Uo=m({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(s){const e=w(!1),t=w();yo({el:t,onBlur:o});function o(){e.value=!1}return(n,i)=>(a(),u("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=l=>e.value=!0),onMouseleave:i[2]||(i[2]=l=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=l=>e.value=!e.value)},[n.button||n.icon?(a(),u("span",Fo,[n.icon?(a(),u("span",{key:0,class:I([n.icon,"option-icon"])},null,2)):h("",!0),n.button?(a(),u("span",{key:1,innerHTML:n.button},null,8,Do)):h("",!0),i[3]||(i[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(a(),u("span",Oo))],8,Eo),d("div",Go,[_(Bo,{items:n.items},{default:f(()=>[c(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),_e=b(Uo,[["__scopeId","data-v-cf11d7a2"]]),jo=["href","aria-label","innerHTML"],zo=m({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(s){const e=s,t=w();j(async()=>{var i;await Ve();const n=(i=t.value)==null?void 0:i.children[0];n instanceof HTMLElement&&n.className.startsWith("vpi-social-")&&(getComputedStyle(n).maskImage||getComputedStyle(n).webkitMaskImage)==="none"&&n.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const o=g(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,i)=>(a(),u("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:o.value},null,8,jo))}}),Ko=b(zo,[["__scopeId","data-v-bd121fe5"]]),Wo={class:"VPSocialLinks"},qo=m({__name:"VPSocialLinks",props:{links:{}},setup(s){return(e,t)=>(a(),u("div",Wo,[(a(!0),u(A,null,H(e.links,({link:o,icon:n,ariaLabel:i})=>(a(),k(Ko,{key:o,icon:n,link:o,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),ke=b(qo,[["__scopeId","data-v-7bc22406"]]),Ro={key:0,class:"group translations"},Jo={class:"trans-title"},Yo={key:1,class:"group"},Xo={class:"item appearance"},Qo={class:"label"},Zo={class:"appearance-action"},xo={key:2,class:"group"},es={class:"item social-links"},ts=m({__name:"VPNavBarExtra",setup(s){const{site:e,theme:t}=V(),{localeLinks:o,currentLang:n}=R({correspondingLink:!0}),i=g(()=>o.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(l,v)=>i.value?(a(),k(_e,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:f(()=>[r(o).length&&r(n).label?(a(),u("div",Ro,[d("p",Jo,M(r(n).label),1),(a(!0),u(A,null,H(r(o),p=>(a(),k(ne,{key:p.link,item:p},null,8,["item"]))),128))])):h("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Yo,[d("div",Xo,[d("p",Qo,M(r(t).darkModeSwitchLabel||"Appearance"),1),d("div",Zo,[_(he)])])])):h("",!0),r(t).socialLinks?(a(),u("div",xo,[d("div",es,[_(ke,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):h("",!0)]),_:1})):h("",!0)}}),ns=b(ts,[["__scopeId","data-v-bb2aa2f0"]]),os=["aria-expanded"],ss=m({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(s){return(e,t)=>(a(),u("button",{type:"button",class:I(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=o=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,os))}}),as=b(ss,[["__scopeId","data-v-e5dd9c1c"]]),rs=["innerHTML"],is=m({__name:"VPNavBarMenuLink",props:{item:{}},setup(s){const{page:e}=V();return(t,o)=>(a(),k(F,{class:I({VPNavBarMenuLink:!0,active:r(K)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,rs)]),_:1},8,["class","href","target","rel","no-icon"]))}}),ls=b(is,[["__scopeId","data-v-e56f3d57"]]),cs=m({__name:"VPNavBarMenuGroup",props:{item:{}},setup(s){const e=s,{page:t}=V(),o=i=>"component"in i?!1:"link"in i?K(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(o),n=g(()=>o(e.item));return(i,l)=>(a(),k(_e,{class:I({VPNavBarMenuGroup:!0,active:r(K)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),us={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},ds=m({__name:"VPNavBarMenu",setup(s){const{theme:e}=V();return(t,o)=>r(e).nav?(a(),u("nav",us,[o[0]||(o[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(a(!0),u(A,null,H(r(e).nav,n=>(a(),u(A,{key:JSON.stringify(n)},["link"in n?(a(),k(ls,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props),null,16)):(a(),k(cs,{key:2,item:n},null,8,["item"]))],64))),128))])):h("",!0)}}),vs=b(ds,[["__scopeId","data-v-dc692963"]]);function ps(s){const{localeIndex:e,theme:t}=V();function o(n){var L,C,N;const i=n.split("."),l=(L=t.value.search)==null?void 0:L.options,v=l&&typeof l=="object",p=v&&((N=(C=l.locales)==null?void 0:C[e.value])==null?void 0:N.translations)||null,$=v&&l.translations||null;let S=p,y=$,P=s;const T=i.pop();for(const B of i){let G=null;const q=P==null?void 0:P[B];q&&(G=P=q);const oe=y==null?void 0:y[B];oe&&(G=y=oe);const se=S==null?void 0:S[B];se&&(G=S=se),q||(P=G),oe||(y=G),se||(S=G)}return(S==null?void 0:S[T])??(y==null?void 0:y[T])??(P==null?void 0:P[T])??""}return o}const fs=["aria-label"],hs={class:"DocSearch-Button-Container"},ms={class:"DocSearch-Button-Placeholder"},ge=m({__name:"VPNavBarSearchButton",setup(s){const t=ps({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(o,n)=>(a(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[d("span",hs,[n[0]||(n[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",ms,M(r(t)("button.buttonText")),1)]),n[1]||(n[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,fs))}}),_s={class:"VPNavBarSearch"},ks={id:"local-search"},bs={key:1,id:"docsearch"},gs=m({__name:"VPNavBarSearch",setup(s){const e=()=>null,t=ze(()=>Ke(()=>import("./VPAlgoliaSearchBox.NIHP5tU5.js"),__vite__mapDeps([0,1]))),{theme:o}=V(),n=w(!1),i=w(!1),l=()=>{const P="VPAlgoliaPreconnect";(window.requestIdleCallback||setTimeout)(()=>{var C;const L=document.createElement("link");L.id=P,L.rel="preconnect",L.href=`https://${(((C=o.value.search)==null?void 0:C.options)??o.value.algolia).appId}-dsn.algolia.net`,L.crossOrigin="",document.head.appendChild(L)})};j(()=>{l();const P=L=>{(L.key.toLowerCase()==="k"&&(L.metaKey||L.ctrlKey)||!$(L)&&L.key==="/")&&(L.preventDefault(),v(),T())},T=()=>{window.removeEventListener("keydown",P)};window.addEventListener("keydown",P),Q(T)});function v(){n.value||(n.value=!0,setTimeout(p,16))}function p(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||p()},16)}function $(P){const T=P.target,L=T.tagName;return T.isContentEditable||L==="INPUT"||L==="SELECT"||L==="TEXTAREA"}const S=w(!1),y="algolia";return(P,T)=>{var L;return a(),u("div",_s,[r(y)==="local"?(a(),u(A,{key:0},[S.value?(a(),k(r(e),{key:0,onClose:T[0]||(T[0]=C=>S.value=!1)})):h("",!0),d("div",ks,[_(ge,{onClick:T[1]||(T[1]=C=>S.value=!0)})])],64)):r(y)==="algolia"?(a(),u(A,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((L=r(o).search)==null?void 0:L.options)??r(o).algolia,onVnodeBeforeMount:T[2]||(T[2]=C=>i.value=!0)},null,8,["algolia"])):h("",!0),i.value?h("",!0):(a(),u("div",bs,[_(ge,{onClick:v})]))],64)):h("",!0)])}}}),$s=m({__name:"VPNavBarSocialLinks",setup(s){const{theme:e}=V();return(t,o)=>r(e).socialLinks?(a(),k(ke,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),ys=b($s,[["__scopeId","data-v-0394ad82"]]),Ps=["href","rel","target"],Ls=["innerHTML"],Vs={key:2},Ss=m({__name:"VPNavBarTitle",setup(s){const{site:e,theme:t}=V(),{hasSidebar:o}=O(),{currentLang:n}=R(),i=g(()=>{var p;return typeof t.value.logoLink=="string"?t.value.logoLink:(p=t.value.logoLink)==null?void 0:p.link}),l=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.rel}),v=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.target});return(p,$)=>(a(),u("div",{class:I(["VPNavBarTitle",{"has-sidebar":r(o)}])},[d("a",{class:"title",href:i.value??r(pe)(r(n).link),rel:l.value,target:v.value},[c(p.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(Y,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):h("",!0),r(t).siteTitle?(a(),u("span",{key:1,innerHTML:r(t).siteTitle},null,8,Ls)):r(t).siteTitle===void 0?(a(),u("span",Vs,M(r(e).title),1)):h("",!0),c(p.$slots,"nav-bar-title-after",{},void 0,!0)],8,Ps)],2))}}),Ts=b(Ss,[["__scopeId","data-v-1168a8e4"]]),Ns={class:"items"},ws={class:"title"},Is=m({__name:"VPNavBarTranslations",setup(s){const{theme:e}=V(),{localeLinks:t,currentLang:o}=R({correspondingLink:!0});return(n,i)=>r(t).length&&r(o).label?(a(),k(_e,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:f(()=>[d("div",Ns,[d("p",ws,M(r(o).label),1),(a(!0),u(A,null,H(r(t),l=>(a(),k(ne,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):h("",!0)}}),Ms=b(Is,[["__scopeId","data-v-88af2de4"]]),Cs={class:"wrapper"},As={class:"container"},Hs={class:"title"},Bs={class:"content"},Es={class:"content-body"},Fs=m({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(s){const e=s,{y:t}=Se(),{hasSidebar:o}=O(),{frontmatter:n}=V(),i=w({});return ve(()=>{i.value={"has-sidebar":o.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(l,v)=>(a(),u("div",{class:I(["VPNavBar",i.value])},[d("div",Cs,[d("div",As,[d("div",Hs,[_(Ts,null,{"nav-bar-title-before":f(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Bs,[d("div",Es,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),_(gs,{class:"search"}),_(vs,{class:"menu"}),_(Ms,{class:"translations"}),_($o,{class:"appearance"}),_(ys,{class:"social-links"}),_(ns,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),_(as,{class:"hamburger",active:l.isScreenOpen,onClick:v[0]||(v[0]=p=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),v[1]||(v[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),Ds=b(Fs,[["__scopeId","data-v-6aa21345"]]),Os={key:0,class:"VPNavScreenAppearance"},Gs={class:"text"},Us=m({__name:"VPNavScreenAppearance",setup(s){const{site:e,theme:t}=V();return(o,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),u("div",Os,[d("p",Gs,M(r(t).darkModeSwitchLabel||"Appearance"),1),_(he)])):h("",!0)}}),js=b(Us,[["__scopeId","data-v-b44890b2"]]),zs=["innerHTML"],Ks=m({__name:"VPNavScreenMenuLink",props:{item:{}},setup(s){const e=ee("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,zs)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ws=b(Ks,[["__scopeId","data-v-df37e6dd"]]),qs=["innerHTML"],Rs=m({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(s){const e=ee("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:r(e)},{default:f(()=>[d("span",{innerHTML:t.item.text},null,8,qs)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),He=b(Rs,[["__scopeId","data-v-3e9c20e4"]]),Js={class:"VPNavScreenMenuGroupSection"},Ys={key:0,class:"title"},Xs=m({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",Js,[e.text?(a(),u("p",Ys,M(e.text),1)):h("",!0),(a(!0),u(A,null,H(e.items,o=>(a(),k(He,{key:o.text,item:o},null,8,["item"]))),128))]))}}),Qs=b(Xs,[["__scopeId","data-v-8133b170"]]),Zs=["aria-controls","aria-expanded"],xs=["innerHTML"],ea=["id"],ta={key:0,class:"item"},na={key:1,class:"item"},oa={key:2,class:"group"},sa=m({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(s){const e=s,t=w(!1),o=g(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,l)=>(a(),u("div",{class:I(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":o.value,"aria-expanded":t.value,onClick:n},[d("span",{class:"button-text",innerHTML:i.text},null,8,xs),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,Zs),d("div",{id:o.value,class:"items"},[(a(!0),u(A,null,H(i.items,v=>(a(),u(A,{key:JSON.stringify(v)},["link"in v?(a(),u("div",ta,[_(He,{item:v},null,8,["item"])])):"component"in v?(a(),u("div",na,[(a(),k(E(v.component),U({ref_for:!0},v.props,{"screen-menu":""}),null,16))])):(a(),u("div",oa,[_(Qs,{text:v.text,items:v.items},null,8,["text","items"])]))],64))),128))],8,ea)],2))}}),aa=b(sa,[["__scopeId","data-v-b9ab8c58"]]),ra={key:0,class:"VPNavScreenMenu"},ia=m({__name:"VPNavScreenMenu",setup(s){const{theme:e}=V();return(t,o)=>r(e).nav?(a(),u("nav",ra,[(a(!0),u(A,null,H(r(e).nav,n=>(a(),u(A,{key:JSON.stringify(n)},["link"in n?(a(),k(Ws,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),U({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(aa,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):h("",!0)}}),la=m({__name:"VPNavScreenSocialLinks",setup(s){const{theme:e}=V();return(t,o)=>r(e).socialLinks?(a(),k(ke,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):h("",!0)}}),ca={class:"list"},ua=m({__name:"VPNavScreenTranslations",setup(s){const{localeLinks:e,currentLang:t}=R({correspondingLink:!0}),o=w(!1);function n(){o.value=!o.value}return(i,l)=>r(e).length&&r(t).label?(a(),u("div",{key:0,class:I(["VPNavScreenTranslations",{open:o.value}])},[d("button",{class:"title",onClick:n},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),z(" "+M(r(t).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",ca,[(a(!0),u(A,null,H(r(e),v=>(a(),u("li",{key:v.link,class:"item"},[_(F,{class:"link",href:v.link},{default:f(()=>[z(M(v.text),1)]),_:2},1032,["href"])]))),128))])],2)):h("",!0)}}),da=b(ua,[["__scopeId","data-v-858fe1a4"]]),va={class:"container"},pa=m({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(s){const e=w(null),t=Te(te?document.body:null);return(o,n)=>(a(),k(ue,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:f(()=>[o.open?(a(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",va,[c(o.$slots,"nav-screen-content-before",{},void 0,!0),_(ia,{class:"menu"}),_(da,{class:"translations"}),_(js,{class:"appearance"}),_(la,{class:"social-links"}),c(o.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):h("",!0)]),_:3}))}}),fa=b(pa,[["__scopeId","data-v-f2779853"]]),ha={key:0,class:"VPNav"},ma=m({__name:"VPNav",setup(s){const{isScreenOpen:e,closeScreen:t,toggleScreen:o}=uo(),{frontmatter:n}=V(),i=g(()=>n.value.navbar!==!1);return Ne("close-screen",t),X(()=>{te&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(l,v)=>i.value?(a(),u("header",ha,[_(Ds,{"is-screen-open":r(e),onToggleScreen:r(o)},{"nav-bar-title-before":f(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),_(fa,{open:r(e)},{"nav-screen-content-before":f(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):h("",!0)}}),_a=b(ma,[["__scopeId","data-v-ae24b3ad"]]),ka=["role","tabindex"],ba={key:1,class:"items"},ga=m({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(s){const e=s,{collapsed:t,collapsible:o,isLink:n,isActiveLink:i,hasActiveLink:l,hasChildren:v,toggle:p}=pt(g(()=>e.item)),$=g(()=>v.value?"section":"div"),S=g(()=>n.value?"a":"div"),y=g(()=>v.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=g(()=>n.value?void 0:"button"),T=g(()=>[[`level-${e.depth}`],{collapsible:o.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":l.value}]);function L(N){"key"in N&&N.key!=="Enter"||!e.item.link&&p()}function C(){e.item.link&&p()}return(N,B)=>{const G=W("VPSidebarItem",!0);return a(),k(E($.value),{class:I(["VPSidebarItem",T.value])},{default:f(()=>[N.item.text?(a(),u("div",U({key:0,class:"item",role:P.value},We(N.item.items?{click:L,keydown:L}:{},!0),{tabindex:N.item.items&&0}),[B[1]||(B[1]=d("div",{class:"indicator"},null,-1)),N.item.link?(a(),k(F,{key:0,tag:S.value,class:"link",href:N.item.link,rel:N.item.rel,target:N.item.target},{default:f(()=>[(a(),k(E(y.value),{class:"text",innerHTML:N.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(E(y.value),{key:1,class:"text",innerHTML:N.item.text},null,8,["innerHTML"])),N.item.collapsed!=null&&N.item.items&&N.item.items.length?(a(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:C,onKeydown:qe(C,["enter"]),tabindex:"0"},B[0]||(B[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):h("",!0)],16,ka)):h("",!0),N.item.items&&N.item.items.length?(a(),u("div",ba,[N.depth<5?(a(!0),u(A,{key:0},H(N.item.items,q=>(a(),k(G,{key:q.text,item:q,depth:N.depth+1},null,8,["item","depth"]))),128)):h("",!0)])):h("",!0)]),_:1},8,["class"])}}}),$a=b(ga,[["__scopeId","data-v-b3fd67f8"]]),ya=m({__name:"VPSidebarGroup",props:{items:{}},setup(s){const e=w(!0);let t=null;return j(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),Re(()=>{t!=null&&(clearTimeout(t),t=null)}),(o,n)=>(a(!0),u(A,null,H(o.items,i=>(a(),u("div",{key:i.text,class:I(["group",{"no-transition":e.value}])},[_($a,{item:i,depth:0},null,8,["item"])],2))),128))}}),Pa=b(ya,[["__scopeId","data-v-c40bc020"]]),La={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Va=m({__name:"VPSidebar",props:{open:{type:Boolean}},setup(s){const{sidebarGroups:e,hasSidebar:t}=O(),o=s,n=w(null),i=Te(te?document.body:null);D([o,n],()=>{var v;o.open?(i.value=!0,(v=n.value)==null||v.focus()):i.value=!1},{immediate:!0,flush:"post"});const l=w(0);return D(e,()=>{l.value+=1},{deep:!0}),(v,p)=>r(t)?(a(),u("aside",{key:0,class:I(["VPSidebar",{open:v.open}]),ref_key:"navEl",ref:n,onClick:p[0]||(p[0]=Je(()=>{},["stop"]))},[p[2]||(p[2]=d("div",{class:"curtain"},null,-1)),d("nav",La,[p[1]||(p[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(v.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(Pa,{items:r(e),key:l.value},null,8,["items"])),c(v.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):h("",!0)}}),Sa=b(Va,[["__scopeId","data-v-319d5ca6"]]),Ta=m({__name:"VPSkipLink",setup(s){const{theme:e}=V(),t=x(),o=w();D(()=>t.path,()=>o.value.focus());function n({target:i}){const l=document.getElementById(decodeURIComponent(i.hash).slice(1));if(l){const v=()=>{l.removeAttribute("tabindex"),l.removeEventListener("blur",v)};l.setAttribute("tabindex","-1"),l.addEventListener("blur",v),l.focus(),window.scrollTo(0,0)}}return(i,l)=>(a(),u(A,null,[d("span",{ref_key:"backToTop",ref:o,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:n},M(r(e).skipToContentLabel||"Skip to content"),1)],64))}}),Na=b(Ta,[["__scopeId","data-v-0b0ada53"]]),wa=m({__name:"Layout",setup(s){const{isOpen:e,open:t,close:o}=O(),n=x();D(()=>n.path,o),vt(e,o);const{frontmatter:i}=V(),l=Ye(),v=g(()=>!!l["home-hero-image"]);return Ne("hero-image-slot-exists",v),(p,$)=>{const S=W("Content");return r(i).layout!==!1?(a(),u("div",{key:0,class:I(["Layout",r(i).pageClass])},[c(p.$slots,"layout-top",{},void 0,!0),_(Na),_(xe,{class:"backdrop",show:r(e),onClick:r(o)},null,8,["show","onClick"]),_(_a,null,{"nav-bar-title-before":f(()=>[c(p.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":f(()=>[c(p.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":f(()=>[c(p.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":f(()=>[c(p.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":f(()=>[c(p.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":f(()=>[c(p.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),_(co,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),_(Sa,{open:r(e)},{"sidebar-nav-before":f(()=>[c(p.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":f(()=>[c(p.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),_(Rn,null,{"page-top":f(()=>[c(p.$slots,"page-top",{},void 0,!0)]),"page-bottom":f(()=>[c(p.$slots,"page-bottom",{},void 0,!0)]),"not-found":f(()=>[c(p.$slots,"not-found",{},void 0,!0)]),"home-hero-before":f(()=>[c(p.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":f(()=>[c(p.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":f(()=>[c(p.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":f(()=>[c(p.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":f(()=>[c(p.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":f(()=>[c(p.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":f(()=>[c(p.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":f(()=>[c(p.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":f(()=>[c(p.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":f(()=>[c(p.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":f(()=>[c(p.$slots,"doc-before",{},void 0,!0)]),"doc-after":f(()=>[c(p.$slots,"doc-after",{},void 0,!0)]),"doc-top":f(()=>[c(p.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":f(()=>[c(p.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":f(()=>[c(p.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":f(()=>[c(p.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":f(()=>[c(p.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":f(()=>[c(p.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":f(()=>[c(p.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":f(()=>[c(p.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),_(Zn),c(p.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(S,{key:1}))}}}),Ia=b(wa,[["__scopeId","data-v-5d98c3a5"]]),$e={Layout:Ia,enhanceApp:({app:s})=>{s.component("Badge",Xe)}},Ma={};function Ca(s,e){return a(),u("span",null,"⚡")}const Aa=b(Ma,[["render",Ca]]),Ba={extends:$e,Layout(){return be($e.Layout,null,{"nav-bar-title-after":()=>be(Aa)})}};export{Ba as R,V as u}; diff --git a/assets/developer_index.md.Hpvd8MTL.js b/assets/developer_index.md.r3kwPi_t.js similarity index 86% rename from assets/developer_index.md.Hpvd8MTL.js rename to assets/developer_index.md.r3kwPi_t.js index 6f4a6e2dde..b08927dd03 100644 --- a/assets/developer_index.md.Hpvd8MTL.js +++ b/assets/developer_index.md.r3kwPi_t.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","description":"","frontmatter":{"layout":"home","title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","hero":{"name":"开发手册","text":"开发手册","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/l10n"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1772422214000}'),n={name:"developer/index.md"};function l(o,r,s,i,p,d){return a(),t("div")}const h=e(n,[["render",l]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","description":"","frontmatter":{"layout":"home","title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","hero":{"name":"开发手册","text":"开发手册","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/l10n"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1772424525000}'),n={name:"developer/index.md"};function l(o,r,s,i,p,d){return a(),t("div")}const h=e(n,[["render",l]]);export{m as __pageData,h as default}; diff --git a/assets/developer_index.md.Hpvd8MTL.lean.js b/assets/developer_index.md.r3kwPi_t.lean.js similarity index 86% rename from assets/developer_index.md.Hpvd8MTL.lean.js rename to assets/developer_index.md.r3kwPi_t.lean.js index 6f4a6e2dde..b08927dd03 100644 --- a/assets/developer_index.md.Hpvd8MTL.lean.js +++ b/assets/developer_index.md.r3kwPi_t.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","description":"","frontmatter":{"layout":"home","title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","hero":{"name":"开发手册","text":"开发手册","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/l10n"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1772422214000}'),n={name:"developer/index.md"};function l(o,r,s,i,p,d){return a(),t("div")}const h=e(n,[["render",l]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","description":"","frontmatter":{"layout":"home","title":"开发手册","titleTemplate":"欢迎使用一键虚拟化项目开发手册,欢迎你提出高质量的Pull Request,帮助一键虚拟化项目变得更好!","hero":{"name":"开发手册","text":"开发手册","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/l10n"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1772424525000}'),n={name:"developer/index.md"};function l(o,r,s,i,p,d){return a(),t("div")}const h=e(n,[["render",l]]);export{m as __pageData,h as default}; diff --git a/assets/developer_l10n.md.BE5vrtKH.lean.js b/assets/developer_l10n.md.BE5vrtKH.lean.js deleted file mode 100644 index 69db0b92de..0000000000 --- a/assets/developer_l10n.md.BE5vrtKH.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,c as l,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1772422214000}'),r={name:"developer/l10n.md"};function d(n,e,i,c,s,_){return a(),l("div",null,e[0]||(e[0]=[t("",5)]))}const m=o(r,[["render",d]]);export{h as __pageData,m as default}; diff --git a/assets/developer_l10n.md.BE5vrtKH.js b/assets/developer_l10n.md.G35yAdba.js similarity index 81% rename from assets/developer_l10n.md.BE5vrtKH.js rename to assets/developer_l10n.md.G35yAdba.js index 5c7e013352..30b3ca8d8b 100644 --- a/assets/developer_l10n.md.BE5vrtKH.js +++ b/assets/developer_l10n.md.G35yAdba.js @@ -1 +1 @@ -import{_ as o,c as l,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1772422214000}'),r={name:"developer/l10n.md"};function d(n,e,i,c,s,_){return a(),l("div",null,e[0]||(e[0]=[t('

你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
',5)]))}const m=o(r,[["render",d]]);export{h as __pageData,m as default}; +import{_ as o,c as l,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1772424525000}'),r={name:"developer/l10n.md"};function d(n,e,i,c,s,_){return a(),l("div",null,e[0]||(e[0]=[t('

你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
',5)]))}const m=o(r,[["render",d]]);export{h as __pageData,m as default}; diff --git a/assets/developer_l10n.md.G35yAdba.lean.js b/assets/developer_l10n.md.G35yAdba.lean.js new file mode 100644 index 0000000000..a8d4a4079d --- /dev/null +++ b/assets/developer_l10n.md.G35yAdba.lean.js @@ -0,0 +1 @@ +import{_ as o,c as l,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1772424525000}'),r={name:"developer/l10n.md"};function d(n,e,i,c,s,_){return a(),l("div",null,e[0]||(e[0]=[t("",5)]))}const m=o(r,[["render",d]]);export{h as __pageData,m as default}; diff --git a/assets/en_developer_index.md.DA-GdzIh.js b/assets/en_developer_index.md.CR5JSB6R.js similarity index 84% rename from assets/en_developer_index.md.DA-GdzIh.js rename to assets/en_developer_index.md.CR5JSB6R.js index 91fd1f2b34..0228e45a3a 100644 --- a/assets/en_developer_index.md.DA-GdzIh.js +++ b/assets/en_developer_index.md.CR5JSB6R.js @@ -1 +1 @@ -import{_ as e,c as t,o as n}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","description":"","frontmatter":{"layout":"home","title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","hero":{"name":"Development Manual","text":"Welcome to the oneclickvirt Development Manual.","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/l10n"}]}},"headers":[],"relativePath":"en/developer/index.md","filePath":"en/developer/index.md","lastUpdated":1772422214000}'),a={name:"en/developer/index.md"};function o(l,r,i,p,c,m){return n(),t("div")}const v=e(a,[["render",o]]);export{d as __pageData,v as default}; +import{_ as e,c as t,o as n}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","description":"","frontmatter":{"layout":"home","title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","hero":{"name":"Development Manual","text":"Welcome to the oneclickvirt Development Manual.","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/l10n"}]}},"headers":[],"relativePath":"en/developer/index.md","filePath":"en/developer/index.md","lastUpdated":1772424525000}'),a={name:"en/developer/index.md"};function o(l,r,i,p,c,m){return n(),t("div")}const v=e(a,[["render",o]]);export{d as __pageData,v as default}; diff --git a/assets/en_developer_index.md.DA-GdzIh.lean.js b/assets/en_developer_index.md.CR5JSB6R.lean.js similarity index 84% rename from assets/en_developer_index.md.DA-GdzIh.lean.js rename to assets/en_developer_index.md.CR5JSB6R.lean.js index 91fd1f2b34..0228e45a3a 100644 --- a/assets/en_developer_index.md.DA-GdzIh.lean.js +++ b/assets/en_developer_index.md.CR5JSB6R.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as n}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","description":"","frontmatter":{"layout":"home","title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","hero":{"name":"Development Manual","text":"Welcome to the oneclickvirt Development Manual.","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/l10n"}]}},"headers":[],"relativePath":"en/developer/index.md","filePath":"en/developer/index.md","lastUpdated":1772422214000}'),a={name:"en/developer/index.md"};function o(l,r,i,p,c,m){return n(),t("div")}const v=e(a,[["render",o]]);export{d as __pageData,v as default}; +import{_ as e,c as t,o as n}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","description":"","frontmatter":{"layout":"home","title":"Development Manual","titleTemplate":"Welcome to the oneclickvirt Development Manual.","hero":{"name":"Development Manual","text":"Welcome to the oneclickvirt Development Manual.","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/l10n"}]}},"headers":[],"relativePath":"en/developer/index.md","filePath":"en/developer/index.md","lastUpdated":1772424525000}'),a={name:"en/developer/index.md"};function o(l,r,i,p,c,m){return n(),t("div")}const v=e(a,[["render",o]]);export{d as __pageData,v as default}; diff --git a/assets/en_developer_l10n.md.D910-W63.js b/assets/en_developer_l10n.md.CspEyVLR.js similarity index 87% rename from assets/en_developer_l10n.md.D910-W63.js rename to assets/en_developer_l10n.md.CspEyVLR.js index ba3238b814..aede0c65da 100644 --- a/assets/en_developer_l10n.md.D910-W63.js +++ b/assets/en_developer_l10n.md.CspEyVLR.js @@ -1 +1 @@ -import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/developer/l10n.md","filePath":"en/developer/l10n.md","lastUpdated":1772422214000}'),i={name:"en/developer/l10n.md"};function l(r,e,d,c,s,u){return a(),n("div",null,e[0]||(e[0]=[o('

You can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
',5)]))}const h=t(i,[["render",l]]);export{g as __pageData,h as default}; +import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/developer/l10n.md","filePath":"en/developer/l10n.md","lastUpdated":1772424525000}'),i={name:"en/developer/l10n.md"};function l(r,e,d,c,s,u){return a(),n("div",null,e[0]||(e[0]=[o('

You can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
',5)]))}const h=t(i,[["render",l]]);export{g as __pageData,h as default}; diff --git a/assets/en_developer_l10n.md.D910-W63.lean.js b/assets/en_developer_l10n.md.CspEyVLR.lean.js similarity index 54% rename from assets/en_developer_l10n.md.D910-W63.lean.js rename to assets/en_developer_l10n.md.CspEyVLR.lean.js index d62b231111..e77bc381cc 100644 --- a/assets/en_developer_l10n.md.D910-W63.lean.js +++ b/assets/en_developer_l10n.md.CspEyVLR.lean.js @@ -1 +1 @@ -import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/developer/l10n.md","filePath":"en/developer/l10n.md","lastUpdated":1772422214000}'),i={name:"en/developer/l10n.md"};function l(r,e,d,c,s,u){return a(),n("div",null,e[0]||(e[0]=[o("",5)]))}const h=t(i,[["render",l]]);export{g as __pageData,h as default}; +import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/developer/l10n.md","filePath":"en/developer/l10n.md","lastUpdated":1772424525000}'),i={name:"en/developer/l10n.md"};function l(r,e,d,c,s,u){return a(),n("div",null,e[0]||(e[0]=[o("",5)]))}const h=t(i,[["render",l]]);export{g as __pageData,h as default}; diff --git a/assets/en_guide_block_block_docker.md.BsVLR5tO.js b/assets/en_guide_block_block_docker.md.BcUATIGh.js similarity index 82% rename from assets/en_guide_block_block_docker.md.BsVLR5tO.js rename to assets/en_guide_block_block_docker.md.BcUATIGh.js index e7687e210f..7598547922 100644 --- a/assets/en_guide_block_block_docker.md.BsVLR5tO.js +++ b/assets/en_guide_block_block_docker.md.BcUATIGh.js @@ -1 +1 @@ -import{_ as o,c as a,o as d,j as t,a as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"To be developed, stay tuned","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_docker.md","filePath":"en/guide/block/block_docker.md","lastUpdated":1772422214000}'),n={name:"en/guide/block/block_docker.md"};function l(s,e,c,i,p,b){return d(),a("div",null,e[0]||(e[0]=[t("h1",{id:"to-be-developed-stay-tuned",tabindex:"-1"},[r("To be developed, stay tuned "),t("a",{class:"header-anchor",href:"#to-be-developed-stay-tuned","aria-label":'Permalink to "To be developed, stay tuned"'},"​")],-1)]))}const _=o(n,[["render",l]]);export{u as __pageData,_ as default}; +import{_ as o,c as a,o as d,j as t,a as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"To be developed, stay tuned","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_docker.md","filePath":"en/guide/block/block_docker.md","lastUpdated":1772424525000}'),n={name:"en/guide/block/block_docker.md"};function l(s,e,c,i,p,b){return d(),a("div",null,e[0]||(e[0]=[t("h1",{id:"to-be-developed-stay-tuned",tabindex:"-1"},[r("To be developed, stay tuned "),t("a",{class:"header-anchor",href:"#to-be-developed-stay-tuned","aria-label":'Permalink to "To be developed, stay tuned"'},"​")],-1)]))}const _=o(n,[["render",l]]);export{u as __pageData,_ as default}; diff --git a/assets/en_guide_block_block_docker.md.BsVLR5tO.lean.js b/assets/en_guide_block_block_docker.md.BcUATIGh.lean.js similarity index 82% rename from assets/en_guide_block_block_docker.md.BsVLR5tO.lean.js rename to assets/en_guide_block_block_docker.md.BcUATIGh.lean.js index e7687e210f..7598547922 100644 --- a/assets/en_guide_block_block_docker.md.BsVLR5tO.lean.js +++ b/assets/en_guide_block_block_docker.md.BcUATIGh.lean.js @@ -1 +1 @@ -import{_ as o,c as a,o as d,j as t,a as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"To be developed, stay tuned","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_docker.md","filePath":"en/guide/block/block_docker.md","lastUpdated":1772422214000}'),n={name:"en/guide/block/block_docker.md"};function l(s,e,c,i,p,b){return d(),a("div",null,e[0]||(e[0]=[t("h1",{id:"to-be-developed-stay-tuned",tabindex:"-1"},[r("To be developed, stay tuned "),t("a",{class:"header-anchor",href:"#to-be-developed-stay-tuned","aria-label":'Permalink to "To be developed, stay tuned"'},"​")],-1)]))}const _=o(n,[["render",l]]);export{u as __pageData,_ as default}; +import{_ as o,c as a,o as d,j as t,a as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"To be developed, stay tuned","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_docker.md","filePath":"en/guide/block/block_docker.md","lastUpdated":1772424525000}'),n={name:"en/guide/block/block_docker.md"};function l(s,e,c,i,p,b){return d(),a("div",null,e[0]||(e[0]=[t("h1",{id:"to-be-developed-stay-tuned",tabindex:"-1"},[r("To be developed, stay tuned "),t("a",{class:"header-anchor",href:"#to-be-developed-stay-tuned","aria-label":'Permalink to "To be developed, stay tuned"'},"​")],-1)]))}const _=o(n,[["render",l]]);export{u as __pageData,_ as default}; diff --git a/assets/en_guide_block_block_incus.md.5Wn3yArP.js b/assets/en_guide_block_block_incus.md.5Wn3yArP.js deleted file mode 100644 index 9de2a3cdfc..0000000000 --- a/assets/en_guide_block_block_incus.md.5Wn3yArP.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_incus.md","filePath":"en/guide/block/block_incus.md","lastUpdated":1772422214000}'),t={name:"en/guide/block/block_incus.md"};function o(l,i,r,h,p,c){return e(),a("div",null,i[0]||(i[0]=[n('

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',9)]))}const g=s(t,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_block_block_incus.md.5Wn3yArP.lean.js b/assets/en_guide_block_block_incus.md.5Wn3yArP.lean.js deleted file mode 100644 index 2621669244..0000000000 --- a/assets/en_guide_block_block_incus.md.5Wn3yArP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_incus.md","filePath":"en/guide/block/block_incus.md","lastUpdated":1772422214000}'),t={name:"en/guide/block/block_incus.md"};function o(l,i,r,h,p,c){return e(),a("div",null,i[0]||(i[0]=[n("",9)]))}const g=s(t,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_block_block_incus.md.wjJR3ro3.js b/assets/en_guide_block_block_incus.md.wjJR3ro3.js new file mode 100644 index 0000000000..d7ec96fc75 --- /dev/null +++ b/assets/en_guide_block_block_incus.md.wjJR3ro3.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_incus.md","filePath":"en/guide/block/block_incus.md","lastUpdated":1772424525000}'),t={name:"en/guide/block/block_incus.md"};function o(l,i,r,p,h,c){return e(),a("div",null,i[0]||(i[0]=[n('

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',9)]))}const m=s(t,[["render",o]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_block_block_incus.md.wjJR3ro3.lean.js b/assets/en_guide_block_block_incus.md.wjJR3ro3.lean.js new file mode 100644 index 0000000000..3c7e5578b9 --- /dev/null +++ b/assets/en_guide_block_block_incus.md.wjJR3ro3.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_incus.md","filePath":"en/guide/block/block_incus.md","lastUpdated":1772424525000}'),t={name:"en/guide/block/block_incus.md"};function o(l,i,r,p,h,c){return e(),a("div",null,i[0]||(i[0]=[n("",9)]))}const m=s(t,[["render",o]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_block_block_iptables.md.wCBeHSMT.js b/assets/en_guide_block_block_iptables.md.CQh9FfY4.js similarity index 57% rename from assets/en_guide_block_block_iptables.md.wCBeHSMT.js rename to assets/en_guide_block_block_iptables.md.CQh9FfY4.js index 6a311bf3b4..b3b702a859 100644 --- a/assets/en_guide_block_block_iptables.md.wCBeHSMT.js +++ b/assets/en_guide_block_block_iptables.md.CQh9FfY4.js @@ -1,4 +1,4 @@ -import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"Blocking abuse through iptables","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_iptables.md","filePath":"en/guide/block/block_iptables.md","lastUpdated":1772422214000}'),l={name:"en/guide/block/block_iptables.md"};function h(p,s,e,k,F,o){return n(),a("div",null,s[0]||(s[0]=[t(`

Blocking abuse through iptables

Basic Usage of iptables

1. Start iptables

In most Linux distributions, the iptables service can be started using the following command:

bash
sudo systemctl start iptables

2. Set Rules

After starting iptables, you can set rules to block abusive traffic. For example, the following command will block traffic from a specific IPv4 address:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. Query Rules

After setting the rules, you can use the following command to view the current iptables rules:

bash
sudo iptables -L

This will list all input, output, and forwarding rules.

4. Stop iptables

If you need to stop the iptables service, you can use the following command:

bash
sudo systemctl stop iptables

5. Save Rules

To ensure that the rules persist after a reboot, you can save the current rules:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. Restore Rules

When you need to restore the rules, you can use the following command:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. Other Common Commands

  • List Rules (Detailed Information):

    bash
    sudo iptables -L -v
  • Delete Specific Rule:

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • Flush All Rules:

    bash
    sudo iptables -F

Block abusive traffic on the host

  • prevention in advance

Blocking Mining Behavior

shell
strings=(
+import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Blocking abuse through iptables","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_iptables.md","filePath":"en/guide/block/block_iptables.md","lastUpdated":1772424525000}'),e={name:"en/guide/block/block_iptables.md"};function p(t,s,h,k,r,F){return n(),a("div",null,s[0]||(s[0]=[l(`

Blocking abuse through iptables

Basic Usage of iptables

1. Start iptables

In most Linux distributions, the iptables service can be started using the following command:

bash
sudo systemctl start iptables

2. Set Rules

After starting iptables, you can set rules to block abusive traffic. For example, the following command will block traffic from a specific IPv4 address:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. Query Rules

After setting the rules, you can use the following command to view the current iptables rules:

bash
sudo iptables -L

This will list all input, output, and forwarding rules.

4. Stop iptables

If you need to stop the iptables service, you can use the following command:

bash
sudo systemctl stop iptables

5. Save Rules

To ensure that the rules persist after a reboot, you can save the current rules:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. Restore Rules

When you need to restore the rules, you can use the following command:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. Other Common Commands

  • List Rules (Detailed Information):

    bash
    sudo iptables -L -v
  • Delete Specific Rule:

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • Flush All Rules:

    bash
    sudo iptables -F

Block abusive traffic on the host

  • prevention in advance

Blocking Mining Behavior

shell
strings=(
     "ethermine.com"
     "ethermine.org"
     "antpool.one"
@@ -40,7 +40,7 @@ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const d
 iptables -C OUTPUT -j MINING_BLOCK 2>/dev/null || iptables -A OUTPUT -j MINING_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A MINING_BLOCK -m string --string "$str" --algo bm -j DROP
-done

Blocking BT behavior

shell
strings=(
+done

Blocking BT behavior

shell
strings=(
     "BitTorrent"
     "BitTorrent protocol"
     "BitTorrent protocol\\x13"
@@ -69,7 +69,7 @@ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const d
 iptables -C OUTPUT -j BT_BLOCK 2>/dev/null || iptables -A OUTPUT -j BT_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A BT_BLOCK -m string --string "$str" --algo bm -j DROP
-done

Blocking Speed Test Behavior

shell
strings=(
+done

Blocking Speed Test Behavior

shell
strings=(
     "speedtest"
     "fast.com"
     "speedtest.net"
@@ -96,10 +96,10 @@ import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const d
 iptables -C OUTPUT -j SPEED_BLOCK 2>/dev/null || iptables -A OUTPUT -j SPEED_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A SPEED_BLOCK -m string --string "$str" --algo bm -j DROP
-done

Unblocking actions

Remove mining restrictions

shell
iptables -D OUTPUT -j MINING_BLOCK
+done

Unblocking actions

Remove mining restrictions

shell
iptables -D OUTPUT -j MINING_BLOCK
 iptables -F MINING_BLOCK
-iptables -X MINING_BLOCK

Remove BT restrictions

shell
iptables -D OUTPUT -j BT_BLOCK
+iptables -X MINING_BLOCK

Remove BT restrictions

shell
iptables -D OUTPUT -j BT_BLOCK
 iptables -F BT_BLOCK
-iptables -X BT_BLOCK

Remove speed restrictions

shell
iptables -D OUTPUT -j SPEED_BLOCK
+iptables -X BT_BLOCK

Remove speed restrictions

shell
iptables -D OUTPUT -j SPEED_BLOCK
 iptables -F SPEED_BLOCK
-iptables -X SPEED_BLOCK
`,38)]))}const g=i(l,[["render",h]]);export{d as __pageData,g as default}; +iptables -X SPEED_BLOCK
`,38)]))}const u=i(e,[["render",p]]);export{o as __pageData,u as default}; diff --git a/assets/en_guide_block_block_iptables.md.CQh9FfY4.lean.js b/assets/en_guide_block_block_iptables.md.CQh9FfY4.lean.js new file mode 100644 index 0000000000..a021b4d1d2 --- /dev/null +++ b/assets/en_guide_block_block_iptables.md.CQh9FfY4.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Blocking abuse through iptables","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_iptables.md","filePath":"en/guide/block/block_iptables.md","lastUpdated":1772424525000}'),e={name:"en/guide/block/block_iptables.md"};function p(t,s,h,k,r,F){return n(),a("div",null,s[0]||(s[0]=[l("",38)]))}const u=i(e,[["render",p]]);export{o as __pageData,u as default}; diff --git a/assets/en_guide_block_block_iptables.md.wCBeHSMT.lean.js b/assets/en_guide_block_block_iptables.md.wCBeHSMT.lean.js deleted file mode 100644 index cf635cf59d..0000000000 --- a/assets/en_guide_block_block_iptables.md.wCBeHSMT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"Blocking abuse through iptables","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_iptables.md","filePath":"en/guide/block/block_iptables.md","lastUpdated":1772422214000}'),l={name:"en/guide/block/block_iptables.md"};function h(p,s,e,k,F,o){return n(),a("div",null,s[0]||(s[0]=[t("",38)]))}const g=i(l,[["render",h]]);export{d as __pageData,g as default}; diff --git a/assets/en_guide_block_block_lxd.md.DXvdC2Cg.js b/assets/en_guide_block_block_lxd.md.DXvdC2Cg.js new file mode 100644 index 0000000000..5695ae0b69 --- /dev/null +++ b/assets/en_guide_block_block_lxd.md.DXvdC2Cg.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_lxd.md","filePath":"en/guide/block/block_lxd.md","lastUpdated":1772424525000}'),t={name:"en/guide/block/block_lxd.md"};function o(l,i,r,p,h,c){return e(),a("div",null,i[0]||(i[0]=[n('

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',9)]))}const m=s(t,[["render",o]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_block_block_lxd.md.DXvdC2Cg.lean.js b/assets/en_guide_block_block_lxd.md.DXvdC2Cg.lean.js new file mode 100644 index 0000000000..081a5b7e8e --- /dev/null +++ b/assets/en_guide_block_block_lxd.md.DXvdC2Cg.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_lxd.md","filePath":"en/guide/block/block_lxd.md","lastUpdated":1772424525000}'),t={name:"en/guide/block/block_lxd.md"};function o(l,i,r,p,h,c){return e(),a("div",null,i[0]||(i[0]=[n("",9)]))}const m=s(t,[["render",o]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_block_block_lxd.md.WTGwz_VC.js b/assets/en_guide_block_block_lxd.md.WTGwz_VC.js deleted file mode 100644 index ce21ebe307..0000000000 --- a/assets/en_guide_block_block_lxd.md.WTGwz_VC.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_lxd.md","filePath":"en/guide/block/block_lxd.md","lastUpdated":1772422214000}'),t={name:"en/guide/block/block_lxd.md"};function o(l,i,r,h,p,c){return e(),a("div",null,i[0]||(i[0]=[n('

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',9)]))}const g=s(t,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_block_block_lxd.md.WTGwz_VC.lean.js b/assets/en_guide_block_block_lxd.md.WTGwz_VC.lean.js deleted file mode 100644 index 80186aff08..0000000000 --- a/assets/en_guide_block_block_lxd.md.WTGwz_VC.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Blocking Abusive Behavior via Shell Scripts","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_lxd.md","filePath":"en/guide/block/block_lxd.md","lastUpdated":1772422214000}'),t={name:"en/guide/block/block_lxd.md"};function o(l,i,r,h,p,c){return e(),a("div",null,i[0]||(i[0]=[n("",9)]))}const g=s(t,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_block_block_pve.md.0KCUf4KK.js b/assets/en_guide_block_block_pve.md.0KCUf4KK.js new file mode 100644 index 0000000000..b88ac04fd4 --- /dev/null +++ b/assets/en_guide_block_block_pve.md.0KCUf4KK.js @@ -0,0 +1,3 @@ +import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Avoid theft by setting up a firewall to limit the IPs used by the VMs","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_pve.md","filePath":"en/guide/block/block_pve.md","lastUpdated":1772424525000}'),n={name:"en/guide/block/block_pve.md"};function l(o,e,r,h,p,d){return i(),s("div",null,e[0]||(e[0]=[a(`

Avoid theft by setting up a firewall to limit the IPs used by the VMs

Create the following file under the PVE's host machine

shell
/etc/pve/firewall/<VMID>.fw
+[IPSET ipfilter-<net0>]
+xxx.xxx.xxx.xxx

<VMID> is replaced with the VMID number of the virtual machine, <net0> is replaced with the corresponding alias in the network device (which generally doesn't need to be changed unless you're restricted to IPV6), and xxx.xxx.xxx.xxx is replaced with the public IP address, noting that this IP corresponds to the network device in front of it.

The idea here is that net0 can only use the IP xxx.xxx.xxx.xxx, if you use any other IP the data will be dropped, thus restricting the VM to only use this IP.

There can be more than one IP, once this rule is enabled the VM can't use any other IP, if you don't write an IPv6 address it means the VM can't use an IPv6 address.

TIP

This setting is only recommended when opening VMs with separate IPs that are not NAT full port mapped, otherwise it may cause strange issues resulting in the server being without a network.

This method is not suitable for use on PVEs that open any NAT VMs/containers.

`,8)]))}const g=t(n,[["render",l]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_block_block_pve.md.BHDS8Khx.lean.js b/assets/en_guide_block_block_pve.md.0KCUf4KK.lean.js similarity index 51% rename from assets/en_guide_block_block_pve.md.BHDS8Khx.lean.js rename to assets/en_guide_block_block_pve.md.0KCUf4KK.lean.js index a7faf2e1c0..d1b6598ce7 100644 --- a/assets/en_guide_block_block_pve.md.BHDS8Khx.lean.js +++ b/assets/en_guide_block_block_pve.md.0KCUf4KK.lean.js @@ -1 +1 @@ -import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Avoid theft by setting up a firewall to limit the IPs used by the VMs","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_pve.md","filePath":"en/guide/block/block_pve.md","lastUpdated":1772422214000}'),n={name:"en/guide/block/block_pve.md"};function l(o,e,h,r,p,d){return i(),s("div",null,e[0]||(e[0]=[a("",8)]))}const g=t(n,[["render",l]]);export{u as __pageData,g as default}; +import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Avoid theft by setting up a firewall to limit the IPs used by the VMs","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_pve.md","filePath":"en/guide/block/block_pve.md","lastUpdated":1772424525000}'),n={name:"en/guide/block/block_pve.md"};function l(o,e,r,h,p,d){return i(),s("div",null,e[0]||(e[0]=[a("",8)]))}const g=t(n,[["render",l]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_block_block_pve.md.BHDS8Khx.js b/assets/en_guide_block_block_pve.md.BHDS8Khx.js deleted file mode 100644 index ec6b059593..0000000000 --- a/assets/en_guide_block_block_pve.md.BHDS8Khx.js +++ /dev/null @@ -1,3 +0,0 @@ -import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Avoid theft by setting up a firewall to limit the IPs used by the VMs","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/block/block_pve.md","filePath":"en/guide/block/block_pve.md","lastUpdated":1772422214000}'),n={name:"en/guide/block/block_pve.md"};function l(o,e,h,r,p,d){return i(),s("div",null,e[0]||(e[0]=[a(`

Avoid theft by setting up a firewall to limit the IPs used by the VMs

Create the following file under the PVE's host machine

shell
/etc/pve/firewall/<VMID>.fw
-[IPSET ipfilter-<net0>]
-xxx.xxx.xxx.xxx

<VMID> is replaced with the VMID number of the virtual machine, <net0> is replaced with the corresponding alias in the network device (which generally doesn't need to be changed unless you're restricted to IPV6), and xxx.xxx.xxx.xxx is replaced with the public IP address, noting that this IP corresponds to the network device in front of it.

The idea here is that net0 can only use the IP xxx.xxx.xxx.xxx, if you use any other IP the data will be dropped, thus restricting the VM to only use this IP.

There can be more than one IP, once this rule is enabled the VM can't use any other IP, if you don't write an IPv6 address it means the VM can't use an IPv6 address.

TIP

This setting is only recommended when opening VMs with separate IPs that are not NAT full port mapped, otherwise it may cause strange issues resulting in the server being without a network.

This method is not suitable for use on PVEs that open any NAT VMs/containers.

`,8)]))}const g=t(n,[["render",l]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.js b/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.js deleted file mode 100644 index 858972d0d0..0000000000 --- a/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.js +++ /dev/null @@ -1,9 +0,0 @@ -import{_ as s,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_build.md","filePath":"en/guide/containerd/containerd_build.md","lastUpdated":1772422214000}'),e={name:"en/guide/containerd/containerd_build.md"};function l(h,i,p,r,d,k){return t(),a("div",null,i[0]||(i[0]=[n(`

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single containerd container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and containerd-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

Example

Supported variables for running:

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
nerdctl ps -a

Enter container

shell
nerdctl exec -it ct1 bash

Enter Alpine container

shell
nerdctl exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
nerdctl rm -f ct1

View container logs

shell
nerdctl logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
-chmod +x create_containerd.sh
-./create_containerd.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
-chmod +x create_containerd.sh
-./create_containerd.sh

Query Batch Container Information

shell
cat ctlog

Output format:

container_name ssh_port root_password cpu_cores memory_mb start_port end_port disk_gb

One line per container.

Remove All Containers and Images

shell
nerdctl ps -aq | xargs -r nerdctl rm -f
-nerdctl images -q | xargs -r nerdctl rmi -f
-rm -rf ctlog

Restart All Containers After Host Reboot

By default, containers are not configured to auto-restart. Run the following command to start all stopped containers:

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
`,47)]))}const g=s(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.lean.js b/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.lean.js deleted file mode 100644 index 63ee33118c..0000000000 --- a/assets/en_guide_containerd_containerd_build.md.DQwxZG0R.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_build.md","filePath":"en/guide/containerd/containerd_build.md","lastUpdated":1772422214000}'),e={name:"en/guide/containerd/containerd_build.md"};function l(h,i,p,r,d,k){return t(),a("div",null,i[0]||(i[0]=[n("",47)]))}const g=s(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_build.md.DdPaINrC.js b/assets/en_guide_containerd_containerd_build.md.DdPaINrC.js new file mode 100644 index 0000000000..bbaaf4d125 --- /dev/null +++ b/assets/en_guide_containerd_containerd_build.md.DdPaINrC.js @@ -0,0 +1,9 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_build.md","filePath":"en/guide/containerd/containerd_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_build.md"};function l(r,s,p,h,d,k){return n(),a("div",null,s[0]||(s[0]=[e(`

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single containerd container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and containerd-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
+chmod +x onecontainerd.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
+chmod +x onecontainerd.sh

Example

Supported variables for running:

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
nerdctl ps -a

Enter container

shell
nerdctl exec -it ct1 bash

Enter Alpine container

shell
nerdctl exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
nerdctl rm -f ct1

View container logs

shell
nerdctl logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+chmod +x create_containerd.sh
+./create_containerd.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+chmod +x create_containerd.sh
+./create_containerd.sh

Query Batch Container Information

shell
cat ctlog

Output format:

container_name ssh_port root_password cpu_cores memory_mb start_port end_port disk_gb

One line per container.

Remove All Containers and Images

shell
nerdctl ps -aq | xargs -r nerdctl rm -f
+nerdctl images -q | xargs -r nerdctl rmi -f
+rm -rf ctlog

Restart All Containers After Host Reboot

By default, containers are not configured to auto-restart. Run the following command to start all stopped containers:

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
`,47)]))}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_build.md.DdPaINrC.lean.js b/assets/en_guide_containerd_containerd_build.md.DdPaINrC.lean.js new file mode 100644 index 0000000000..379c71b554 --- /dev/null +++ b/assets/en_guide_containerd_containerd_build.md.DdPaINrC.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_build.md","filePath":"en/guide/containerd/containerd_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_build.md"};function l(r,s,p,h,d,k){return n(),a("div",null,s[0]||(s[0]=[e("",47)]))}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.js b/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.js new file mode 100644 index 0000000000..953a76a446 --- /dev/null +++ b/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.js @@ -0,0 +1 @@ +import{_ as s,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_install.md","filePath":"en/guide/containerd/containerd_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_install.md"};function l(r,i,p,h,d,o){return a(),e("div",null,i[0]||(i[0]=[n('

Preface

Install the containerd environment, including containerd + runc + nerdctl + CNI + buildkitd full suite.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs containerd + runc + nerdctl + CNI + buildkitd (via nerdctl-full bundle)
  • Automatically configures CNI network (containerd-net: 172.20.0.0/16) with iptables NAT rules
  • Detects public IPv6 address; if present, automatically creates containerd-ipv6 CNI network and starts NDP Responder
  • Installs DNS liveness check service (check-dns.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

After installation, run nerdctl ps -a to verify the containerd environment is working correctly.

Uninstall containerd Environment

One-click uninstall of the entire containerd environment, including all containers, images, CNI networks, systemd services, and nerdctl/containerd binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and CNI network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

',21)]))}const u=s(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.lean.js b/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.lean.js new file mode 100644 index 0000000000..5d6c97843e --- /dev/null +++ b/assets/en_guide_containerd_containerd_install.md.DGtKJnx8.lean.js @@ -0,0 +1 @@ +import{_ as s,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_install.md","filePath":"en/guide/containerd/containerd_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_install.md"};function l(r,i,p,h,d,o){return a(),e("div",null,i[0]||(i[0]=[n("",21)]))}const u=s(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_containerd_containerd_install.md.DdY95TOF.js b/assets/en_guide_containerd_containerd_install.md.DdY95TOF.js deleted file mode 100644 index db8b386ecd..0000000000 --- a/assets/en_guide_containerd_containerd_install.md.DdY95TOF.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as a,ag as e}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_install.md","filePath":"en/guide/containerd/containerd_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/containerd/containerd_install.md"};function l(r,i,h,p,o,c){return a(),t("div",null,i[0]||(i[0]=[e('

Preface

Install the containerd environment, including containerd + runc + nerdctl + CNI + buildkitd full suite.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs containerd + runc + nerdctl + CNI + buildkitd (via nerdctl-full bundle)
  • Automatically configures CNI network (containerd-net: 172.20.0.0/16) with iptables NAT rules
  • Detects public IPv6 address; if present, automatically creates containerd-ipv6 CNI network and starts NDP Responder
  • Installs DNS liveness check service (check-dns.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

After installation, run nerdctl ps -a to verify the containerd environment is working correctly.

Uninstall containerd Environment

One-click uninstall of the entire containerd environment, including all containers, images, CNI networks, systemd services, and nerdctl/containerd binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and CNI network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

',21)]))}const u=s(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_containerd_containerd_install.md.DdY95TOF.lean.js b/assets/en_guide_containerd_containerd_install.md.DdY95TOF.lean.js deleted file mode 100644 index f40117b2b1..0000000000 --- a/assets/en_guide_containerd_containerd_install.md.DdY95TOF.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as a,ag as e}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_install.md","filePath":"en/guide/containerd/containerd_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/containerd/containerd_install.md"};function l(r,i,h,p,o,c){return a(),t("div",null,i[0]||(i[0]=[e("",21)]))}const u=s(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.js b/assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.js similarity index 72% rename from assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.js rename to assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.js index 2729989978..5546a6170c 100644 --- a/assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.js +++ b/assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.js @@ -1 +1 @@ -import{_ as e,c as i,o as a,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_precheck.md","filePath":"en/guide/containerd/containerd_precheck.md","lastUpdated":1772422214000}'),s={name:"en/guide/containerd/containerd_precheck.md"};function n(o,t,d,l,c,h){return a(),i("div",null,t[0]||(t[0]=[r('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The containerd solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/containerd

Project Features

Bulk or individual NAT server provisioning based on containerd + nerdctl runtime

  • Installs containerd + runc + nerdctl + CNI + buildkitd via the nerdctl-full bundle
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to official images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Default unprivileged containers, supports lxcfs mounting (if lxcfs is installed on the host)
  • Supports disk limit parameters (requires xfs/btrfs snapshotter with storage-opt support)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with Docker

Featurecontainerddocker
Runtimecontainerd + runcDocker daemon + runc
Management CLInerdctldocker
Daemon requiredLightweight daemonHeavy Docker daemon
Container supportLinux containers (LXC)Linux containers + KVM VMs
Installationnerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',16)]))}const m=e(s,[["render",n]]);export{u as __pageData,m as default}; +import{_ as e,c as i,o as a,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_precheck.md","filePath":"en/guide/containerd/containerd_precheck.md","lastUpdated":1772424525000}'),s={name:"en/guide/containerd/containerd_precheck.md"};function n(d,t,o,l,c,h){return a(),i("div",null,t[0]||(t[0]=[r('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The containerd solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/containerd

Project Features

Bulk or individual NAT server provisioning based on containerd + nerdctl runtime

  • Installs containerd + runc + nerdctl + CNI + buildkitd via the nerdctl-full bundle
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to official images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Default unprivileged containers, supports lxcfs mounting (if lxcfs is installed on the host)
  • Supports disk limit parameters (requires xfs/btrfs snapshotter with storage-opt support)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with Docker

Featurecontainerddocker
Runtimecontainerd + runcDocker daemon + runc
Management CLInerdctldocker
Daemon requiredLightweight daemonHeavy Docker daemon
Container supportLinux containers (LXC)Linux containers + KVM VMs
Installationnerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',16)]))}const m=e(s,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.lean.js b/assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.lean.js similarity index 50% rename from assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.lean.js rename to assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.lean.js index d157c0ca64..db98b15a14 100644 --- a/assets/en_guide_containerd_containerd_precheck.md.0wSyDPbw.lean.js +++ b/assets/en_guide_containerd_containerd_precheck.md.ClTA4zal.lean.js @@ -1 +1 @@ -import{_ as e,c as i,o as a,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_precheck.md","filePath":"en/guide/containerd/containerd_precheck.md","lastUpdated":1772422214000}'),s={name:"en/guide/containerd/containerd_precheck.md"};function n(o,t,d,l,c,h){return a(),i("div",null,t[0]||(t[0]=[r("",16)]))}const m=e(s,[["render",n]]);export{u as __pageData,m as default}; +import{_ as e,c as i,o as a,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_precheck.md","filePath":"en/guide/containerd/containerd_precheck.md","lastUpdated":1772424525000}'),s={name:"en/guide/containerd/containerd_precheck.md"};function n(d,t,o,l,c,h){return a(),i("div",null,t[0]||(t[0]=[r("",16)]))}const m=e(s,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.js b/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.js new file mode 100644 index 0000000000..6aa273793f --- /dev/null +++ b/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.js @@ -0,0 +1,8 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_qa.md","filePath":"en/guide/containerd/containerd_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_qa.md"};function l(h,s,p,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e(`

FAQ

nerdctl: command not found

The containerd environment is not correctly installed or /usr/local/bin is not in PATH.

Fix:

shell
export PATH="/usr/local/bin:$PATH"
+echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/profile
+source /etc/profile

If still not found, re-run the installation script:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

containerd service not running

shell
systemctl status containerd
+systemctl restart containerd

View logs:

shell
journalctl -u containerd -f

Container cannot access external network (IPv4)

Check if iptables NAT rules exist:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.20

If not present, add manually:

shell
iptables -t nat -A POSTROUTING -s 172.20.0.0/16 ! -d 172.20.0.0/16 -j MASQUERADE
+iptables -A FORWARD -s 172.20.0.0/16 -j ACCEPT
+iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

Container IPv6 not working

  1. Confirm the host has a public IPv6 address
  2. Check if the containerd-ipv6 CNI network exists:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. Check if the ndpresponder container is running:
shell
nerdctl ps | grep ndpresponder

Image pull failed

The script includes built-in CDN detection. You can also manually test CDN availability:

shell
curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

How to completely reset the containerd environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

If lxcfs is not installed on the host, containers will see the host's CPU/memory view. Install lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
+yum install -y lxcfs       # CentOS/RHEL

Disk limit not working

Disk limits require xfs or btrfs snapshotter support. The default overlay snapshotter does not support container-level disk limits.

For disk limits, refer to the docker or incus solution documentation.

`,33)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.lean.js b/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.lean.js new file mode 100644 index 0000000000..c52da74877 --- /dev/null +++ b/assets/en_guide_containerd_containerd_qa.md.BHimqcWr.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_qa.md","filePath":"en/guide/containerd/containerd_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/containerd/containerd_qa.md"};function l(h,s,p,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e("",33)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.js b/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.js deleted file mode 100644 index 570f8bbc9d..0000000000 --- a/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.js +++ /dev/null @@ -1,8 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_qa.md","filePath":"en/guide/containerd/containerd_qa.md","lastUpdated":1772422214000}'),e={name:"en/guide/containerd/containerd_qa.md"};function l(h,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n(`

FAQ

nerdctl: command not found

The containerd environment is not correctly installed or /usr/local/bin is not in PATH.

Fix:

shell
export PATH="/usr/local/bin:$PATH"
-echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/profile
-source /etc/profile

If still not found, re-run the installation script:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

containerd service not running

shell
systemctl status containerd
-systemctl restart containerd

View logs:

shell
journalctl -u containerd -f

Container cannot access external network (IPv4)

Check if iptables NAT rules exist:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.20

If not present, add manually:

shell
iptables -t nat -A POSTROUTING -s 172.20.0.0/16 ! -d 172.20.0.0/16 -j MASQUERADE
-iptables -A FORWARD -s 172.20.0.0/16 -j ACCEPT
-iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

Container IPv6 not working

  1. Confirm the host has a public IPv6 address
  2. Check if the containerd-ipv6 CNI network exists:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. Check if the ndpresponder container is running:
shell
nerdctl ps | grep ndpresponder

Image pull failed

The script includes built-in CDN detection. You can also manually test CDN availability:

shell
curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

How to completely reset the containerd environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
-bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

If lxcfs is not installed on the host, containers will see the host's CPU/memory view. Install lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
-yum install -y lxcfs       # CentOS/RHEL

Disk limit not working

Disk limits require xfs or btrfs snapshotter support. The default overlay snapshotter does not support container-level disk limits.

For disk limits, refer to the docker or incus solution documentation.

`,33)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.lean.js b/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.lean.js deleted file mode 100644 index e99a1fb5a7..0000000000 --- a/assets/en_guide_containerd_containerd_qa.md.D42OkEJX.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/containerd/containerd_qa.md","filePath":"en/guide/containerd/containerd_qa.md","lastUpdated":1772422214000}'),e={name:"en/guide/containerd/containerd_qa.md"};function l(h,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[n("",33)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.js b/assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.js similarity index 88% rename from assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.js rename to assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.js index 8d22963926..c407475bd4 100644 --- a/assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.js +++ b/assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.js @@ -1 +1 @@ -import{_ as e,c as r,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/containerd/containerd_thanks.md","filePath":"en/guide/containerd/containerd_thanks.md","lastUpdated":1772422214000}'),o={name:"en/guide/containerd/containerd_thanks.md"};function i(c,t,s,p,h,d){return n(),r("div",null,t[0]||(t[0]=[a('

Acknowledgements

https://github.com/containerd/nerdctl

https://github.com/containerd/containerd

https://github.com/opencontainers/runc

https://github.com/containernetworking/cni

https://github.com/moby/buildkit

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

',9)]))}const g=e(o,[["render",i]]);export{u as __pageData,g as default}; +import{_ as e,c as r,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/containerd/containerd_thanks.md","filePath":"en/guide/containerd/containerd_thanks.md","lastUpdated":1772424525000}'),o={name:"en/guide/containerd/containerd_thanks.md"};function i(c,t,s,p,h,d){return n(),r("div",null,t[0]||(t[0]=[a('

Acknowledgements

https://github.com/containerd/nerdctl

https://github.com/containerd/containerd

https://github.com/opencontainers/runc

https://github.com/containernetworking/cni

https://github.com/moby/buildkit

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

',9)]))}const g=e(o,[["render",i]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.lean.js b/assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.lean.js similarity index 60% rename from assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.lean.js rename to assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.lean.js index 6dfaa98758..cc10bc1820 100644 --- a/assets/en_guide_containerd_containerd_thanks.md.BtZSrBbC.lean.js +++ b/assets/en_guide_containerd_containerd_thanks.md.Bz27py1Y.lean.js @@ -1 +1 @@ -import{_ as e,c as r,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/containerd/containerd_thanks.md","filePath":"en/guide/containerd/containerd_thanks.md","lastUpdated":1772422214000}'),o={name:"en/guide/containerd/containerd_thanks.md"};function i(c,t,s,p,h,d){return n(),r("div",null,t[0]||(t[0]=[a("",9)]))}const g=e(o,[["render",i]]);export{u as __pageData,g as default}; +import{_ as e,c as r,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/containerd/containerd_thanks.md","filePath":"en/guide/containerd/containerd_thanks.md","lastUpdated":1772424525000}'),o={name:"en/guide/containerd/containerd_thanks.md"};function i(c,t,s,p,h,d){return n(),r("div",null,t[0]||(t[0]=[a("",9)]))}const g=e(o,[["render",i]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_dashboard.md.Dj9blBWx.js b/assets/en_guide_dashboard.md.COXDfcrB.js similarity index 63% rename from assets/en_guide_dashboard.md.Dj9blBWx.js rename to assets/en_guide_dashboard.md.COXDfcrB.js index aa97147c73..afeb792ccf 100644 --- a/assets/en_guide_dashboard.md.Dj9blBWx.js +++ b/assets/en_guide_dashboard.md.COXDfcrB.js @@ -1 +1 @@ -import{_ as t,c as a,o as r,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/dashboard.md","filePath":"en/guide/dashboard.md","lastUpdated":1772422214000}'),o={name:"en/guide/dashboard.md"};function n(s,e,l,c,h,p){return r(),a("div",null,e[0]||(e[0]=[i('

Preparation Work

To virtualize a server, you will need:

  1. A server (VPS or Dedicated Server) that can connect to the public internet. It's preferable if this server can access GitHub's RAW pages perfectly, as some projects and components might not use CDN acceleration.

  2. A stable SSH connection from your local machine. If the connection isn't stable, you can use the screen command to create a window and execute commands within that window.

TIP

If you're unfamiliar with the screen command, please search for relevant tutorials to learn it, or you can use tmux as an alternative.

  1. Ensure that the server's system and hardware meet the requirements specified by the corresponding project. Refer to the project's documentation for detailed information.

This document will use a VPS as an example, and the VPS should be clean without any native environment issues. If necessary, reinstall the system to ensure the initial environment's cleanliness.

WARNING

The PVE project might cause problems on the host machine. If you're not familiar with debugging bugs and fixing system issues, it's not recommended to use PVE in a production environment. When using PVE-related scripts, make sure the host machine can be reinstalled at any time.

Project Repository

Welcome Star and Fork, all resources are open source, no non-open source parts, reproduced as well as the use of please write on the source of this site, thank you!

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

',23)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; +import{_ as t,c as a,o as r,ag as i}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/dashboard.md","filePath":"en/guide/dashboard.md","lastUpdated":1772424525000}'),o={name:"en/guide/dashboard.md"};function n(s,e,l,c,h,p){return r(),a("div",null,e[0]||(e[0]=[i('

Preparation Work

To virtualize a server, you will need:

  1. A server (VPS or Dedicated Server) that can connect to the public internet. It's preferable if this server can access GitHub's RAW pages perfectly, as some projects and components might not use CDN acceleration.

  2. A stable SSH connection from your local machine. If the connection isn't stable, you can use the screen command to create a window and execute commands within that window.

TIP

If you're unfamiliar with the screen command, please search for relevant tutorials to learn it, or you can use tmux as an alternative.

  1. Ensure that the server's system and hardware meet the requirements specified by the corresponding project. Refer to the project's documentation for detailed information.

This document will use a VPS as an example, and the VPS should be clean without any native environment issues. If necessary, reinstall the system to ensure the initial environment's cleanliness.

WARNING

The PVE project might cause problems on the host machine. If you're not familiar with debugging bugs and fixing system issues, it's not recommended to use PVE in a production environment. When using PVE-related scripts, make sure the host machine can be reinstalled at any time.

Project Repository

Welcome Star and Fork, all resources are open source, no non-open source parts, reproduced as well as the use of please write on the source of this site, thank you!

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

',23)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_dashboard.md.Dj9blBWx.lean.js b/assets/en_guide_dashboard.md.COXDfcrB.lean.js similarity index 56% rename from assets/en_guide_dashboard.md.Dj9blBWx.lean.js rename to assets/en_guide_dashboard.md.COXDfcrB.lean.js index cad851f700..e59c6638c9 100644 --- a/assets/en_guide_dashboard.md.Dj9blBWx.lean.js +++ b/assets/en_guide_dashboard.md.COXDfcrB.lean.js @@ -1 +1 @@ -import{_ as t,c as a,o as r,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/dashboard.md","filePath":"en/guide/dashboard.md","lastUpdated":1772422214000}'),o={name:"en/guide/dashboard.md"};function n(s,e,l,c,h,p){return r(),a("div",null,e[0]||(e[0]=[i("",23)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; +import{_ as t,c as a,o as r,ag as i}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/dashboard.md","filePath":"en/guide/dashboard.md","lastUpdated":1772424525000}'),o={name:"en/guide/dashboard.md"};function n(s,e,l,c,h,p){return r(),a("div",null,e[0]||(e[0]=[i("",23)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_dashboardq.md.D4VkqjRF.js b/assets/en_guide_dashboardq.md.D4VkqjRF.js new file mode 100644 index 0000000000..b7ad5c0c02 --- /dev/null +++ b/assets/en_guide_dashboardq.md.D4VkqjRF.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/wechat.BhfskdFa.jpg",m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/dashboardq.md","filePath":"en/guide/dashboardq.md","lastUpdated":1772424525000}'),n={name:"en/guide/dashboardq.md"};function r(d,e,l,o,c,h){return t(),s("div",null,e[0]||(e[0]=[i('

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
',8)]))}const u=a(n,[["render",r]]);export{m as __pageData,u as default}; diff --git a/assets/en_guide_dashboardq.md.D4VkqjRF.lean.js b/assets/en_guide_dashboardq.md.D4VkqjRF.lean.js new file mode 100644 index 0000000000..6bebdd1e85 --- /dev/null +++ b/assets/en_guide_dashboardq.md.D4VkqjRF.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/wechat.BhfskdFa.jpg",m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/dashboardq.md","filePath":"en/guide/dashboardq.md","lastUpdated":1772424525000}'),n={name:"en/guide/dashboardq.md"};function r(d,e,l,o,c,h){return t(),s("div",null,e[0]||(e[0]=[i("",8)]))}const u=a(n,[["render",r]]);export{m as __pageData,u as default}; diff --git a/assets/en_guide_dashboardq.md.DDyuylV5.js b/assets/en_guide_dashboardq.md.DDyuylV5.js deleted file mode 100644 index ee6e6185b3..0000000000 --- a/assets/en_guide_dashboardq.md.DDyuylV5.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const p="/assets/wechat.BhfskdFa.jpg",_=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/dashboardq.md","filePath":"en/guide/dashboardq.md","lastUpdated":1772422214000}'),o={name:"en/guide/dashboardq.md"};function n(d,a,c,l,r,h){return t(),s("div",null,a[0]||(a[0]=[i('

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
',8)]))}const g=e(o,[["render",n]]);export{_ as __pageData,g as default}; diff --git a/assets/en_guide_dashboardq.md.DDyuylV5.lean.js b/assets/en_guide_dashboardq.md.DDyuylV5.lean.js deleted file mode 100644 index 44d43ca4ae..0000000000 --- a/assets/en_guide_dashboardq.md.DDyuylV5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const p="/assets/wechat.BhfskdFa.jpg",_=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/dashboardq.md","filePath":"en/guide/dashboardq.md","lastUpdated":1772422214000}'),o={name:"en/guide/dashboardq.md"};function n(d,a,c,l,r,h){return t(),s("div",null,a[0]||(a[0]=[i("",8)]))}const g=e(o,[["render",n]]);export{_ as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_android.md.D36suc1j.js b/assets/en_guide_docker_docker_android.md.D36suc1j.js new file mode 100644 index 0000000000..0cb75fbc2c --- /dev/null +++ b/assets/en_guide_docker_docker_android.md.D36suc1j.js @@ -0,0 +1,6 @@ +import{_ as e,c as s,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Running Android Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_android.md","filePath":"en/guide/docker/docker_android.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_android.md"};function r(o,i,l,h,d,p){return n(),s("div",null,i[0]||(i[0]=[a(`

Running Android Virtual Machine in Docker

One-Click Deployment

  • Customizable Android version
  • Automatically creates a validated web website
  • Automatically installs Nginx and configures reverse proxy. Option to bind a domain is available. Default is port 80 if no domain binding is chosen.
  • No need to worry about host machine supporting nested virtualization
  • Supports x86_64 and ARM architectures

Host machine should have a minimum configuration of 1 core, 2GB RAM, and 15GB storage, else starting the setup might lead to host machine freezing.

Ubuntu is recommended for hosting, Debian may cause white screen on Android.

Newer Android versions occupy more resources. The above configuration requirements are for the minimum version of Android. (Personally tested with the tag "12.0.0-latest", higher versions resulted in a blank screen. Test which version works for you.)

If, after 5 minutes after opening, the login verification of the browser page still keeps failing, then please check the logs of the Android container, it is probable that the Android container has crashed, and it is recommended to replace the container with a lower version of the Android system for installation.

Setup:

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

After executing the command, follow the prompts to input the required information. Make sure to choose the version by entering the corresponding number index. Once the installation is complete, open YourMachineIPv4+80Port to log in.

If you need to check the generated Android information and web login details, execute cat /root/android_info to retrieve the information.

Default username: onea Default password: oneclick

For remote desktop, click on H264 Converter to initiate the redirection.

Please note that currently only one Android container can be generated. Do not generate duplicates. If you need to replace the version, please execute the subsequent commands after deletion.

Temporarily only support the opening has been used, can not restart the server, reboot may not be able to restart after the mapping success, self-test

Deletion:

  • Delete the container
  • Delete the corresponding container image
  • Delete the configuration file
shell
docker rm -f android
+docker rmi $(docker images | grep "redroid" | awk '{print $3}')
+rm -rf /etc/nginx/sites-enabled/reverse-proxy
+rm -rf /etc/nginx/sites-available/reverse-proxy
+rm -rf /etc/nginx/passwd_scrcpy_web
+rm -rf /root/android_info

Install the APK file

Click list files to open the file directory, switch to the /storage/emulated/0/Download directory, drag and drop the apk into it to install it, and wait for the progress to finish running, and the apk will be uploaded to the Android container.

At this point, go back to the Android interface, open the file manager, it will show the file you just uploaded, click on it to install.

`,22)]))}const g=e(t,[["render",r]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_android.md.D36suc1j.lean.js b/assets/en_guide_docker_docker_android.md.D36suc1j.lean.js new file mode 100644 index 0000000000..7e176d342d --- /dev/null +++ b/assets/en_guide_docker_docker_android.md.D36suc1j.lean.js @@ -0,0 +1 @@ +import{_ as e,c as s,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Running Android Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_android.md","filePath":"en/guide/docker/docker_android.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_android.md"};function r(o,i,l,h,d,p){return n(),s("div",null,i[0]||(i[0]=[a("",22)]))}const g=e(t,[["render",r]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_android.md.DkafNdh_.js b/assets/en_guide_docker_docker_android.md.DkafNdh_.js deleted file mode 100644 index 3022cb654b..0000000000 --- a/assets/en_guide_docker_docker_android.md.DkafNdh_.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running Android Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_android.md","filePath":"en/guide/docker/docker_android.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_android.md"};function o(r,i,l,h,d,p){return a(),s("div",null,i[0]||(i[0]=[t(`

Running Android Virtual Machine in Docker

One-Click Deployment

  • Customizable Android version
  • Automatically creates a validated web website
  • Automatically installs Nginx and configures reverse proxy. Option to bind a domain is available. Default is port 80 if no domain binding is chosen.
  • No need to worry about host machine supporting nested virtualization
  • Supports x86_64 and ARM architectures

Host machine should have a minimum configuration of 1 core, 2GB RAM, and 15GB storage, else starting the setup might lead to host machine freezing.

Ubuntu is recommended for hosting, Debian may cause white screen on Android.

Newer Android versions occupy more resources. The above configuration requirements are for the minimum version of Android. (Personally tested with the tag "12.0.0-latest", higher versions resulted in a blank screen. Test which version works for you.)

If, after 5 minutes after opening, the login verification of the browser page still keeps failing, then please check the logs of the Android container, it is probable that the Android container has crashed, and it is recommended to replace the container with a lower version of the Android system for installation.

Setup:

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

After executing the command, follow the prompts to input the required information. Make sure to choose the version by entering the corresponding number index. Once the installation is complete, open YourMachineIPv4+80Port to log in.

If you need to check the generated Android information and web login details, execute cat /root/android_info to retrieve the information.

Default username: onea Default password: oneclick

For remote desktop, click on H264 Converter to initiate the redirection.

Please note that currently only one Android container can be generated. Do not generate duplicates. If you need to replace the version, please execute the subsequent commands after deletion.

Temporarily only support the opening has been used, can not restart the server, reboot may not be able to restart after the mapping success, self-test

Deletion:

  • Delete the container
  • Delete the corresponding container image
  • Delete the configuration file
shell
docker rm -f android
-docker rmi $(docker images | grep "redroid" | awk '{print $3}')
-rm -rf /etc/nginx/sites-enabled/reverse-proxy
-rm -rf /etc/nginx/sites-available/reverse-proxy
-rm -rf /etc/nginx/passwd_scrcpy_web
-rm -rf /root/android_info

Install the APK file

Click list files to open the file directory, switch to the /storage/emulated/0/Download directory, drag and drop the apk into it to install it, and wait for the progress to finish running, and the apk will be uploaded to the Android container.

At this point, go back to the Android interface, open the file manager, it will show the file you just uploaded, click on it to install.

`,22)]))}const g=e(n,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_android.md.DkafNdh_.lean.js b/assets/en_guide_docker_docker_android.md.DkafNdh_.lean.js deleted file mode 100644 index bf6e754ad3..0000000000 --- a/assets/en_guide_docker_docker_android.md.DkafNdh_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running Android Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_android.md","filePath":"en/guide/docker/docker_android.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_android.md"};function o(r,i,l,h,d,p){return a(),s("div",null,i[0]||(i[0]=[t("",22)]))}const g=e(n,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_build.md.4AU7pDL9.js b/assets/en_guide_docker_docker_build.md.4AU7pDL9.js new file mode 100644 index 0000000000..44b560701e --- /dev/null +++ b/assets/en_guide_docker_docker_build.md.4AU7pDL9.js @@ -0,0 +1,24 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_build.md","filePath":"en/guide/docker/docker_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_build.md"};function l(h,s,r,p,d,o){return e(),a("div",null,s[0]||(s[0]=[n(`

Introduction

There are two methods of building

Setting Up Standalone

  • Generate only one docker
  • Can be configured to bind a separate IPV6 address, but requires a docker previously installed using the environment installation command of this set of scripts, and requires the host to be bound to at least the /112 IPV6 subnet
  • Support for x86_64 and ARM architecture servers

Download the Script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

Example

Running the supported variables are as follows

./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

Currently, the system only supports selecting:

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

with Debian being the default choice.

The hard disk size can only be set by filling in the value if you have selected the option to support limiting the hard disk size during the previous Docker installation, it is not limited when not filled in by default.

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

The following is the information for the created example container:

AttributeValue
Container Nametest
Username for SSH Loginroot
Password for SSH Login123456
Number of CPU Cores1
Memory Size512MB
SSH Port25000
Port Range for Internal and External Mapping34975 to 35000
Operating Systemdebian
Whether to bind a separate IPV6 addressN
Disk Size5G

Deleting the test container

shell
docker rm -f test
+rm -rf test
+ls

Accessing the test container

shell
docker exec -it test /bin/bash

To exit the container, simply execute exit.

Inquiry Information

shell
cat Container_Name(change me)

The output format is

Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port

The docker's ipv6 address can only be looked up within the container itself, it doesn't exist in the docker's configuration

Batch Deployment

  • Run inheritance configuration generation multiple times in bulk.
  • When generating multiple instances, it is recommended to execute within a screen session to avoid SSH connection interruptions.
  • Support for x86_64 and ARM architecture servers

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -o create_docker.sh && chmod +x create_docker.sh && bash create_docker.sh

Querying information on batch openings

shell
cat dclog

The output format is

Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port Disk_Size

One line corresponds to information about a container, the docker's ipv6 address can only be looked up within the container itself, it doesn't exist in the docker's configuration.

Uninstall all Docker containers and images

The following command offload ignores ndpresponder to prevent IPV6 configuration failure

shell
docker ps -a --format '{{.Names}}' | grep -vE '^ndpresponder' | xargs -r docker rm -f
+docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep -v 'ndpresponder' | awk '{print $2}' | xargs -r docker rmi
+rm -rf dclog test
+ls

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/onedocker.sh
+rm -rf /root/create_docker.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -O /root/onedocker.sh && chmod +x /root/onedocker.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -O /root/create_docker.sh && chmod +x /root/create_docker.sh

Start all containers after host reboot

The default containers are not set to restart themselves after stopping, you need to execute the following command to start all stopped containers.

docker start $(docker ps -aq)

Start SSH service for all containers after host reboot

Since the container itself does not have a daemon, the SSH service cannot start itself, and you need to execute the following command to start the SSH process for all containers.

container_ids=$(docker ps -q)
+for container_id in $container_ids
+do
+    docker exec -it $container_id bash -c "service ssh start"
+    docker exec -it $container_id bash -c "service sshd restart"
+    docker exec -it $container_id sh -c "service ssh start"
+    docker exec -it $container_id sh -c "/usr/sbin/sshd"
+done
`,51)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_docker_docker_build.md.4AU7pDL9.lean.js b/assets/en_guide_docker_docker_build.md.4AU7pDL9.lean.js new file mode 100644 index 0000000000..d672f2ddea --- /dev/null +++ b/assets/en_guide_docker_docker_build.md.4AU7pDL9.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_build.md","filePath":"en/guide/docker/docker_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_build.md"};function l(h,s,r,p,d,o){return e(),a("div",null,s[0]||(s[0]=[n("",51)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_docker_docker_build.md.CCbKzKAh.js b/assets/en_guide_docker_docker_build.md.CCbKzKAh.js deleted file mode 100644 index c49fdc2ba1..0000000000 --- a/assets/en_guide_docker_docker_build.md.CCbKzKAh.js +++ /dev/null @@ -1,24 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_build.md","filePath":"en/guide/docker/docker_build.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_build.md"};function h(l,s,p,r,o,k){return t(),a("div",null,s[0]||(s[0]=[e(`

Introduction

There are two methods of building

Setting Up Standalone

  • Generate only one docker
  • Can be configured to bind a separate IPV6 address, but requires a docker previously installed using the environment installation command of this set of scripts, and requires the host to be bound to at least the /112 IPV6 subnet
  • Support for x86_64 and ARM architecture servers

Download the Script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

Example

Running the supported variables are as follows

./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

Currently, the system only supports selecting:

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

with Debian being the default choice.

The hard disk size can only be set by filling in the value if you have selected the option to support limiting the hard disk size during the previous Docker installation, it is not limited when not filled in by default.

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

The following is the information for the created example container:

AttributeValue
Container Nametest
Username for SSH Loginroot
Password for SSH Login123456
Number of CPU Cores1
Memory Size512MB
SSH Port25000
Port Range for Internal and External Mapping34975 to 35000
Operating Systemdebian
Whether to bind a separate IPV6 addressN
Disk Size5G

Deleting the test container

shell
docker rm -f test
-rm -rf test
-ls

Accessing the test container

shell
docker exec -it test /bin/bash

To exit the container, simply execute exit.

Inquiry Information

shell
cat Container_Name(change me)

The output format is

Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port

The docker's ipv6 address can only be looked up within the container itself, it doesn't exist in the docker's configuration

Batch Deployment

  • Run inheritance configuration generation multiple times in bulk.
  • When generating multiple instances, it is recommended to execute within a screen session to avoid SSH connection interruptions.
  • Support for x86_64 and ARM architecture servers

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -o create_docker.sh && chmod +x create_docker.sh && bash create_docker.sh

Querying information on batch openings

shell
cat dclog

The output format is

Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port Disk_Size

One line corresponds to information about a container, the docker's ipv6 address can only be looked up within the container itself, it doesn't exist in the docker's configuration.

Uninstall all Docker containers and images

The following command offload ignores ndpresponder to prevent IPV6 configuration failure

shell
docker ps -a --format '{{.Names}}' | grep -vE '^ndpresponder' | xargs -r docker rm -f
-docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep -v 'ndpresponder' | awk '{print $2}' | xargs -r docker rmi
-rm -rf dclog test
-ls

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/onedocker.sh
-rm -rf /root/create_docker.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -O /root/onedocker.sh && chmod +x /root/onedocker.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -O /root/create_docker.sh && chmod +x /root/create_docker.sh

Start all containers after host reboot

The default containers are not set to restart themselves after stopping, you need to execute the following command to start all stopped containers.

docker start $(docker ps -aq)

Start SSH service for all containers after host reboot

Since the container itself does not have a daemon, the SSH service cannot start itself, and you need to execute the following command to start the SSH process for all containers.

container_ids=$(docker ps -q)
-for container_id in $container_ids
-do
-    docker exec -it $container_id bash -c "service ssh start"
-    docker exec -it $container_id bash -c "service sshd restart"
-    docker exec -it $container_id sh -c "service ssh start"
-    docker exec -it $container_id sh -c "/usr/sbin/sshd"
-done
`,51)]))}const F=i(n,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_docker_docker_build.md.CCbKzKAh.lean.js b/assets/en_guide_docker_docker_build.md.CCbKzKAh.lean.js deleted file mode 100644 index ee02c276cb..0000000000 --- a/assets/en_guide_docker_docker_build.md.CCbKzKAh.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_build.md","filePath":"en/guide/docker/docker_build.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_build.md"};function h(l,s,p,r,o,k){return t(),a("div",null,s[0]||(s[0]=[e("",51)]))}const F=i(n,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_docker_docker_custom.md.CLqEZu-z.js b/assets/en_guide_docker_docker_custom.md.CLqEZu-z.js deleted file mode 100644 index d270086d0f..0000000000 --- a/assets/en_guide_docker_docker_custom.md.CLqEZu-z.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Script for One-Click Installation of Certain Containers using Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_custom.md","filePath":"en/guide/docker/docker_custom.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_custom.md"};function o(l,s,h,p,r,c){return a(),e("div",null,s[0]||(s[0]=[t(`

Script for One-Click Installation of Certain Containers using Docker

Each container has specific configuration requirements; please refer to them individually.

If the configured memory is not enough, then it's okay to make up for it with the virtual memory here.

Note that the following scripts must be pre-installed using the environment installation scripts in this set of tutorials before using them

One-Click Setup of Firefox Browser Container

  • Crash recovery on startup has been configured.
  • Chinese fonts have been integrated into the container.
  • Built-in web validation with the option to set a custom password.
  • Maximum memory usage for the container is customizable.
  • Choice to enable VNC port, disabled by default.
  • No need to consider support for nested virtualization or server architecture.
  • Audio mapping is not supported; sound transmission is unavailable on both the web and VNC.

The host machine should have at least 1 core, 1GB RAM, and 5GB disk space. The created container will occupy a minimum of 1GB disk space.

Setup:

After setup, the default password is oneclick.

The default web port is 3003. Once the setup is complete, simply open HOST_IPV4:PORT in your browser.

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

Deletion

Modify the following port number 3003 to your actual port number, and then execute the command to delete the container, configuration file, and corresponding image

shell
PORT="3003"
-docker stop firefox_\${PORT}
-docker rm -f firefox_\${PORT}
-rm -rf /usr/local/bin/firefox_\${PORT}
-docker rmi jlesage/firefox

One-Click Setup of Chrome Browser Container

  • Crashing self-start has been set
  • Web checksums and passwords can be set.
  • Customizable maximum container memory footprint
  • No need to consider whether to support nested virtualization and server architecture.
  • Supports sound mapping

Host requires at least 1 core, 2G RAM, and 10G hard disk, and the size of the container to be opened will take up a minimum of 1G hard disk

It is better to hang the execution in the screen during the first installation, to avoid long running SSH connection disconnection

Opening

If no custom username is set, the default username after opening is oneclick.

If no custom password is set, the default password after opening is oneclick.

The default http port is 3004, open http://IPV4:3004 after opening.

The default https port is 3005, open https://IPV4:3005 after opening.

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onechromium.sh -o onechromium.sh && chmod +x onechromium.sh && bash onechromium.sh

Delete

Change the following port number 3004 to your actual http port number, then execute the command enter twice to delete the container, configuration file, and corresponding image

shell
PORT="3004"
-docker stop chromium_\${PORT}
-docker rm -f chromium_\${PORT}
-rm -rf /usr/local/bin/config_\${PORT}
-rm -rf /usr/local/bin/password_\${PORT}
-docker rmi lscr.io/linuxserver/chromium

One-Click Setup of Desktop Container

  • Crashes automatically restart have been configured.
  • Chinese fonts are included in the setup.
  • Built-in web validation with the ability to set your own username and password.
  • Customizable maximum memory usage for the container.
  • No need to consider nested virtualization support and server architecture.
  • Sound mapping is supported, and sound can be transmitted via the web interface.

A complete Linux desktop on which you can use a browser

The host system requires at least 1 core, 2 GB of RAM, and 5 GB of hard disk space. The created container will occupy a minimum of 3.2 GB of hard disk space.

Setup Instructions:

After setup, the default username is onew and the password is oneclick. The default maximum memory usage is 2 GB.

The default web port for HTTP protocol is 3004, and for HTTPS protocol is 3005. After setup, open the corresponding protocol with localhost's IPV4:port in your web browser.

Run the following command to download and execute the setup script:

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

Deletion

Command:

shell
docker ps -a

Query for containers with a prefix of 'webtop' in their names, and record the IDs of these containers.

shell
docker rm -f container_ID

To remove the corresponding image, you can use the following command after deleting all associated containers:

shell
docker rmi lscr.io/linuxserver/webtop

One-Click Installation of Guacamole

A web-based tool for controlling servers using protocols like SSH or RDP.

Website: http://your_IPV4_address:80/guacamole

Default Username: guacadmin

Default Password: guacadmin

After installation, remember to change the password upon login.

The host machine should have at least 1 core, 2GB RAM, and 10GB of disk space; otherwise, launching might lead to host machine freezing!

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh
`,52)]))}const u=i(n,[["render",o]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_custom.md.CLqEZu-z.lean.js b/assets/en_guide_docker_docker_custom.md.CLqEZu-z.lean.js deleted file mode 100644 index deaf86aa24..0000000000 --- a/assets/en_guide_docker_docker_custom.md.CLqEZu-z.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Script for One-Click Installation of Certain Containers using Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_custom.md","filePath":"en/guide/docker/docker_custom.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_custom.md"};function o(l,s,h,p,r,c){return a(),e("div",null,s[0]||(s[0]=[t("",52)]))}const u=i(n,[["render",o]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_custom.md.CW9sFVv_.js b/assets/en_guide_docker_docker_custom.md.CW9sFVv_.js new file mode 100644 index 0000000000..d9143166ac --- /dev/null +++ b/assets/en_guide_docker_docker_custom.md.CW9sFVv_.js @@ -0,0 +1,10 @@ +import{_ as i,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Script for One-Click Installation of Certain Containers using Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_custom.md","filePath":"en/guide/docker/docker_custom.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_custom.md"};function l(o,s,r,p,h,d){return a(),e("div",null,s[0]||(s[0]=[n(`

Script for One-Click Installation of Certain Containers using Docker

Each container has specific configuration requirements; please refer to them individually.

If the configured memory is not enough, then it's okay to make up for it with the virtual memory here.

Note that the following scripts must be pre-installed using the environment installation scripts in this set of tutorials before using them

One-Click Setup of Firefox Browser Container

  • Crash recovery on startup has been configured.
  • Chinese fonts have been integrated into the container.
  • Built-in web validation with the option to set a custom password.
  • Maximum memory usage for the container is customizable.
  • Choice to enable VNC port, disabled by default.
  • No need to consider support for nested virtualization or server architecture.
  • Audio mapping is not supported; sound transmission is unavailable on both the web and VNC.

The host machine should have at least 1 core, 1GB RAM, and 5GB disk space. The created container will occupy a minimum of 1GB disk space.

Setup:

After setup, the default password is oneclick.

The default web port is 3003. Once the setup is complete, simply open HOST_IPV4:PORT in your browser.

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

Deletion

Modify the following port number 3003 to your actual port number, and then execute the command to delete the container, configuration file, and corresponding image

shell
PORT="3003"
+docker stop firefox_\${PORT}
+docker rm -f firefox_\${PORT}
+rm -rf /usr/local/bin/firefox_\${PORT}
+docker rmi jlesage/firefox

One-Click Setup of Chrome Browser Container

  • Crashing self-start has been set
  • Web checksums and passwords can be set.
  • Customizable maximum container memory footprint
  • No need to consider whether to support nested virtualization and server architecture.
  • Supports sound mapping

Host requires at least 1 core, 2G RAM, and 10G hard disk, and the size of the container to be opened will take up a minimum of 1G hard disk

It is better to hang the execution in the screen during the first installation, to avoid long running SSH connection disconnection

Opening

If no custom username is set, the default username after opening is oneclick.

If no custom password is set, the default password after opening is oneclick.

The default http port is 3004, open http://IPV4:3004 after opening.

The default https port is 3005, open https://IPV4:3005 after opening.

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onechromium.sh -o onechromium.sh && chmod +x onechromium.sh && bash onechromium.sh

Delete

Change the following port number 3004 to your actual http port number, then execute the command enter twice to delete the container, configuration file, and corresponding image

shell
PORT="3004"
+docker stop chromium_\${PORT}
+docker rm -f chromium_\${PORT}
+rm -rf /usr/local/bin/config_\${PORT}
+rm -rf /usr/local/bin/password_\${PORT}
+docker rmi lscr.io/linuxserver/chromium

One-Click Setup of Desktop Container

  • Crashes automatically restart have been configured.
  • Chinese fonts are included in the setup.
  • Built-in web validation with the ability to set your own username and password.
  • Customizable maximum memory usage for the container.
  • No need to consider nested virtualization support and server architecture.
  • Sound mapping is supported, and sound can be transmitted via the web interface.

A complete Linux desktop on which you can use a browser

The host system requires at least 1 core, 2 GB of RAM, and 5 GB of hard disk space. The created container will occupy a minimum of 3.2 GB of hard disk space.

Setup Instructions:

After setup, the default username is onew and the password is oneclick. The default maximum memory usage is 2 GB.

The default web port for HTTP protocol is 3004, and for HTTPS protocol is 3005. After setup, open the corresponding protocol with localhost's IPV4:port in your web browser.

Run the following command to download and execute the setup script:

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

Deletion

Command:

shell
docker ps -a

Query for containers with a prefix of 'webtop' in their names, and record the IDs of these containers.

shell
docker rm -f container_ID

To remove the corresponding image, you can use the following command after deleting all associated containers:

shell
docker rmi lscr.io/linuxserver/webtop

One-Click Installation of Guacamole

A web-based tool for controlling servers using protocols like SSH or RDP.

Website: http://your_IPV4_address:80/guacamole

Default Username: guacadmin

Default Password: guacadmin

After installation, remember to change the password upon login.

The host machine should have at least 1 core, 2GB RAM, and 10GB of disk space; otherwise, launching might lead to host machine freezing!

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh
`,52)]))}const u=i(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_custom.md.CW9sFVv_.lean.js b/assets/en_guide_docker_docker_custom.md.CW9sFVv_.lean.js new file mode 100644 index 0000000000..ea9b403181 --- /dev/null +++ b/assets/en_guide_docker_docker_custom.md.CW9sFVv_.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Script for One-Click Installation of Certain Containers using Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_custom.md","filePath":"en/guide/docker/docker_custom.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_custom.md"};function l(o,s,r,p,h,d){return a(),e("div",null,s[0]||(s[0]=[n("",52)]))}const u=i(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_install.md.Dg0jEf_z.js b/assets/en_guide_docker_docker_install.md.Dg0jEf_z.js deleted file mode 100644 index 1d8c27cade..0000000000 --- a/assets/en_guide_docker_docker_install.md.Dg0jEf_z.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as i,c as e,o as t,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_install.md"};function l(h,s,r,o,p,d){return t(),e("div",null,s[0]||(s[0]=[a(`

Preface

Support for running Docker virtualization on various systems, including Linux, Android, and Windows.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Detect the system environment and install the corresponding components
  • Install docker and docker-compose.
  • Download some configuration scripts required by default
  • Detect if there is an IPV6 address, check if it is greater than or equal to /112, and if so, configure the docker's ipv6 network.
  • If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.
  • Support for x86_64 and ARM architecture servers
  • The installation process will ask you to enter some options, select the Docker installation path, select whether the Docker installation can limit the hard disk

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

OR

bash dockerinstall.sh

TIP

The environment installation process may require you to reboot the server and then execute the script again, see the instructions after the script is run for more details

Detect whether Docker supports limiting container hard disk size

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

Or specify a different storage limit size (in MB), the default test of the 500MB limit of the container whether the limit is successful

shell
# 1GB Limit
-bash disk_test.sh 1000

Uninstall Docker Environment

One-click uninstall of the entire Docker environment, including all containers, images, networks, systemd services, and binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

`,27)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_install.md.Dg0jEf_z.lean.js b/assets/en_guide_docker_docker_install.md.Dg0jEf_z.lean.js deleted file mode 100644 index f3ce18fd7e..0000000000 --- a/assets/en_guide_docker_docker_install.md.Dg0jEf_z.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as t,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_install.md"};function l(h,s,r,o,p,d){return t(),e("div",null,s[0]||(s[0]=[a("",27)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_install.md.yeDlAOS5.js b/assets/en_guide_docker_docker_install.md.yeDlAOS5.js new file mode 100644 index 0000000000..718e0db769 --- /dev/null +++ b/assets/en_guide_docker_docker_install.md.yeDlAOS5.js @@ -0,0 +1,2 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_install.md"};function l(r,s,h,p,o,d){return a(),e("div",null,s[0]||(s[0]=[t(`

Preface

Support for running Docker virtualization on various systems, including Linux, Android, and Windows.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Detect the system environment and install the corresponding components
  • Install docker and docker-compose.
  • Download some configuration scripts required by default
  • Detect if there is an IPV6 address, check if it is greater than or equal to /112, and if so, configure the docker's ipv6 network.
  • If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.
  • Support for x86_64 and ARM architecture servers
  • The installation process will ask you to enter some options, select the Docker installation path, select whether the Docker installation can limit the hard disk

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

OR

bash dockerinstall.sh

TIP

The environment installation process may require you to reboot the server and then execute the script again, see the instructions after the script is run for more details

Detect whether Docker supports limiting container hard disk size

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

Or specify a different storage limit size (in MB), the default test of the 500MB limit of the container whether the limit is successful

shell
# 1GB Limit
+bash disk_test.sh 1000

Uninstall Docker Environment

One-click uninstall of the entire Docker environment, including all containers, images, networks, systemd services, and binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

`,27)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_install.md.yeDlAOS5.lean.js b/assets/en_guide_docker_docker_install.md.yeDlAOS5.lean.js new file mode 100644 index 0000000000..f68502fc5a --- /dev/null +++ b/assets/en_guide_docker_docker_install.md.yeDlAOS5.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_install.md","filePath":"en/guide/docker/docker_install.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_install.md"};function l(r,s,h,p,o,d){return a(),e("div",null,s[0]||(s[0]=[t("",27)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_macos.md.BW5cJ7CP.js b/assets/en_guide_docker_docker_macos.md.B-27DPbM.js similarity index 86% rename from assets/en_guide_docker_docker_macos.md.BW5cJ7CP.js rename to assets/en_guide_docker_docker_macos.md.B-27DPbM.js index b062a34246..2678894d53 100644 --- a/assets/en_guide_docker_docker_macos.md.BW5cJ7CP.js +++ b/assets/en_guide_docker_docker_macos.md.B-27DPbM.js @@ -1 +1 @@ -import{_ as a,c as r,o,ag as c}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"Running macOS Virtual Machines in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_macos.md","filePath":"en/guide/docker/docker_macos.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_macos.md"};function t(i,e,s,d,u,l){return o(),r("div",null,e[0]||(e[0]=[c('

Running macOS Virtual Machines in Docker

Using Dockur

Original Project:

https://github.com/dockur/macos

Using Docker-OSX

Original Project:

https://github.com/sickcodes/Docker-OSX

',7)]))}const m=a(n,[["render",t]]);export{h as __pageData,m as default}; +import{_ as a,c as r,o,ag as c}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"Running macOS Virtual Machines in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_macos.md","filePath":"en/guide/docker/docker_macos.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_macos.md"};function t(i,e,s,d,u,l){return o(),r("div",null,e[0]||(e[0]=[c('

Running macOS Virtual Machines in Docker

Using Dockur

Original Project:

https://github.com/dockur/macos

Using Docker-OSX

Original Project:

https://github.com/sickcodes/Docker-OSX

',7)]))}const m=a(n,[["render",t]]);export{h as __pageData,m as default}; diff --git a/assets/en_guide_docker_docker_macos.md.BW5cJ7CP.lean.js b/assets/en_guide_docker_docker_macos.md.B-27DPbM.lean.js similarity index 62% rename from assets/en_guide_docker_docker_macos.md.BW5cJ7CP.lean.js rename to assets/en_guide_docker_docker_macos.md.B-27DPbM.lean.js index e65c0c8854..e3ab927a24 100644 --- a/assets/en_guide_docker_docker_macos.md.BW5cJ7CP.lean.js +++ b/assets/en_guide_docker_docker_macos.md.B-27DPbM.lean.js @@ -1 +1 @@ -import{_ as a,c as r,o,ag as c}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"Running macOS Virtual Machines in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_macos.md","filePath":"en/guide/docker/docker_macos.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_macos.md"};function t(i,e,s,d,u,l){return o(),r("div",null,e[0]||(e[0]=[c("",7)]))}const m=a(n,[["render",t]]);export{h as __pageData,m as default}; +import{_ as a,c as r,o,ag as c}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"Running macOS Virtual Machines in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_macos.md","filePath":"en/guide/docker/docker_macos.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_macos.md"};function t(i,e,s,d,u,l){return o(),r("div",null,e[0]||(e[0]=[c("",7)]))}const m=a(n,[["render",t]]);export{h as __pageData,m as default}; diff --git a/assets/en_guide_docker_docker_precheck.md._EARYSlQ.js b/assets/en_guide_docker_docker_precheck.md._chG0wUt.js similarity index 94% rename from assets/en_guide_docker_docker_precheck.md._EARYSlQ.js rename to assets/en_guide_docker_docker_precheck.md._chG0wUt.js index b134207915..bcebcf174e 100644 --- a/assets/en_guide_docker_docker_precheck.md._EARYSlQ.js +++ b/assets/en_guide_docker_docker_precheck.md._chG0wUt.js @@ -1 +1 @@ -import{_ as t,c as o,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const p=JSON.parse('{"title":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_precheck.md","filePath":"en/guide/docker/docker_precheck.md","lastUpdated":1772422214000}'),r={name:"en/guide/docker/docker_precheck.md"};function i(s,e,c,h,d,u){return a(),o("div",null,e[0]||(e[0]=[n('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

WARNING

If the host has an IPV6 network, the installation will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/docker

Project Features

Bulk or individual NAT server provisioning via docker

Default use of debian system optional alpine system, each container comes with 1 external ssh port, 25 internal and external network ports, you can choose whether to bind IPV6 address

The default creation of unprivileged containers, and does not mount and host docker daemon communication, so ** host created docker virtualization NAT servers can not be nested within the virtualization docker **

By default, lxcfs is installed and enabled, so that when querying resources within a container, CPU and memory use the configured view instead of the host's view.

By default, you can choose whether or not to share the hard disk of the host machine, and you can choose whether or not to install it as an environment that can limit the size of the hard disk during Docker installation.

Configuration requirements

The system can be installed docker can be used, the network can connect to the Github raw interface can be used, hardware configuration as long as not pull across the line, free hard disk has 3G on it!

(If you need to bind an IPV6 address, then please make sure to use the installation script of this set of scripts for docker installation, you need it to automatically preset some of the settings)

If the hardware resources are just a little bit better, need to limit more things and need to limit the size of the hard disk, you can use the incus partition of the script batch open LXC virtualization containers

If the hardware is very good and you have a lot of resources, you can use the PVE partition script to batch open KVM virtualized VMs.

',16)]))}const f=t(r,[["render",i]]);export{p as __pageData,f as default}; +import{_ as t,c as o,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const p=JSON.parse('{"title":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_precheck.md","filePath":"en/guide/docker/docker_precheck.md","lastUpdated":1772424525000}'),r={name:"en/guide/docker/docker_precheck.md"};function i(s,e,c,h,d,u){return a(),o("div",null,e[0]||(e[0]=[n('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

WARNING

If the host has an IPV6 network, the installation will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/docker

Project Features

Bulk or individual NAT server provisioning via docker

Default use of debian system optional alpine system, each container comes with 1 external ssh port, 25 internal and external network ports, you can choose whether to bind IPV6 address

The default creation of unprivileged containers, and does not mount and host docker daemon communication, so ** host created docker virtualization NAT servers can not be nested within the virtualization docker **

By default, lxcfs is installed and enabled, so that when querying resources within a container, CPU and memory use the configured view instead of the host's view.

By default, you can choose whether or not to share the hard disk of the host machine, and you can choose whether or not to install it as an environment that can limit the size of the hard disk during Docker installation.

Configuration requirements

The system can be installed docker can be used, the network can connect to the Github raw interface can be used, hardware configuration as long as not pull across the line, free hard disk has 3G on it!

(If you need to bind an IPV6 address, then please make sure to use the installation script of this set of scripts for docker installation, you need it to automatically preset some of the settings)

If the hardware resources are just a little bit better, need to limit more things and need to limit the size of the hard disk, you can use the incus partition of the script batch open LXC virtualization containers

If the hardware is very good and you have a lot of resources, you can use the PVE partition script to batch open KVM virtualized VMs.

',16)]))}const f=t(r,[["render",i]]);export{p as __pageData,f as default}; diff --git a/assets/en_guide_docker_docker_precheck.md._EARYSlQ.lean.js b/assets/en_guide_docker_docker_precheck.md._chG0wUt.lean.js similarity index 60% rename from assets/en_guide_docker_docker_precheck.md._EARYSlQ.lean.js rename to assets/en_guide_docker_docker_precheck.md._chG0wUt.lean.js index 719370cd7a..ea7b8d77bf 100644 --- a/assets/en_guide_docker_docker_precheck.md._EARYSlQ.lean.js +++ b/assets/en_guide_docker_docker_precheck.md._chG0wUt.lean.js @@ -1 +1 @@ -import{_ as t,c as o,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const p=JSON.parse('{"title":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_precheck.md","filePath":"en/guide/docker/docker_precheck.md","lastUpdated":1772422214000}'),r={name:"en/guide/docker/docker_precheck.md"};function i(s,e,c,h,d,u){return a(),o("div",null,e[0]||(e[0]=[n("",16)]))}const f=t(r,[["render",i]]);export{p as __pageData,f as default}; +import{_ as t,c as o,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const p=JSON.parse('{"title":"Introduction","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_precheck.md","filePath":"en/guide/docker/docker_precheck.md","lastUpdated":1772424525000}'),r={name:"en/guide/docker/docker_precheck.md"};function i(s,e,c,h,d,u){return a(),o("div",null,e[0]||(e[0]=[n("",16)]))}const f=t(r,[["render",i]]);export{p as __pageData,f as default}; diff --git a/assets/en_guide_docker_docker_qa.md.84Eubfu_.js b/assets/en_guide_docker_docker_qa.md.84Eubfu_.js deleted file mode 100644 index a450e39b7a..0000000000 --- a/assets/en_guide_docker_docker_qa.md.84Eubfu_.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_qa.md","filePath":"en/guide/docker/docker_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_qa.md"};function o(p,e,c,l,d,r){return t(),s("div",null,e[0]||(e[0]=[i('

Solve the puzzle

Common Docker Commands

Check real-time resource usage of a specific container

docker stats <container_name>

Enter a specific container

docker exec -it <container_name> /bin/bash

Clean Docker cache, remove unused resources including images, containers, networks, etc.

docker system prune -a

Uninstall all Docker images and containers

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

View logs of a specific container

docker logs <container_name_or_ID>

View overall disk usage of Docker

docker system df

List all containers

docker ps -a

List all images

docker images

Remove a specific container

docker rm -f <container_name_or_ID>

Remove a specific image

docker rmi <image_name_or_ID>
',22)]))}const u=a(n,[["render",o]]);export{g as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_qa.md.84Eubfu_.lean.js b/assets/en_guide_docker_docker_qa.md.84Eubfu_.lean.js deleted file mode 100644 index d388c4e309..0000000000 --- a/assets/en_guide_docker_docker_qa.md.84Eubfu_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_qa.md","filePath":"en/guide/docker/docker_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_qa.md"};function o(p,e,c,l,d,r){return t(),s("div",null,e[0]||(e[0]=[i("",22)]))}const u=a(n,[["render",o]]);export{g as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_qa.md.974S2wwI.js b/assets/en_guide_docker_docker_qa.md.974S2wwI.js new file mode 100644 index 0000000000..f57f25015c --- /dev/null +++ b/assets/en_guide_docker_docker_qa.md.974S2wwI.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_qa.md","filePath":"en/guide/docker/docker_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_qa.md"};function p(l,e,d,r,c,o){return n(),s("div",null,e[0]||(e[0]=[i('

Solve the puzzle

Common Docker Commands

Check real-time resource usage of a specific container

docker stats <container_name>

Enter a specific container

docker exec -it <container_name> /bin/bash

Clean Docker cache, remove unused resources including images, containers, networks, etc.

docker system prune -a

Uninstall all Docker images and containers

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

View logs of a specific container

docker logs <container_name_or_ID>

View overall disk usage of Docker

docker system df

List all containers

docker ps -a

List all images

docker images

Remove a specific container

docker rm -f <container_name_or_ID>

Remove a specific image

docker rmi <image_name_or_ID>
',22)]))}const h=a(t,[["render",p]]);export{m as __pageData,h as default}; diff --git a/assets/en_guide_docker_docker_qa.md.974S2wwI.lean.js b/assets/en_guide_docker_docker_qa.md.974S2wwI.lean.js new file mode 100644 index 0000000000..24153c572f --- /dev/null +++ b/assets/en_guide_docker_docker_qa.md.974S2wwI.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_qa.md","filePath":"en/guide/docker/docker_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_qa.md"};function p(l,e,d,r,c,o){return n(),s("div",null,e[0]||(e[0]=[i("",22)]))}const h=a(t,[["render",p]]);export{m as __pageData,h as default}; diff --git a/assets/en_guide_docker_docker_thanks.md.CercwUPI.js b/assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.js similarity index 94% rename from assets/en_guide_docker_docker_thanks.md.CercwUPI.js rename to assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.js index 76becf5989..bf09c02d72 100644 --- a/assets/en_guide_docker_docker_thanks.md.CercwUPI.js +++ b/assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_thanks.md","filePath":"en/guide/docker/docker_thanks.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_thanks.md"};function c(p,r,h,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o('

Acknowledgements

https://hub.docker.com/_/debian

https://hub.docker.com/r/redroid/redroid

https://github.com/NetrisTV/ws-scrcpy

https://guacamole.apache.org/doc/gug/introduction.html

https://blog.imoeq.com/oracle-arm-run-android-by-docker

https://blog.imoeq.com/scrcpy-run-a-android-web-page

https://github.com/NetrisTV/ws-scrcpy

https://www.howtoforge.com/how-to-install-apache-guacamole-as-docker-container-on-ubuntu/

https://releases.hashicorp.com/vagrant/

https://github.com/hashicorp/vagrant/

https://app.vagrantup.com/peru

https://medium.com/axon-technologies/installing-a-windows-virtual-machine-in-a-linux-docker-container-c78e4c3f9ba1

https://forum.garudalinux.org/t/error-while-attempting-to-create-a-virtual-machine-with-virt-manager/18534/4

https://github.com/jlesage/docker-firefox

https://github.com/linuxserver/docker-webtop

https://github.com/yoursunny/ndpresponder

https://github.com/linuxserver/docker-chromium

https://github.com/SuperManito/LinuxMirrors

Thank @Ella-Alinda and @CoiaPrant for providing docker guidance.

',20)]))}const u=e(n,[["render",c]]);export{d as __pageData,u as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_thanks.md","filePath":"en/guide/docker/docker_thanks.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_thanks.md"};function c(p,r,h,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o('

Acknowledgements

https://hub.docker.com/_/debian

https://hub.docker.com/r/redroid/redroid

https://github.com/NetrisTV/ws-scrcpy

https://guacamole.apache.org/doc/gug/introduction.html

https://blog.imoeq.com/oracle-arm-run-android-by-docker

https://blog.imoeq.com/scrcpy-run-a-android-web-page

https://github.com/NetrisTV/ws-scrcpy

https://www.howtoforge.com/how-to-install-apache-guacamole-as-docker-container-on-ubuntu/

https://releases.hashicorp.com/vagrant/

https://github.com/hashicorp/vagrant/

https://app.vagrantup.com/peru

https://medium.com/axon-technologies/installing-a-windows-virtual-machine-in-a-linux-docker-container-c78e4c3f9ba1

https://forum.garudalinux.org/t/error-while-attempting-to-create-a-virtual-machine-with-virt-manager/18534/4

https://github.com/jlesage/docker-firefox

https://github.com/linuxserver/docker-webtop

https://github.com/yoursunny/ndpresponder

https://github.com/linuxserver/docker-chromium

https://github.com/SuperManito/LinuxMirrors

Thank @Ella-Alinda and @CoiaPrant for providing docker guidance.

',20)]))}const u=e(n,[["render",c]]);export{d as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_thanks.md.CercwUPI.lean.js b/assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.lean.js similarity index 58% rename from assets/en_guide_docker_docker_thanks.md.CercwUPI.lean.js rename to assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.lean.js index 4a0647e3f4..8e3d379279 100644 --- a/assets/en_guide_docker_docker_thanks.md.CercwUPI.lean.js +++ b/assets/en_guide_docker_docker_thanks.md.Cn6VZq0S.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_thanks.md","filePath":"en/guide/docker/docker_thanks.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_thanks.md"};function c(p,r,h,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o("",20)]))}const u=e(n,[["render",c]]);export{d as __pageData,u as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/docker/docker_thanks.md","filePath":"en/guide/docker/docker_thanks.md","lastUpdated":1772424525000}'),n={name:"en/guide/docker/docker_thanks.md"};function c(p,r,h,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o("",20)]))}const u=e(n,[["render",c]]);export{d as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_windows.md.3PfgRvse.js b/assets/en_guide_docker_docker_windows.md.3PfgRvse.js new file mode 100644 index 0000000000..05bd6d8abf --- /dev/null +++ b/assets/en_guide_docker_docker_windows.md.3PfgRvse.js @@ -0,0 +1,26 @@ +import{_ as e,c as i,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Running Windows Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_windows.md","filePath":"en/guide/docker/docker_windows.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_windows.md"};function r(l,s,o,p,h,d){return a(),i("div",null,s[0]||(s[0]=[n(`

Running Windows Virtual Machine in Docker

One-Click Deployment (Using Vagrant)

  • Shares all resources of the host machine; based on Docker, so it only occupies the size of the system, suitable for multiple instances.
  • Shares IP; Docker's NAT mapping is employed. You can choose whether to map to the external network or just the internal network.
  • The configured Windows system is set to use a maximum of 1 core, 2GB RAM, and 50GB hard disk by default. Actual usage may vary based on usage patterns.
  • No need for iptables for NAT mapping; port mappings are automatically deleted when containers are removed, making maintenance easier.
  • Ensure that the host machine supports nested virtualization, and currently, only X86_64 architecture systems are supported. I haven't compiled corresponding images for ARM devices at the moment.

The host machine needs to support nested virtualization and currently only supports systems based on the X86_64 architecture; I don't have an ARM machine on hand to compile the corresponding image at the moment.

Command:

shell
egrep -c '(vmx|svm)' /proc/cpuinfo

The result should be greater than or equal to 1 and cannot be 0.

Next, you need to configure Docker to start using the v1 version of cgroup.

shell
sed -i 's/GRUB_CMDLINE_LINUX="\\(.*\\)"/GRUB_CMDLINE_LINUX="\\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
+update-grub
+ls

If there are no errors during execution, run the reboot command to restart the system and apply the settings.

Supported Images

We are using custom-built images: https://hub.docker.com/r/spiritlhl/wds

Image NameImage Size
1020GB
202217.5GB
201917GB

The size of the created container will be slightly larger than the image size, but not by much.

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewindows.sh -o onewindows.sh && chmod +x onewindows.sh

Usage Instructions

Make sure to execute the following commands in a 'screen' session before proceeding, to avoid potential disconnection or freezing of the SSH connection.

./onewindows.sh <container_name> <system_version> <RDP_port> <external_mapping>
  • Replace <container_name> with the name.
  • Replace <system_version> with the desired Windows system version.
  • Replace <RDP_port> with the port number for RDP access.
  • If you want to enable external mapping, replace <external_mapping> with 'Y'. If not, leave it blank or use 'N'.

Before initiating the setup, ensure that the host machine has a disk size at least twice the size of the image, plus an additional 10GB, as Docker needs to pull the image locally before creating the container.

During the creation process, the peak disk usage will be host_system_size + image_size + container_size.

For example, to set up a container with the name test, the container with the lowest occupancy Windows 2019 system, map the extranet RDP port 13389 and set it to extranet mapping (mapping to your server's extranet IPV4 address)

shell
./onewindows.sh test 2019 13389 Y

After it, the default usernames are Administrator and vagrant, with the default password being vagrant.

If you choose to open a mapped extranet port, be sure to log in and change the password of the corresponding account (both accounts may have, try it yourself), otherwise it may be abused by someone blasting

Deletion

To delete the corresponding image and container, first use the command docker ps -a and docker images to find the ID of the image named spiritlhl/wds. Then, use the following commands accordingly:

docker rm -f container_ID
+docker rmi image_ID

After deletion, you can create containers of different versions of Windows.

Other similar projects

https://github.com/dockur/windows - Similar project that support more systems, but have more resource requirements

https://github.com/dockur/windows-arm/ - It's great that he has ARM servers for mirror compilation, my project doesn't have

Note that both of the above projects require a host with at least 4 cores of CPU, at least 4G of RAM, and at least 64G of hard disk, which is greater than the mirroring requirements of my project. (The advantage of his project is that you can customize many configuration items, see his corresponding project description for details.)

Manual Provisioning (via the Dockur Project)

This project supports VM creation using QEMU even on host systems that do not support nested virtualization.

Original Project Repositories

⚠️ Notes:

  • The original project provides only the launcher, not a Windows image.

  • The first container startup may take up to 4 hours on domestic (China) networks, due to image download and installation.

  • The host system should meet the following minimum hardware requirements (can be adjusted via script modifications):

    • CPU: At least 4 cores
    • RAM: At least 4 GB
    • Disk: At least 64 GB

For customization such as reducing resource usage or changing launch parameters, refer to:

For x86_64 Architecture Users

A pre-modified single-file launcher is available to simplify building a Windows image. This version writes system files and images directly into Docker’s writable layer—no external image mounting required.

Download link: https://github.com/oneclickvirt/docker/releases/download/amd64_builder/builder.tar

Import Docker image:

bash
docker load -i builder.tar

Launching the Container with a Custom Windows ISO

Download a Windows ISO image from: https://down.idc.wiki/ISOS/Windows/

Sample command to start the container:

bash
docker run -it -d \\
+  -e RAM_SIZE="8G" \\
+  -e CPU_CORES="4" \\
+  --name win2022 \\
+  -p 8006:8006 \\
+  --device=/dev/kvm \\
+  --device=/dev/net/tun \\
+  --cap-add NET_ADMIN \\
+  -v "$(pwd)/WindowsImage.iso:/boot.iso" \\
+  --stop-timeout 120 \\
+  windows:builder

We also offer a ready-to-use image with the system and configuration already integrated. Features:

  • Image size: ~26 GB (includes system image and default config)
  • Supports auto disk expansion and startup tasks
  • Just download, import, and run
  • ⚠️ Note: Combined download will require ~60 GB of free space

Download and Merge Split Files

bash
curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/mergew.sh -o mergew.sh
+chmod +x mergew.sh
+bash mergew.sh

Start the Container

bash
docker load -i win2022.tar
+docker run -it -d \\
+  -e RAM_SIZE="4G" \\
+  -e CPU_CORES="2" \\
+  --name win2022 \\
+  -p 8006:8006 \\
+  --device=/dev/kvm \\
+  --device=/dev/net/tun \\
+  --cap-add NET_ADMIN \\
+  --stop-timeout 120 \\
+  windows:2022

Important Notes

It is not recommended to use docker commit to save changes to this image, as repeated layer stacking may cause the image size to exceed 40 GB.

For personalized configuration or additional software integration, always start from the builder image to ensure a clean and maintainable result.

`,61)]))}const u=e(t,[["render",r]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_windows.md.3PfgRvse.lean.js b/assets/en_guide_docker_docker_windows.md.3PfgRvse.lean.js new file mode 100644 index 0000000000..edbd849f9d --- /dev/null +++ b/assets/en_guide_docker_docker_windows.md.3PfgRvse.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Running Windows Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_windows.md","filePath":"en/guide/docker/docker_windows.md","lastUpdated":1772424525000}'),t={name:"en/guide/docker/docker_windows.md"};function r(l,s,o,p,h,d){return a(),i("div",null,s[0]||(s[0]=[n("",61)]))}const u=e(t,[["render",r]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_docker_docker_windows.md.DOkUGTOv.js b/assets/en_guide_docker_docker_windows.md.DOkUGTOv.js deleted file mode 100644 index 74005dd5c3..0000000000 --- a/assets/en_guide_docker_docker_windows.md.DOkUGTOv.js +++ /dev/null @@ -1,26 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running Windows Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_windows.md","filePath":"en/guide/docker/docker_windows.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_windows.md"};function o(r,s,l,h,p,d){return a(),e("div",null,s[0]||(s[0]=[t(`

Running Windows Virtual Machine in Docker

One-Click Deployment (Using Vagrant)

  • Shares all resources of the host machine; based on Docker, so it only occupies the size of the system, suitable for multiple instances.
  • Shares IP; Docker's NAT mapping is employed. You can choose whether to map to the external network or just the internal network.
  • The configured Windows system is set to use a maximum of 1 core, 2GB RAM, and 50GB hard disk by default. Actual usage may vary based on usage patterns.
  • No need for iptables for NAT mapping; port mappings are automatically deleted when containers are removed, making maintenance easier.
  • Ensure that the host machine supports nested virtualization, and currently, only X86_64 architecture systems are supported. I haven't compiled corresponding images for ARM devices at the moment.

The host machine needs to support nested virtualization and currently only supports systems based on the X86_64 architecture; I don't have an ARM machine on hand to compile the corresponding image at the moment.

Command:

shell
egrep -c '(vmx|svm)' /proc/cpuinfo

The result should be greater than or equal to 1 and cannot be 0.

Next, you need to configure Docker to start using the v1 version of cgroup.

shell
sed -i 's/GRUB_CMDLINE_LINUX="\\(.*\\)"/GRUB_CMDLINE_LINUX="\\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
-update-grub
-ls

If there are no errors during execution, run the reboot command to restart the system and apply the settings.

Supported Images

We are using custom-built images: https://hub.docker.com/r/spiritlhl/wds

Image NameImage Size
1020GB
202217.5GB
201917GB

The size of the created container will be slightly larger than the image size, but not by much.

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewindows.sh -o onewindows.sh && chmod +x onewindows.sh

Usage Instructions

Make sure to execute the following commands in a 'screen' session before proceeding, to avoid potential disconnection or freezing of the SSH connection.

./onewindows.sh <container_name> <system_version> <RDP_port> <external_mapping>
  • Replace <container_name> with the name.
  • Replace <system_version> with the desired Windows system version.
  • Replace <RDP_port> with the port number for RDP access.
  • If you want to enable external mapping, replace <external_mapping> with 'Y'. If not, leave it blank or use 'N'.

Before initiating the setup, ensure that the host machine has a disk size at least twice the size of the image, plus an additional 10GB, as Docker needs to pull the image locally before creating the container.

During the creation process, the peak disk usage will be host_system_size + image_size + container_size.

For example, to set up a container with the name test, the container with the lowest occupancy Windows 2019 system, map the extranet RDP port 13389 and set it to extranet mapping (mapping to your server's extranet IPV4 address)

shell
./onewindows.sh test 2019 13389 Y

After it, the default usernames are Administrator and vagrant, with the default password being vagrant.

If you choose to open a mapped extranet port, be sure to log in and change the password of the corresponding account (both accounts may have, try it yourself), otherwise it may be abused by someone blasting

Deletion

To delete the corresponding image and container, first use the command docker ps -a and docker images to find the ID of the image named spiritlhl/wds. Then, use the following commands accordingly:

docker rm -f container_ID
-docker rmi image_ID

After deletion, you can create containers of different versions of Windows.

Other similar projects

https://github.com/dockur/windows - Similar project that support more systems, but have more resource requirements

https://github.com/dockur/windows-arm/ - It's great that he has ARM servers for mirror compilation, my project doesn't have

Note that both of the above projects require a host with at least 4 cores of CPU, at least 4G of RAM, and at least 64G of hard disk, which is greater than the mirroring requirements of my project. (The advantage of his project is that you can customize many configuration items, see his corresponding project description for details.)

Manual Provisioning (via the Dockur Project)

This project supports VM creation using QEMU even on host systems that do not support nested virtualization.

Original Project Repositories

⚠️ Notes:

  • The original project provides only the launcher, not a Windows image.

  • The first container startup may take up to 4 hours on domestic (China) networks, due to image download and installation.

  • The host system should meet the following minimum hardware requirements (can be adjusted via script modifications):

    • CPU: At least 4 cores
    • RAM: At least 4 GB
    • Disk: At least 64 GB

For customization such as reducing resource usage or changing launch parameters, refer to:

For x86_64 Architecture Users

A pre-modified single-file launcher is available to simplify building a Windows image. This version writes system files and images directly into Docker’s writable layer—no external image mounting required.

Download link: https://github.com/oneclickvirt/docker/releases/download/amd64_builder/builder.tar

Import Docker image:

bash
docker load -i builder.tar

Launching the Container with a Custom Windows ISO

Download a Windows ISO image from: https://down.idc.wiki/ISOS/Windows/

Sample command to start the container:

bash
docker run -it -d \\
-  -e RAM_SIZE="8G" \\
-  -e CPU_CORES="4" \\
-  --name win2022 \\
-  -p 8006:8006 \\
-  --device=/dev/kvm \\
-  --device=/dev/net/tun \\
-  --cap-add NET_ADMIN \\
-  -v "$(pwd)/WindowsImage.iso:/boot.iso" \\
-  --stop-timeout 120 \\
-  windows:builder

We also offer a ready-to-use image with the system and configuration already integrated. Features:

  • Image size: ~26 GB (includes system image and default config)
  • Supports auto disk expansion and startup tasks
  • Just download, import, and run
  • ⚠️ Note: Combined download will require ~60 GB of free space

Download and Merge Split Files

bash
curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/mergew.sh -o mergew.sh
-chmod +x mergew.sh
-bash mergew.sh

Start the Container

bash
docker load -i win2022.tar
-docker run -it -d \\
-  -e RAM_SIZE="4G" \\
-  -e CPU_CORES="2" \\
-  --name win2022 \\
-  -p 8006:8006 \\
-  --device=/dev/kvm \\
-  --device=/dev/net/tun \\
-  --cap-add NET_ADMIN \\
-  --stop-timeout 120 \\
-  windows:2022

Important Notes

It is not recommended to use docker commit to save changes to this image, as repeated layer stacking may cause the image size to exceed 40 GB.

For personalized configuration or additional software integration, always start from the builder image to ensure a clean and maintainable result.

`,61)]))}const g=i(n,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_docker_docker_windows.md.DOkUGTOv.lean.js b/assets/en_guide_docker_docker_windows.md.DOkUGTOv.lean.js deleted file mode 100644 index 11c207666a..0000000000 --- a/assets/en_guide_docker_docker_windows.md.DOkUGTOv.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running Windows Virtual Machine in Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_windows.md","filePath":"en/guide/docker/docker_windows.md","lastUpdated":1772422214000}'),n={name:"en/guide/docker/docker_windows.md"};function o(r,s,l,h,p,d){return a(),e("div",null,s[0]||(s[0]=[t("",61)]))}const g=i(n,[["render",o]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_custom.md.BvOwR9yS.js b/assets/en_guide_incus_incus_custom.md.BvOwR9yS.js deleted file mode 100644 index 83c783b94c..0000000000 --- a/assets/en_guide_incus_incus_custom.md.BvOwR9yS.js +++ /dev/null @@ -1,82 +0,0 @@ -import{_ as s,c as t,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const i="/assets/lxd1.CbGLa5s4.png",o="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",p="/assets/lxd4.CSfRHLxz.png",r="/assets/lxd5.WUJi0qzd.png",h="/assets/lxd6.Cnds779U.png",d="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",k="/assets/lxd11.D6E5sVW2.png",m="/assets/lxd12.B9udKIzn.png",b="/assets/lxd13.Dwv7xBpz.png",f="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",v="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",S=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_custom.md","filePath":"en/guide/incus/incus_custom.md","lastUpdated":1772422214000}'),B={name:"en/guide/incus/incus_custom.md"};function I(q,e,T,V,A,O){return a(),t("div",null,e[0]||(e[0]=[n(`

Custom

Adding a customized mirror source

https://incusimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/incus_images for details.

shell
incus remote remove spiritlhl
-incus remote add spiritlhl https://incusimages.spiritlhl.net --protocol simplestreams --public
-incus image list spiritlhl:debian

Attach free IPV6 address segments to host machines

Some machines don't have an IPV6 /64 subnet on the machine itself, here is a method given to attach an IPV6 subnet for free.

Here is a solution using the 6in4 method for a host machine that doesn't have an IPV6 address on its own.

TIP

The operations on this page must be performed on the original system, and ensure that no other scripts from this project are installed(Except for PVE, which needs to be installed first), as this may lead to environment conflicts.

Here are the platforms that are currently running in 2023 that offer IPV6 subnets for free.

Supported PlatformsCorresponding Required Installation PackagesProtocolsNumber of Channels/Subnets
tunnelbroker.netifupdown OR ifupdown2v4tunnel OR sit3✖/64 OR 5✖/64
tunnelbroker.chifupdown OR ifupdown2v4tunnel OR sit3✖/64
ip4market.ruifupdown OR ifupdown2v4tunnel OR sit1✖/64
netassist.uaifupdown OR ifupdown2v4tunnel OR sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipipcustom

The free platform only solves the problem that IPV6 is not available, it does not provide premium IPV6 bandwidth.

If you need high quality bandwidth, please build your own tunnel. When both ifupdown and ifupdown2 are available, try ifupdown first to see if it can be installed successfully, otherwise install ifupdown2.

After the installation is complete, select which package is installed behind to convert the format.

Initial environment modifications

Execute

touch /etc/cloud/cloud-init.disabled

Turn off the automated overwrite of cloud-init first, and then to see what the local machine is using to manage the network, run

systemctl is-active systemd-networkd

and

systemctl is-active networking

See which case this falls into, if it's the former active and the latter inactive, you need to reinstall/DD a system that isn't configured this way, or switch the local machine to use ifupdown/ifupdown2 to manage network execution

# Judge for yourself whether you need to disable the original network management or not
-# systemctl stop systemd-networkd
-# systemctl disable systemd-networkd
-# systemctl stop systemd-networkd.socket
-# systemctl disable systemd-networkd.socket

If you want to install ifupdown to control the network, this tool is available on all major linux systems.

apt-get install ifupdown -y

If you want to install ifupdown2 for network management, which is generally only available on debian systems, you can install

apt-get install ifupdown2 -y

After the installation is complete, select which package is installed behind to convert the format.

systemctl start networking
-systemctl enable networking

Then restart the server, check whether the machine's network will be rebooted due to the modification of the case of loss of connection, and runuptimeto observe that the startup has been more than 1 minute before proceeding to the next steps

If it is inactive and active, there is no need to switch the network management program and you can proceed directly to the next step.

Since some servers have default intranet IPV6 routes that will conflict with the tunnel, you can use the following command to remove the default IPV6 routes

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

This assumes that your client's server's default NIC is eth0, you can use ip -6 route to see the default route and replace it, the default route starts with default via, and uses dev to specify the default NIC, you just need to find it according to this rule

Currently supported platforms

tunnelbroker_net

Combined with a script that opens containers with IPV6 addresses with a single click, you can attach an IPV6 address from he to each container

The downside is that the addresses are dark/dirty, and cloudflare's cdn will most likely not be able to latch on, test it yourself

  1. Register an account at https://tunnelbroker.net/ and clickCreate Regular Tunnelon the left.

1

  1. Fill in your server's IPV4 address in the red box, choose a connection point that is physically close to your server, for example, if your machine is in Los Angeles, choose a connection point on the west coast of the United States, and then clickCreate Tunnelto create the tunnel when you are prompted by the green box!

2

3

4

  1. Wait for the following screen, clickExample Configurationsand select the corresponding system, for example, the host of incus is definitely Debian/Ubuntu.

5

6

  1. The boxed part is the file to be modified and the content to be filled in.

7

  1. Exchange the format of the command then add IPV6 settings to your network configuration file.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerNet, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
-# Here, copy and paste the contents of the configuration file in the red box, and then run this command.
-EOF

Then you can usecat /etc/network/interfacesto see if the configuration file is written correctly.

  1. If all of the above is OK, then you need to enable the network interfaces
apt-get install net-tools iproute2 -y
-systemctl restart networking
  1. Then you can test the IP address of the network interface.

Execute theifconfigcommand, and there should be a he-ipv6 interface, similar to the following:

8

Or execute:

curl ipv6.ip.sb

Returns the IPV6 address you bound to

  1. Additional settings for NAT VPS

IPv4 NAT VPS may require some additional settings beyond the IP replacement operation mentioned earlier, otherwise it may still not be able to access the IPv6 network.

apt-get install ufw -y
-ufw allow 41

Add the relevant routing rules

route -A inet6 add ::/0 dev he-ipv6
  1. If the IPV6 network is no longer needed and you want to delete it, delete the he-ipv6 network interface configuration.

If you want to delete the he-ipv6 network interface configuration (if not, it will be enabled automatically after reboot), remember to modify the/etc/network/interfacesfile to remove the content added in the red box before.

Then reboot the server to remove the

tunnelbroker_ch

Similar to the above, first register an account at https://www.tunnelbroker.ch/ and click on the activation email after registering.

Then you have to fill in the IPV4 address of your server.

After creating an account, you need to go to the Config page instead of the details page.

Don't use the following page, first refresh the page without the light blue box and then stop refreshing it

Don't stop refreshing after the light blue box pops up

Record the content of the last red box on the following page, and prepare to modify the host configuration file.

Copy the last red box of the page without the blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerCh, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

ip4market_ru

Similar to the above, first register an account at https://tb.ip4market.ru, the registered email address must be an unseen email address, the phone number can be written randomly without verification, and the IP address should be the IPV4 address of the host you want to attach.

The IP address is the IPV4 address of the host computer you are attaching to

Then you have to go through Recaptcha's human-machine verification, and click register.

You will receive an activation email with your password, memorize it.

Then login on the homepage

Then you will be taken to this page

Hold down the right button and copy the four lines framed in red, which are

Server IPv4.
-Client IPv4
-Server IPv6
-Client IPv6

For these four lines, press ctrl+c to copy or right-click to copy

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforip4market, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the formatting

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

netassist_ua

Similar to the above operation, first in https://tb.netassist.ua/ register an account first, after registration, click on the activation of the mail, the activation page will have a password display, remember to record!

Then fill in the IPV4 address of your server, you can change it later, just fill in a random one first.

Then you will get to this page

a

The first red box is the location of your host's IPV4 address, if you want to modify it, modify it there, and then click change to save.

The second red box is for```Linux``, and then click on show

b

The above content will appear, copy all the boxed parts without blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforNetAssist, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then click onCovertto convert the formatting

c

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

Transfer IPV6 subnets between different servers

Related repository: https://github.com/oneclickvirt/6in4

This method will provide a way to split a /80 out of the IPV6 segment on A and attach it to B to use.

Features

  • Self-built IPv6 tunnel for sit/gre/ipip protocols
  • Support to customize the IPV6 subnet size to be cut out, and the appropriate IPV6 subnet information in CIDR format will be calculated automatically.
  • Automatically recognizes the IPV6 subnet size of the server side
  • will automatically set up the tunnel server and print the commands that the client needs to execute
  • Setting up the IPV6 tunnel is easy to understand and easy to remove

Environmental Preparation

VPS(A)VPS(B)
one IPV4 address (server_ipv4)one IPV4 address (clinet_ipv4)
one IPV6 subnetno IPV6 address
Hereafter referred to as serverHereafter referred to as client

Usage

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

Execute it

./6in4.sh client_ipv4 <mode_type> <subnet_size>
OptionsOptional Option 1Optional Option 2Optional Option 3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type> only support those three protocols for now, the more advanced the more recommended, no fill in the default is sit protocol

<subnet_size> as long as it is larger than the original system subnet mask, and is a multiple of 8, if you don't fill it in, it defaults to 80.

Remember to replace client_ipv4 with the IPV4 address of the machine you want to attach IPV6 to, and the command you need to execute on the client side will be sent back to you after execution, see the instructions after execution for details.

To prevent you from forgetting to copy the commands, the commands themselves will be written to the 6in4.log file under the current path, you can use cat 6in4.log to query the commands that need to be executed on the client side

For copied commands, be sure to select option 6in4 in https://ipv6tunnel.spiritlhl.top/ before converting!

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify here
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

Check server status

systemctl status ndpresponder
ip addr show

Check client status

ip addr show
curl ipv6.ip.sb

Delete tunnel

server

ip link set server-ipv6 down
-ip tunnel del server-ipv6

client

ip link set user-ipv6 down
-ip tunnel del user-ipv6

The above deletion is only temporary, for permanent deletion you must modify and delete the contents of the /etc/network/interfaces file that you have previously added.

one more thing

In fact https://tunnelbroker.net/ supports the application of IPV6 subnets of size /48

Make the request here, then when converting the format change the original /64 IPV6 address to a /48 IPV6 address and you'll get a larger IPV6 subnet!

Supplemental CloudFlare WARP IPv4 / IPv6 outbound

1: Benefits

  • By installing it on the host machine, all enabled machines can benefit from the advantages of Warp without the need for individual configurations, thus saving resources and simplifying management.
  • The use of kernel WireGuard on the host machine enables more efficient operation of WireGuard compared to user-space WireGuard-Go.

2: Manual Installation

2-1 Installing WireGuard Dependencies

  • Debian and Ubuntu systems
# Update dependent libraries
-apt update -y
-
-# Install WireGuard runtime dependencies
-apt install -y --no-install-recommends net-tools openresolv dnsutils
-
-# Install WireGuard protocol-compatible toolset
-apt install -y --no-install-recommends wireguard-tools
  • CentOS systems
# Update dependent libraries
-yum update -y
-
-# Install additional package components
-yum install -y epel-release 
-
-# Install WireGuard runtime dependencies
-yum install -y net-tools
-
-# Install WireGuard protocol-compatible toolset
-yum install -y wireguard-tools

2-2 Getting warp account information

Visit https://warp.cloudflare.now.cc/?run=register&format=yaml and record private_key, v6 2 values

image.png

2-3: Modifying Configuration Files

  • Create and edit the /etc/wireguard/warp.conf file, replacing any parts that contain <> (pointy brackets) together, just to make it look obvious.

  • For IPv4-only hosts, Warp takes over IPv6 egress only

shell
[Interface]
-PrivateKey = <Your PrivateKey>
-Address = 172.16.0.2/32
-Address = <Your Address-v6 >/128
-DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = ::/0
-Endpoint = 162.159.193.10:2408
  • For IPv6 only hosts, Warp takes over IPv4 egress only.
shell
[Interface]
-PrivateKey = <Your PrivateKey>
-Address = 172.16.0.2/32
-Address = <Your Address-v6>/128
-DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = 0.0.0.0/0
-Endpoint = [2606:4700:d0::a29f:c101]:2408
  • There's no need to target dual-stack, after all, native network outlets are better than relaying through Warp

2-4: Setting the Address Resolution Priority

For IPv4-only host machines, Warp only takes control of the IPv6 outbound, prioritizing the use of the native network's IPv4 outbound.

shell
# IPv4 priority
-grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf

For IPv6-only host machines, Warp only takes control of the IPv4 outbound, prioritizing the use of the native network's IPv6 outbound.

shell
# IPv6 priority
-sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

2-5: Connecting to Warp and setting up the systemd process daemon

# Run wireguard to connect to Warp. If this step gets stuck and causes the connection to be lost, reboot the host in the background to resolve it.
-wg-quick up warp
-
-# Check IPv4
-curl -A a https://api-ipv4.ip.sb/geoip
-
-# Check IPv6
-curl -A a https://api-ipv6.ip.sb/geoip
-
-# Disconnect from Warp after successful test.
-wg-quick down warp
-
-# Reconnect and set process daemon to take effect automatically after reboot.
-systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
-wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',198)]))}const W=s(B,[["render",I]]);export{S as __pageData,W as default}; diff --git a/assets/en_guide_incus_incus_custom.md.BvOwR9yS.lean.js b/assets/en_guide_incus_incus_custom.md.BvOwR9yS.lean.js deleted file mode 100644 index 8b67832c7e..0000000000 --- a/assets/en_guide_incus_incus_custom.md.BvOwR9yS.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const i="/assets/lxd1.CbGLa5s4.png",o="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",p="/assets/lxd4.CSfRHLxz.png",r="/assets/lxd5.WUJi0qzd.png",h="/assets/lxd6.Cnds779U.png",d="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",k="/assets/lxd11.D6E5sVW2.png",m="/assets/lxd12.B9udKIzn.png",b="/assets/lxd13.Dwv7xBpz.png",f="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",v="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",S=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_custom.md","filePath":"en/guide/incus/incus_custom.md","lastUpdated":1772422214000}'),B={name:"en/guide/incus/incus_custom.md"};function I(q,e,T,V,A,O){return a(),t("div",null,e[0]||(e[0]=[n("",198)]))}const W=s(B,[["render",I]]);export{S as __pageData,W as default}; diff --git a/assets/en_guide_incus_incus_custom.md.CsWNjjxG.js b/assets/en_guide_incus_incus_custom.md.CsWNjjxG.js new file mode 100644 index 0000000000..44ec69ac8a --- /dev/null +++ b/assets/en_guide_incus_incus_custom.md.CsWNjjxG.js @@ -0,0 +1,82 @@ +import{_ as s,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",p="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",o="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",c="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",b="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",v="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_custom.md","filePath":"en/guide/incus/incus_custom.md","lastUpdated":1772424525000}'),B={name:"en/guide/incus/incus_custom.md"};function I(q,e,T,V,A,z){return n(),a("div",null,e[0]||(e[0]=[t(`

Custom

Adding a customized mirror source

https://incusimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/incus_images for details.

shell
incus remote remove spiritlhl
+incus remote add spiritlhl https://incusimages.spiritlhl.net --protocol simplestreams --public
+incus image list spiritlhl:debian

Attach free IPV6 address segments to host machines

Some machines don't have an IPV6 /64 subnet on the machine itself, here is a method given to attach an IPV6 subnet for free.

Here is a solution using the 6in4 method for a host machine that doesn't have an IPV6 address on its own.

TIP

The operations on this page must be performed on the original system, and ensure that no other scripts from this project are installed(Except for PVE, which needs to be installed first), as this may lead to environment conflicts.

Here are the platforms that are currently running in 2023 that offer IPV6 subnets for free.

Supported PlatformsCorresponding Required Installation PackagesProtocolsNumber of Channels/Subnets
tunnelbroker.netifupdown OR ifupdown2v4tunnel OR sit3✖/64 OR 5✖/64
tunnelbroker.chifupdown OR ifupdown2v4tunnel OR sit3✖/64
ip4market.ruifupdown OR ifupdown2v4tunnel OR sit1✖/64
netassist.uaifupdown OR ifupdown2v4tunnel OR sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipipcustom

The free platform only solves the problem that IPV6 is not available, it does not provide premium IPV6 bandwidth.

If you need high quality bandwidth, please build your own tunnel. When both ifupdown and ifupdown2 are available, try ifupdown first to see if it can be installed successfully, otherwise install ifupdown2.

After the installation is complete, select which package is installed behind to convert the format.

Initial environment modifications

Execute

touch /etc/cloud/cloud-init.disabled

Turn off the automated overwrite of cloud-init first, and then to see what the local machine is using to manage the network, run

systemctl is-active systemd-networkd

and

systemctl is-active networking

See which case this falls into, if it's the former active and the latter inactive, you need to reinstall/DD a system that isn't configured this way, or switch the local machine to use ifupdown/ifupdown2 to manage network execution

# Judge for yourself whether you need to disable the original network management or not
+# systemctl stop systemd-networkd
+# systemctl disable systemd-networkd
+# systemctl stop systemd-networkd.socket
+# systemctl disable systemd-networkd.socket

If you want to install ifupdown to control the network, this tool is available on all major linux systems.

apt-get install ifupdown -y

If you want to install ifupdown2 for network management, which is generally only available on debian systems, you can install

apt-get install ifupdown2 -y

After the installation is complete, select which package is installed behind to convert the format.

systemctl start networking
+systemctl enable networking

Then restart the server, check whether the machine's network will be rebooted due to the modification of the case of loss of connection, and runuptimeto observe that the startup has been more than 1 minute before proceeding to the next steps

If it is inactive and active, there is no need to switch the network management program and you can proceed directly to the next step.

Since some servers have default intranet IPV6 routes that will conflict with the tunnel, you can use the following command to remove the default IPV6 routes

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

This assumes that your client's server's default NIC is eth0, you can use ip -6 route to see the default route and replace it, the default route starts with default via, and uses dev to specify the default NIC, you just need to find it according to this rule

Currently supported platforms

tunnelbroker_net

Combined with a script that opens containers with IPV6 addresses with a single click, you can attach an IPV6 address from he to each container

The downside is that the addresses are dark/dirty, and cloudflare's cdn will most likely not be able to latch on, test it yourself

  1. Register an account at https://tunnelbroker.net/ and clickCreate Regular Tunnelon the left.

1

  1. Fill in your server's IPV4 address in the red box, choose a connection point that is physically close to your server, for example, if your machine is in Los Angeles, choose a connection point on the west coast of the United States, and then clickCreate Tunnelto create the tunnel when you are prompted by the green box!

2

3

4

  1. Wait for the following screen, clickExample Configurationsand select the corresponding system, for example, the host of incus is definitely Debian/Ubuntu.

5

6

  1. The boxed part is the file to be modified and the content to be filled in.

7

  1. Exchange the format of the command then add IPV6 settings to your network configuration file.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerNet, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
+# Here, copy and paste the contents of the configuration file in the red box, and then run this command.
+EOF

Then you can usecat /etc/network/interfacesto see if the configuration file is written correctly.

  1. If all of the above is OK, then you need to enable the network interfaces
apt-get install net-tools iproute2 -y
+systemctl restart networking
  1. Then you can test the IP address of the network interface.

Execute theifconfigcommand, and there should be a he-ipv6 interface, similar to the following:

8

Or execute:

curl ipv6.ip.sb

Returns the IPV6 address you bound to

  1. Additional settings for NAT VPS

IPv4 NAT VPS may require some additional settings beyond the IP replacement operation mentioned earlier, otherwise it may still not be able to access the IPv6 network.

apt-get install ufw -y
+ufw allow 41

Add the relevant routing rules

route -A inet6 add ::/0 dev he-ipv6
  1. If the IPV6 network is no longer needed and you want to delete it, delete the he-ipv6 network interface configuration.

If you want to delete the he-ipv6 network interface configuration (if not, it will be enabled automatically after reboot), remember to modify the/etc/network/interfacesfile to remove the content added in the red box before.

Then reboot the server to remove the

tunnelbroker_ch

Similar to the above, first register an account at https://www.tunnelbroker.ch/ and click on the activation email after registering.

Then you have to fill in the IPV4 address of your server.

After creating an account, you need to go to the Config page instead of the details page.

Don't use the following page, first refresh the page without the light blue box and then stop refreshing it

Don't stop refreshing after the light blue box pops up

Record the content of the last red box on the following page, and prepare to modify the host configuration file.

Copy the last red box of the page without the blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerCh, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

ip4market_ru

Similar to the above, first register an account at https://tb.ip4market.ru, the registered email address must be an unseen email address, the phone number can be written randomly without verification, and the IP address should be the IPV4 address of the host you want to attach.

The IP address is the IPV4 address of the host computer you are attaching to

Then you have to go through Recaptcha's human-machine verification, and click register.

You will receive an activation email with your password, memorize it.

Then login on the homepage

Then you will be taken to this page

Hold down the right button and copy the four lines framed in red, which are

Server IPv4.
+Client IPv4
+Server IPv6
+Client IPv6

For these four lines, press ctrl+c to copy or right-click to copy

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforip4market, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the formatting

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

netassist_ua

Similar to the above operation, first in https://tb.netassist.ua/ register an account first, after registration, click on the activation of the mail, the activation page will have a password display, remember to record!

Then fill in the IPV4 address of your server, you can change it later, just fill in a random one first.

Then you will get to this page

a

The first red box is the location of your host's IPV4 address, if you want to modify it, modify it there, and then click change to save.

The second red box is for```Linux``, and then click on show

b

The above content will appear, copy all the boxed parts without blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforNetAssist, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then click onCovertto convert the formatting

c

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

Transfer IPV6 subnets between different servers

Related repository: https://github.com/oneclickvirt/6in4

This method will provide a way to split a /80 out of the IPV6 segment on A and attach it to B to use.

Features

  • Self-built IPv6 tunnel for sit/gre/ipip protocols
  • Support to customize the IPV6 subnet size to be cut out, and the appropriate IPV6 subnet information in CIDR format will be calculated automatically.
  • Automatically recognizes the IPV6 subnet size of the server side
  • will automatically set up the tunnel server and print the commands that the client needs to execute
  • Setting up the IPV6 tunnel is easy to understand and easy to remove

Environmental Preparation

VPS(A)VPS(B)
one IPV4 address (server_ipv4)one IPV4 address (clinet_ipv4)
one IPV6 subnetno IPV6 address
Hereafter referred to as serverHereafter referred to as client

Usage

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

Execute it

./6in4.sh client_ipv4 <mode_type> <subnet_size>
OptionsOptional Option 1Optional Option 2Optional Option 3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type> only support those three protocols for now, the more advanced the more recommended, no fill in the default is sit protocol

<subnet_size> as long as it is larger than the original system subnet mask, and is a multiple of 8, if you don't fill it in, it defaults to 80.

Remember to replace client_ipv4 with the IPV4 address of the machine you want to attach IPV6 to, and the command you need to execute on the client side will be sent back to you after execution, see the instructions after execution for details.

To prevent you from forgetting to copy the commands, the commands themselves will be written to the 6in4.log file under the current path, you can use cat 6in4.log to query the commands that need to be executed on the client side

For copied commands, be sure to select option 6in4 in https://ipv6tunnel.spiritlhl.top/ before converting!

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify here
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

Check server status

systemctl status ndpresponder
ip addr show

Check client status

ip addr show
curl ipv6.ip.sb

Delete tunnel

server

ip link set server-ipv6 down
+ip tunnel del server-ipv6

client

ip link set user-ipv6 down
+ip tunnel del user-ipv6

The above deletion is only temporary, for permanent deletion you must modify and delete the contents of the /etc/network/interfaces file that you have previously added.

one more thing

In fact https://tunnelbroker.net/ supports the application of IPV6 subnets of size /48

Make the request here, then when converting the format change the original /64 IPV6 address to a /48 IPV6 address and you'll get a larger IPV6 subnet!

Supplemental CloudFlare WARP IPv4 / IPv6 outbound

1: Benefits

  • By installing it on the host machine, all enabled machines can benefit from the advantages of Warp without the need for individual configurations, thus saving resources and simplifying management.
  • The use of kernel WireGuard on the host machine enables more efficient operation of WireGuard compared to user-space WireGuard-Go.

2: Manual Installation

2-1 Installing WireGuard Dependencies

  • Debian and Ubuntu systems
# Update dependent libraries
+apt update -y
+
+# Install WireGuard runtime dependencies
+apt install -y --no-install-recommends net-tools openresolv dnsutils
+
+# Install WireGuard protocol-compatible toolset
+apt install -y --no-install-recommends wireguard-tools
  • CentOS systems
# Update dependent libraries
+yum update -y
+
+# Install additional package components
+yum install -y epel-release 
+
+# Install WireGuard runtime dependencies
+yum install -y net-tools
+
+# Install WireGuard protocol-compatible toolset
+yum install -y wireguard-tools

2-2 Getting warp account information

Visit https://warp.cloudflare.now.cc/?run=register&format=yaml and record private_key, v6 2 values

image.png

2-3: Modifying Configuration Files

  • Create and edit the /etc/wireguard/warp.conf file, replacing any parts that contain <> (pointy brackets) together, just to make it look obvious.

  • For IPv4-only hosts, Warp takes over IPv6 egress only

shell
[Interface]
+PrivateKey = <Your PrivateKey>
+Address = 172.16.0.2/32
+Address = <Your Address-v6 >/128
+DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = ::/0
+Endpoint = 162.159.193.10:2408
  • For IPv6 only hosts, Warp takes over IPv4 egress only.
shell
[Interface]
+PrivateKey = <Your PrivateKey>
+Address = 172.16.0.2/32
+Address = <Your Address-v6>/128
+DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = 0.0.0.0/0
+Endpoint = [2606:4700:d0::a29f:c101]:2408
  • There's no need to target dual-stack, after all, native network outlets are better than relaying through Warp

2-4: Setting the Address Resolution Priority

For IPv4-only host machines, Warp only takes control of the IPv6 outbound, prioritizing the use of the native network's IPv4 outbound.

shell
# IPv4 priority
+grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf

For IPv6-only host machines, Warp only takes control of the IPv4 outbound, prioritizing the use of the native network's IPv6 outbound.

shell
# IPv6 priority
+sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

2-5: Connecting to Warp and setting up the systemd process daemon

# Run wireguard to connect to Warp. If this step gets stuck and causes the connection to be lost, reboot the host in the background to resolve it.
+wg-quick up warp
+
+# Check IPv4
+curl -A a https://api-ipv4.ip.sb/geoip
+
+# Check IPv6
+curl -A a https://api-ipv6.ip.sb/geoip
+
+# Disconnect from Warp after successful test.
+wg-quick down warp
+
+# Reconnect and set process daemon to take effect automatically after reboot.
+systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',198)]))}const S=s(B,[["render",I]]);export{D as __pageData,S as default}; diff --git a/assets/en_guide_incus_incus_custom.md.CsWNjjxG.lean.js b/assets/en_guide_incus_incus_custom.md.CsWNjjxG.lean.js new file mode 100644 index 0000000000..e9aa589219 --- /dev/null +++ b/assets/en_guide_incus_incus_custom.md.CsWNjjxG.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",p="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",o="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",c="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",b="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",v="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_custom.md","filePath":"en/guide/incus/incus_custom.md","lastUpdated":1772424525000}'),B={name:"en/guide/incus/incus_custom.md"};function I(q,e,T,V,A,z){return n(),a("div",null,e[0]||(e[0]=[t("",198)]))}const S=s(B,[["render",I]]);export{D as __pageData,S as default}; diff --git a/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.js b/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.js deleted file mode 100644 index 1324a0e7d9..0000000000 --- a/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_extra_config.md","filePath":"en/guide/incus/incus_extra_config.md","lastUpdated":1772422214000}'),e={name:"en/guide/incus/incus_extra_config.md"};function l(p,s,h,o,r,k){return t(),a("div",null,s[0]||(s[0]=[n(`

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for incus containers created with incus.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
-ip6tables-legacy -t nat -F PREROUTING
-ip6tables-save > /etc/iptables/rules.v6
-netfilter-persistent save
-netfilter-persistent reload
-service netfilter-persistent restart

Uninstall the IPV6 address binding daemon and corresponding files

shell
systemctl stop add-ipv6.service
-systemctl disable add-ipv6.service
-rm /etc/systemd/system/add-ipv6.service
-systemctl daemon-reload
-rm /usr/local/bin/add-ipv6.sh

One-click Installation of Common Pre-configured Environment for incus Hosts with vnstat Integration

  • (Optional, this script is only for easy monitoring integration with the site, it's fine if you choose not to install)

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

One-Click Installation of the official incus Visualization Dashboard

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
shell
apt-get install -y incus-ui-canonical
-incus config set core.https_address [::]

Then you can type in your browser

https://your_public_ipv4_address:8443

You can enter the official visualization panel, subsequent operation configuration in accordance with the UI prompts can be operated.

If you receive a prompt stating that the UI installation package cannot be found, this indicates that your previous installation utilized the official Incus repository rather than the Zabbly repository.

In this case, you need to add an additional repository. Assuming you are using Debian 13, you can add the repository using the following command before attempting the installation again:

shell
sudo -i
-mkdir -p /etc/apt/keyrings/
-curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
-sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
-Enabled: yes
-Types: deb
-URIs: https://pkgs.zabbly.com/incus/stable
-Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
-Components: main
-Architectures: $(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/zabbly.gpg
-EOF'
-apt-get update

For instructions on adding sources to other systems, refer to the official repository documentation at https://github.com/zabbly/incus?tab=readme-ov-file#installation.

`,33)]))}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.lean.js b/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.lean.js deleted file mode 100644 index c88f05bcf5..0000000000 --- a/assets/en_guide_incus_incus_extra_config.md.Dp3fBZKT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_extra_config.md","filePath":"en/guide/incus/incus_extra_config.md","lastUpdated":1772422214000}'),e={name:"en/guide/incus/incus_extra_config.md"};function l(p,s,h,o,r,k){return t(),a("div",null,s[0]||(s[0]=[n("",33)]))}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.js b/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.js new file mode 100644 index 0000000000..141e0b8f51 --- /dev/null +++ b/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.js @@ -0,0 +1,23 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_extra_config.md","filePath":"en/guide/incus/incus_extra_config.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_extra_config.md"};function l(p,s,h,r,o,d){return n(),a("div",null,s[0]||(s[0]=[e(`

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for incus containers created with incus.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
+ip6tables-legacy -t nat -F PREROUTING
+ip6tables-save > /etc/iptables/rules.v6
+netfilter-persistent save
+netfilter-persistent reload
+service netfilter-persistent restart

Uninstall the IPV6 address binding daemon and corresponding files

shell
systemctl stop add-ipv6.service
+systemctl disable add-ipv6.service
+rm /etc/systemd/system/add-ipv6.service
+systemctl daemon-reload
+rm /usr/local/bin/add-ipv6.sh

One-click Installation of Common Pre-configured Environment for incus Hosts with vnstat Integration

  • (Optional, this script is only for easy monitoring integration with the site, it's fine if you choose not to install)

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

One-Click Installation of the official incus Visualization Dashboard

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
shell
apt-get install -y incus-ui-canonical
+incus config set core.https_address [::]

Then you can type in your browser

https://your_public_ipv4_address:8443

You can enter the official visualization panel, subsequent operation configuration in accordance with the UI prompts can be operated.

If you receive a prompt stating that the UI installation package cannot be found, this indicates that your previous installation utilized the official Incus repository rather than the Zabbly repository.

In this case, you need to add an additional repository. Assuming you are using Debian 13, you can add the repository using the following command before attempting the installation again:

shell
sudo -i
+mkdir -p /etc/apt/keyrings/
+curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
+sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
+Enabled: yes
+Types: deb
+URIs: https://pkgs.zabbly.com/incus/stable
+Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
+Components: main
+Architectures: $(dpkg --print-architecture)
+Signed-By: /etc/apt/keyrings/zabbly.gpg
+EOF'
+apt-get update

For instructions on adding sources to other systems, refer to the official repository documentation at https://github.com/zabbly/incus?tab=readme-ov-file#installation.

`,33)]))}const u=i(t,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.lean.js b/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.lean.js new file mode 100644 index 0000000000..dc7035b764 --- /dev/null +++ b/assets/en_guide_incus_incus_extra_config.md.Dr1qTPcl.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_extra_config.md","filePath":"en/guide/incus/incus_extra_config.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_extra_config.md"};function l(p,s,h,r,o,d){return n(),a("div",null,s[0]||(s[0]=[e("",33)]))}const u=i(t,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_install.md.B8Wed1_H.js b/assets/en_guide_incus_incus_install.md.B8Wed1_H.js deleted file mode 100644 index 1b8babc54a..0000000000 --- a/assets/en_guide_incus_incus_install.md.B8Wed1_H.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_install.md","filePath":"en/guide/incus/incus_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_install.md"};function l(o,s,p,h,r,d){return i(),e("div",null,s[0]||(s[0]=[t(`

Incus

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus One-Click Installation Guide

WARNING

If this is a new server, make sure that both update and curl are working properly before executing this script.

  • Prerequisites: Ubuntu 20+(Not recommended to use Incus, please use LXD), Debian 11+(Recommended), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

OR

shell
bash incus_install.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

TIP

The execution process may require a manual reboot to load the storage type into the kernel, the installation is completed at the end of the execution will automatically reboot the server, the first time after the complete installation of the reboot will take about 400 ~ 500 seconds, please be patient

WARNING

If you need to open more than 200 Incus containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Manual Installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic Incus installation process.

Disable Firewall

bash
apt update
-apt install curl wget sudo dos2unix ufw jq -y
-ufw disable

Enabling Virtual Memory SWAP

The amount of memory depends on how many instances you want to run. If you want to run 8 instances and calculate, you'll need 2GB of memory. If your actual physical memory is 512MB, you'll need an additional 1.5GB. To be cautious, allocate 2GB of virtual memory.

Execute the following commands: Enter '1', then enter '2048'. This signifies allocating 2GB of virtual memory.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

Installing incus

sudo -i
-mkdir -p /etc/apt/keyrings/
-curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
-sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
-Enabled: yes
-Types: deb
-URIs: https://pkgs.zabbly.com/incus/stable
-Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
-Components: main
-Architectures: $(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/zabbly.gpg
-EOF'
-apt-get update
-apt-get install incus -y
-incus -h

If there are no exceptions, continue execution

incus admin init

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

`,39)]))}const k=a(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_install.md.B8Wed1_H.lean.js b/assets/en_guide_incus_incus_install.md.B8Wed1_H.lean.js deleted file mode 100644 index a93b42a198..0000000000 --- a/assets/en_guide_incus_incus_install.md.B8Wed1_H.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_install.md","filePath":"en/guide/incus/incus_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_install.md"};function l(o,s,p,h,r,d){return i(),e("div",null,s[0]||(s[0]=[t("",39)]))}const k=a(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_install.md.hdIbk1po.js b/assets/en_guide_incus_incus_install.md.hdIbk1po.js new file mode 100644 index 0000000000..c208c19c6a --- /dev/null +++ b/assets/en_guide_incus_incus_install.md.hdIbk1po.js @@ -0,0 +1,17 @@ +import{_ as a,c as e,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_install.md","filePath":"en/guide/incus/incus_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_install.md"};function l(p,s,o,r,h,d){return i(),e("div",null,s[0]||(s[0]=[n(`

Incus

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus One-Click Installation Guide

WARNING

If this is a new server, make sure that both update and curl are working properly before executing this script.

  • Prerequisites: Ubuntu 20+(Not recommended to use Incus, please use LXD), Debian 11+(Recommended), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

OR

shell
bash incus_install.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

TIP

The execution process may require a manual reboot to load the storage type into the kernel, the installation is completed at the end of the execution will automatically reboot the server, the first time after the complete installation of the reboot will take about 400 ~ 500 seconds, please be patient

WARNING

If you need to open more than 200 Incus containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Manual Installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic Incus installation process.

Disable Firewall

bash
apt update
+apt install curl wget sudo dos2unix ufw jq -y
+ufw disable

Enabling Virtual Memory SWAP

The amount of memory depends on how many instances you want to run. If you want to run 8 instances and calculate, you'll need 2GB of memory. If your actual physical memory is 512MB, you'll need an additional 1.5GB. To be cautious, allocate 2GB of virtual memory.

Execute the following commands: Enter '1', then enter '2048'. This signifies allocating 2GB of virtual memory.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

Installing incus

sudo -i
+mkdir -p /etc/apt/keyrings/
+curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
+sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
+Enabled: yes
+Types: deb
+URIs: https://pkgs.zabbly.com/incus/stable
+Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
+Components: main
+Architectures: $(dpkg --print-architecture)
+Signed-By: /etc/apt/keyrings/zabbly.gpg
+EOF'
+apt-get update
+apt-get install incus -y
+incus -h

If there are no exceptions, continue execution

incus admin init

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

`,39)]))}const m=a(t,[["render",l]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_incus_incus_install.md.hdIbk1po.lean.js b/assets/en_guide_incus_incus_install.md.hdIbk1po.lean.js new file mode 100644 index 0000000000..fc79ef40ce --- /dev/null +++ b/assets/en_guide_incus_incus_install.md.hdIbk1po.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_install.md","filePath":"en/guide/incus/incus_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_install.md"};function l(p,s,o,r,h,d){return i(),e("div",null,s[0]||(s[0]=[n("",39)]))}const m=a(t,[["render",l]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_incus_incus_lxc.md.DrEuefPO.js b/assets/en_guide_incus_incus_lxc.md.DrEuefPO.js deleted file mode 100644 index 539b84dc47..0000000000 --- a/assets/en_guide_incus_incus_lxc.md.DrEuefPO.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Running LXC Container in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_lxc.md","filePath":"en/guide/incus/incus_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_lxc.md"};function h(l,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[e(`

Running LXC Container in Incus

Images available for creating LXC Containers

A portion of the available system parameters are shown here for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually opened out of the Stream version)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (CGroupV1 needs to be enabled in GRUB or it won't start.)
  • kali,archlinux
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

TIP

The version number has ended the long-term maintenance of the general no longer have an official mirror, temporarily did not find the archive address of the historical mirror, if you find welcome to leave a message I will add support!

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Download script

Downloading the boot script is NOT REQUIRED, if you have used the command to install incus with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian11)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port\`\` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that \`\`\`can't be null, and it needs to be set to 0 if it's not to be mapped.

Support custom container system, do not fill in the leave blank default use debian11, pay attention to the incoming parameters for the system name + version number

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
incus stop test
-incus delete test
-rm -rf test
-rm -rf test_v6
-ls

Normal version batch generation

Opened Chick Configuration:

  • 1 core 256MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • With 1 SSH port, 24 extranet ports
  • Default memory and hard disk size

TIP

incus if the command is no problem, the execution of the initialization of the opening of the containers, this step is best to put \`\`\`screen\`\` in the background to suspend the execution of the opening of the containers, the length of time with you to open a few and the mother hen configuration-related

Execute the following command to load the boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

The following command opens 10 chicks with the name prefix tj.

shell
./init.sh tj 10

Sometimes there is a problem with the path where init.sh is run, in this case it is recommended to add sudo in front of it to force it to run in the root directory

Bulk generation of pure SSH port versions

Opened Chick Configuration:

  • 1 core 128MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • Only one SSH port
  • Unable to mount warp

TIP

incus if the command is no problem, the execution of the initialization of the opening of the chick, this step is best to put the \`\`\`screen\`\` in the background to hang the execution of the opening of the chick, the length of time you open the chick with the opening of a few and the mother hen configuration-related

Load boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

The last line of the following command opens 10 chicks with the chick name prefix tj

shell
./least.sh tj 10

Sometimes there is a problem with the path where last.sh is run, in this case it is recommended to force the root directory to run by adding sudo in front of it.

Custom Batch Generation of Versions

  • Customizable memory and hard disk sizes
  • It's also fine if you have manually executed the above batch generation before; the configuration inherits without overwriting

If you need to batch-generate containers multiple times, you can use the following:

Command:

curl -L https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

Can be run multiple times to batch generate chicks, and inherit the previous part has been generated in the back to add, customizable memory and hard disk size

View the information of the batch opened chicks

After opening the chicks, the specific information will be generated in the log file in the current directory, with the following format

shell
container_1_Name Password SSH_Port Public_Port_Start Public_Port_End
-container_2_Name Password SSH_Port Public_Port_Start Public_Port_End

To view it, simply print the log file by executing the following command in the current directory

shell
cat log

WARNING

Don't use the chicks opened by this script as a production environment, incus virtualization doesn't support changing kernel, dd, turning on bbr, etc.

Some common incus commands

View all containers:

bash
incus list

View details of a specific container:

bash
incus info container_name

Start a specific container:

bash
incus start container_name

Stop a specific container:

bash
incus stop container_name

Delete a specific container:

bash
incus delete -f container_name

Enter the container's shell:

bash
incus exec container_name /bin/bash

TIP

Instead of /bin/bash, you can use /bin/sh in alpine, which is /bin/bash on regular systems.

To exit, type \`\`\`exit\`\` and enter.

Delete all incus containers

bash
incus list -c n --format csv | xargs -I {} incus delete -f {}

Perform deletion of useless logs within a container

bash
sudo apt-get autoremove
-sudo apt-get clean
-sudo find /var/log -type f -delete
-sudo find /var/tmp -type f -delete
-sudo find /tmp -type f -delete
-sudo find /var/cache/apt/archives -type f -delete

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/config.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/config.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/buildct.sh
-rm -rf /root/add_more.sh
-rm -rf /root/build_ipv6_network.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

`,85)]))}const g=i(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_lxc.md.DrEuefPO.lean.js b/assets/en_guide_incus_incus_lxc.md.DrEuefPO.lean.js deleted file mode 100644 index 4bf351c0a6..0000000000 --- a/assets/en_guide_incus_incus_lxc.md.DrEuefPO.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Running LXC Container in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_lxc.md","filePath":"en/guide/incus/incus_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_lxc.md"};function h(l,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[e("",85)]))}const g=i(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_lxc.md._bTip1Ub.js b/assets/en_guide_incus_incus_lxc.md._bTip1Ub.js new file mode 100644 index 0000000000..b6a48395d5 --- /dev/null +++ b/assets/en_guide_incus_incus_lxc.md._bTip1Ub.js @@ -0,0 +1,25 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Running LXC Container in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_lxc.md","filePath":"en/guide/incus/incus_lxc.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_lxc.md"};function l(h,s,p,r,o,d){return e(),a("div",null,s[0]||(s[0]=[n(`

Running LXC Container in Incus

Images available for creating LXC Containers

A portion of the available system parameters are shown here for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually opened out of the Stream version)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (CGroupV1 needs to be enabled in GRUB or it won't start.)
  • kali,archlinux
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

TIP

The version number has ended the long-term maintenance of the general no longer have an official mirror, temporarily did not find the archive address of the historical mirror, if you find welcome to leave a message I will add support!

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Download script

Downloading the boot script is NOT REQUIRED, if you have used the command to install incus with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian11)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port\`\` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that \`\`\`can't be null, and it needs to be set to 0 if it's not to be mapped.

Support custom container system, do not fill in the leave blank default use debian11, pay attention to the incoming parameters for the system name + version number

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
incus stop test
+incus delete test
+rm -rf test
+rm -rf test_v6
+ls

Normal version batch generation

Opened Chick Configuration:

  • 1 core 256MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • With 1 SSH port, 24 extranet ports
  • Default memory and hard disk size

TIP

incus if the command is no problem, the execution of the initialization of the opening of the containers, this step is best to put \`\`\`screen\`\` in the background to suspend the execution of the opening of the containers, the length of time with you to open a few and the mother hen configuration-related

Execute the following command to load the boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

The following command opens 10 chicks with the name prefix tj.

shell
./init.sh tj 10

Sometimes there is a problem with the path where init.sh is run, in this case it is recommended to add sudo in front of it to force it to run in the root directory

Bulk generation of pure SSH port versions

Opened Chick Configuration:

  • 1 core 128MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • Only one SSH port
  • Unable to mount warp

TIP

incus if the command is no problem, the execution of the initialization of the opening of the chick, this step is best to put the \`\`\`screen\`\` in the background to hang the execution of the opening of the chick, the length of time you open the chick with the opening of a few and the mother hen configuration-related

Load boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

The last line of the following command opens 10 chicks with the chick name prefix tj

shell
./least.sh tj 10

Sometimes there is a problem with the path where last.sh is run, in this case it is recommended to force the root directory to run by adding sudo in front of it.

Custom Batch Generation of Versions

  • Customizable memory and hard disk sizes
  • It's also fine if you have manually executed the above batch generation before; the configuration inherits without overwriting

If you need to batch-generate containers multiple times, you can use the following:

Command:

curl -L https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

Can be run multiple times to batch generate chicks, and inherit the previous part has been generated in the back to add, customizable memory and hard disk size

View the information of the batch opened chicks

After opening the chicks, the specific information will be generated in the log file in the current directory, with the following format

shell
container_1_Name Password SSH_Port Public_Port_Start Public_Port_End
+container_2_Name Password SSH_Port Public_Port_Start Public_Port_End

To view it, simply print the log file by executing the following command in the current directory

shell
cat log

WARNING

Don't use the chicks opened by this script as a production environment, incus virtualization doesn't support changing kernel, dd, turning on bbr, etc.

Some common incus commands

View all containers:

bash
incus list

View details of a specific container:

bash
incus info container_name

Start a specific container:

bash
incus start container_name

Stop a specific container:

bash
incus stop container_name

Delete a specific container:

bash
incus delete -f container_name

Enter the container's shell:

bash
incus exec container_name /bin/bash

TIP

Instead of /bin/bash, you can use /bin/sh in alpine, which is /bin/bash on regular systems.

To exit, type \`\`\`exit\`\` and enter.

Delete all incus containers

bash
incus list -c n --format csv | xargs -I {} incus delete -f {}

Perform deletion of useless logs within a container

bash
sudo apt-get autoremove
+sudo apt-get clean
+sudo find /var/log -type f -delete
+sudo find /var/tmp -type f -delete
+sudo find /tmp -type f -delete
+sudo find /var/cache/apt/archives -type f -delete

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/config.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/config.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/buildct.sh
+rm -rf /root/add_more.sh
+rm -rf /root/build_ipv6_network.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

`,85)]))}const u=i(t,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_lxc.md._bTip1Ub.lean.js b/assets/en_guide_incus_incus_lxc.md._bTip1Ub.lean.js new file mode 100644 index 0000000000..5a82805c50 --- /dev/null +++ b/assets/en_guide_incus_incus_lxc.md._bTip1Ub.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Running LXC Container in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_lxc.md","filePath":"en/guide/incus/incus_lxc.md","lastUpdated":1772424525000}'),t={name:"en/guide/incus/incus_lxc.md"};function l(h,s,p,r,o,d){return e(),a("div",null,s[0]||(s[0]=[n("",85)]))}const u=i(t,[["render",l]]);export{c as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.lean.js b/assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.lean.js deleted file mode 100644 index ca22aa2272..0000000000 --- a/assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as n,o,ag as a}from"./chunks/framework.CSeR4K32.js";const p=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_precheck.md","filePath":"en/guide/incus/incus_precheck.md","lastUpdated":1772422214000}'),r={name:"en/guide/incus/incus_precheck.md"};function i(s,e,c,d,h,l){return o(),n("div",null,e[0]||(e[0]=[a("",15)]))}const m=t(r,[["render",i]]);export{p as __pageData,m as default}; diff --git a/assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.js b/assets/en_guide_incus_incus_precheck.md.DBBM44YS.js similarity index 84% rename from assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.js rename to assets/en_guide_incus_incus_precheck.md.DBBM44YS.js index d88b07635b..f3a5bd863f 100644 --- a/assets/en_guide_incus_incus_precheck.md.Ckl7PFsr.js +++ b/assets/en_guide_incus_incus_precheck.md.DBBM44YS.js @@ -1 +1 @@ -import{_ as t,c as n,o,ag as a}from"./chunks/framework.CSeR4K32.js";const p=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_precheck.md","filePath":"en/guide/incus/incus_precheck.md","lastUpdated":1772422214000}'),r={name:"en/guide/incus/incus_precheck.md"};function i(s,e,c,d,h,l){return o(),n("div",null,e[0]||(e[0]=[a('

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/incus

Requirements

Hardware requirements.

  • System: Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Virtualization: KVM, VMWARE recommended.
  • CPU: The number of cores should be greater than or equal to 2, otherwise there may be a kernel idling slice cycle resulting in 100% occupancy
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the Github raw page on the line

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu24 and Debian12, other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open incus containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for incus containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
',15)]))}const m=t(r,[["render",i]]);export{p as __pageData,m as default}; +import{_ as t,c as n,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const p=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_precheck.md","filePath":"en/guide/incus/incus_precheck.md","lastUpdated":1772424525000}'),a={name:"en/guide/incus/incus_precheck.md"};function i(s,e,c,d,l,h){return o(),n("div",null,e[0]||(e[0]=[r('

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/incus

Requirements

Hardware requirements.

  • System: Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Virtualization: KVM, VMWARE recommended.
  • CPU: The number of cores should be greater than or equal to 2, otherwise there may be a kernel idling slice cycle resulting in 100% occupancy
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the Github raw page on the line

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu24 and Debian12, other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open incus containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for incus containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
',15)]))}const m=t(a,[["render",i]]);export{p as __pageData,m as default}; diff --git a/assets/en_guide_incus_incus_precheck.md.DBBM44YS.lean.js b/assets/en_guide_incus_incus_precheck.md.DBBM44YS.lean.js new file mode 100644 index 0000000000..ac13f3dbb2 --- /dev/null +++ b/assets/en_guide_incus_incus_precheck.md.DBBM44YS.lean.js @@ -0,0 +1 @@ +import{_ as t,c as n,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const p=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_precheck.md","filePath":"en/guide/incus/incus_precheck.md","lastUpdated":1772424525000}'),a={name:"en/guide/incus/incus_precheck.md"};function i(s,e,c,d,l,h){return o(),n("div",null,e[0]||(e[0]=[r("",15)]))}const m=t(a,[["render",i]]);export{p as __pageData,m as default}; diff --git a/assets/en_guide_incus_incus_qa.md.GseGoNjL.js b/assets/en_guide_incus_incus_qa.md.GseGoNjL.js new file mode 100644 index 0000000000..8c4f727e26 --- /dev/null +++ b/assets/en_guide_incus_incus_qa.md.GseGoNjL.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qa.md","filePath":"en/guide/incus/incus_qa.md","lastUpdated":1772424525000}'),n={name:"en/guide/incus/incus_qa.md"};function r(l,s,o,h,p,d){return a(),i("div",null,s[0]||(s[0]=[t('

Solve the puzzle

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both Incus and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause Incus to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus has high CPU usage on single-core hosts after long-term use

This high CPU usage is native to Incus, there is no workaround for it, and it can only be reproduced on single-core hosts, so you don't need to bother with multi-core hosts.

You need to install a timed task to detect and fix the problem, and check the usage every 5 minutes to see if you need to restart the Incus back-end.

  • Download
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart. sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • Installation
bash
bash incus_fixed_restart.sh install

will be copied to /usr/local/bin/incus_fixed_restart.sh and written to cron to run every minute.

  • Uninstall
bash
bash incus_fixed_restart.sh uninstall

Removes cron tasks, script files, log files, and count files.

  • Runs normally (called by cron)
bash
/usr/local/bin/incus_fixed_restart.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

',30)]))}const k=e(n,[["render",r]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qa.md.GseGoNjL.lean.js b/assets/en_guide_incus_incus_qa.md.GseGoNjL.lean.js new file mode 100644 index 0000000000..a7824ab72c --- /dev/null +++ b/assets/en_guide_incus_incus_qa.md.GseGoNjL.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qa.md","filePath":"en/guide/incus/incus_qa.md","lastUpdated":1772424525000}'),n={name:"en/guide/incus/incus_qa.md"};function r(l,s,o,h,p,d){return a(),i("div",null,s[0]||(s[0]=[t("",30)]))}const k=e(n,[["render",r]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qa.md.P4UmWQEI.js b/assets/en_guide_incus_incus_qa.md.P4UmWQEI.js deleted file mode 100644 index 4532039144..0000000000 --- a/assets/en_guide_incus_incus_qa.md.P4UmWQEI.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qa.md","filePath":"en/guide/incus/incus_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_qa.md"};function o(h,s,l,p,r,d){return a(),i("div",null,s[0]||(s[0]=[t('

Solve the puzzle

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both Incus and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause Incus to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus has high CPU usage on single-core hosts after long-term use

This high CPU usage is native to Incus, there is no workaround for it, and it can only be reproduced on single-core hosts, so you don't need to bother with multi-core hosts.

You need to install a timed task to detect and fix the problem, and check the usage every 5 minutes to see if you need to restart the Incus back-end.

  • Download
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart. sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • Installation
bash
bash incus_fixed_restart.sh install

will be copied to /usr/local/bin/incus_fixed_restart.sh and written to cron to run every minute.

  • Uninstall
bash
bash incus_fixed_restart.sh uninstall

Removes cron tasks, script files, log files, and count files.

  • Runs normally (called by cron)
bash
/usr/local/bin/incus_fixed_restart.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

',30)]))}const k=e(n,[["render",o]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qa.md.P4UmWQEI.lean.js b/assets/en_guide_incus_incus_qa.md.P4UmWQEI.lean.js deleted file mode 100644 index 780914970b..0000000000 --- a/assets/en_guide_incus_incus_qa.md.P4UmWQEI.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qa.md","filePath":"en/guide/incus/incus_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_qa.md"};function o(h,s,l,p,r,d){return a(),i("div",null,s[0]||(s[0]=[t("",30)]))}const k=e(n,[["render",o]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.js b/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.js new file mode 100644 index 0000000000..aeb63f4d80 --- /dev/null +++ b/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.js @@ -0,0 +1,5 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Running QEMU Virtualized Linux Virtual Machines in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qemu.md","filePath":"en/guide/incus/incus_qemu.md","lastUpdated":1772424525000}'),n={name:"en/guide/incus/incus_qemu.md"};function l(r,s,h,d,p,o){return a(),i("div",null,s[0]||(s[0]=[t(`

Running QEMU Virtualized Linux Virtual Machines in Incus

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
incus console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
incus stop -f test
+incus delete -f test
+rm -rf test
+rm -rf test_v6
+ls
`,31)]))}const k=e(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.lean.js b/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.lean.js new file mode 100644 index 0000000000..121de98f23 --- /dev/null +++ b/assets/en_guide_incus_incus_qemu.md.BgVQYDz-.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Running QEMU Virtualized Linux Virtual Machines in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qemu.md","filePath":"en/guide/incus/incus_qemu.md","lastUpdated":1772424525000}'),n={name:"en/guide/incus/incus_qemu.md"};function l(r,s,h,d,p,o){return a(),i("div",null,s[0]||(s[0]=[t("",31)]))}const k=e(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.js b/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.js deleted file mode 100644 index b9e43116d4..0000000000 --- a/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running QEMU Virtualized Linux Virtual Machines in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qemu.md","filePath":"en/guide/incus/incus_qemu.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_qemu.md"};function l(r,s,h,d,p,o){return a(),e("div",null,s[0]||(s[0]=[t(`

Running QEMU Virtualized Linux Virtual Machines in Incus

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
incus console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
incus stop -f test
-incus delete -f test
-rm -rf test
-rm -rf test_v6
-ls
`,31)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.lean.js b/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.lean.js deleted file mode 100644 index c7eb73943b..0000000000 --- a/assets/en_guide_incus_incus_qemu.md.BqEmO0PA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Running QEMU Virtualized Linux Virtual Machines in Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/incus/incus_qemu.md","filePath":"en/guide/incus/incus_qemu.md","lastUpdated":1772422214000}'),n={name:"en/guide/incus/incus_qemu.md"};function l(r,s,h,d,p,o){return a(),e("div",null,s[0]||(s[0]=[t("",31)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_incus_incus_thanks.md.BWXAYkPF.js b/assets/en_guide_incus_incus_thanks.md.BOhT9kDv.js similarity index 91% rename from assets/en_guide_incus_incus_thanks.md.BWXAYkPF.js rename to assets/en_guide_incus_incus_thanks.md.BOhT9kDv.js index 7980b3c1dc..d54ecf0122 100644 --- a/assets/en_guide_incus_incus_thanks.md.BWXAYkPF.js +++ b/assets/en_guide_incus_incus_thanks.md.BOhT9kDv.js @@ -1 +1 @@ -import{_ as e,c as r,o as n,ag as s}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_thanks.md","filePath":"en/guide/incus/incus_thanks.md","lastUpdated":1772422214000}'),a={name:"en/guide/incus/incus_thanks.md"};function o(i,t,c,p,l,u){return n(),r("div",null,t[0]||(t[0]=[s('

Acknowledgements

https://github.com/lxc/lxd

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://github.com/zabbly/incus

',10)]))}const g=e(a,[["render",o]]);export{d as __pageData,g as default}; +import{_ as e,c as r,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_thanks.md","filePath":"en/guide/incus/incus_thanks.md","lastUpdated":1772424525000}'),a={name:"en/guide/incus/incus_thanks.md"};function o(i,t,c,p,l,u){return n(),r("div",null,t[0]||(t[0]=[s('

Acknowledgements

https://github.com/lxc/lxd

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://github.com/zabbly/incus

',10)]))}const g=e(a,[["render",o]]);export{d as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_thanks.md.BWXAYkPF.lean.js b/assets/en_guide_incus_incus_thanks.md.BOhT9kDv.lean.js similarity index 57% rename from assets/en_guide_incus_incus_thanks.md.BWXAYkPF.lean.js rename to assets/en_guide_incus_incus_thanks.md.BOhT9kDv.lean.js index 21964933b9..27455489cc 100644 --- a/assets/en_guide_incus_incus_thanks.md.BWXAYkPF.lean.js +++ b/assets/en_guide_incus_incus_thanks.md.BOhT9kDv.lean.js @@ -1 +1 @@ -import{_ as e,c as r,o as n,ag as s}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_thanks.md","filePath":"en/guide/incus/incus_thanks.md","lastUpdated":1772422214000}'),a={name:"en/guide/incus/incus_thanks.md"};function o(i,t,c,p,l,u){return n(),r("div",null,t[0]||(t[0]=[s("",10)]))}const g=e(a,[["render",o]]);export{d as __pageData,g as default}; +import{_ as e,c as r,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_thanks.md","filePath":"en/guide/incus/incus_thanks.md","lastUpdated":1772424525000}'),a={name:"en/guide/incus/incus_thanks.md"};function o(i,t,c,p,l,u){return n(),r("div",null,t[0]||(t[0]=[s("",10)]))}const g=e(a,[["render",o]]);export{d as __pageData,g as default}; diff --git a/assets/en_guide_incus_incus_windows.md.CB-MXhl2.js b/assets/en_guide_incus_incus_windows.md.CB-MXhl2.js new file mode 100644 index 0000000000..0273ee93d2 --- /dev/null +++ b/assets/en_guide_incus_incus_windows.md.CB-MXhl2.js @@ -0,0 +1,28 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",p="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",r="/assets/wincf.B_Jc2M1G.jpg",o="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",k="/assets/win7.xhBfJRvu.jpg",c="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in Incus","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_windows.md","filePath":"en/guide/incus/incus_windows.md","lastUpdated":1772424525000}'),u={name:"en/guide/incus/incus_windows.md"};function g(F,s,m,y,b,C){return e(),a("div",null,s[0]||(s[0]=[n(`

Running Windows Virtual Machines in Incus

Verify the Incus Driver

Ensure that incus info output contains qemu, otherwise you cannot create VMs:

shell
incus info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, incus drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
+apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
+snap install distrobuilder --classic
+# reboot to load some config
+reboot

Download the image and apply the patch. If you're using a different image, replace the download link accordingly.

(You don't need to download the image that comes with virtio, the original image will suffice)

Windows image download link: https://github.com/ILLKX/Windows

Supported Windows image versions for patching: https://linuxcontainers.org/distrobuilder/docs/latest/tutorials/use/#repack-windows-iso

The following guide will use Windows 2019 as an example:

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
+distrobuilder repack-windows \\
+  --windows-arch=amd64 \\
+  win.iso \\
+  win.incus.iso

The patching time depends on when the program adds the drivers needed for booting (it will add one by one until successful).

Some may take a short time, others may take longer, potentially exceeding 10~30 minutes. It's recommended to run this in screen or tmux.

After patching is complete, you can delete the original image:

shell
rm -f win.iso

Create the VM and Mount the Installation ISO

Here I'm using a configuration of 3 CPUs, 5GB RAM, and 30GB storage. If you're using Windows 10 or newer versions, you'll need at least 4 CPUs, 6GB RAM, and 40GB storage.

It's recommended to use more CPU and RAM than the resources I have set up now to avoid the system getting stuck to the point of crashing.

If you don't have enough memory, we recommend checking the Add SWAP item in the Other Useful Items section of this guide to add more virtual memory on your own.

shell
# Initialize empty VM
+incus init winvm --empty --vm
+
+# Adjust root disk size, CPU, and memory
+incus config device override winvm root size=30GiB
+incus config set winvm limits.cpu=3
+incus config set winvm limits.memory=5GiB
+
+# Add TPM device (for Secure Boot/BitLocker support)
+incus config device add winvm vtpm tpm path=/dev/tpm0
+
+# Mount installation ISO and set as first boot device
+incus config device add winvm install disk \\
+  source=/root/win.incus.iso \\
+  boot.priority=10

Start the VM and Access the Desktop Remotely via Browser

Install the components needed for browser access:

shell
apt update
+apt install -y spice-html5 websockify lsof

Start the VM:

shell
incus start winvm

Start remote access components:

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
+nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/run/incus/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
+echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

At the first boot, you'll need to press the Ctrl+Alt+Delete button in the upper left corner of the browser page. After restarting, follow the prompts on the default interface. You'll need to wait 5-10 minutes for the ISO to be loaded for the actual installation.

Eventually, the Zabbly icon will appear and spin for at least 2 minutes. Please be patient.

Once the spinning stops, you'll enter the normal Windows VM installation process, similar to PVE operations.

Here the hard disk can not be selected, choose to view the yellow tips in the lower left corner, and then follow the prompts will be offline hard disk online point to confirm the button, you can select the hard disk.

Once the installation is complete, the virtual machine will automatically reboot a few times to update the network, and the web side of spice will show up in the user setup interface, while in the background you can use the incus list to see that the network is automatically attached.

After setting up the user to enter the system login page, execute the following command to shut down/exit Windows, then remove the ISO device to ensure that the next boot is from the hard disk, and then start the virtual machine again.

shell
incus stop winvm
+incus config device remove winvm install
+incus start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, incus will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then incus delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
incus config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

',64)]))}const B=i(u,[["render",g]]);export{v as __pageData,B as default}; diff --git a/assets/en_guide_incus_incus_windows.md.CB-MXhl2.lean.js b/assets/en_guide_incus_incus_windows.md.CB-MXhl2.lean.js new file mode 100644 index 0000000000..df2a1e8451 --- /dev/null +++ b/assets/en_guide_incus_incus_windows.md.CB-MXhl2.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",p="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",r="/assets/wincf.B_Jc2M1G.jpg",o="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",k="/assets/win7.xhBfJRvu.jpg",c="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in Incus","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_windows.md","filePath":"en/guide/incus/incus_windows.md","lastUpdated":1772424525000}'),u={name:"en/guide/incus/incus_windows.md"};function g(F,s,m,y,b,C){return e(),a("div",null,s[0]||(s[0]=[n("",64)]))}const B=i(u,[["render",g]]);export{v as __pageData,B as default}; diff --git a/assets/en_guide_incus_incus_windows.md.CG6RVzg2.js b/assets/en_guide_incus_incus_windows.md.CG6RVzg2.js deleted file mode 100644 index aaccb0da8b..0000000000 --- a/assets/en_guide_incus_incus_windows.md.CG6RVzg2.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",o="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",k="/assets/win7.xhBfJRvu.jpg",c="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in Incus","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_windows.md","filePath":"en/guide/incus/incus_windows.md","lastUpdated":1772422214000}'),F={name:"en/guide/incus/incus_windows.md"};function g(u,s,y,m,C,w){return e(),a("div",null,s[0]||(s[0]=[t(`

Running Windows Virtual Machines in Incus

Verify the Incus Driver

Ensure that incus info output contains qemu, otherwise you cannot create VMs:

shell
incus info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, incus drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
-apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
-snap install distrobuilder --classic
-# reboot to load some config
-reboot

Download the image and apply the patch. If you're using a different image, replace the download link accordingly.

(You don't need to download the image that comes with virtio, the original image will suffice)

Windows image download link: https://github.com/ILLKX/Windows

Supported Windows image versions for patching: https://linuxcontainers.org/distrobuilder/docs/latest/tutorials/use/#repack-windows-iso

The following guide will use Windows 2019 as an example:

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
-distrobuilder repack-windows \\
-  --windows-arch=amd64 \\
-  win.iso \\
-  win.incus.iso

The patching time depends on when the program adds the drivers needed for booting (it will add one by one until successful).

Some may take a short time, others may take longer, potentially exceeding 10~30 minutes. It's recommended to run this in screen or tmux.

After patching is complete, you can delete the original image:

shell
rm -f win.iso

Create the VM and Mount the Installation ISO

Here I'm using a configuration of 3 CPUs, 5GB RAM, and 30GB storage. If you're using Windows 10 or newer versions, you'll need at least 4 CPUs, 6GB RAM, and 40GB storage.

It's recommended to use more CPU and RAM than the resources I have set up now to avoid the system getting stuck to the point of crashing.

If you don't have enough memory, we recommend checking the Add SWAP item in the Other Useful Items section of this guide to add more virtual memory on your own.

shell
# Initialize empty VM
-incus init winvm --empty --vm
-
-# Adjust root disk size, CPU, and memory
-incus config device override winvm root size=30GiB
-incus config set winvm limits.cpu=3
-incus config set winvm limits.memory=5GiB
-
-# Add TPM device (for Secure Boot/BitLocker support)
-incus config device add winvm vtpm tpm path=/dev/tpm0
-
-# Mount installation ISO and set as first boot device
-incus config device add winvm install disk \\
-  source=/root/win.incus.iso \\
-  boot.priority=10

Start the VM and Access the Desktop Remotely via Browser

Install the components needed for browser access:

shell
apt update
-apt install -y spice-html5 websockify lsof

Start the VM:

shell
incus start winvm

Start remote access components:

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
-nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/run/incus/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
-echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

At the first boot, you'll need to press the Ctrl+Alt+Delete button in the upper left corner of the browser page. After restarting, follow the prompts on the default interface. You'll need to wait 5-10 minutes for the ISO to be loaded for the actual installation.

Eventually, the Zabbly icon will appear and spin for at least 2 minutes. Please be patient.

Once the spinning stops, you'll enter the normal Windows VM installation process, similar to PVE operations.

Here the hard disk can not be selected, choose to view the yellow tips in the lower left corner, and then follow the prompts will be offline hard disk online point to confirm the button, you can select the hard disk.

Once the installation is complete, the virtual machine will automatically reboot a few times to update the network, and the web side of spice will show up in the user setup interface, while in the background you can use the incus list to see that the network is automatically attached.

After setting up the user to enter the system login page, execute the following command to shut down/exit Windows, then remove the ISO device to ensure that the next boot is from the hard disk, and then start the virtual machine again.

shell
incus stop winvm
-incus config device remove winvm install
-incus start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, incus will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then incus delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
incus config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

',64)]))}const f=i(F,[["render",g]]);export{v as __pageData,f as default}; diff --git a/assets/en_guide_incus_incus_windows.md.CG6RVzg2.lean.js b/assets/en_guide_incus_incus_windows.md.CG6RVzg2.lean.js deleted file mode 100644 index 56ef05ec40..0000000000 --- a/assets/en_guide_incus_incus_windows.md.CG6RVzg2.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",o="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",k="/assets/win7.xhBfJRvu.jpg",c="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in Incus","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/incus/incus_windows.md","filePath":"en/guide/incus/incus_windows.md","lastUpdated":1772422214000}'),F={name:"en/guide/incus/incus_windows.md"};function g(u,s,y,m,C,w){return e(),a("div",null,s[0]||(s[0]=[t("",64)]))}const f=i(F,[["render",g]]);export{v as __pageData,f as default}; diff --git a/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.js b/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.js new file mode 100644 index 0000000000..21c45c9859 --- /dev/null +++ b/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.js @@ -0,0 +1,82 @@ +import{_ as s,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",p="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",o="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",h="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",b="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",v="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_custom.md","filePath":"en/guide/lxd/lxd_custom.md","lastUpdated":1772424525000}'),B={name:"en/guide/lxd/lxd_custom.md"};function I(q,e,T,V,A,z){return n(),a("div",null,e[0]||(e[0]=[t(`

Custom

Adding a customized mirror source

https://lxdimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/lxd_images for details.

shell
lxc remote remove spiritlhl
+lxc remote add spiritlhl https://lxdimages.spiritlhl.net --protocol simplestreams --public
+lxc image list spiritlhl:debian

Attach free IPV6 address segments to host machines

Some machines don't have an IPV6 /64 subnet on the machine itself, here is a method given to attach an IPV6 subnet for free.

Here is a solution using the 6in4 method for a host machine that doesn't have an IPV6 address on its own.

TIP

The operations on this page must be performed on the original system, and ensure that no other scripts from this project are installed(Except for PVE, which needs to be installed first), as this may lead to environment conflicts.

Here are the platforms that are currently running in 2023 that offer IPV6 subnets for free.

Supported PlatformsCorresponding Required Installation PackagesProtocolsNumber of Channels/Subnets
tunnelbroker.netifupdown OR ifupdown2v4tunnel OR sit3✖/64 OR 5✖/64
tunnelbroker.chifupdown OR ifupdown2v4tunnel OR sit3✖/64
ip4market.ruifupdown OR ifupdown2v4tunnel OR sit1✖/64
netassist.uaifupdown OR ifupdown2v4tunnel OR sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipipcustom

The free platform only solves the problem that IPV6 is not available, it does not provide premium IPV6 bandwidth.

If you need high quality bandwidth, please build your own tunnel. When both ifupdown and ifupdown2 are available, try ifupdown first to see if it can be installed successfully, otherwise install ifupdown2.

After the installation is complete, select which package is installed behind to convert the format.

Initial environment modifications

Execute

touch /etc/cloud/cloud-init.disabled

Turn off the automated overwrite of cloud-init first, and then to see what the local machine is using to manage the network, run

systemctl is-active systemd-networkd

and

systemctl is-active networking

See which case this falls into, if it's the former active and the latter inactive, you need to reinstall/DD a system that isn't configured this way, or switch the local machine to use ifupdown/ifupdown2 to manage network execution

# Judge for yourself whether you need to disable the original network management or not
+# systemctl stop systemd-networkd
+# systemctl disable systemd-networkd
+# systemctl stop systemd-networkd.socket
+# systemctl disable systemd-networkd.socket

If you want to install ifupdown to control the network, this tool is available on all major linux systems.

apt-get install ifupdown -y

If you want to install ifupdown2 for network management, which is generally only available on debian systems, you can install

apt-get install ifupdown2 -y

After the installation is complete, select which package is installed behind to convert the format.

systemctl start networking
+systemctl enable networking

Then restart the server, check whether the machine's network will be rebooted due to the modification of the case of loss of connection, and runuptimeto observe that the startup has been more than 1 minute before proceeding to the next steps

If it is inactive and active, there is no need to switch the network management program and you can proceed directly to the next step.

Since some servers have default intranet IPV6 routes that will conflict with the tunnel, you can use the following command to remove the default IPV6 routes

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

This assumes that your client's server's default NIC is eth0, you can use ip -6 route to see the default route and replace it, the default route starts with default via, and uses dev to specify the default NIC, you just need to find it according to this rule

Currently supported platforms

tunnelbroker_net

Combined with a script that opens containers with IPV6 addresses with a single click, you can attach an IPV6 address from he to each container

The downside is that the addresses are dark/dirty, and cloudflare's cdn will most likely not be able to latch on, test it yourself

  1. Register an account at https://tunnelbroker.net/ and clickCreate Regular Tunnelon the left.

1

  1. Fill in your server's IPV4 address in the red box, choose a connection point that is physically close to your server, for example, if your machine is in Los Angeles, choose a connection point on the west coast of the United States, and then clickCreate Tunnelto create the tunnel when you are prompted by the green box!

2

3

4

  1. Wait for the following screen, clickExample Configurationsand select the corresponding system, for example, the host of LXD is definitely Debian/Ubuntu.

5

6

  1. The boxed part is the file to be modified and the content to be filled in.

7

  1. Exchange the format of the command then add IPV6 settings to your network configuration file.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerNet, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
+# Here, copy and paste the contents of the configuration file in the red box, and then run this command.
+EOF

Then you can usecat /etc/network/interfacesto see if the configuration file is written correctly.

  1. If all of the above is OK, then you need to enable the network interfaces
apt-get install net-tools iproute2 -y
+systemctl restart networking
  1. Then you can test the IP address of the network interface.

Execute theifconfigcommand, and there should be a he-ipv6 interface, similar to the following:

8

Or execute:

curl ipv6.ip.sb

Returns the IPV6 address you bound to

  1. Additional settings for NAT VPS

IPv4 NAT VPS may require some additional settings beyond the IP replacement operation mentioned earlier, otherwise it may still not be able to access the IPv6 network.

apt-get install ufw -y
+ufw allow 41

Add the relevant routing rules

route -A inet6 add ::/0 dev he-ipv6
  1. If the IPV6 network is no longer needed and you want to delete it, delete the he-ipv6 network interface configuration.

If you want to delete the he-ipv6 network interface configuration (if not, it will be enabled automatically after reboot), remember to modify the/etc/network/interfacesfile to remove the content added in the red box before.

Then reboot the server to remove the

tunnelbroker_ch

Similar to the above, first register an account at https://www.tunnelbroker.ch/ and click on the activation email after registering.

Then you have to fill in the IPV4 address of your server.

After creating an account, you need to go to the Config page instead of the details page.

Don't use the following page, first refresh the page without the light blue box and then stop refreshing it

Don't stop refreshing after the light blue box pops up

Record the content of the last red box on the following page, and prepare to modify the host configuration file.

Copy the last red box of the page without the blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerCh, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

ip4market_ru

Similar to the above, first register an account at https://tb.ip4market.ru, the registered email address must be an unseen email address, the phone number can be written randomly without verification, and the IP address should be the IPV4 address of the host you want to attach.

The IP address is the IPV4 address of the host computer you are attaching to

Then you have to go through Recaptcha's human-machine verification, and click register.

You will receive an activation email with your password, memorize it.

Then login on the homepage

Then you will be taken to this page

Hold down the right button and copy the four lines framed in red, which are

Server IPv4.
+Client IPv4
+Server IPv6
+Client IPv6

For these four lines, press ctrl+c to copy or right-click to copy

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforip4market, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the formatting

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

netassist_ua

Similar to the above operation, first in https://tb.netassist.ua/ register an account first, after registration, click on the activation of the mail, the activation page will have a password display, remember to record!

Then fill in the IPV4 address of your server, you can change it later, just fill in a random one first.

Then you will get to this page

a

The first red box is the location of your host's IPV4 address, if you want to modify it, modify it there, and then click change to save.

The second red box is for```Linux``, and then click on show

b

The above content will appear, copy all the boxed parts without blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforNetAssist, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then click onCovertto convert the formatting

c

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify the
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

Transfer IPV6 subnets between different servers

Related repository: https://github.com/oneclickvirt/6in4

This method will provide a way to split a /80 out of the IPV6 segment on A and attach it to B to use.

Features

  • Self-built IPv6 tunnel for sit/gre/ipip protocols
  • Support to customize the IPV6 subnet size to be cut out, and the appropriate IPV6 subnet information in CIDR format will be calculated automatically.
  • Automatically recognizes the IPV6 subnet size of the server side
  • will automatically set up the tunnel server and print the commands that the client needs to execute
  • Setting up the IPV6 tunnel is easy to understand and easy to remove

Environmental Preparation

VPS(A)VPS(B)
one IPV4 address (server_ipv4)one IPV4 address (clinet_ipv4)
one IPV6 subnetno IPV6 address
Hereafter referred to as serverHereafter referred to as client

Usage

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

Execute it

./6in4.sh client_ipv4 <mode_type> <subnet_size>
OptionsOptional Option 1Optional Option 2Optional Option 3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type> only support those three protocols for now, the more advanced the more recommended, no fill in the default is sit protocol

<subnet_size> as long as it is larger than the original system subnet mask, and is a multiple of 8, if you don't fill it in, it defaults to 80.

Remember to replace client_ipv4 with the IPV4 address of the machine you want to attach IPV6 to, and the command you need to execute on the client side will be sent back to you after execution, see the instructions after execution for details.

To prevent you from forgetting to copy the commands, the commands themselves will be written to the 6in4.log file under the current path, you can use cat 6in4.log to query the commands that need to be executed on the client side

For copied commands, be sure to select option 6in4 in https://ipv6tunnel.spiritlhl.top/ before converting!

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
+# Modify here
+EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
+systemctl restart networking

Make sure the environment is OK before you do anything else

Check server status

systemctl status ndpresponder
ip addr show

Check client status

ip addr show
curl ipv6.ip.sb

Delete tunnel

server

ip link set server-ipv6 down
+ip tunnel del server-ipv6

client

ip link set user-ipv6 down
+ip tunnel del user-ipv6

The above deletion is only temporary, for permanent deletion you must modify and delete the contents of the /etc/network/interfaces file that you have previously added.

one more thing

In fact https://tunnelbroker.net/ supports the application of IPV6 subnets of size /48

Make the request here, then when converting the format change the original /64 IPV6 address to a /48 IPV6 address and you'll get a larger IPV6 subnet!

Supplemental CloudFlare WARP IPv4 / IPv6 outbound

1: Benefits

  • By installing it on the host machine, all enabled machines can benefit from the advantages of Warp without the need for individual configurations, thus saving resources and simplifying management.
  • The use of kernel WireGuard on the host machine enables more efficient operation of WireGuard compared to user-space WireGuard-Go.

2: Manual Installation

2-1 Installing WireGuard Dependencies

  • Debian and Ubuntu systems
# Update dependent libraries
+apt update -y
+
+# Install WireGuard runtime dependencies
+apt install -y --no-install-recommends net-tools openresolv dnsutils
+
+# Install WireGuard protocol-compatible toolset
+apt install -y --no-install-recommends wireguard-tools
  • CentOS systems
# Update dependent libraries
+yum update -y
+
+# Install additional package components
+yum install -y epel-release 
+
+# Install WireGuard runtime dependencies
+yum install -y net-tools
+
+# Install WireGuard protocol-compatible toolset
+yum install -y wireguard-tools

2-2 Getting warp account information

Visit https://warp.cloudflare.now.cc/?run=register&format=yaml and record private_key, v6 2 values

image.png

2-3: Modifying Configuration Files

  • Create and edit the /etc/wireguard/warp.conf file, replacing any parts that contain <> (pointy brackets) together, just to make it look obvious.

  • For IPv4-only hosts, Warp takes over IPv6 egress only

shell
[Interface]
+PrivateKey = <Your PrivateKey>
+Address = 172.16.0.2/32
+Address = <Your Address-v6 >/128
+DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = ::/0
+Endpoint = 162.159.193.10:2408
  • For IPv6 only hosts, Warp takes over IPv4 egress only.
shell
[Interface]
+PrivateKey = <Your PrivateKey>
+Address = 172.16.0.2/32
+Address = <Your Address-v6>/128
+DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = 0.0.0.0/0
+Endpoint = [2606:4700:d0::a29f:c101]:2408
  • There's no need to target dual-stack, after all, native network outlets are better than relaying through Warp

2-4: Setting the Address Resolution Priority

For IPv4-only host machines, Warp only takes control of the IPv6 outbound, prioritizing the use of the native network's IPv4 outbound.

shell
# IPv4 priority
+grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf

For IPv6-only host machines, Warp only takes control of the IPv4 outbound, prioritizing the use of the native network's IPv6 outbound.

shell
# IPv6 priority
+sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

2-5: Connecting to Warp and setting up the systemd process daemon

# Run wireguard to connect to Warp. If this step gets stuck and causes the connection to be lost, reboot the host in the background to resolve it.
+wg-quick up warp
+
+# Check IPv4
+curl -A a https://api-ipv4.ip.sb/geoip
+
+# Check IPv6
+curl -A a https://api-ipv6.ip.sb/geoip
+
+# Disconnect from Warp after successful test.
+wg-quick down warp
+
+# Reconnect and set process daemon to take effect automatically after reboot.
+systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',198)]))}const S=s(B,[["render",I]]);export{D as __pageData,S as default}; diff --git a/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.lean.js b/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.lean.js new file mode 100644 index 0000000000..8ba81879cd --- /dev/null +++ b/assets/en_guide_lxd_lxd_custom.md.BuoYFyrL.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as n,ag as t}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",p="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",o="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",h="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",b="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",v="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_custom.md","filePath":"en/guide/lxd/lxd_custom.md","lastUpdated":1772424525000}'),B={name:"en/guide/lxd/lxd_custom.md"};function I(q,e,T,V,A,z){return n(),a("div",null,e[0]||(e[0]=[t("",198)]))}const S=s(B,[["render",I]]);export{D as __pageData,S as default}; diff --git a/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.js b/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.js deleted file mode 100644 index c3b4d8d674..0000000000 --- a/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.js +++ /dev/null @@ -1,82 +0,0 @@ -import{_ as s,c as t,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const i="/assets/lxd1.CbGLa5s4.png",o="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",p="/assets/lxd4.CSfRHLxz.png",r="/assets/lxd5.WUJi0qzd.png",h="/assets/lxd6.Cnds779U.png",d="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",k="/assets/lxd11.D6E5sVW2.png",m="/assets/lxd12.B9udKIzn.png",b="/assets/lxd13.Dwv7xBpz.png",f="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",v="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",S=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_custom.md","filePath":"en/guide/lxd/lxd_custom.md","lastUpdated":1772422214000}'),B={name:"en/guide/lxd/lxd_custom.md"};function I(q,e,T,V,A,O){return a(),t("div",null,e[0]||(e[0]=[n(`

Custom

Adding a customized mirror source

https://lxdimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/lxd_images for details.

shell
lxc remote remove spiritlhl
-lxc remote add spiritlhl https://lxdimages.spiritlhl.net --protocol simplestreams --public
-lxc image list spiritlhl:debian

Attach free IPV6 address segments to host machines

Some machines don't have an IPV6 /64 subnet on the machine itself, here is a method given to attach an IPV6 subnet for free.

Here is a solution using the 6in4 method for a host machine that doesn't have an IPV6 address on its own.

TIP

The operations on this page must be performed on the original system, and ensure that no other scripts from this project are installed(Except for PVE, which needs to be installed first), as this may lead to environment conflicts.

Here are the platforms that are currently running in 2023 that offer IPV6 subnets for free.

Supported PlatformsCorresponding Required Installation PackagesProtocolsNumber of Channels/Subnets
tunnelbroker.netifupdown OR ifupdown2v4tunnel OR sit3✖/64 OR 5✖/64
tunnelbroker.chifupdown OR ifupdown2v4tunnel OR sit3✖/64
ip4market.ruifupdown OR ifupdown2v4tunnel OR sit1✖/64
netassist.uaifupdown OR ifupdown2v4tunnel OR sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipipcustom

The free platform only solves the problem that IPV6 is not available, it does not provide premium IPV6 bandwidth.

If you need high quality bandwidth, please build your own tunnel. When both ifupdown and ifupdown2 are available, try ifupdown first to see if it can be installed successfully, otherwise install ifupdown2.

After the installation is complete, select which package is installed behind to convert the format.

Initial environment modifications

Execute

touch /etc/cloud/cloud-init.disabled

Turn off the automated overwrite of cloud-init first, and then to see what the local machine is using to manage the network, run

systemctl is-active systemd-networkd

and

systemctl is-active networking

See which case this falls into, if it's the former active and the latter inactive, you need to reinstall/DD a system that isn't configured this way, or switch the local machine to use ifupdown/ifupdown2 to manage network execution

# Judge for yourself whether you need to disable the original network management or not
-# systemctl stop systemd-networkd
-# systemctl disable systemd-networkd
-# systemctl stop systemd-networkd.socket
-# systemctl disable systemd-networkd.socket

If you want to install ifupdown to control the network, this tool is available on all major linux systems.

apt-get install ifupdown -y

If you want to install ifupdown2 for network management, which is generally only available on debian systems, you can install

apt-get install ifupdown2 -y

After the installation is complete, select which package is installed behind to convert the format.

systemctl start networking
-systemctl enable networking

Then restart the server, check whether the machine's network will be rebooted due to the modification of the case of loss of connection, and runuptimeto observe that the startup has been more than 1 minute before proceeding to the next steps

If it is inactive and active, there is no need to switch the network management program and you can proceed directly to the next step.

Since some servers have default intranet IPV6 routes that will conflict with the tunnel, you can use the following command to remove the default IPV6 routes

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

This assumes that your client's server's default NIC is eth0, you can use ip -6 route to see the default route and replace it, the default route starts with default via, and uses dev to specify the default NIC, you just need to find it according to this rule

Currently supported platforms

tunnelbroker_net

Combined with a script that opens containers with IPV6 addresses with a single click, you can attach an IPV6 address from he to each container

The downside is that the addresses are dark/dirty, and cloudflare's cdn will most likely not be able to latch on, test it yourself

  1. Register an account at https://tunnelbroker.net/ and clickCreate Regular Tunnelon the left.

1

  1. Fill in your server's IPV4 address in the red box, choose a connection point that is physically close to your server, for example, if your machine is in Los Angeles, choose a connection point on the west coast of the United States, and then clickCreate Tunnelto create the tunnel when you are prompted by the green box!

2

3

4

  1. Wait for the following screen, clickExample Configurationsand select the corresponding system, for example, the host of LXD is definitely Debian/Ubuntu.

5

6

  1. The boxed part is the file to be modified and the content to be filled in.

7

  1. Exchange the format of the command then add IPV6 settings to your network configuration file.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerNet, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
-# Here, copy and paste the contents of the configuration file in the red box, and then run this command.
-EOF

Then you can usecat /etc/network/interfacesto see if the configuration file is written correctly.

  1. If all of the above is OK, then you need to enable the network interfaces
apt-get install net-tools iproute2 -y
-systemctl restart networking
  1. Then you can test the IP address of the network interface.

Execute theifconfigcommand, and there should be a he-ipv6 interface, similar to the following:

8

Or execute:

curl ipv6.ip.sb

Returns the IPV6 address you bound to

  1. Additional settings for NAT VPS

IPv4 NAT VPS may require some additional settings beyond the IP replacement operation mentioned earlier, otherwise it may still not be able to access the IPv6 network.

apt-get install ufw -y
-ufw allow 41

Add the relevant routing rules

route -A inet6 add ::/0 dev he-ipv6
  1. If the IPV6 network is no longer needed and you want to delete it, delete the he-ipv6 network interface configuration.

If you want to delete the he-ipv6 network interface configuration (if not, it will be enabled automatically after reboot), remember to modify the/etc/network/interfacesfile to remove the content added in the red box before.

Then reboot the server to remove the

tunnelbroker_ch

Similar to the above, first register an account at https://www.tunnelbroker.ch/ and click on the activation email after registering.

Then you have to fill in the IPV4 address of your server.

After creating an account, you need to go to the Config page instead of the details page.

Don't use the following page, first refresh the page without the light blue box and then stop refreshing it

Don't stop refreshing after the light blue box pops up

Record the content of the last red box on the following page, and prepare to modify the host configuration file.

Copy the last red box of the page without the blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforTunnelBrokerCh, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the format, and wait for the page to refresh to show the converted configuration file.

Then use vim or vi to modify the/etc/network/interfacesfile to add content, or modify the following command to add new content

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

ip4market_ru

Similar to the above, first register an account at https://tb.ip4market.ru, the registered email address must be an unseen email address, the phone number can be written randomly without verification, and the IP address should be the IPV4 address of the host you want to attach.

The IP address is the IPV4 address of the host computer you are attaching to

Then you have to go through Recaptcha's human-machine verification, and click register.

You will receive an activation email with your password, memorize it.

Then login on the homepage

Then you will be taken to this page

Hold down the right button and copy the four lines framed in red, which are

Server IPv4.
-Client IPv4
-Server IPv6
-Client IPv6

For these four lines, press ctrl+c to copy or right-click to copy

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforip4market, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then clickCovertto convert the formatting

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

netassist_ua

Similar to the above operation, first in https://tb.netassist.ua/ register an account first, after registration, click on the activation of the mail, the activation page will have a password display, remember to record!

Then fill in the IPV4 address of your server, you can change it later, just fill in a random one first.

Then you will get to this page

a

The first red box is the location of your host's IPV4 address, if you want to modify it, modify it there, and then click change to save.

The second red box is for```Linux``, and then click on show

b

The above content will appear, copy all the boxed parts without blank lines.

Then open https://ipv6tunnel.spiritlhl.top/ and selectOptionforNetAssist, another drop-down selection box to choose the name of the package you successfully installed previously, then paste what you copied in the input box.

Then click onCovertto convert the formatting

c

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify the
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

Transfer IPV6 subnets between different servers

Related repository: https://github.com/oneclickvirt/6in4

This method will provide a way to split a /80 out of the IPV6 segment on A and attach it to B to use.

Features

  • Self-built IPv6 tunnel for sit/gre/ipip protocols
  • Support to customize the IPV6 subnet size to be cut out, and the appropriate IPV6 subnet information in CIDR format will be calculated automatically.
  • Automatically recognizes the IPV6 subnet size of the server side
  • will automatically set up the tunnel server and print the commands that the client needs to execute
  • Setting up the IPV6 tunnel is easy to understand and easy to remove

Environmental Preparation

VPS(A)VPS(B)
one IPV4 address (server_ipv4)one IPV4 address (clinet_ipv4)
one IPV6 subnetno IPV6 address
Hereafter referred to as serverHereafter referred to as client

Usage

Download Script

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

Execute it

./6in4.sh client_ipv4 <mode_type> <subnet_size>
OptionsOptional Option 1Optional Option 2Optional Option 3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type> only support those three protocols for now, the more advanced the more recommended, no fill in the default is sit protocol

<subnet_size> as long as it is larger than the original system subnet mask, and is a multiple of 8, if you don't fill it in, it defaults to 80.

Remember to replace client_ipv4 with the IPV4 address of the machine you want to attach IPV6 to, and the command you need to execute on the client side will be sent back to you after execution, see the instructions after execution for details.

To prevent you from forgetting to copy the commands, the commands themselves will be written to the 6in4.log file under the current path, you can use cat 6in4.log to query the commands that need to be executed on the client side

For copied commands, be sure to select option 6in4 in https://ipv6tunnel.spiritlhl.top/ before converting!

Then the page will be refreshed automatically and you need to modify the contents of the/etc/network/interfacesfile with vim or vi commands, or modify the following commands to add new contents.

tee -a /etc/network/interfaces <<EOF
-# Modify here
-EOF

Then you'll need to reboot the system a bit, or run

apt-get install net-tools iproute2 -y
-systemctl restart networking

Make sure the environment is OK before you do anything else

Check server status

systemctl status ndpresponder
ip addr show

Check client status

ip addr show
curl ipv6.ip.sb

Delete tunnel

server

ip link set server-ipv6 down
-ip tunnel del server-ipv6

client

ip link set user-ipv6 down
-ip tunnel del user-ipv6

The above deletion is only temporary, for permanent deletion you must modify and delete the contents of the /etc/network/interfaces file that you have previously added.

one more thing

In fact https://tunnelbroker.net/ supports the application of IPV6 subnets of size /48

Make the request here, then when converting the format change the original /64 IPV6 address to a /48 IPV6 address and you'll get a larger IPV6 subnet!

Supplemental CloudFlare WARP IPv4 / IPv6 outbound

1: Benefits

  • By installing it on the host machine, all enabled machines can benefit from the advantages of Warp without the need for individual configurations, thus saving resources and simplifying management.
  • The use of kernel WireGuard on the host machine enables more efficient operation of WireGuard compared to user-space WireGuard-Go.

2: Manual Installation

2-1 Installing WireGuard Dependencies

  • Debian and Ubuntu systems
# Update dependent libraries
-apt update -y
-
-# Install WireGuard runtime dependencies
-apt install -y --no-install-recommends net-tools openresolv dnsutils
-
-# Install WireGuard protocol-compatible toolset
-apt install -y --no-install-recommends wireguard-tools
  • CentOS systems
# Update dependent libraries
-yum update -y
-
-# Install additional package components
-yum install -y epel-release 
-
-# Install WireGuard runtime dependencies
-yum install -y net-tools
-
-# Install WireGuard protocol-compatible toolset
-yum install -y wireguard-tools

2-2 Getting warp account information

Visit https://warp.cloudflare.now.cc/?run=register&format=yaml and record private_key, v6 2 values

image.png

2-3: Modifying Configuration Files

  • Create and edit the /etc/wireguard/warp.conf file, replacing any parts that contain <> (pointy brackets) together, just to make it look obvious.

  • For IPv4-only hosts, Warp takes over IPv6 egress only

shell
[Interface]
-PrivateKey = <Your PrivateKey>
-Address = 172.16.0.2/32
-Address = <Your Address-v6 >/128
-DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = ::/0
-Endpoint = 162.159.193.10:2408
  • For IPv6 only hosts, Warp takes over IPv4 egress only.
shell
[Interface]
-PrivateKey = <Your PrivateKey>
-Address = 172.16.0.2/32
-Address = <Your Address-v6>/128
-DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = 0.0.0.0/0
-Endpoint = [2606:4700:d0::a29f:c101]:2408
  • There's no need to target dual-stack, after all, native network outlets are better than relaying through Warp

2-4: Setting the Address Resolution Priority

For IPv4-only host machines, Warp only takes control of the IPv6 outbound, prioritizing the use of the native network's IPv4 outbound.

shell
# IPv4 priority
-grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf

For IPv6-only host machines, Warp only takes control of the IPv4 outbound, prioritizing the use of the native network's IPv6 outbound.

shell
# IPv6 priority
-sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

2-5: Connecting to Warp and setting up the systemd process daemon

# Run wireguard to connect to Warp. If this step gets stuck and causes the connection to be lost, reboot the host in the background to resolve it.
-wg-quick up warp
-
-# Check IPv4
-curl -A a https://api-ipv4.ip.sb/geoip
-
-# Check IPv6
-curl -A a https://api-ipv6.ip.sb/geoip
-
-# Disconnect from Warp after successful test.
-wg-quick down warp
-
-# Reconnect and set process daemon to take effect automatically after reboot.
-systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
-wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',198)]))}const W=s(B,[["render",I]]);export{S as __pageData,W as default}; diff --git a/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.lean.js b/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.lean.js deleted file mode 100644 index 5713415a8b..0000000000 --- a/assets/en_guide_lxd_lxd_custom.md.DVmNiIau.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const i="/assets/lxd1.CbGLa5s4.png",o="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",p="/assets/lxd4.CSfRHLxz.png",r="/assets/lxd5.WUJi0qzd.png",h="/assets/lxd6.Cnds779U.png",d="/assets/lxd7.EJ0s1ls2.png",c="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",k="/assets/lxd11.D6E5sVW2.png",m="/assets/lxd12.B9udKIzn.png",b="/assets/lxd13.Dwv7xBpz.png",f="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",v="/assets/lxd16.CgeIdYJ2.png",F="/assets/lxd17.CWPY1pea.png",w="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",x="/assets/lxd20.rK3P3TT8.png",P="/assets/lxd21.w-R0l00Y.png",_="/assets/lxd22.45M-VX6J.png",E="/assets/lxd23.CLaVW0qk.png",S=JSON.parse('{"title":"Custom","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_custom.md","filePath":"en/guide/lxd/lxd_custom.md","lastUpdated":1772422214000}'),B={name:"en/guide/lxd/lxd_custom.md"};function I(q,e,T,V,A,O){return a(),t("div",null,e[0]||(e[0]=[n("",198)]))}const W=s(B,[["render",I]]);export{S as __pageData,W as default}; diff --git a/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.js b/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.js deleted file mode 100644 index 535c49e4b5..0000000000 --- a/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.js +++ /dev/null @@ -1,16 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_extra_config.md","filePath":"en/guide/lxd/lxd_extra_config.md","lastUpdated":1772422214000}'),e={name:"en/guide/lxd/lxd_extra_config.md"};function l(h,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[n(`

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for LXC containers created with LXD.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
-ip6tables-legacy -t nat -F PREROUTING
-ip6tables-save > /etc/iptables/rules.v6
-netfilter-persistent save
-netfilter-persistent reload
-service netfilter-persistent restart

Uninstall the IPV6 address binding daemon and corresponding files

shell
systemctl stop add-ipv6.service
-systemctl disable add-ipv6.service
-rm /etc/systemd/system/add-ipv6.service
-systemctl daemon-reload
-rm /usr/local/bin/add-ipv6.sh

One-click Installation of Common Pre-configured Environment for LXD Hosts with vnstat Integration

  • (Optional, this script is only for easy monitoring integration with the site, it's fine if you choose not to install)

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

Enable the official lxd control panel with a single click

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
shell
sudo snap refresh lxd --channel=latest/stable
-snap set lxd ui.enable=true
-lxc config set core.https_address $(curl -sKL ipv4.ip.sb):8443
-systemctl reload snap.lxd.daemon
-snap restart --reload lxd

Then you can type in your browser

https://your_public_ipv4_address:8443

You can enter the official visualization panel, subsequent operation configuration in accordance with the UI prompts can be operated.

One-Click Installation of Hosted Third-Party Visualization Dashboard

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
  • Original author's repository: Link
shell
lxc config set core.https_address [::]
-lxc config set core.trust_password your_password
-snap install lxdmosaic

After the installation is complete, open the hen IP address, follow the prompts to set the password for admin, other all the way to the default will be able to use the panel!

`,33)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.lean.js b/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.lean.js deleted file mode 100644 index 225cf5dbc0..0000000000 --- a/assets/en_guide_lxd_lxd_extra_config.md.Ddc8nbud.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_extra_config.md","filePath":"en/guide/lxd/lxd_extra_config.md","lastUpdated":1772422214000}'),e={name:"en/guide/lxd/lxd_extra_config.md"};function l(h,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[n("",33)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.js b/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.js new file mode 100644 index 0000000000..4c459393b0 --- /dev/null +++ b/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.js @@ -0,0 +1,16 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_extra_config.md","filePath":"en/guide/lxd/lxd_extra_config.md","lastUpdated":1772424525000}'),t={name:"en/guide/lxd/lxd_extra_config.md"};function l(p,s,h,r,d,o){return n(),a("div",null,s[0]||(s[0]=[e(`

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for LXC containers created with LXD.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
+ip6tables-legacy -t nat -F PREROUTING
+ip6tables-save > /etc/iptables/rules.v6
+netfilter-persistent save
+netfilter-persistent reload
+service netfilter-persistent restart

Uninstall the IPV6 address binding daemon and corresponding files

shell
systemctl stop add-ipv6.service
+systemctl disable add-ipv6.service
+rm /etc/systemd/system/add-ipv6.service
+systemctl daemon-reload
+rm /usr/local/bin/add-ipv6.sh

One-click Installation of Common Pre-configured Environment for LXD Hosts with vnstat Integration

  • (Optional, this script is only for easy monitoring integration with the site, it's fine if you choose not to install)

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

Enable the official lxd control panel with a single click

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
shell
sudo snap refresh lxd --channel=latest/stable
+snap set lxd ui.enable=true
+lxc config set core.https_address $(curl -sKL ipv4.ip.sb):8443
+systemctl reload snap.lxd.daemon
+snap restart --reload lxd

Then you can type in your browser

https://your_public_ipv4_address:8443

You can enter the official visualization panel, subsequent operation configuration in accordance with the UI prompts can be operated.

One-Click Installation of Hosted Third-Party Visualization Dashboard

  • (Optional, this panel is just for convenient visualization operations, it's okay if not present)
  • Original author's repository: Link
shell
lxc config set core.https_address [::]
+lxc config set core.trust_password your_password
+snap install lxdmosaic

After the installation is complete, open the hen IP address, follow the prompts to set the password for admin, other all the way to the default will be able to use the panel!

`,33)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.lean.js b/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.lean.js new file mode 100644 index 0000000000..2e0f3f93a5 --- /dev/null +++ b/assets/en_guide_lxd_lxd_extra_config.md.DilF79sp.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Custom Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_extra_config.md","filePath":"en/guide/lxd/lxd_extra_config.md","lastUpdated":1772424525000}'),t={name:"en/guide/lxd/lxd_extra_config.md"};function l(p,s,h,r,d,o){return n(),a("div",null,s[0]||(s[0]=[e("",33)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.js b/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.js new file mode 100644 index 0000000000..bee2348911 --- /dev/null +++ b/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.js @@ -0,0 +1,6 @@ +import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/lxdd1.CVTAIewh.png",l="/assets/lxdd2.C_mYE7sL.png",o="/assets/lxdd3.DZ2Na5-t.png",p="/assets/lxdd4.CO1I1FPh.png",h="/assets/lxdd0.QoEngFSd.png",y=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_install.md","filePath":"en/guide/lxd/lxd_install.md","lastUpdated":1772424525000}'),r={name:"en/guide/lxd/lxd_install.md"};function d(c,s,u,k,m,g){return i(),e("div",null,s[0]||(s[0]=[t('

LXD

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD One-Click Installation Guide

WARNING

If this is a new server, make sure that both apt update and apt install curl are working properly before executing this script.

TIP

It's recommended to wait for at least 5 minutes after the system boots up before executing the following commands. This is to avoid the script being executed by the default system settings, which could cause issues with apt sources.

  • Prerequisites: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxd's lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

OR

shell
bash lxdinstall.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

WARNING

If you need to open more than 200 LXD containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Installation of WEB Control Panel

Customization There are tutorials on how to enable the official panel, but here do not choose to use the official panel, because the official panel in order to security, at the expense of a lot of user experience, this piece of using the

https://github.com/turtle0x1/LxdMosaic

third-party panels

shell
sudo snap install lxdmosaic

Do a straightforward one-click install, then open the current host's https://<public IP address>/ and force access to it to get to the setup page

lxd

lxd

lxd

This piece can be changed if you need to set up the site name

lxd

Better than nothing can only mean that there is no RBAC access control for sub-user segregation

Manual installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic LXD installation process.

Disable Firewall

bash
apt update
+apt install curl wget sudo dos2unix ufw jq -y
+ufw disable

Enabling Virtual Memory SWAP

The amount of memory depends on how many instances you want to run. If you want to run 8 instances and calculate, you'll need 2GB of memory. If your actual physical memory is 512MB, you'll need an additional 1.5GB. To be cautious, allocate 2GB of virtual memory.

Execute the following commands: Enter '1', then enter '2048'. This signifies allocating 2GB of virtual memory.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

Installing LXD

Actually, the virtual memory allocated for swap should be twice the size of the actual memory. So, it's reasonable to allocate 1GB if the actual memory is 500MB. The scenario I described above is an excessive allocation.

apt install snapd -y
+snap install lxd
+/snap/bin/lxd init

If the following error occurs in the above command

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

Use the command patch before installing lxd

snap install core

If there are no exceptions, the results of the above three lines of commands are as follows

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

Test whether symbolic links are functioning in LXC.

lxc -h

If an error is reported then execute the following command to soft connect the lxc command

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
+export PATH=$PATH:/snap/bin

After connecting, test the lxc command again to see if there is an error about not being able to find it

`,61)]))}const F=a(r,[["render",d]]);export{y as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.lean.js b/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.lean.js new file mode 100644 index 0000000000..8e432e77ee --- /dev/null +++ b/assets/en_guide_lxd_lxd_install.md.Dm-AP6iw.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/lxdd1.CVTAIewh.png",l="/assets/lxdd2.C_mYE7sL.png",o="/assets/lxdd3.DZ2Na5-t.png",p="/assets/lxdd4.CO1I1FPh.png",h="/assets/lxdd0.QoEngFSd.png",y=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_install.md","filePath":"en/guide/lxd/lxd_install.md","lastUpdated":1772424525000}'),r={name:"en/guide/lxd/lxd_install.md"};function d(c,s,u,k,m,g){return i(),e("div",null,s[0]||(s[0]=[t("",61)]))}const F=a(r,[["render",d]]);export{y as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_install.md.yduQKhy1.js b/assets/en_guide_lxd_lxd_install.md.yduQKhy1.js deleted file mode 100644 index bf910a9880..0000000000 --- a/assets/en_guide_lxd_lxd_install.md.yduQKhy1.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as a,c as t,o as e,ag as i}from"./chunks/framework.CSeR4K32.js";const n="/assets/lxdd1.CVTAIewh.png",l="/assets/lxdd2.C_mYE7sL.png",o="/assets/lxdd3.DZ2Na5-t.png",h="/assets/lxdd4.CO1I1FPh.png",p="/assets/lxdd0.QoEngFSd.png",b=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_install.md","filePath":"en/guide/lxd/lxd_install.md","lastUpdated":1772422214000}'),r={name:"en/guide/lxd/lxd_install.md"};function d(c,s,k,u,g,m){return e(),t("div",null,s[0]||(s[0]=[i('

LXD

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD One-Click Installation Guide

WARNING

If this is a new server, make sure that both apt update and apt install curl are working properly before executing this script.

TIP

It's recommended to wait for at least 5 minutes after the system boots up before executing the following commands. This is to avoid the script being executed by the default system settings, which could cause issues with apt sources.

  • Prerequisites: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxd's lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

OR

shell
bash lxdinstall.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

WARNING

If you need to open more than 200 LXD containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Installation of WEB Control Panel

Customization There are tutorials on how to enable the official panel, but here do not choose to use the official panel, because the official panel in order to security, at the expense of a lot of user experience, this piece of using the

https://github.com/turtle0x1/LxdMosaic

third-party panels

shell
sudo snap install lxdmosaic

Do a straightforward one-click install, then open the current host's https://<public IP address>/ and force access to it to get to the setup page

lxd

lxd

lxd

This piece can be changed if you need to set up the site name

lxd

Better than nothing can only mean that there is no RBAC access control for sub-user segregation

Manual installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic LXD installation process.

Disable Firewall

bash
apt update
-apt install curl wget sudo dos2unix ufw jq -y
-ufw disable

Enabling Virtual Memory SWAP

The amount of memory depends on how many instances you want to run. If you want to run 8 instances and calculate, you'll need 2GB of memory. If your actual physical memory is 512MB, you'll need an additional 1.5GB. To be cautious, allocate 2GB of virtual memory.

Execute the following commands: Enter '1', then enter '2048'. This signifies allocating 2GB of virtual memory.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

Installing LXD

Actually, the virtual memory allocated for swap should be twice the size of the actual memory. So, it's reasonable to allocate 1GB if the actual memory is 500MB. The scenario I described above is an excessive allocation.

apt install snapd -y
-snap install lxd
-/snap/bin/lxd init

If the following error occurs in the above command

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

Use the command patch before installing lxd

snap install core

If there are no exceptions, the results of the above three lines of commands are as follows

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

Test whether symbolic links are functioning in LXC.

lxc -h

If an error is reported then execute the following command to soft connect the lxc command

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
-export PATH=$PATH:/snap/bin

After connecting, test the lxc command again to see if there is an error about not being able to find it

`,61)]))}const F=a(r,[["render",d]]);export{b as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_install.md.yduQKhy1.lean.js b/assets/en_guide_lxd_lxd_install.md.yduQKhy1.lean.js deleted file mode 100644 index 0c43db972c..0000000000 --- a/assets/en_guide_lxd_lxd_install.md.yduQKhy1.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,ag as i}from"./chunks/framework.CSeR4K32.js";const n="/assets/lxdd1.CVTAIewh.png",l="/assets/lxdd2.C_mYE7sL.png",o="/assets/lxdd3.DZ2Na5-t.png",h="/assets/lxdd4.CO1I1FPh.png",p="/assets/lxdd0.QoEngFSd.png",b=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_install.md","filePath":"en/guide/lxd/lxd_install.md","lastUpdated":1772422214000}'),r={name:"en/guide/lxd/lxd_install.md"};function d(c,s,k,u,g,m){return e(),t("div",null,s[0]||(s[0]=[i("",61)]))}const F=a(r,[["render",d]]);export{b as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.js b/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.js deleted file mode 100644 index b267f0e1af..0000000000 --- a/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"LXC virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_lxc.md","filePath":"en/guide/lxd/lxd_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/lxd/lxd_lxc.md"};function h(l,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[e(`

LXC virtualization

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Downloading the boot script is NOT REQUIRED, if you have used the command to install LXD with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian12)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port\`\` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that \`\`\`can't be null, and it needs to be set to 0 if it's not to be mapped.

Support for customizing the system of the container, do not fill out the default use of debian12 when left blank, note that the incoming parameters for the system name + version number, such as:

  • debian12, debian13
  • ubuntu22, ubuntu24
  • centos8,centos9
  • alpine3.16, alpine3.17, alpine3.18,alpine3.19
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 12
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
lxc stop test
-lxc delete test
-rm -rf test
-rm -rf test_v6
-ls

Normal version batch generation

Opened Chick Configuration:

  • 1 core 256MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • With 1 SSH port, 24 extranet ports
  • Default memory and hard disk size

TIP

lxc if the command is no problem, the execution of the initialization of the opening of the containers, this step is best to put \`\`\`screen\`\` in the background to suspend the execution of the opening of the containers, the length of time with you to open a few and the mother hen configuration-related

Execute the following command to load the boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

The following command opens 10 chicks with the name prefix tj.

shell
./init.sh tj 10

Sometimes there is a problem with the path where init.sh is run, in this case it is recommended to add sudo in front of it to force it to run in the root directory

Bulk generation of pure SSH port versions

Opened Chick Configuration:

  • 1 core 128MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • Only one SSH port
  • Unable to mount warp

TIP

lxc if the command is no problem, the execution of the initialization of the opening of the chick, this step is best to put the \`\`\`screen\`\` in the background to hang the execution of the opening of the chick, the length of time you open the chick with the opening of a few and the mother hen configuration-related

Load boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

The last line of the following command opens 10 chicks with the chick name prefix tj

shell
./least.sh tj 10

Sometimes there is a problem with the path where last.sh is run, in this case it is recommended to force the root directory to run by adding sudo in front of it.

Custom Batch Generation of Versions

  • Customizable memory and hard disk sizes
  • It's also fine if you have manually executed the above batch generation before; the configuration inherits without overwriting

If you need to batch-generate containers multiple times, you can use the following:

Command:

curl -L https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

Can be run multiple times to batch generate chicks, and inherit the previous part has been generated in the back to add, customizable memory and hard disk size

View the information of the batch opened chicks

After opening the chicks, the specific information will be generated in the log file in the current directory, with the following format

shell
container_1_Name Password SSH_Port Public_Port_Start Public_Port_End
-container_2_Name Password SSH_Port Public_Port_Start Public_Port_End

To view it, simply print the log file by executing the following command in the current directory

shell
cat log

WARNING

Don't use the chicks opened by this script as a production environment, LXC virtualization doesn't support changing kernel, dd, turning on bbr, etc.

Some common LXD commands

View all containers:

bash
lxc list

View details of a specific container:

bash
lxc info container_name

Start a specific container:

bash
lxc start container_name

Stop a specific container:

bash
lxc stop container_name

Delete a specific container:

bash
lxc delete -f container_name

Enter the container's shell:

bash
lxc exec container_name /bin/bash

TIP

Instead of /bin/bash, you can use /bin/sh in alpine, which is /bin/bash on regular systems.

To exit, type \`\`\`exit\`\` and enter.

Delete all LXC containers

bash
lxc list -c n --format csv | xargs -I {} lxc delete -f {}

Perform deletion of useless logs within a container

bash
sudo apt-get autoremove
-sudo apt-get clean
-sudo find /var/log -type f -delete
-sudo find /var/tmp -type f -delete
-sudo find /tmp -type f -delete
-sudo find /var/cache/apt/archives -type f -delete

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/config.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/config.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/buildct.sh
-rm -rf /root/add_more.sh
-rm -rf /root/build_ipv6_network.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

`,81)]))}const F=i(n,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.lean.js b/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.lean.js deleted file mode 100644 index a77d39bccd..0000000000 --- a/assets/en_guide_lxd_lxd_lxc.md.BY8Stcml.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"LXC virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_lxc.md","filePath":"en/guide/lxd/lxd_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/lxd/lxd_lxc.md"};function h(l,s,p,o,r,k){return t(),a("div",null,s[0]||(s[0]=[e("",81)]))}const F=i(n,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.js b/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.js new file mode 100644 index 0000000000..692aab38f6 --- /dev/null +++ b/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.js @@ -0,0 +1,25 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"LXC virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_lxc.md","filePath":"en/guide/lxd/lxd_lxc.md","lastUpdated":1772424525000}'),t={name:"en/guide/lxd/lxd_lxc.md"};function l(h,s,p,r,d,o){return e(),a("div",null,s[0]||(s[0]=[n(`

LXC virtualization

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Downloading the boot script is NOT REQUIRED, if you have used the command to install LXD with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian12)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port\`\` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that \`\`\`can't be null, and it needs to be set to 0 if it's not to be mapped.

Support for customizing the system of the container, do not fill out the default use of debian12 when left blank, note that the incoming parameters for the system name + version number, such as:

  • debian12, debian13
  • ubuntu22, ubuntu24
  • centos8,centos9
  • alpine3.16, alpine3.17, alpine3.18,alpine3.19
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 12
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
lxc stop test
+lxc delete test
+rm -rf test
+rm -rf test_v6
+ls

Normal version batch generation

Opened Chick Configuration:

  • 1 core 256MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • With 1 SSH port, 24 extranet ports
  • Default memory and hard disk size

TIP

lxc if the command is no problem, the execution of the initialization of the opening of the containers, this step is best to put \`\`\`screen\`\` in the background to suspend the execution of the opening of the containers, the length of time with you to open a few and the mother hen configuration-related

Execute the following command to load the boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

The following command opens 10 chicks with the name prefix tj.

shell
./init.sh tj 10

Sometimes there is a problem with the path where init.sh is run, in this case it is recommended to add sudo in front of it to force it to run in the root directory

Bulk generation of pure SSH port versions

Opened Chick Configuration:

  • 1 core 128MB RAM 1GB hard disk limited to 300Mbit bandwidth
  • Only one SSH port
  • Unable to mount warp

TIP

lxc if the command is no problem, the execution of the initialization of the opening of the chick, this step is best to put the \`\`\`screen\`\` in the background to hang the execution of the opening of the chick, the length of time you open the chick with the opening of a few and the mother hen configuration-related

Load boot script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

The last line of the following command opens 10 chicks with the chick name prefix tj

shell
./least.sh tj 10

Sometimes there is a problem with the path where last.sh is run, in this case it is recommended to force the root directory to run by adding sudo in front of it.

Custom Batch Generation of Versions

  • Customizable memory and hard disk sizes
  • It's also fine if you have manually executed the above batch generation before; the configuration inherits without overwriting

If you need to batch-generate containers multiple times, you can use the following:

Command:

curl -L https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

Can be run multiple times to batch generate chicks, and inherit the previous part has been generated in the back to add, customizable memory and hard disk size

View the information of the batch opened chicks

After opening the chicks, the specific information will be generated in the log file in the current directory, with the following format

shell
container_1_Name Password SSH_Port Public_Port_Start Public_Port_End
+container_2_Name Password SSH_Port Public_Port_Start Public_Port_End

To view it, simply print the log file by executing the following command in the current directory

shell
cat log

WARNING

Don't use the chicks opened by this script as a production environment, LXC virtualization doesn't support changing kernel, dd, turning on bbr, etc.

Some common LXD commands

View all containers:

bash
lxc list

View details of a specific container:

bash
lxc info container_name

Start a specific container:

bash
lxc start container_name

Stop a specific container:

bash
lxc stop container_name

Delete a specific container:

bash
lxc delete -f container_name

Enter the container's shell:

bash
lxc exec container_name /bin/bash

TIP

Instead of /bin/bash, you can use /bin/sh in alpine, which is /bin/bash on regular systems.

To exit, type \`\`\`exit\`\` and enter.

Delete all LXC containers

bash
lxc list -c n --format csv | xargs -I {} lxc delete -f {}

Perform deletion of useless logs within a container

bash
sudo apt-get autoremove
+sudo apt-get clean
+sudo find /var/log -type f -delete
+sudo find /var/tmp -type f -delete
+sudo find /tmp -type f -delete
+sudo find /var/cache/apt/archives -type f -delete

Delete the original configuration script

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/config.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/config.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/buildct.sh
+rm -rf /root/add_more.sh
+rm -rf /root/build_ipv6_network.sh

Download back the relevant configuration scripts for the new version

bash
wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

`,81)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.lean.js b/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.lean.js new file mode 100644 index 0000000000..bbf1671d7e --- /dev/null +++ b/assets/en_guide_lxd_lxd_lxc.md.Df4IkzL_.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"LXC virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_lxc.md","filePath":"en/guide/lxd/lxd_lxc.md","lastUpdated":1772424525000}'),t={name:"en/guide/lxd/lxd_lxc.md"};function l(h,s,p,r,d,o){return e(),a("div",null,s[0]||(s[0]=[n("",81)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.js b/assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.js similarity index 85% rename from assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.js rename to assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.js index 6ea19804c6..c8d2adc105 100644 --- a/assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.js +++ b/assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.js @@ -1 +1 @@ -import{_ as t,c as o,o as n,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_precheck.md","filePath":"en/guide/lxd/lxd_precheck.md","lastUpdated":1772422214000}'),a={name:"en/guide/lxd/lxd_precheck.md"};function i(s,e,d,c,l,h){return n(),o("div",null,e[0]||(e[0]=[r('

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/lxd

Requirements

Hardware requirements.

  • System: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • Virtualization: KVM, VMWARE recommended.
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the public network.

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu20, Ubuntu other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open LXC containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for LXC containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
',15)]))}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; +import{_ as t,c as o,o as n,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_precheck.md","filePath":"en/guide/lxd/lxd_precheck.md","lastUpdated":1772424525000}'),a={name:"en/guide/lxd/lxd_precheck.md"};function i(s,e,d,c,l,h){return n(),o("div",null,e[0]||(e[0]=[r('

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/lxd

Requirements

Hardware requirements.

  • System: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • Virtualization: KVM, VMWARE recommended.
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the public network.

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu20, Ubuntu other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open LXC containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for LXC containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
',15)]))}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.lean.js b/assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.lean.js similarity index 59% rename from assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.lean.js rename to assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.lean.js index 2f23f9f970..38a2b44170 100644 --- a/assets/en_guide_lxd_lxd_precheck.md.DSjNf6kH.lean.js +++ b/assets/en_guide_lxd_lxd_precheck.md.FBOBo4eE.lean.js @@ -1 +1 @@ -import{_ as t,c as o,o as n,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_precheck.md","filePath":"en/guide/lxd/lxd_precheck.md","lastUpdated":1772422214000}'),a={name:"en/guide/lxd/lxd_precheck.md"};function i(s,e,d,c,l,h){return n(),o("div",null,e[0]||(e[0]=[r("",15)]))}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; +import{_ as t,c as o,o as n,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_precheck.md","filePath":"en/guide/lxd/lxd_precheck.md","lastUpdated":1772424525000}'),a={name:"en/guide/lxd/lxd_precheck.md"};function i(s,e,d,c,l,h){return n(),o("div",null,e[0]||(e[0]=[r("",15)]))}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.js b/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.js new file mode 100644 index 0000000000..0fd0f022e3 --- /dev/null +++ b/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qa.md","filePath":"en/guide/lxd/lxd_qa.md","lastUpdated":1772424525000}'),n={name:"en/guide/lxd/lxd_qa.md"};function o(r,e,p,d,l,h){return t(),s("div",null,e[0]||(e[0]=[i('

Solve the puzzle

What if the lxc command says it can't be found after LXD is installed?

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc\nexport PATH=$PATH:/snap/bin

After executing this command try

lxc -h

to see if the lxc command is fixed.

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both LXD and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause LXD to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

',22)]))}const b=a(n,[["render",o]]);export{u as __pageData,b as default}; diff --git a/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.lean.js b/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.lean.js new file mode 100644 index 0000000000..6605244c08 --- /dev/null +++ b/assets/en_guide_lxd_lxd_qa.md.CoAwiIE5.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qa.md","filePath":"en/guide/lxd/lxd_qa.md","lastUpdated":1772424525000}'),n={name:"en/guide/lxd/lxd_qa.md"};function o(r,e,p,d,l,h){return t(),s("div",null,e[0]||(e[0]=[i("",22)]))}const b=a(n,[["render",o]]);export{u as __pageData,b as default}; diff --git a/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.js b/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.js deleted file mode 100644 index ab861bace4..0000000000 --- a/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qa.md","filePath":"en/guide/lxd/lxd_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/lxd/lxd_qa.md"};function o(p,e,d,r,l,h){return s(),t("div",null,e[0]||(e[0]=[i('

Solve the puzzle

What if the lxc command says it can't be found after LXD is installed?

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc\nexport PATH=$PATH:/snap/bin

After executing this command try

lxc -h

to see if the lxc command is fixed.

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both LXD and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause LXD to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

',22)]))}const k=a(n,[["render",o]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.lean.js b/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.lean.js deleted file mode 100644 index 9f31ce0fda..0000000000 --- a/assets/en_guide_lxd_lxd_qa.md.DqghSlNz.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qa.md","filePath":"en/guide/lxd/lxd_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/lxd/lxd_qa.md"};function o(p,e,d,r,l,h){return s(),t("div",null,e[0]||(e[0]=[i("",22)]))}const k=a(n,[["render",o]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.js b/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.js new file mode 100644 index 0000000000..cd7669303f --- /dev/null +++ b/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.js @@ -0,0 +1,5 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"QEMU virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qemu.md","filePath":"en/guide/lxd/lxd_qemu.md","lastUpdated":1772424525000}'),n={name:"en/guide/lxd/lxd_qemu.md"};function l(r,s,d,h,p,o){return a(),i("div",null,s[0]||(s[0]=[t(`

QEMU virtualization

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
lxc console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
lxc stop -f test
+lxc delete -f test
+rm -rf test
+rm -rf test_v6
+ls
`,31)]))}const u=e(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.lean.js b/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.lean.js new file mode 100644 index 0000000000..fea68a0382 --- /dev/null +++ b/assets/en_guide_lxd_lxd_qemu.md.CWB-pXl7.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"QEMU virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qemu.md","filePath":"en/guide/lxd/lxd_qemu.md","lastUpdated":1772424525000}'),n={name:"en/guide/lxd/lxd_qemu.md"};function l(r,s,d,h,p,o){return a(),i("div",null,s[0]||(s[0]=[t("",31)]))}const u=e(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.js b/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.js deleted file mode 100644 index 5f1f742506..0000000000 --- a/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"QEMU virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qemu.md","filePath":"en/guide/lxd/lxd_qemu.md","lastUpdated":1772422214000}'),l={name:"en/guide/lxd/lxd_qemu.md"};function n(r,s,h,d,p,o){return a(),i("div",null,s[0]||(s[0]=[t(`

QEMU virtualization

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
lxc console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
lxc stop -f test
-lxc delete -f test
-rm -rf test
-rm -rf test_v6
-ls
`,31)]))}const g=e(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.lean.js b/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.lean.js deleted file mode 100644 index 243a52d159..0000000000 --- a/assets/en_guide_lxd_lxd_qemu.md.Cks1_4zJ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"QEMU virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/lxd/lxd_qemu.md","filePath":"en/guide/lxd/lxd_qemu.md","lastUpdated":1772422214000}'),l={name:"en/guide/lxd/lxd_qemu.md"};function n(r,s,h,d,p,o){return a(),i("div",null,s[0]||(s[0]=[t("",31)]))}const g=e(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.js b/assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.js similarity index 92% rename from assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.js rename to assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.js index dd71453cba..89736d3746 100644 --- a/assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.js +++ b/assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.js @@ -1 +1 @@ -import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_thanks.md","filePath":"en/guide/lxd/lxd_thanks.md","lastUpdated":1772422214000}'),s={name:"en/guide/lxd/lxd_thanks.md"};function o(i,e,l,p,c,d){return a(),r("div",null,e[0]||(e[0]=[n('

Acknowledgements

https://github.com/lxc/lxd

https://lxdware.com/

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://images.opsmaru.dev/

Thank @Ella-Alinda @fscarmen for providing guidance.

',12)]))}const g=t(s,[["render",o]]);export{u as __pageData,g as default}; +import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_thanks.md","filePath":"en/guide/lxd/lxd_thanks.md","lastUpdated":1772424525000}'),s={name:"en/guide/lxd/lxd_thanks.md"};function o(i,e,l,p,c,d){return a(),r("div",null,e[0]||(e[0]=[n('

Acknowledgements

https://github.com/lxc/lxd

https://lxdware.com/

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://images.opsmaru.dev/

Thank @Ella-Alinda @fscarmen for providing guidance.

',12)]))}const g=t(s,[["render",o]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.lean.js b/assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.lean.js similarity index 56% rename from assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.lean.js rename to assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.lean.js index d214eeaba9..b670e50ba1 100644 --- a/assets/en_guide_lxd_lxd_thanks.md.D8uhyy3i.lean.js +++ b/assets/en_guide_lxd_lxd_thanks.md.DZe-0H6X.lean.js @@ -1 +1 @@ -import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_thanks.md","filePath":"en/guide/lxd/lxd_thanks.md","lastUpdated":1772422214000}'),s={name:"en/guide/lxd/lxd_thanks.md"};function o(i,e,l,p,c,d){return a(),r("div",null,e[0]||(e[0]=[n("",12)]))}const g=t(s,[["render",o]]);export{u as __pageData,g as default}; +import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_thanks.md","filePath":"en/guide/lxd/lxd_thanks.md","lastUpdated":1772424525000}'),s={name:"en/guide/lxd/lxd_thanks.md"};function o(i,e,l,p,c,d){return a(),r("div",null,e[0]||(e[0]=[n("",12)]))}const g=t(s,[["render",o]]);export{u as __pageData,g as default}; diff --git a/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.js b/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.js new file mode 100644 index 0000000000..20af5295df --- /dev/null +++ b/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.js @@ -0,0 +1,18 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/win1.CJKAoRm5.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",r="/assets/wincf.B_Jc2M1G.jpg",o="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.C8qmMo1u.jpg",k="/assets/win7.CI43Ul0V.jpg",c="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in LXD","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_windows.md","filePath":"en/guide/lxd/lxd_windows.md","lastUpdated":1772424525000}'),g={name:"en/guide/lxd/lxd_windows.md"};function F(u,s,m,y,b,C){return e(),a("div",null,s[0]||(s[0]=[n(`

Running Windows Virtual Machines in LXD

Verify the LXD Driver

Ensure that lxc info output contains qemu, otherwise you cannot create VMs:

shell
lxc info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, lxd drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
+apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
+snap install lxd-imagebuilder --classic --edge
+# reboot to load some config
+reboot

Download the image and apply the patch. If you're using a different image, replace the download link accordingly.

(You don't need to download the image that comes with virtio, the original image will suffice)

Windows image download link: https://github.com/ILLKX/Windows

The following guide will use Windows 2019 as an example:

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
+lxd-imagebuilder repack-windows \\
+  --windows-arch=amd64 \\
+  win.iso \\
+  win.lxc.iso

The patching time depends on when the program adds the drivers needed for booting (it will add one by one until successful).

Some may take a short time, others may take longer, potentially exceeding 10~30 minutes. It's recommended to run this in screen or tmux.

After patching is complete, you can delete the original image:

shell
rm -f win.iso

Create the VM and Mount the Installation ISO

Here I'm using a configuration of 3 CPUs, 5GB RAM, and 30GB storage. If you're using Windows 10 or newer versions, you'll need at least 4 CPUs, 6GB RAM, and 40GB storage.

It's recommended to use more CPU and RAM than the resources I have set up now to avoid the system getting stuck to the point of crashing.

If you don't have enough memory, we recommend checking the Add SWAP item in the Other Useful Items section of this guide to add more virtual memory on your own.

shell
lxc init winvm --vm --empty
+lxc config device override winvm root size=30GiB
+lxc config set winvm limits.cpu=3 limits.memory=5GiB
+lxc config device add winvm vtpm tpm path=/dev/tpm0
+lxc config device add winvm install disk source=/root/win.lxd.iso boot.priority=10

Start the VM and Access the Desktop Remotely via Browser

Install the components needed for browser access:

shell
apt update
+apt install -y spice-html5 websockify lsof

Start the VM:

shell
lxc start winvm

Start remote access components:

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
+nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/var/snap/lxd/common/lxd/logs/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
+echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

At the first boot, you'll need to press the Ctrl+Alt+Delete button in the upper left corner of the browser page. After restarting, follow the prompts on the default interface. You'll need to wait 5-10 minutes for the ISO to be loaded for the actual installation.

Eventually, the Zabbly icon will appear and spin for at least 2 minutes. Please be patient.

Once the spinning stops, you'll enter the normal Windows VM installation process, similar to PVE operations.

Here the hard disk can not be selected, choose to view the yellow tips in the lower left corner, and then follow the prompts will be offline hard disk online point to confirm the button, you can select the hard disk.

Once the installation is complete, the virtual machine will automatically reboot a few times to update the network, and the web side of spice will show up in the user setup interface, while in the background you can use the lxc list to see that the network is automatically attached.

After setting up the user to enter the system login page, execute the following command to shut down/exit Windows, then remove the ISO device to ensure that the next boot is from the hard disk, and then start the virtual machine again.

shell
lxc stop winvm
+lxc config device remove winvm install
+lxc start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, lxd will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then lxc delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
lxc config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

',63)]))}const B=i(g,[["render",F]]);export{v as __pageData,B as default}; diff --git a/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.lean.js b/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.lean.js new file mode 100644 index 0000000000..e3eb9885fa --- /dev/null +++ b/assets/en_guide_lxd_lxd_windows.md.D7f4OoQI.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/win1.CJKAoRm5.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",r="/assets/wincf.B_Jc2M1G.jpg",o="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.C8qmMo1u.jpg",k="/assets/win7.CI43Ul0V.jpg",c="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in LXD","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_windows.md","filePath":"en/guide/lxd/lxd_windows.md","lastUpdated":1772424525000}'),g={name:"en/guide/lxd/lxd_windows.md"};function F(u,s,m,y,b,C){return e(),a("div",null,s[0]||(s[0]=[n("",63)]))}const B=i(g,[["render",F]]);export{v as __pageData,B as default}; diff --git a/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.js b/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.js deleted file mode 100644 index 6024525810..0000000000 --- a/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.js +++ /dev/null @@ -1,18 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.CJKAoRm5.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",o="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.C8qmMo1u.jpg",k="/assets/win7.CI43Ul0V.jpg",c="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in LXD","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_windows.md","filePath":"en/guide/lxd/lxd_windows.md","lastUpdated":1772422214000}'),F={name:"en/guide/lxd/lxd_windows.md"};function g(u,s,m,y,C,w){return a(),e("div",null,s[0]||(s[0]=[t(`

Running Windows Virtual Machines in LXD

Verify the LXD Driver

Ensure that lxc info output contains qemu, otherwise you cannot create VMs:

shell
lxc info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, lxd drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
-apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
-snap install lxd-imagebuilder --classic --edge
-# reboot to load some config
-reboot

Download the image and apply the patch. If you're using a different image, replace the download link accordingly.

(You don't need to download the image that comes with virtio, the original image will suffice)

Windows image download link: https://github.com/ILLKX/Windows

The following guide will use Windows 2019 as an example:

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
-lxd-imagebuilder repack-windows \\
-  --windows-arch=amd64 \\
-  win.iso \\
-  win.lxc.iso

The patching time depends on when the program adds the drivers needed for booting (it will add one by one until successful).

Some may take a short time, others may take longer, potentially exceeding 10~30 minutes. It's recommended to run this in screen or tmux.

After patching is complete, you can delete the original image:

shell
rm -f win.iso

Create the VM and Mount the Installation ISO

Here I'm using a configuration of 3 CPUs, 5GB RAM, and 30GB storage. If you're using Windows 10 or newer versions, you'll need at least 4 CPUs, 6GB RAM, and 40GB storage.

It's recommended to use more CPU and RAM than the resources I have set up now to avoid the system getting stuck to the point of crashing.

If you don't have enough memory, we recommend checking the Add SWAP item in the Other Useful Items section of this guide to add more virtual memory on your own.

shell
lxc init winvm --vm --empty
-lxc config device override winvm root size=30GiB
-lxc config set winvm limits.cpu=3 limits.memory=5GiB
-lxc config device add winvm vtpm tpm path=/dev/tpm0
-lxc config device add winvm install disk source=/root/win.lxd.iso boot.priority=10

Start the VM and Access the Desktop Remotely via Browser

Install the components needed for browser access:

shell
apt update
-apt install -y spice-html5 websockify lsof

Start the VM:

shell
lxc start winvm

Start remote access components:

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
-nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/var/snap/lxd/common/lxd/logs/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
-echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

At the first boot, you'll need to press the Ctrl+Alt+Delete button in the upper left corner of the browser page. After restarting, follow the prompts on the default interface. You'll need to wait 5-10 minutes for the ISO to be loaded for the actual installation.

Eventually, the Zabbly icon will appear and spin for at least 2 minutes. Please be patient.

Once the spinning stops, you'll enter the normal Windows VM installation process, similar to PVE operations.

Here the hard disk can not be selected, choose to view the yellow tips in the lower left corner, and then follow the prompts will be offline hard disk online point to confirm the button, you can select the hard disk.

Once the installation is complete, the virtual machine will automatically reboot a few times to update the network, and the web side of spice will show up in the user setup interface, while in the background you can use the lxc list to see that the network is automatically attached.

After setting up the user to enter the system login page, execute the following command to shut down/exit Windows, then remove the ISO device to ensure that the next boot is from the hard disk, and then start the virtual machine again.

shell
lxc stop winvm
-lxc config device remove winvm install
-lxc start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, lxd will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then lxc delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
lxc config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

',63)]))}const b=i(F,[["render",g]]);export{v as __pageData,b as default}; diff --git a/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.lean.js b/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.lean.js deleted file mode 100644 index 03cebbf983..0000000000 --- a/assets/en_guide_lxd_lxd_windows.md.wAMCEdnx.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.CJKAoRm5.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",p="/assets/wintj.tP8uDOfH.jpg",o="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.C8qmMo1u.jpg",k="/assets/win7.CI43Ul0V.jpg",c="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"Running Windows Virtual Machines in LXD","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/lxd/lxd_windows.md","filePath":"en/guide/lxd/lxd_windows.md","lastUpdated":1772422214000}'),F={name:"en/guide/lxd/lxd_windows.md"};function g(u,s,m,y,C,w){return a(),e("div",null,s[0]||(s[0]=[t("",63)]))}const b=i(F,[["render",g]]);export{v as __pageData,b as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.js b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.js new file mode 100644 index 0000000000..621aa53ef7 --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.js @@ -0,0 +1,72 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",r="/assets/home.BlmfOIEU.png",m=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_install.md","filePath":"en/guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772424525000}'),h={name:"en/guide/oneclickvirt/oneclickvirt_install.md"};function o(d,s,c,k,u,g){return e(),a("div",null,s[0]||(s[0]=[n('

OneClickVirt

Distinguish between the panel side and the controlled side. The controlled side needs to have the corresponding virtualization environment installed in advance. You can use the main installation of other virtualization in one-click virtualization for environment installation. The control side is actually just a panel, with no virtualization environment requirements.

Controlled Side

For other virtual environments corresponding to this guide, their main installation scripts can be used to set up the environment. We won't elaborate further here. This tutorial provides installation commands for the main setup of the four major virtualization technologies. Please refer to them directly.

If possible, always use the scripts to install the corresponding environment. Otherwise, you may encounter strange issues like inconsistent presets. If you lack technical expertise, do not manually install the environment. Use scripts for everything.

The controlled end only requires the virtualization environment to be installed. There is no need to install an additional agent for control. Simply ensure SSH login is possible (the SSH login address can be public or internal network, as long as connectivity is unimpeded).

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Panel Side

Hardware requirements include at least 1G of free memory and 2G of free disk space. Installation can be completed through any of the following methods.

Installation MethodApplicable ScenarioAdvantagesDisadvantages
Frontend-Backend Separated DeploymentHigh performance, minimal resource usageBest performance, flexible configurationComplex configuration, requires reverse proxy setup
All-in-One DeploymentWorks with or without public IPv4 addressSimple deployment, no reverse proxy neededRelatively poor performance
Docker Deployment (Pre-built Image)Quick deployment, larger resource usageOne-click installation, data persistenceRequires Docker environment, large image download
Docker Compose DeploymentSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time
Dockerfile Self-CompilationSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time

Installation via Pre-compiled Binary Files

Two methods are distinguished here:

  • Frontend-backend separated deployment (backend and frontend are compiled separately into corresponding files for deployment), better performance
  • All-in-one deployment (frontend and backend combined into one file for deployment), relatively poorer performance

Frontend-Backend Separated Deployment

Linux
Download Script

International

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
Environment Installation

Interactive environment installation

./install.sh env

Non-interactive environment installation

noninteractive=true ./install.sh env
Main Installation
./install.sh install

Installation directory: /opt/oneclickvirt

After successful installation, you need to manually start the service:

shell
systemctl start oneclickvirt

Other usage methods:

Stop service:

shell
systemctl stop oneclickvirt

Enable auto-start on boot:

shell
systemctl enable oneclickvirt

Check status:

shell
systemctl status oneclickvirt

View logs:

shell
journalctl -u oneclickvirt -f

Restart service:

shell
systemctl restart oneclickvirt
Upgrade Frontend and Backend
./install.sh upgrade

Except for configuration files, both backend and frontend files will be upgraded

During the upgrade process, you will be prompted whether you need to customize the frontend file path. If you choose not to customize, it will be extracted to /opt/oneclickvirt/web/ by default

This setting is mainly to accommodate the issue that 1panel cannot customize the frontend file path. The 1panel file path is similar to /opt/1panel/www/sites/beta/index/web, where beta is the name of the website you set up

Deploy Frontend

The previous installation script will extract the static files to (when not customized)

shell
cd /opt/oneclickvirt/web/

This path

Use nginx or caddy to establish a static website with this path. Whether you need to bind a domain name is your choice

After the static files are deployed, you need to reverse proxy the backend address for frontend use. Here is a specific example using OpenResty:

You need to reverse proxy the path /api to the backend http://127.0.0.1:8888 address. If you are using 1panel, you only need to fill in these, and the default backend domain name uses the default $host without modification.

If you are using nginx or caddy, please refer to the proxy source code below and modify it yourself for proxying

shell
location /api {
+    proxy_pass http://127.0.0.1:8888; 
+    proxy_set_header Host $host; 
+    proxy_set_header X-Real-IP $remote_addr; 
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
+    proxy_set_header REMOTE-HOST $remote_addr; 
+    proxy_set_header X-Forwarded-Proto $scheme; 
+    proxy_set_header X-Forwarded-Port $server_port; 
+    
+    # WebSocket support
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "upgrade";
+    
+    proxy_http_version 1.1; 
+    
+    # SSL settings
+    proxy_ssl_server_name off; 
+    proxy_ssl_name $proxy_host;
+    
+    # Timeout settings
+    proxy_connect_timeout 60s;
+    proxy_send_timeout 600s;
+    proxy_read_timeout 600s;
+    
+    # Cache and buffering
+    proxy_buffering off;
+    add_header X-Cache $upstream_cache_status;
+    add_header Cache-Control no-cache;
+}
Windows

View

https://github.com/oneclickvirt/oneclickvirt/releases/latest

Download the latest compressed file for the corresponding architecture, extract it, and execute it in the background.

In the same directory as the binary file being executed, download

https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml

This is the configuration file that will be needed later.

After downloading the web-dist.zip file, extract it and use the corresponding program to establish a static website, similar to Linux, set up the reverse proxy accordingly.

All-in-One Deployment

Here we no longer distinguish between frontend and backend concepts. From

https://github.com/oneclickvirt/oneclickvirt/releases/latest

Find the compressed package with the allinone tag for download. Note the distinction between amd64 and arm64 architectures, as well as the corresponding systems.

In Linux, use the tar -zxvf command to extract the tar.gz compressed package. In Windows, use the corresponding extraction tool to extract the zip compressed package, and copy and paste the binary file to the location where you need to deploy the project.

It's best to move it to a dedicated folder, as structured log files will be generated during operation.

(The following instructions will use the amd64 architecture Linux system file as an example)

In Linux, grant executable permissions to the file, such as

shell
chmod 777 server-allinone-linux-amd64

Then download

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

File to the same folder.

In Linux, use the screen or tmux or nohup command to execute the binary file in the background, such as

shell
./server-allinone-linux-amd64

Then open port 8888 of the corresponding IP address to see the frontend for use, such as

http://your-IP-address:8888

If you are on a Windows system, you need to start the exe file with administrator privileges, and ensure that the config.yaml configuration file exists in the same folder as the exe file before starting, otherwise a white screen or connectivity issues will occur upon startup. As for how to execute it in the background, explore it yourself. It's also fine to just leave the cmd interface running.

The all-in-one deployment mode is suitable for situations where the local machine does not have a public IP. Your IP address can be localhost or 127.0.0.1, or it can be the corresponding public IPv4 address. Test it yourself in the specific deployment environment.

Installation via Docker

TIP

Since the database is started together when starting, do not operate immediately when the container just starts. You need to wait at least 12 seconds.

Available image tags can be queried at

https://hub.docker.com/r/spiritlhl/oneclickvirt

https://github.com/oneclickvirt/oneclickvirt/pkgs/container/oneclickvirt

Method 1: Deploy Using Pre-built Image

Image Tag Description

Image TagDescriptionApplicable Scenario
spiritlhl/oneclickvirt:latestAll-in-one version (built-in database) latestQuick deployment
spiritlhl/oneclickvirt:20251209All-in-one version specific date versionNeed fixed version
spiritlhl/oneclickvirt:no-dbIndependent database version latestNo built-in database
spiritlhl/oneclickvirt:no-db-20251209Independent database version specific dateNo built-in database

All images support both linux/amd64 and linux/arm64 architectures.

Fresh Deployment

Using pre-built amd64 or arm64 images, the corresponding version will be automatically downloaded based on the current system architecture:

Without domain configuration:

bash
docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  spiritlhl/oneclickvirt:latest

With domain access configuration:

If you need to configure a domain name, you need to set the FRONTEND_URL environment variable:

bash
docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -e FRONTEND_URL="https://your-domain.com" \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  spiritlhl/oneclickvirt:latest

The above methods are only for new installations

Upgrade Only in Old Environment

First backup the configuration file to the current path:

shell
docker cp oneclickvirt:/app/config.yaml .

Delete only the container itself without deleting the mount volumes:

shell
docker rm -f oneclickvirt

Then delete the original image:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

Pull the container image again:

shell
docker pull spiritlhl/oneclickvirt:latest

Then follow the steps for fresh environment deployment. Note that after waiting 12 seconds to open the frontend, you will find it has automatically skipped the initialization interface because the data has been persisted and imported.

Then overwrite the original configuration file:

shell
docker cp config.yaml oneclickvirt:/app/config.yaml
Fresh Deployment in Old Environment

This will completely delete the original data before deployment. Not only do you need to delete the container but also the corresponding mount points:

shell
docker rm -f oneclickvirt
+docker volume rm oneclickvirt-data oneclickvirt-storage

Then delete the original image:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

Pull the container image again:

shell
docker pull spiritlhl/oneclickvirt:latest

Then follow the steps for fresh environment deployment. This will prompt for reinitialization, and all original data has been deleted.

Method 2: Self-Compile Deployment via Docker Compose

Using Docker Compose allows one-click deployment of a complete development environment, adopting a separate container deployment architecture, including independent frontend container, backend container, and database container:

bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker-compose up -d --build || docker compose up -d --build

Default Configuration Description:

  • Frontend service: http://localhost:8888
  • Backend API: Accessed through frontend proxy
  • MySQL database: Port 3306, database name oneclickvirt, no password
  • Data persistence:
    • Database data: ./data/mysql
    • Application storage: ./data/app/

Initialization Configuration:

When accessing for the first time, you will enter the initialization interface. Please fill in the database configuration:

  • Database address: mysql (container name, not 127.0.0.1)
  • Database port: 3306
  • Database name: oneclickvirt
  • Database user: root
  • Database password: Leave blank (no password)

Custom Port (Optional):

If you need to modify the frontend access port, edit the ports configuration in the docker-compose.yaml file:

yaml
services:
+  web:
+    ports:
+      - "your-port:80"  # For example "80:80" or "8080:80"

Stop Service:

bash
docker-compose down

View Logs:

bash
docker-compose logs -f

Clean Data:

bash
docker-compose down
+rm -rf ./data

Method 3: Self-Compile Deployment via Dockerfile

This method is suitable for modifying source code and custom builds:

All-in-One Version (Built-in Database)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker build -t oneclickvirt .
+docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  oneclickvirt
Independent Database Version (No Built-in Database)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
+docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -e FRONTEND_URL="https://your-domain.com" \\
+  -e DB_HOST="your-mysql-host" \\
+  -e DB_PORT="3306" \\
+  -e DB_NAME="oneclickvirt" \\
+  -e DB_USER="root" \\
+  -e DB_PASSWORD="your-password" \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  oneclickvirt:no-db

Database Initialization

After installing and starting mysql, create an empty database oneclickvirt with type utf8mb4. It's best to make it accessible only locally at 127.0.0.1. Save the corresponding username and password. (If you are using the all-in-one Docker deployment container, it comes with a built-in database and you don't need to create an empty database yourself. The corresponding database is already started and available in the container by default)

After opening the corresponding frontend page, it will automatically redirect to the initialization interface.

Fill in the database information and related user information. If the database connection test is successful, you can click Initialize System.

After completing initialization, it will automatically redirect to the homepage, and you can explore and use it yourself.

If the default user information is used for initialization, the default account is:

Administrator account name and password are respectively:

admin
Admin123!@#

During the initialization process, all image seed data is loaded into the database by default, but by default only debian and alpine related version images are enabled. This is to avoid user selection difficulties caused by too many enabled images.

If you need additional types of images, you need to search by type, architecture, and version in the system image management interface under administrator privileges and enable them.

After initialization, please immediately change the default administrator username and password, and disable or delete the default enabled test user testuser. This can be done in the administrator's user management page.

',155)]))}const F=i(h,[["render",o]]);export{m as __pageData,F as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.lean.js new file mode 100644 index 0000000000..d23a6b7047 --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CpP4Nxv_.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",r="/assets/home.BlmfOIEU.png",m=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_install.md","filePath":"en/guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772424525000}'),h={name:"en/guide/oneclickvirt/oneclickvirt_install.md"};function o(d,s,c,k,u,g){return e(),a("div",null,s[0]||(s[0]=[n("",155)]))}const F=i(h,[["render",o]]);export{m as __pageData,F as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.js b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.js deleted file mode 100644 index 158057a2f9..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.js +++ /dev/null @@ -1,72 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",y=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_install.md","filePath":"en/guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772422214000}'),o={name:"en/guide/oneclickvirt/oneclickvirt_install.md"};function r(d,s,k,c,g,F){return e(),a("div",null,s[0]||(s[0]=[t('

OneClickVirt

Distinguish between the panel side and the controlled side. The controlled side needs to have the corresponding virtualization environment installed in advance. You can use the main installation of other virtualization in one-click virtualization for environment installation. The control side is actually just a panel, with no virtualization environment requirements.

Controlled Side

For other virtual environments corresponding to this guide, their main installation scripts can be used to set up the environment. We won't elaborate further here. This tutorial provides installation commands for the main setup of the four major virtualization technologies. Please refer to them directly.

If possible, always use the scripts to install the corresponding environment. Otherwise, you may encounter strange issues like inconsistent presets. If you lack technical expertise, do not manually install the environment. Use scripts for everything.

The controlled end only requires the virtualization environment to be installed. There is no need to install an additional agent for control. Simply ensure SSH login is possible (the SSH login address can be public or internal network, as long as connectivity is unimpeded).

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Panel Side

Hardware requirements include at least 1G of free memory and 2G of free disk space. Installation can be completed through any of the following methods.

Installation MethodApplicable ScenarioAdvantagesDisadvantages
Frontend-Backend Separated DeploymentHigh performance, minimal resource usageBest performance, flexible configurationComplex configuration, requires reverse proxy setup
All-in-One DeploymentWorks with or without public IPv4 addressSimple deployment, no reverse proxy neededRelatively poor performance
Docker Deployment (Pre-built Image)Quick deployment, larger resource usageOne-click installation, data persistenceRequires Docker environment, large image download
Docker Compose DeploymentSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time
Dockerfile Self-CompilationSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time

Installation via Pre-compiled Binary Files

Two methods are distinguished here:

  • Frontend-backend separated deployment (backend and frontend are compiled separately into corresponding files for deployment), better performance
  • All-in-one deployment (frontend and backend combined into one file for deployment), relatively poorer performance

Frontend-Backend Separated Deployment

Linux
Download Script

International

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
Environment Installation

Interactive environment installation

./install.sh env

Non-interactive environment installation

noninteractive=true ./install.sh env
Main Installation
./install.sh install

Installation directory: /opt/oneclickvirt

After successful installation, you need to manually start the service:

shell
systemctl start oneclickvirt

Other usage methods:

Stop service:

shell
systemctl stop oneclickvirt

Enable auto-start on boot:

shell
systemctl enable oneclickvirt

Check status:

shell
systemctl status oneclickvirt

View logs:

shell
journalctl -u oneclickvirt -f

Restart service:

shell
systemctl restart oneclickvirt
Upgrade Frontend and Backend
./install.sh upgrade

Except for configuration files, both backend and frontend files will be upgraded

During the upgrade process, you will be prompted whether you need to customize the frontend file path. If you choose not to customize, it will be extracted to /opt/oneclickvirt/web/ by default

This setting is mainly to accommodate the issue that 1panel cannot customize the frontend file path. The 1panel file path is similar to /opt/1panel/www/sites/beta/index/web, where beta is the name of the website you set up

Deploy Frontend

The previous installation script will extract the static files to (when not customized)

shell
cd /opt/oneclickvirt/web/

This path

Use nginx or caddy to establish a static website with this path. Whether you need to bind a domain name is your choice

After the static files are deployed, you need to reverse proxy the backend address for frontend use. Here is a specific example using OpenResty:

You need to reverse proxy the path /api to the backend http://127.0.0.1:8888 address. If you are using 1panel, you only need to fill in these, and the default backend domain name uses the default $host without modification.

If you are using nginx or caddy, please refer to the proxy source code below and modify it yourself for proxying

shell
location /api {
-    proxy_pass http://127.0.0.1:8888; 
-    proxy_set_header Host $host; 
-    proxy_set_header X-Real-IP $remote_addr; 
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
-    proxy_set_header REMOTE-HOST $remote_addr; 
-    proxy_set_header X-Forwarded-Proto $scheme; 
-    proxy_set_header X-Forwarded-Port $server_port; 
-    
-    # WebSocket support
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "upgrade";
-    
-    proxy_http_version 1.1; 
-    
-    # SSL settings
-    proxy_ssl_server_name off; 
-    proxy_ssl_name $proxy_host;
-    
-    # Timeout settings
-    proxy_connect_timeout 60s;
-    proxy_send_timeout 600s;
-    proxy_read_timeout 600s;
-    
-    # Cache and buffering
-    proxy_buffering off;
-    add_header X-Cache $upstream_cache_status;
-    add_header Cache-Control no-cache;
-}
Windows

View

https://github.com/oneclickvirt/oneclickvirt/releases/latest

Download the latest compressed file for the corresponding architecture, extract it, and execute it in the background.

In the same directory as the binary file being executed, download

https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml

This is the configuration file that will be needed later.

After downloading the web-dist.zip file, extract it and use the corresponding program to establish a static website, similar to Linux, set up the reverse proxy accordingly.

All-in-One Deployment

Here we no longer distinguish between frontend and backend concepts. From

https://github.com/oneclickvirt/oneclickvirt/releases/latest

Find the compressed package with the allinone tag for download. Note the distinction between amd64 and arm64 architectures, as well as the corresponding systems.

In Linux, use the tar -zxvf command to extract the tar.gz compressed package. In Windows, use the corresponding extraction tool to extract the zip compressed package, and copy and paste the binary file to the location where you need to deploy the project.

It's best to move it to a dedicated folder, as structured log files will be generated during operation.

(The following instructions will use the amd64 architecture Linux system file as an example)

In Linux, grant executable permissions to the file, such as

shell
chmod 777 server-allinone-linux-amd64

Then download

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

File to the same folder.

In Linux, use the screen or tmux or nohup command to execute the binary file in the background, such as

shell
./server-allinone-linux-amd64

Then open port 8888 of the corresponding IP address to see the frontend for use, such as

http://your-IP-address:8888

If you are on a Windows system, you need to start the exe file with administrator privileges, and ensure that the config.yaml configuration file exists in the same folder as the exe file before starting, otherwise a white screen or connectivity issues will occur upon startup. As for how to execute it in the background, explore it yourself. It's also fine to just leave the cmd interface running.

The all-in-one deployment mode is suitable for situations where the local machine does not have a public IP. Your IP address can be localhost or 127.0.0.1, or it can be the corresponding public IPv4 address. Test it yourself in the specific deployment environment.

Installation via Docker

TIP

Since the database is started together when starting, do not operate immediately when the container just starts. You need to wait at least 12 seconds.

Available image tags can be queried at

https://hub.docker.com/r/spiritlhl/oneclickvirt

https://github.com/oneclickvirt/oneclickvirt/pkgs/container/oneclickvirt

Method 1: Deploy Using Pre-built Image

Image Tag Description

Image TagDescriptionApplicable Scenario
spiritlhl/oneclickvirt:latestAll-in-one version (built-in database) latestQuick deployment
spiritlhl/oneclickvirt:20251209All-in-one version specific date versionNeed fixed version
spiritlhl/oneclickvirt:no-dbIndependent database version latestNo built-in database
spiritlhl/oneclickvirt:no-db-20251209Independent database version specific dateNo built-in database

All images support both linux/amd64 and linux/arm64 architectures.

Fresh Deployment

Using pre-built amd64 or arm64 images, the corresponding version will be automatically downloaded based on the current system architecture:

Without domain configuration:

bash
docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  spiritlhl/oneclickvirt:latest

With domain access configuration:

If you need to configure a domain name, you need to set the FRONTEND_URL environment variable:

bash
docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -e FRONTEND_URL="https://your-domain.com" \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  spiritlhl/oneclickvirt:latest

The above methods are only for new installations

Upgrade Only in Old Environment

First backup the configuration file to the current path:

shell
docker cp oneclickvirt:/app/config.yaml .

Delete only the container itself without deleting the mount volumes:

shell
docker rm -f oneclickvirt

Then delete the original image:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

Pull the container image again:

shell
docker pull spiritlhl/oneclickvirt:latest

Then follow the steps for fresh environment deployment. Note that after waiting 12 seconds to open the frontend, you will find it has automatically skipped the initialization interface because the data has been persisted and imported.

Then overwrite the original configuration file:

shell
docker cp config.yaml oneclickvirt:/app/config.yaml
Fresh Deployment in Old Environment

This will completely delete the original data before deployment. Not only do you need to delete the container but also the corresponding mount points:

shell
docker rm -f oneclickvirt
-docker volume rm oneclickvirt-data oneclickvirt-storage

Then delete the original image:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

Pull the container image again:

shell
docker pull spiritlhl/oneclickvirt:latest

Then follow the steps for fresh environment deployment. This will prompt for reinitialization, and all original data has been deleted.

Method 2: Self-Compile Deployment via Docker Compose

Using Docker Compose allows one-click deployment of a complete development environment, adopting a separate container deployment architecture, including independent frontend container, backend container, and database container:

bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker-compose up -d --build || docker compose up -d --build

Default Configuration Description:

  • Frontend service: http://localhost:8888
  • Backend API: Accessed through frontend proxy
  • MySQL database: Port 3306, database name oneclickvirt, no password
  • Data persistence:
    • Database data: ./data/mysql
    • Application storage: ./data/app/

Initialization Configuration:

When accessing for the first time, you will enter the initialization interface. Please fill in the database configuration:

  • Database address: mysql (container name, not 127.0.0.1)
  • Database port: 3306
  • Database name: oneclickvirt
  • Database user: root
  • Database password: Leave blank (no password)

Custom Port (Optional):

If you need to modify the frontend access port, edit the ports configuration in the docker-compose.yaml file:

yaml
services:
-  web:
-    ports:
-      - "your-port:80"  # For example "80:80" or "8080:80"

Stop Service:

bash
docker-compose down

View Logs:

bash
docker-compose logs -f

Clean Data:

bash
docker-compose down
-rm -rf ./data

Method 3: Self-Compile Deployment via Dockerfile

This method is suitable for modifying source code and custom builds:

All-in-One Version (Built-in Database)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker build -t oneclickvirt .
-docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  oneclickvirt
Independent Database Version (No Built-in Database)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
-docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -e FRONTEND_URL="https://your-domain.com" \\
-  -e DB_HOST="your-mysql-host" \\
-  -e DB_PORT="3306" \\
-  -e DB_NAME="oneclickvirt" \\
-  -e DB_USER="root" \\
-  -e DB_PASSWORD="your-password" \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  oneclickvirt:no-db

Database Initialization

After installing and starting mysql, create an empty database oneclickvirt with type utf8mb4. It's best to make it accessible only locally at 127.0.0.1. Save the corresponding username and password. (If you are using the all-in-one Docker deployment container, it comes with a built-in database and you don't need to create an empty database yourself. The corresponding database is already started and available in the container by default)

After opening the corresponding frontend page, it will automatically redirect to the initialization interface.

Fill in the database information and related user information. If the database connection test is successful, you can click Initialize System.

After completing initialization, it will automatically redirect to the homepage, and you can explore and use it yourself.

If the default user information is used for initialization, the default account is:

Administrator account name and password are respectively:

admin
Admin123!@#

During the initialization process, all image seed data is loaded into the database by default, but by default only debian and alpine related version images are enabled. This is to avoid user selection difficulties caused by too many enabled images.

If you need additional types of images, you need to search by type, architecture, and version in the system image management interface under administrator privileges and enable them.

After initialization, please immediately change the default administrator username and password, and disable or delete the default enabled test user testuser. This can be done in the administrator's user management page.

',155)]))}const m=i(o,[["render",r]]);export{y as __pageData,m as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.lean.js deleted file mode 100644 index f037bc9a2d..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_install.md.CxoE6wYv.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",y=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_install.md","filePath":"en/guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772422214000}'),o={name:"en/guide/oneclickvirt/oneclickvirt_install.md"};function r(d,s,k,c,g,F){return e(),a("div",null,s[0]||(s[0]=[t("",155)]))}const m=i(o,[["render",r]]);export{y as __pageData,m as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.js b/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.js similarity index 67% rename from assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.js rename to assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.js index e2f7478938..22cef5af60 100644 --- a/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.js +++ b/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.js @@ -1,5 +1,5 @@ -import{_ as t,c as a,o as i,ag as n}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772422214000}'),o={name:"en/guide/oneclickvirt/oneclickvirt_precheck.md"};function r(s,e,p,l,c,d){return i(),a("div",null,e[0]||(e[0]=[n(`

Preface

This is a control panel for interfacing with mainstream virtualization technologies, supplementing features not natively supported by virtualization platforms such as user management, traffic monitoring, NAT port mapping, and custom system images.

Welcome to support the project with a Star for free --> https://github.com/oneclickvirt/oneclickvirt

WARNING

This is a project in early development and may have various bugs and instabilities. Please assess the risks before use. Updates will be relatively frequent.

Environment Requirements

Supported architectures: amd64 or arm64

Supported systems: Linux, Windows, or any self-compiled system architecture

Only requires public network access. The deployed machine does not need an independent public IP address. This is just a virtualization control panel that only needs port display for the frontend. In fact, one important reason for development is that I need to manage multiple virtualization environments without a public IPv4 address.

This control panel has no special environmental dependency requirements. For one-click deployment, you can use the all-in-one Docker image with database included or docker-compose deployment with separated containers.

Frontend static files are deployed through nginx or caddy or OpenResty. For non-source code deployment and non-Docker deployment, API path reverse proxy to the backend port is required.

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Platform Features

  • Language internationalization: Frontend supports bilingual display in Chinese and English, defaults to Chinese display, with switchable default system language

  • Provider Integration: Supports ProxmoxVE, Incus, Docker, LXD - four major mainstream virtualization platforms, with more platforms coming soon

  • Flexible Instance Types: Supports automatic creation of virtual machines (VM) and containers (Container), providing a unified virtualization resource management experience through abstraction design

  • Built-in Image Seed Data: No need to search for platform-specific images yourself. All platforms come with self-compiled image loading, supporting unified management or custom image download URLs

  • Automatic NAT Port Mapping: Supports automatic port mapping for IPv4/IPv6, with mapped IPs supporting non-public IPs. Supports multiple network types:

NAT IPv4
+import{_ as t,c as a,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772424525000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_precheck.md"};function r(o,e,p,l,c,d){return n(),a("div",null,e[0]||(e[0]=[i(`

Preface

This is a control panel for interfacing with mainstream virtualization technologies, supplementing features not natively supported by virtualization platforms such as user management, traffic monitoring, NAT port mapping, and custom system images.

Welcome to support the project with a Star for free --> https://github.com/oneclickvirt/oneclickvirt

WARNING

This is a project in early development and may have various bugs and instabilities. Please assess the risks before use. Updates will be relatively frequent.

Environment Requirements

Supported architectures: amd64 or arm64

Supported systems: Linux, Windows, or any self-compiled system architecture

Only requires public network access. The deployed machine does not need an independent public IP address. This is just a virtualization control panel that only needs port display for the frontend. In fact, one important reason for development is that I need to manage multiple virtualization environments without a public IPv4 address.

This control panel has no special environmental dependency requirements. For one-click deployment, you can use the all-in-one Docker image with database included or docker-compose deployment with separated containers.

Frontend static files are deployed through nginx or caddy or OpenResty. For non-source code deployment and non-Docker deployment, API path reverse proxy to the backend port is required.

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Platform Features

  • Language internationalization: Frontend supports bilingual display in Chinese and English, defaults to Chinese display, with switchable default system language

  • Provider Integration: Supports ProxmoxVE, Incus, Docker, LXD - four major mainstream virtualization platforms, with more platforms coming soon

  • Flexible Instance Types: Supports automatic creation of virtual machines (VM) and containers (Container), providing a unified virtualization resource management experience through abstraction design

  • Built-in Image Seed Data: No need to search for platform-specific images yourself. All platforms come with self-compiled image loading, supporting unified management or custom image download URLs

  • Automatic NAT Port Mapping: Supports automatic port mapping for IPv4/IPv6, with mapped IPs supporting non-public IPs. Supports multiple network types:

NAT IPv4
 NAT IPv4 + Independent IPv6
 Independent IPv4
 Independent IPv4 + IPv6
-Pure IPv6
  • Port Mapping Methods: Flexibly selects the best mapping solution automatically based on different Providers (native, device proxy, iptables, etc.)

  • Traffic Statistics: Integrates IP-level and network interface-level precise network traffic statistics. Forces traffic data synchronization during sensitive operations to ensure data accuracy

  • Monthly traffic usage statistics reset at the beginning of each month. Supports traffic statistics and limits at user, instance, and Provider levels

  • Invitation Code System: Supports non-public registration invitation mechanism, with different resource quota limits based on user levels

  • Resource Limits: Supports setting instance quantity/CPU/memory/disk/bandwidth quota management and traffic usage restrictions

  • All code is open source, but no commercial development will be undertaken

`,15)]))}const h=t(o,[["render",r]]);export{m as __pageData,h as default}; +Pure IPv6
  • Port Mapping Methods: Flexibly selects the best mapping solution automatically based on different Providers (native, device proxy, iptables, etc.)

  • Traffic Statistics: Integrates IP-level and network interface-level precise network traffic statistics. Forces traffic data synchronization during sensitive operations to ensure data accuracy

  • Monthly traffic usage statistics reset at the beginning of each month. Supports traffic statistics and limits at user, instance, and Provider levels

  • Invitation Code System: Supports non-public registration invitation mechanism, with different resource quota limits based on user levels

  • Resource Limits: Supports setting instance quantity/CPU/memory/disk/bandwidth quota management and traffic usage restrictions

  • All code is open source, but no commercial development will be undertaken

`,15)]))}const h=t(s,[["render",r]]);export{m as __pageData,h as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.lean.js new file mode 100644 index 0000000000..9aa355eeed --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.CTP4Q8vT.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772424525000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_precheck.md"};function r(o,e,p,l,c,d){return n(),a("div",null,e[0]||(e[0]=[i("",15)]))}const h=t(s,[["render",r]]);export{m as __pageData,h as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.lean.js deleted file mode 100644 index d5e4a34a28..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_precheck.md.DkRfggVQ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as i,ag as n}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"en/guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772422214000}'),o={name:"en/guide/oneclickvirt/oneclickvirt_precheck.md"};function r(s,e,p,l,c,d){return i(),a("div",null,e[0]||(e[0]=[n("",15)]))}const h=t(o,[["render",r]]);export{m as __pageData,h as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.js b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.js deleted file mode 100644 index 35a435056f..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.js +++ /dev/null @@ -1,13 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/iofailed.BIGD2fYy.png",g=JSON.parse('{"title":"Please Report Issues to the Corresponding Repository","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","filePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772422214000}'),l={name:"en/guide/oneclickvirt/oneclickvirt_qa.md"};function p(h,s,o,r,k,d){return e(),a("div",null,s[0]||(s[0]=[t(`

Please Report Issues to the Corresponding Repository

What to Do If You Forgot the Administrator Password

You need to forcibly change the password through database operations

  1. Generate Password Hash
bash
# Generate using Python (replace NewPassword123! with your new password)
-python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

Example output: $2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. Enter the Database

Docker Deployment (All-in-One Version):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

Standalone Database Deployment:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. Update Password
sql
-- View administrator account
-SELECT id, username, user_type FROM users WHERE user_type = 'admin';
-
--- Update password (replace with the hash value generated in step 1)
-UPDATE users 
-SET password = '$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
-WHERE username = 'admin';
-
--- Exit
-EXIT;
  1. Login Test

Log in to the system with the new password to verify.

Notes

  • The hash value must start with $2a$, $2b$, or $2y$
  • The default administrator username is admin, which can be confirmed through a query
  • It is recommended to use a strong password (≥8 characters, containing uppercase and lowercase letters, numbers, and special characters)
  • It is recommended to backup the database before modification:
    bash
    docker exec oneclickvirt mysqldump -u root oneclickvirt > backup.sql

How to Delete Persistent Database and Storage Volumes in Docker

After deleting the corresponding container

Execute

shell
docker volume rm oneclickvirt-data oneclickvirt-storage oneclickvirt-config

to delete

Excessive Instance Creation Causes Node Abnormalities

A prominent symptom is extremely slow operation execution, with commands taking several minutes to complete.

This commonly occurs when a node has poor I/O performance and is over-allocated with SWAP memory. For example, in an LXD environment, executing lxc list may result in an error:

shell
internal error, please report: running “lxd.lxc” failed: cannot create transient scope: DBus error “org.freedesktop.DBus.Error.TimedOut”: [Failed to activate service ‘org.freedesktop.systemd1’: timed out (service_start_timeout=25000ms)]

The root cause is setting too many instances while the provider imposes strict I/O restrictions.

At this point, only one solution remains: force-reboot the node server.

Immediately after reboot, log into SSH and use the corresponding script to clear swap usage, then delete some instances to free resources.

Since containers take time to restart individually after reboot, this window may not delete many instances, but each reboot clears some.

Ultimately, when limiting instance counts, carefully assess node performance. Avoid overloading weaker nodes or those with strict constraints.

Issues Arising from Self-Compilation

Commonly encountered in source code deployment, Dockerfile, and Docker Compose deployment methods

Frequently observed in frontend compilation errors on ARM architectures

Directly deploy using pre-compiled Docker container images or binary files (most reliable approach)

Some commands cannot detect NAT mapping rules for Incus and LXD.

This is normal behavior.

Incus/LXD port mapping defaults to kernel-level NAT (DNAT + FORWARD) and does not create port listening processes on the host machine. Therefore, traditional port occupancy tools typically will not show any results.

For example, the following commands will not detect host port usage:

shell
ss -lntup
-lsof -i
-netstat -lntp

Only by running:

shell
incus config device show instance1

or:

shell
lxd config device show instance1

to view configured port mapping rules, as traffic bypasses the host and forwards directly externally.

The correct method to check port mappings is to examine nftables rules

shell
nft list ruleset

or view only the NAT table:

shell
nft list table ip nat

On systems using iptables, use:

shell
iptables -t nat -L

If traffic is flowing in or out, inspect actual connection states with:

shell
conntrack -L | grep <port>
`,54)]))}const F=i(l,[["render",p]]);export{g as __pageData,F as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.lean.js deleted file mode 100644 index a715cd513c..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.DGrQtLLQ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/iofailed.BIGD2fYy.png",g=JSON.parse('{"title":"Please Report Issues to the Corresponding Repository","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","filePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772422214000}'),l={name:"en/guide/oneclickvirt/oneclickvirt_qa.md"};function p(h,s,o,r,k,d){return e(),a("div",null,s[0]||(s[0]=[t("",54)]))}const F=i(l,[["render",p]]);export{g as __pageData,F as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.js b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.js new file mode 100644 index 0000000000..61730f50b2 --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.js @@ -0,0 +1,13 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/iofailed.BIGD2fYy.png",g=JSON.parse('{"title":"Please Report Issues to the Corresponding Repository","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","filePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772424525000}'),l={name:"en/guide/oneclickvirt/oneclickvirt_qa.md"};function p(r,s,h,o,d,k){return e(),a("div",null,s[0]||(s[0]=[n(`

Please Report Issues to the Corresponding Repository

What to Do If You Forgot the Administrator Password

You need to forcibly change the password through database operations

  1. Generate Password Hash
bash
# Generate using Python (replace NewPassword123! with your new password)
+python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

Example output: $2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. Enter the Database

Docker Deployment (All-in-One Version):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

Standalone Database Deployment:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. Update Password
sql
-- View administrator account
+SELECT id, username, user_type FROM users WHERE user_type = 'admin';
+
+-- Update password (replace with the hash value generated in step 1)
+UPDATE users 
+SET password = '$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
+WHERE username = 'admin';
+
+-- Exit
+EXIT;
  1. Login Test

Log in to the system with the new password to verify.

Notes

  • The hash value must start with $2a$, $2b$, or $2y$
  • The default administrator username is admin, which can be confirmed through a query
  • It is recommended to use a strong password (≥8 characters, containing uppercase and lowercase letters, numbers, and special characters)
  • It is recommended to backup the database before modification:
    bash
    docker exec oneclickvirt mysqldump -u root oneclickvirt > backup.sql

How to Delete Persistent Database and Storage Volumes in Docker

After deleting the corresponding container

Execute

shell
docker volume rm oneclickvirt-data oneclickvirt-storage oneclickvirt-config

to delete

Excessive Instance Creation Causes Node Abnormalities

A prominent symptom is extremely slow operation execution, with commands taking several minutes to complete.

This commonly occurs when a node has poor I/O performance and is over-allocated with SWAP memory. For example, in an LXD environment, executing lxc list may result in an error:

shell
internal error, please report: running “lxd.lxc” failed: cannot create transient scope: DBus error “org.freedesktop.DBus.Error.TimedOut”: [Failed to activate service ‘org.freedesktop.systemd1’: timed out (service_start_timeout=25000ms)]

The root cause is setting too many instances while the provider imposes strict I/O restrictions.

At this point, only one solution remains: force-reboot the node server.

Immediately after reboot, log into SSH and use the corresponding script to clear swap usage, then delete some instances to free resources.

Since containers take time to restart individually after reboot, this window may not delete many instances, but each reboot clears some.

Ultimately, when limiting instance counts, carefully assess node performance. Avoid overloading weaker nodes or those with strict constraints.

Issues Arising from Self-Compilation

Commonly encountered in source code deployment, Dockerfile, and Docker Compose deployment methods

Frequently observed in frontend compilation errors on ARM architectures

Directly deploy using pre-compiled Docker container images or binary files (most reliable approach)

Some commands cannot detect NAT mapping rules for Incus and LXD.

This is normal behavior.

Incus/LXD port mapping defaults to kernel-level NAT (DNAT + FORWARD) and does not create port listening processes on the host machine. Therefore, traditional port occupancy tools typically will not show any results.

For example, the following commands will not detect host port usage:

shell
ss -lntup
+lsof -i
+netstat -lntp

Only by running:

shell
incus config device show instance1

or:

shell
lxd config device show instance1

to view configured port mapping rules, as traffic bypasses the host and forwards directly externally.

The correct method to check port mappings is to examine nftables rules

shell
nft list ruleset

or view only the NAT table:

shell
nft list table ip nat

On systems using iptables, use:

shell
iptables -t nat -L

If traffic is flowing in or out, inspect actual connection states with:

shell
conntrack -L | grep <port>
`,54)]))}const u=i(l,[["render",p]]);export{g as __pageData,u as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.lean.js new file mode 100644 index 0000000000..d693b0e41f --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_qa.md.Dq5O4kXg.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/iofailed.BIGD2fYy.png",g=JSON.parse('{"title":"Please Report Issues to the Corresponding Repository","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","filePath":"en/guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772424525000}'),l={name:"en/guide/oneclickvirt/oneclickvirt_qa.md"};function p(r,s,h,o,d,k){return e(),a("div",null,s[0]||(s[0]=[n("",54)]))}const u=i(l,[["render",p]]);export{g as __pageData,u as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.js b/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.js similarity index 89% rename from assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.js rename to assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.js index 8aae694ef5..5b03c5b76f 100644 --- a/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.js +++ b/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.js @@ -1 +1 @@ -import{_ as t,c as r,o,ag as a}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772422214000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_thanks.md"};function n(c,e,i,l,m,p){return o(),r("div",null,e[0]||(e[0]=[a('

Acknowledgments

We extend our gratitude to the following platforms for providing servers available for testing.

https://console.zmto.com/

https://fossvps.org/

https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/

',5)]))}const f=t(s,[["render",n]]);export{_ as __pageData,f as default}; +import{_ as t,c as r,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772424525000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_thanks.md"};function n(c,e,i,l,m,p){return o(),r("div",null,e[0]||(e[0]=[a('

Acknowledgments

We extend our gratitude to the following platforms for providing servers available for testing.

https://console.zmto.com/

https://fossvps.org/

https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/

',5)]))}const f=t(s,[["render",n]]);export{_ as __pageData,f as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.lean.js similarity index 74% rename from assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.lean.js rename to assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.lean.js index 4baff69f42..12de85d3c9 100644 --- a/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.BZDqTjl9.lean.js +++ b/assets/en_guide_oneclickvirt_oneclickvirt_thanks.md.DfA7zu-W.lean.js @@ -1 +1 @@ -import{_ as t,c as r,o,ag as a}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772422214000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_thanks.md"};function n(c,e,i,l,m,p){return o(),r("div",null,e[0]||(e[0]=[a("",5)]))}const f=t(s,[["render",n]]);export{_ as __pageData,f as default}; +import{_ as t,c as r,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"en/guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772424525000}'),s={name:"en/guide/oneclickvirt/oneclickvirt_thanks.md"};function n(c,e,i,l,m,p){return o(),r("div",null,e[0]||(e[0]=[a("",5)]))}const f=t(s,[["render",n]]);export{_ as __pageData,f as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.js b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.js new file mode 100644 index 0000000000..56cb27b62d --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.js @@ -0,0 +1,97 @@ +import{_ as i,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/resetuserpassword.CqOxip2E.png",l="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",r="/assets/edituser.5rScwK1u.png",o="/assets/switch.yK08dswR.png",p="/assets/base.DRc_UdCb.png",h="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",k="/assets/setvirt.DKwPSHcD.png",u="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",m="/assets/ipt1.BWlPVFUI.png",y="/assets/ipt2.BZjM3d2a.png",E="/assets/bw1.Cf2N9DNJ.png",b="/assets/bw2.DJ4v_edl.png",f="/assets/bw3.D087jBmd.png",v="/assets/cz.CpDm16A7.png",C="/assets/pcz.Bf32qIMb.png",F="/assets/level.ClT-FQGb.png",w="/assets/setmore1.C4F--yVn.png",x="/assets/setmore2.DbU1hlgY.png",q="/assets/autoapi1.DUEk35Fd.png",B="/assets/autoapi2.YWfGcqPd.png",D="/assets/autoapi3.PO1KiLU6.png",A="/assets/hardwareconfig.qww9PB2d.png",_="/assets/autoapi4.BMm_5qST.png",P="/assets/autoapi45.D3Ei-57N.png",z="/assets/images.CshFq7yK.png",I="/assets/userlevel.Dff1Ev4j.png",M="/assets/usercontrol.VCrXBaGX.png",H=JSON.parse('{"title":"Usage Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","filePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772424525000}'),T={name:"en/guide/oneclickvirt/oneclickvirt_usage.md"};function S(L,s,N,R,O,U){return a(),e("div",null,s[0]||(s[0]=[n('

Usage Guide

This document provides detailed instructions on how to use this panel. If you have any questions, please join the group for assistance from administrators: https://t.me/oneclickvirt

User Management

After logging into the administrator interface, open the user management page and you must click reset password to ensure the admin account password is a strong password, preventing malicious brute force attacks. If you defined your own password during initialization, you may skip resetting the password.

Resetting the password will automatically generate a strong password, which is displayed only once. Be sure to copy and save it to avoid forgetting it.

If you need to change a user's type, click on the corresponding user to edit. The edit popup supports changing the user type.

Administrators can click on the avatar in the upper right corner, where the dropdown menu has a button to switch between administrator and regular user views. If you need to test any features, you can directly use the administrator user for testing. (Regular users do not have this view switching button)

Managing Nodes

First, you need to ensure that the node to be managed has one of the four major virtualization technologies installed.

Ping the node's IP from the machine where this panel is deployed. Ideally, the latency should be within 300ms and the packet loss rate should not be too high, otherwise connection failures may occur, resulting in missed command execution in control.

Below are the steps for setting up nodes. Required and mandatory steps must be followed, while optional steps depend on your needs.

Basic Information (Required)

The server name should preferably use only English letters and numbers, avoid special characters, and ideally be within 6 characters. When creating containers or virtual machines later, this server name will be automatically added as a prefix.

Select the virtualization technology name you actually installed for the server type. Docker can only create containers by default, while other virtualization technologies can create virtual machines.

For SSH address, fill in the node's public IPv4 address or internal SSH connection address. This address will be used for SSH connections and API connections.

NAT port mapping prioritizes using the port IP for mapping. If no specific port IP is provided, the SSH address IP will be used for mapping. Neither needs to be a public IPv4 address.

In the port field, fill in the port for SSH connection to the node.

Description can note some information about the current node, visible only to administrators.

Status is enabled by default, allowing regular users to apply and claim instances after health checks.

Architecture is the node's own architecture. Currently supports managing amd64 and arm64 architecture nodes, select accordingly.

(Nodes with existing instances are temporarily not supported for management. The feature to synchronize and manage existing instances has not yet been developed)

Connection Configuration (Required)

Username is recommended to be root user, as automatic API configuration later requires downloading some dependencies. Non-root users may encounter permission issues.

Password is the password used for SSH login. Of course, if you don't use a password and use key-based login, that's also acceptable.

SSH timeout configuration is designed to test connectivity and optimize fault tolerance, and can also be used to check connectivity.

After filling in the previous information, click test and corresponding prompt values will appear. Click apply to proceed. Of course, not applying is also fine, with higher fault tolerance.

The latency here is the latency of actually executing commands on the corresponding node via ping, so it's generally around 2s or more, which is normal latency.

This design is to accommodate nodes with extremely poor connectivity to the panel machine. Increasing these parameter values means higher fault tolerance.

Execution timeout generally doesn't need modification unless your node's performance is particularly weak and command execution takes a long time.

Location Information (Optional)

Directly enter a specific country and click to select. Most countries already have presets with corresponding flag icons.

After setting the location, regular users will be able to see the corresponding flag and region in the application interface, along with the automatically matched continent.

You can optionally fill in the corresponding city. Not filling it in is fine and doesn't affect usage.

Instance Type and Quantity Limits (Required)

For docker type nodes, only containers can be created. Other virtualization types support creating both containers and virtual machines (provided the node itself supports it; forced creation on unsupported nodes will automatically fail).

If you don't need to create virtual machines, be sure to uncheck the virtual machine option.

If the quantity limit maintains the default parameter of 0, it means no node-level quantity limit for this type of instance.

For container type, it's recommended to set the quantity according to the following formula:

Node free storage disk size / Minimum disk size of instances to be distributed = Maximum number of instances

For virtual machine type:

Node free memory size (including virtual memory) / Minimum memory size of instances to be distributed = Number of instances

The reason for this calculation is that containers generally don't limit total CPU quantity and memory size, but limit disk size, while memory is usually the bottleneck for the number of virtual machines that can be created.

If you need to overcommit, the values obtained from the above calculation rules can be appropriately increased, and the following configuration should be set up.

Resource Overcommitment Configuration (Optional)

Overcommitment resource configuration means whether to strictly limit corresponding resources. Removing limits means no checks will be performed and forced creation may occur, which may lead to creation task failures.

By default, container type doesn't limit total CPU and memory pre-allocation, but limits total pre-allocated disk capacity to achieve optimal resource sharing and maximum number of instances. Generally doesn't need modification.

By default, virtual machine type limits all resources, with the maximum total pre-allocated resources not exceeding actual resource size.

For ProxmoxVE, there's also a storage pool name setting for the disk to be created. If it's a multi-disk PVE, you need to set which storage pool to create on.

Other types of virtualization environments have asked about the specific storage pool creation location during installation, so there's no need to set it.

In general, if you need to limit which resources cannot be overcommitted, click limit. After limiting, corresponding resources cannot be overcommitted; without limiting, corresponding resources can be overcommitted.

The limit here is for the total resource usage of this type of instance on this node, used to calculate available resources and limit instance creation.

Not recommended to modify unless you know what this setting does.

IP Mapping Configuration (Optional)

Generally doesn't need modification. Here you can set the number of port mappings, range, network configuration method, and port mapping method for each instance.

By default, instances are created with NAT-mapped public IPv4 ports. The priority of mapped IPs is: Port IP > SSH connection IP (used when port IP is not set)

If the node itself has an IPv6 subnet greater than or equal to /80 in size, change the network configuration to create instances with independent public IPv6 addresses.

Extremely, you can also create instances with only independent IPv6 addresses. Make your own choice.

Not recommended to modify the mapping method unless you know what this setting does. The default configuration is already the best configuration.

Bandwidth and Traffic Configuration (Required)

Literal meaning: set the maximum bandwidth and total available traffic calculated by natural month for instances created on the node. Traffic monitoring and traffic statistics are not automatically enabled by default.

Starting traffic monitoring will have a corresponding memory burden because traffic statistics data needs to be cached. Even after extreme optimization by this project, it will still increase with bandwidth. Don't enable traffic statistics if you don't have enough memory.

If traffic statistics are enabled, pay attention to the statistics mode. The default statistics mode is the most universal. If your local performance is good enough (mainly enough memory), you can choose higher collection frequency and collection quantity. If performance is very poor, it's recommended to choose the last tier. Custom parameters are also supported, but not recommended for beginners to modify; the preset modes are sufficient.

If traffic statistics are enabled, note that the allocated bandwidth for levels should not be too large. Monitoring will dynamically generate configuration files according to the allocated bandwidth for monitoring. The larger the bandwidth, the more memory monitoring occupies.

LevelInstance Bandwidthplugin_pipe_sizesql_cache_entriesBase UsageBurst Usage
Low≤50 Mbps2 MB325~8 MB8~12 MB
Medium-Low51~100 Mbps10 MB6410~15 MB15~30 MB
Medium101~200 Mbps25 MB12815~20 MB30~50 MB
Medium-High201~500 Mbps50 MB25620~30 MB50~80 MB
High501~1000 Mbps128 MB51230~50 MB80~150 MB
Very High1001~2000 Mbps256 MB76850~80 MB150~300 MB
Extremely High>2000 Mbps512 MB102480~120 MB300~600 MB

Traffic statistics error margin is about 0.1G deviation per 10G. NAT mapping and instances with independent IPv6 IPs are automatically handled, no manual management needed.

However, if traffic statistics were previously enabled and need to be disabled and monitoring uninstalled later, you need to delete the monitoring in the following place first before disabling traffic statistics. This ensures complete uninstallation, otherwise it will still collect statistics in the background.

Only after enabling traffic control will the traffic monitoring management button appear here. After entering, three buttons are visible, mainly for manually synchronizing monitoring situations. Generally, if traffic monitoring is not enabled after some instances are created, manual management is not needed. If needed, just click detect traffic monitoring, which will batch detect the monitoring situation of all instances under the current instance.

Level Restrictions (Required)

Five levels are preset here, and users will be filtered through this restriction configuration when applying and claiming.

During the actual instance creation process, the node-level level restrictions will be compared with the global user level resource restrictions, taking the minimum value as the user's available resource limit on the current node.

This setting is to specialize the configuration limits of instances that users of corresponding levels can create on the current node, avoiding situations where global limits are not suitable for the current node. Global limits can be set in system configuration and are generally used for user account-level resource usage restrictions.

Advanced Settings (Optional)

Expiration time:

Prevents users from continuing to operate expired nodes. Expired nodes will be automatically frozen, at which time corresponding instances will not allow any operations but will not be automatically deleted. If a node is frozen, please clean and delete it in time.

Task concurrency control:

Default is single-threaded serial execution. At the same time, only one add/delete/modify task (corresponding to instance creation, deletion, and reset operations) will exist.

Can be changed to multi-threaded concurrent execution, where multiple add/delete/modify tasks can exist at the same time. Only when concurrent execution is used does the concurrency number setting make sense.

Serial execution is suitable for situations where the node itself has weak performance or the platform has few users. Concurrent operation is suitable for situations where the node itself has strong performance or there are many users. Please choose the mode yourself.

Personally recommend using default settings. Concurrent execution may have boundary conditions that have not been fully tested and may have bugs.

Task polling settings:

Controls whether to enable task execution and the interval for polling to check status. Generally keep default.

Operation execution rules:

Node operation mode supports API only, SSH only, and automatic switching. By default, automatic switching mode is used. Generally, there's no need to modify unless there are special requirements.

If you need to enable API operation mode, after successfully saving the node settings, click the auto-configure API button outside to execute background tasks to automatically interface with the virtualization platform API, no manual configuration required. After waiting for about 15-20 seconds, it should have been configured successfully. Click the button to see the configuration history tasks and corresponding logs. After successful configuration, click health check again to ensure the API status is green online status, and you've successfully configured and enabled the API.

Hardware Configuration (Optional)

Only lxd and incus support setting default instance parameter configurations. Generally use the defaults unless you need to manually limit certain special hardware resources; otherwise, generally no modification is needed.

If you need to set the maximum percentage of CPU usage or similar parameters, the settings here can meet your requirements.

Health Check (Required)

Click the operation button

After saving the node, after completing the health check, regular users can see the corresponding server and can apply for creation. If health check is not performed, users cannot apply for creation and claiming.

After health check, it will display whether the corresponding type of connection status is online and will automatically detect the actual total resources of the entire machine. This total resource amount is the total resource limit for non-overcommitted creation set above.

Whether the API is available does not affect specific usage. Auto-configuring the API is not mandatory.

System Images

By default, seed data will include all available images for all virtualization environments. By default, only alpine and debian images are enabled to avoid too many available images for users.

If you need images for any system, any virtualization environment, any architecture, please search and enable them yourself, otherwise users cannot select the corresponding images.

Custom image addresses are temporarily not supported. The current frontend entry function is not available. Do not manually enter images.

System Configuration

General options here won't be elaborated on. There are two configurations that need special explanation.

User Level Configuration (Required)

This limits the total account available resources for regular user levels.

When creating instances on corresponding nodes, this global configuration will work together with the node's own level configuration to filter and provide users with configurations that meet both conditions.

Instance Permission Configuration (Required)

Here you can control the minimum level required for users to perform sensitive operations. You can control the minimum user level required for instance creation, instance deletion, and instance system reset.

Configuration File

The default system configuration is already sufficient for light usage. If advanced customization is needed, you need to modify the configuration file or modify it in the administrator interface after initialization.

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

This is the complete initialization configuration file. Below we will explain the specific configuration items:

auth Authentication Configuration

yaml
auth:
+    email-password: ""
+    email-smtp-host: ""
+    email-smtp-port: "3306"
+    email-username: root
+    enable-email: false
+    enable-oauth2: false
+    enable-public-registration: false
+    enable-qq: false
+    enable-telegram: false
+    qq-app-id: ""
+    qq-app-key: ""
+    telegram-bot-token: ""
+    frontend-url: ""

Authentication module configuration items, used to control user login and registration methods and third-party login integration.

  • email-password: Email service authentication password, used for authentication when sending emails via SMTP
  • email-smtp-host: SMTP server address, such as smtp.gmail.com
  • email-smtp-port: SMTP server port, common ports are 25, 465 (SSL), 587 (TLS)
  • email-username: SMTP server login username, usually the complete email address
  • enable-email: Whether to enable email login functionality
  • enable-oauth2: Whether to enable OAuth2 third-party login functionality
  • enable-public-registration: Whether to allow public registration. When disabled, only administrators can create accounts
  • enable-qq: Whether to enable QQ login
  • enable-telegram: Whether to enable Telegram login
  • qq-app-id: App ID applied for on QQ Connect platform
  • qq-app-key: App Key applied for on QQ Connect platform
  • telegram-bot-token: Telegram Bot's API Token
  • frontend-url: Frontend access address, needs to include protocol header (http:// or https://), trailing slash is optional. OAuth2 callback address depends on this configuration

captcha Verification Code Configuration

yaml
captcha:
+    enabled: true
+    expire-time: 300
+    height: 40
+    length: 4
+    width: 120

Graphic verification code generation and verification configuration, used for security verification on frontend login and registration pages.

  • enabled: Whether to enable verification code functionality
  • expire-time: Verification code expiration time in seconds
  • height: Verification code image height in pixels
  • length: Verification code character length
  • width: Verification code image width in pixels

cdn Content Delivery Network Configuration

yaml
cdn:
+    base-endpoint: https://cdn.spiritlhl.net/
+    endpoints:
+        - https://cdn0.spiritlhl.top/
+        - http://cdn3.spiritlhl.net/
+        - http://cdn1.spiritlhl.net/
+        - http://cdn2.spiritlhl.net/

CDN acceleration node configuration used when downloading system images.

  • base-endpoint: Primary CDN node address, used first
  • endpoints: Backup CDN node list, retried in order. The system will automatically select available nodes for image download

Generally, this configuration doesn't need modification. Preloaded system images are all hosted in this organization's repository, and default CDN nodes can already provide good download acceleration.

mysql Database Configuration

yaml
mysql:
+    auto-create: true
+    config: charset=utf8mb4&parseTime=True&loc=Local
+    db-name: oneclickvirt
+    engine: InnoDB
+    log-mode: error
+    log-zap: false
+    max-idle-conns: 10
+    max-lifetime: 3600
+    max-open-conns: 100
+    password: ""
+    path: ""
+    port: ""
+    prefix: ""
+    singular: false
+    username: root

MySQL database connection and behavior configuration. Initialization judgment logic: when both path and port are empty, the system considers initialization is needed, and at this time the target database must be an empty database.

  • auto-create: Whether to automatically create the database (if it doesn't exist)
  • config: Database connection parameters, including character set, time parsing, etc.
  • db-name: Database name
  • engine: Database storage engine, InnoDB is recommended
  • log-mode: Database log mode, options are silent, error, warn, info
  • log-zap: Whether to use zap log library to record database logs
  • max-idle-conns: Maximum number of idle connections
  • max-lifetime: Connection maximum lifetime in seconds
  • max-open-conns: Maximum number of open connections
  • password: Database password
  • path: Database server address
  • port: Database server port
  • prefix: Database table name prefix
  • singular: Whether to use singular table names (default is plural)
  • username: Database username

quota Quota Limit Configuration

yaml
quota:
+    default-level: 1
+    level-limits:
+        "1":
+            max-instances: 1
+            max-resources:
+                bandwidth: 100
+                cpu: 1
+                disk: 1025
+                memory: 350
+            max-traffic: 102400
+        "2":
+            max-instances: 3
+            max-resources:
+                bandwidth: 200
+                cpu: 2
+                disk: 20480
+                memory: 1024
+            max-traffic: 204800
+        "3":
+            max-instances: 5
+            max-resources:
+                bandwidth: 500
+                cpu: 4
+                disk: 40960
+                memory: 2048
+            max-traffic: 307200
+        "4":
+            max-instances: 10
+            max-resources:
+                bandwidth: 1000
+                cpu: 8
+                disk: 81920
+                memory: 4096
+            max-traffic: 409600
+        "5":
+            max-instances: 20
+            max-resources:
+                bandwidth: 2000
+                cpu: 16
+                disk: 163840
+                memory: 8192
+            max-traffic: 512000

User level and resource quota control configuration. The default unit for memory, disk, and traffic is MB.

Global Configuration

  • default-level: Default level for newly registered users

instance-type-permissions Instance Type Permissions

Controls what operation types users of different levels can perform.

  • min-level-for-container: Minimum user level required to create container instances
  • min-level-for-delete: Minimum level required to perform delete operations on the regular user side
  • min-level-for-vm: Minimum user level required to create virtual machine instances

level-limits Level Quota Limits

Defines the resource quota upper limits corresponding to each user level, with keys being level numbers.

Each level contains the following configurations:

  • max-instances: Maximum number of instances this level user can create
  • max-resources: Maximum resource limits for a single instance
    • bandwidth: Maximum bandwidth in Mbps
    • cpu: Maximum CPU cores
    • disk: Maximum disk space in MB
    • memory: Maximum memory in MB
  • max-traffic: Maximum total traffic for this level user in MB

zap Log Configuration

yaml
zap:
+    compress-logs: true
+    director: storage/logs
+    encode-level: LowercaseLevelEncoder
+    format: console
+    level: info
+    log-in-console: false
+    max-array-elements: 5
+    max-backups: 15
+    max-file-size: 5
+    max-log-length: 2000
+    max-string-length: 1000
+    prefix: '[oneclickvirt]'
+    retention-day: 3
+    show-line: false
+    stacktrace-key: stacktrace

Detailed configuration for system log recording, based on the zap log library.

  • compress-logs: Whether to compress archived log files
  • director: Log file storage directory
  • encode-level: Log level encoding method, options are LowercaseLevelEncoder (lowercase), CapitalLevelEncoder (uppercase)
  • format: Log output format, options are console (console format), json (JSON format)
  • level: Log level, options are debug, info, warn, error. It's recommended to use debug during development and debugging, and info or warn in production environments
  • log-in-console: Whether to output logs to console simultaneously
  • max-array-elements: Maximum number of elements to record for array type fields
  • max-backups: Maximum number of historical log files to retain
  • max-file-size: Maximum size of a single log file in MB
  • max-log-length: Maximum length of a single log entry, excess will be truncated
  • max-string-length: Maximum recording length for string fields
  • prefix: Log prefix identifier
  • retention-day: Log file retention days, automatically deleted after expiration
  • show-line: Whether to display the filename and line number of log calls
  • stacktrace-key: Key name for stack trace information

Note: When debugging issues, level should be set to debug to obtain detailed log information.

`,171)]))}const W=i(T,[["render",S]]);export{H as __pageData,W as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.lean.js new file mode 100644 index 0000000000..288ce0d777 --- /dev/null +++ b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.CSQ0IE81.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/resetuserpassword.CqOxip2E.png",l="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",r="/assets/edituser.5rScwK1u.png",o="/assets/switch.yK08dswR.png",p="/assets/base.DRc_UdCb.png",h="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",k="/assets/setvirt.DKwPSHcD.png",u="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",m="/assets/ipt1.BWlPVFUI.png",y="/assets/ipt2.BZjM3d2a.png",E="/assets/bw1.Cf2N9DNJ.png",b="/assets/bw2.DJ4v_edl.png",f="/assets/bw3.D087jBmd.png",v="/assets/cz.CpDm16A7.png",C="/assets/pcz.Bf32qIMb.png",F="/assets/level.ClT-FQGb.png",w="/assets/setmore1.C4F--yVn.png",x="/assets/setmore2.DbU1hlgY.png",q="/assets/autoapi1.DUEk35Fd.png",B="/assets/autoapi2.YWfGcqPd.png",D="/assets/autoapi3.PO1KiLU6.png",A="/assets/hardwareconfig.qww9PB2d.png",_="/assets/autoapi4.BMm_5qST.png",P="/assets/autoapi45.D3Ei-57N.png",z="/assets/images.CshFq7yK.png",I="/assets/userlevel.Dff1Ev4j.png",M="/assets/usercontrol.VCrXBaGX.png",H=JSON.parse('{"title":"Usage Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","filePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772424525000}'),T={name:"en/guide/oneclickvirt/oneclickvirt_usage.md"};function S(L,s,N,R,O,U){return a(),e("div",null,s[0]||(s[0]=[n("",171)]))}const W=i(T,[["render",S]]);export{H as __pageData,W as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.js b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.js deleted file mode 100644 index 78956a3acb..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.js +++ /dev/null @@ -1,97 +0,0 @@ -import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/resetuserpassword.CqOxip2E.png",l="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",o="/assets/edituser.5rScwK1u.png",r="/assets/switch.yK08dswR.png",p="/assets/base.DRc_UdCb.png",h="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",k="/assets/setvirt.DKwPSHcD.png",g="/assets/setct.D56FUfb8.png",u="/assets/setvm.BFPcFZ8j.png",m="/assets/ipt1.BWlPVFUI.png",y="/assets/ipt2.BZjM3d2a.png",E="/assets/bw1.Cf2N9DNJ.png",f="/assets/bw2.DJ4v_edl.png",b="/assets/bw3.D087jBmd.png",v="/assets/cz.CpDm16A7.png",C="/assets/pcz.Bf32qIMb.png",F="/assets/level.ClT-FQGb.png",w="/assets/setmore1.C4F--yVn.png",x="/assets/setmore2.DbU1hlgY.png",q="/assets/autoapi1.DUEk35Fd.png",B="/assets/autoapi2.YWfGcqPd.png",D="/assets/autoapi3.PO1KiLU6.png",A="/assets/hardwareconfig.qww9PB2d.png",_="/assets/autoapi4.BMm_5qST.png",P="/assets/autoapi45.D3Ei-57N.png",I="/assets/images.CshFq7yK.png",M="/assets/userlevel.Dff1Ev4j.png",T="/assets/usercontrol.VCrXBaGX.png",H=JSON.parse('{"title":"Usage Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","filePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772422214000}'),z={name:"en/guide/oneclickvirt/oneclickvirt_usage.md"};function S(L,i,N,R,O,U){return a(),s("div",null,i[0]||(i[0]=[t('

Usage Guide

This document provides detailed instructions on how to use this panel. If you have any questions, please join the group for assistance from administrators: https://t.me/oneclickvirt

User Management

After logging into the administrator interface, open the user management page and you must click reset password to ensure the admin account password is a strong password, preventing malicious brute force attacks. If you defined your own password during initialization, you may skip resetting the password.

Resetting the password will automatically generate a strong password, which is displayed only once. Be sure to copy and save it to avoid forgetting it.

If you need to change a user's type, click on the corresponding user to edit. The edit popup supports changing the user type.

Administrators can click on the avatar in the upper right corner, where the dropdown menu has a button to switch between administrator and regular user views. If you need to test any features, you can directly use the administrator user for testing. (Regular users do not have this view switching button)

Managing Nodes

First, you need to ensure that the node to be managed has one of the four major virtualization technologies installed.

Ping the node's IP from the machine where this panel is deployed. Ideally, the latency should be within 300ms and the packet loss rate should not be too high, otherwise connection failures may occur, resulting in missed command execution in control.

Below are the steps for setting up nodes. Required and mandatory steps must be followed, while optional steps depend on your needs.

Basic Information (Required)

The server name should preferably use only English letters and numbers, avoid special characters, and ideally be within 6 characters. When creating containers or virtual machines later, this server name will be automatically added as a prefix.

Select the virtualization technology name you actually installed for the server type. Docker can only create containers by default, while other virtualization technologies can create virtual machines.

For SSH address, fill in the node's public IPv4 address or internal SSH connection address. This address will be used for SSH connections and API connections.

NAT port mapping prioritizes using the port IP for mapping. If no specific port IP is provided, the SSH address IP will be used for mapping. Neither needs to be a public IPv4 address.

In the port field, fill in the port for SSH connection to the node.

Description can note some information about the current node, visible only to administrators.

Status is enabled by default, allowing regular users to apply and claim instances after health checks.

Architecture is the node's own architecture. Currently supports managing amd64 and arm64 architecture nodes, select accordingly.

(Nodes with existing instances are temporarily not supported for management. The feature to synchronize and manage existing instances has not yet been developed)

Connection Configuration (Required)

Username is recommended to be root user, as automatic API configuration later requires downloading some dependencies. Non-root users may encounter permission issues.

Password is the password used for SSH login. Of course, if you don't use a password and use key-based login, that's also acceptable.

SSH timeout configuration is designed to test connectivity and optimize fault tolerance, and can also be used to check connectivity.

After filling in the previous information, click test and corresponding prompt values will appear. Click apply to proceed. Of course, not applying is also fine, with higher fault tolerance.

The latency here is the latency of actually executing commands on the corresponding node via ping, so it's generally around 2s or more, which is normal latency.

This design is to accommodate nodes with extremely poor connectivity to the panel machine. Increasing these parameter values means higher fault tolerance.

Execution timeout generally doesn't need modification unless your node's performance is particularly weak and command execution takes a long time.

Location Information (Optional)

Directly enter a specific country and click to select. Most countries already have presets with corresponding flag icons.

After setting the location, regular users will be able to see the corresponding flag and region in the application interface, along with the automatically matched continent.

You can optionally fill in the corresponding city. Not filling it in is fine and doesn't affect usage.

Instance Type and Quantity Limits (Required)

For docker type nodes, only containers can be created. Other virtualization types support creating both containers and virtual machines (provided the node itself supports it; forced creation on unsupported nodes will automatically fail).

If you don't need to create virtual machines, be sure to uncheck the virtual machine option.

If the quantity limit maintains the default parameter of 0, it means no node-level quantity limit for this type of instance.

For container type, it's recommended to set the quantity according to the following formula:

Node free storage disk size / Minimum disk size of instances to be distributed = Maximum number of instances

For virtual machine type:

Node free memory size (including virtual memory) / Minimum memory size of instances to be distributed = Number of instances

The reason for this calculation is that containers generally don't limit total CPU quantity and memory size, but limit disk size, while memory is usually the bottleneck for the number of virtual machines that can be created.

If you need to overcommit, the values obtained from the above calculation rules can be appropriately increased, and the following configuration should be set up.

Resource Overcommitment Configuration (Optional)

Overcommitment resource configuration means whether to strictly limit corresponding resources. Removing limits means no checks will be performed and forced creation may occur, which may lead to creation task failures.

By default, container type doesn't limit total CPU and memory pre-allocation, but limits total pre-allocated disk capacity to achieve optimal resource sharing and maximum number of instances. Generally doesn't need modification.

By default, virtual machine type limits all resources, with the maximum total pre-allocated resources not exceeding actual resource size.

For ProxmoxVE, there's also a storage pool name setting for the disk to be created. If it's a multi-disk PVE, you need to set which storage pool to create on.

Other types of virtualization environments have asked about the specific storage pool creation location during installation, so there's no need to set it.

In general, if you need to limit which resources cannot be overcommitted, click limit. After limiting, corresponding resources cannot be overcommitted; without limiting, corresponding resources can be overcommitted.

The limit here is for the total resource usage of this type of instance on this node, used to calculate available resources and limit instance creation.

Not recommended to modify unless you know what this setting does.

IP Mapping Configuration (Optional)

Generally doesn't need modification. Here you can set the number of port mappings, range, network configuration method, and port mapping method for each instance.

By default, instances are created with NAT-mapped public IPv4 ports. The priority of mapped IPs is: Port IP > SSH connection IP (used when port IP is not set)

If the node itself has an IPv6 subnet greater than or equal to /80 in size, change the network configuration to create instances with independent public IPv6 addresses.

Extremely, you can also create instances with only independent IPv6 addresses. Make your own choice.

Not recommended to modify the mapping method unless you know what this setting does. The default configuration is already the best configuration.

Bandwidth and Traffic Configuration (Required)

Literal meaning: set the maximum bandwidth and total available traffic calculated by natural month for instances created on the node. Traffic monitoring and traffic statistics are not automatically enabled by default.

Starting traffic monitoring will have a corresponding memory burden because traffic statistics data needs to be cached. Even after extreme optimization by this project, it will still increase with bandwidth. Don't enable traffic statistics if you don't have enough memory.

If traffic statistics are enabled, pay attention to the statistics mode. The default statistics mode is the most universal. If your local performance is good enough (mainly enough memory), you can choose higher collection frequency and collection quantity. If performance is very poor, it's recommended to choose the last tier. Custom parameters are also supported, but not recommended for beginners to modify; the preset modes are sufficient.

If traffic statistics are enabled, note that the allocated bandwidth for levels should not be too large. Monitoring will dynamically generate configuration files according to the allocated bandwidth for monitoring. The larger the bandwidth, the more memory monitoring occupies.

LevelInstance Bandwidthplugin_pipe_sizesql_cache_entriesBase UsageBurst Usage
Low≤50 Mbps2 MB325~8 MB8~12 MB
Medium-Low51~100 Mbps10 MB6410~15 MB15~30 MB
Medium101~200 Mbps25 MB12815~20 MB30~50 MB
Medium-High201~500 Mbps50 MB25620~30 MB50~80 MB
High501~1000 Mbps128 MB51230~50 MB80~150 MB
Very High1001~2000 Mbps256 MB76850~80 MB150~300 MB
Extremely High>2000 Mbps512 MB102480~120 MB300~600 MB

Traffic statistics error margin is about 0.1G deviation per 10G. NAT mapping and instances with independent IPv6 IPs are automatically handled, no manual management needed.

However, if traffic statistics were previously enabled and need to be disabled and monitoring uninstalled later, you need to delete the monitoring in the following place first before disabling traffic statistics. This ensures complete uninstallation, otherwise it will still collect statistics in the background.

Only after enabling traffic control will the traffic monitoring management button appear here. After entering, three buttons are visible, mainly for manually synchronizing monitoring situations. Generally, if traffic monitoring is not enabled after some instances are created, manual management is not needed. If needed, just click detect traffic monitoring, which will batch detect the monitoring situation of all instances under the current instance.

Level Restrictions (Required)

Five levels are preset here, and users will be filtered through this restriction configuration when applying and claiming.

During the actual instance creation process, the node-level level restrictions will be compared with the global user level resource restrictions, taking the minimum value as the user's available resource limit on the current node.

This setting is to specialize the configuration limits of instances that users of corresponding levels can create on the current node, avoiding situations where global limits are not suitable for the current node. Global limits can be set in system configuration and are generally used for user account-level resource usage restrictions.

Advanced Settings (Optional)

Expiration time:

Prevents users from continuing to operate expired nodes. Expired nodes will be automatically frozen, at which time corresponding instances will not allow any operations but will not be automatically deleted. If a node is frozen, please clean and delete it in time.

Task concurrency control:

Default is single-threaded serial execution. At the same time, only one add/delete/modify task (corresponding to instance creation, deletion, and reset operations) will exist.

Can be changed to multi-threaded concurrent execution, where multiple add/delete/modify tasks can exist at the same time. Only when concurrent execution is used does the concurrency number setting make sense.

Serial execution is suitable for situations where the node itself has weak performance or the platform has few users. Concurrent operation is suitable for situations where the node itself has strong performance or there are many users. Please choose the mode yourself.

Personally recommend using default settings. Concurrent execution may have boundary conditions that have not been fully tested and may have bugs.

Task polling settings:

Controls whether to enable task execution and the interval for polling to check status. Generally keep default.

Operation execution rules:

Node operation mode supports API only, SSH only, and automatic switching. By default, automatic switching mode is used. Generally, there's no need to modify unless there are special requirements.

If you need to enable API operation mode, after successfully saving the node settings, click the auto-configure API button outside to execute background tasks to automatically interface with the virtualization platform API, no manual configuration required. After waiting for about 15-20 seconds, it should have been configured successfully. Click the button to see the configuration history tasks and corresponding logs. After successful configuration, click health check again to ensure the API status is green online status, and you've successfully configured and enabled the API.

Hardware Configuration (Optional)

Only lxd and incus support setting default instance parameter configurations. Generally use the defaults unless you need to manually limit certain special hardware resources; otherwise, generally no modification is needed.

If you need to set the maximum percentage of CPU usage or similar parameters, the settings here can meet your requirements.

Health Check (Required)

Click the operation button

After saving the node, after completing the health check, regular users can see the corresponding server and can apply for creation. If health check is not performed, users cannot apply for creation and claiming.

After health check, it will display whether the corresponding type of connection status is online and will automatically detect the actual total resources of the entire machine. This total resource amount is the total resource limit for non-overcommitted creation set above.

Whether the API is available does not affect specific usage. Auto-configuring the API is not mandatory.

System Images

By default, seed data will include all available images for all virtualization environments. By default, only alpine and debian images are enabled to avoid too many available images for users.

If you need images for any system, any virtualization environment, any architecture, please search and enable them yourself, otherwise users cannot select the corresponding images.

Custom image addresses are temporarily not supported. The current frontend entry function is not available. Do not manually enter images.

System Configuration

General options here won't be elaborated on. There are two configurations that need special explanation.

User Level Configuration (Required)

This limits the total account available resources for regular user levels.

When creating instances on corresponding nodes, this global configuration will work together with the node's own level configuration to filter and provide users with configurations that meet both conditions.

Instance Permission Configuration (Required)

Here you can control the minimum level required for users to perform sensitive operations. You can control the minimum user level required for instance creation, instance deletion, and instance system reset.

Configuration File

The default system configuration is already sufficient for light usage. If advanced customization is needed, you need to modify the configuration file or modify it in the administrator interface after initialization.

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

This is the complete initialization configuration file. Below we will explain the specific configuration items:

auth Authentication Configuration

yaml
auth:
-    email-password: ""
-    email-smtp-host: ""
-    email-smtp-port: "3306"
-    email-username: root
-    enable-email: false
-    enable-oauth2: false
-    enable-public-registration: false
-    enable-qq: false
-    enable-telegram: false
-    qq-app-id: ""
-    qq-app-key: ""
-    telegram-bot-token: ""
-    frontend-url: ""

Authentication module configuration items, used to control user login and registration methods and third-party login integration.

  • email-password: Email service authentication password, used for authentication when sending emails via SMTP
  • email-smtp-host: SMTP server address, such as smtp.gmail.com
  • email-smtp-port: SMTP server port, common ports are 25, 465 (SSL), 587 (TLS)
  • email-username: SMTP server login username, usually the complete email address
  • enable-email: Whether to enable email login functionality
  • enable-oauth2: Whether to enable OAuth2 third-party login functionality
  • enable-public-registration: Whether to allow public registration. When disabled, only administrators can create accounts
  • enable-qq: Whether to enable QQ login
  • enable-telegram: Whether to enable Telegram login
  • qq-app-id: App ID applied for on QQ Connect platform
  • qq-app-key: App Key applied for on QQ Connect platform
  • telegram-bot-token: Telegram Bot's API Token
  • frontend-url: Frontend access address, needs to include protocol header (http:// or https://), trailing slash is optional. OAuth2 callback address depends on this configuration

captcha Verification Code Configuration

yaml
captcha:
-    enabled: true
-    expire-time: 300
-    height: 40
-    length: 4
-    width: 120

Graphic verification code generation and verification configuration, used for security verification on frontend login and registration pages.

  • enabled: Whether to enable verification code functionality
  • expire-time: Verification code expiration time in seconds
  • height: Verification code image height in pixels
  • length: Verification code character length
  • width: Verification code image width in pixels

cdn Content Delivery Network Configuration

yaml
cdn:
-    base-endpoint: https://cdn.spiritlhl.net/
-    endpoints:
-        - https://cdn0.spiritlhl.top/
-        - http://cdn3.spiritlhl.net/
-        - http://cdn1.spiritlhl.net/
-        - http://cdn2.spiritlhl.net/

CDN acceleration node configuration used when downloading system images.

  • base-endpoint: Primary CDN node address, used first
  • endpoints: Backup CDN node list, retried in order. The system will automatically select available nodes for image download

Generally, this configuration doesn't need modification. Preloaded system images are all hosted in this organization's repository, and default CDN nodes can already provide good download acceleration.

mysql Database Configuration

yaml
mysql:
-    auto-create: true
-    config: charset=utf8mb4&parseTime=True&loc=Local
-    db-name: oneclickvirt
-    engine: InnoDB
-    log-mode: error
-    log-zap: false
-    max-idle-conns: 10
-    max-lifetime: 3600
-    max-open-conns: 100
-    password: ""
-    path: ""
-    port: ""
-    prefix: ""
-    singular: false
-    username: root

MySQL database connection and behavior configuration. Initialization judgment logic: when both path and port are empty, the system considers initialization is needed, and at this time the target database must be an empty database.

  • auto-create: Whether to automatically create the database (if it doesn't exist)
  • config: Database connection parameters, including character set, time parsing, etc.
  • db-name: Database name
  • engine: Database storage engine, InnoDB is recommended
  • log-mode: Database log mode, options are silent, error, warn, info
  • log-zap: Whether to use zap log library to record database logs
  • max-idle-conns: Maximum number of idle connections
  • max-lifetime: Connection maximum lifetime in seconds
  • max-open-conns: Maximum number of open connections
  • password: Database password
  • path: Database server address
  • port: Database server port
  • prefix: Database table name prefix
  • singular: Whether to use singular table names (default is plural)
  • username: Database username

quota Quota Limit Configuration

yaml
quota:
-    default-level: 1
-    level-limits:
-        "1":
-            max-instances: 1
-            max-resources:
-                bandwidth: 100
-                cpu: 1
-                disk: 1025
-                memory: 350
-            max-traffic: 102400
-        "2":
-            max-instances: 3
-            max-resources:
-                bandwidth: 200
-                cpu: 2
-                disk: 20480
-                memory: 1024
-            max-traffic: 204800
-        "3":
-            max-instances: 5
-            max-resources:
-                bandwidth: 500
-                cpu: 4
-                disk: 40960
-                memory: 2048
-            max-traffic: 307200
-        "4":
-            max-instances: 10
-            max-resources:
-                bandwidth: 1000
-                cpu: 8
-                disk: 81920
-                memory: 4096
-            max-traffic: 409600
-        "5":
-            max-instances: 20
-            max-resources:
-                bandwidth: 2000
-                cpu: 16
-                disk: 163840
-                memory: 8192
-            max-traffic: 512000

User level and resource quota control configuration. The default unit for memory, disk, and traffic is MB.

Global Configuration

  • default-level: Default level for newly registered users

instance-type-permissions Instance Type Permissions

Controls what operation types users of different levels can perform.

  • min-level-for-container: Minimum user level required to create container instances
  • min-level-for-delete: Minimum level required to perform delete operations on the regular user side
  • min-level-for-vm: Minimum user level required to create virtual machine instances

level-limits Level Quota Limits

Defines the resource quota upper limits corresponding to each user level, with keys being level numbers.

Each level contains the following configurations:

  • max-instances: Maximum number of instances this level user can create
  • max-resources: Maximum resource limits for a single instance
    • bandwidth: Maximum bandwidth in Mbps
    • cpu: Maximum CPU cores
    • disk: Maximum disk space in MB
    • memory: Maximum memory in MB
  • max-traffic: Maximum total traffic for this level user in MB

zap Log Configuration

yaml
zap:
-    compress-logs: true
-    director: storage/logs
-    encode-level: LowercaseLevelEncoder
-    format: console
-    level: info
-    log-in-console: false
-    max-array-elements: 5
-    max-backups: 15
-    max-file-size: 5
-    max-log-length: 2000
-    max-string-length: 1000
-    prefix: '[oneclickvirt]'
-    retention-day: 3
-    show-line: false
-    stacktrace-key: stacktrace

Detailed configuration for system log recording, based on the zap log library.

  • compress-logs: Whether to compress archived log files
  • director: Log file storage directory
  • encode-level: Log level encoding method, options are LowercaseLevelEncoder (lowercase), CapitalLevelEncoder (uppercase)
  • format: Log output format, options are console (console format), json (JSON format)
  • level: Log level, options are debug, info, warn, error. It's recommended to use debug during development and debugging, and info or warn in production environments
  • log-in-console: Whether to output logs to console simultaneously
  • max-array-elements: Maximum number of elements to record for array type fields
  • max-backups: Maximum number of historical log files to retain
  • max-file-size: Maximum size of a single log file in MB
  • max-log-length: Maximum length of a single log entry, excess will be truncated
  • max-string-length: Maximum recording length for string fields
  • prefix: Log prefix identifier
  • retention-day: Log file retention days, automatically deleted after expiration
  • show-line: Whether to display the filename and line number of log calls
  • stacktrace-key: Key name for stack trace information

Note: When debugging issues, level should be set to debug to obtain detailed log information.

`,171)]))}const W=e(z,[["render",S]]);export{H as __pageData,W as default}; diff --git a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.lean.js b/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.lean.js deleted file mode 100644 index edfc6e3158..0000000000 --- a/assets/en_guide_oneclickvirt_oneclickvirt_usage.md.DOrER2az.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/resetuserpassword.CqOxip2E.png",l="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",o="/assets/edituser.5rScwK1u.png",r="/assets/switch.yK08dswR.png",p="/assets/base.DRc_UdCb.png",h="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",k="/assets/setvirt.DKwPSHcD.png",g="/assets/setct.D56FUfb8.png",u="/assets/setvm.BFPcFZ8j.png",m="/assets/ipt1.BWlPVFUI.png",y="/assets/ipt2.BZjM3d2a.png",E="/assets/bw1.Cf2N9DNJ.png",f="/assets/bw2.DJ4v_edl.png",b="/assets/bw3.D087jBmd.png",v="/assets/cz.CpDm16A7.png",C="/assets/pcz.Bf32qIMb.png",F="/assets/level.ClT-FQGb.png",w="/assets/setmore1.C4F--yVn.png",x="/assets/setmore2.DbU1hlgY.png",q="/assets/autoapi1.DUEk35Fd.png",B="/assets/autoapi2.YWfGcqPd.png",D="/assets/autoapi3.PO1KiLU6.png",A="/assets/hardwareconfig.qww9PB2d.png",_="/assets/autoapi4.BMm_5qST.png",P="/assets/autoapi45.D3Ei-57N.png",I="/assets/images.CshFq7yK.png",M="/assets/userlevel.Dff1Ev4j.png",T="/assets/usercontrol.VCrXBaGX.png",H=JSON.parse('{"title":"Usage Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","filePath":"en/guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772422214000}'),z={name:"en/guide/oneclickvirt/oneclickvirt_usage.md"};function S(L,i,N,R,O,U){return a(),s("div",null,i[0]||(i[0]=[t("",171)]))}const W=e(z,[["render",S]]);export{H as __pageData,W as default}; diff --git a/assets/en_guide_podman_podman_build.md.BStFWgWW.js b/assets/en_guide_podman_podman_build.md.BStFWgWW.js new file mode 100644 index 0000000000..16faa7aa2f --- /dev/null +++ b/assets/en_guide_podman_podman_build.md.BStFWgWW.js @@ -0,0 +1,13 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_build.md","filePath":"en/guide/podman/podman_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_build.md"};function l(p,s,h,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e(`

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single Podman container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and podman-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
+chmod +x onepodman.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
+chmod +x onepodman.sh

Example

Supported variables for running:

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
podman ps -a

Enter container

shell
podman exec -it ct1 bash

Enter Alpine container

shell
podman exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
podman rm -f ct1

View container logs

shell
podman logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+chmod +x create_podman.sh
+./create_podman.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+chmod +x create_podman.sh
+./create_podman.sh

Query Batch Container Information

shell
cat ctlog

Output format:

container_name ssh_port root_password cpu_cores memory_mb start_port end_port disk_gb

One line per container.

Remove All Containers and Images

shell
podman ps -aq | xargs -r podman rm -f
+podman images -aq | xargs -r podman rmi -f
+podman volume prune -f
+podman system prune -af
+rm -rf ctlog

Restart All Containers After Host Reboot

Podman supports systemd integration. Generate auto-start service for a container:

shell
# Generate systemd service for a specific container
+podman generate systemd --name ct1 > /etc/systemd/system/container-ct1.service
+systemctl enable container-ct1

Or manually start all stopped containers:

shell
podman ps -aq -f status=exited | xargs -r podman start
`,49)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_podman_podman_build.md.BStFWgWW.lean.js b/assets/en_guide_podman_podman_build.md.BStFWgWW.lean.js new file mode 100644 index 0000000000..2c07f227e3 --- /dev/null +++ b/assets/en_guide_podman_podman_build.md.BStFWgWW.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_build.md","filePath":"en/guide/podman/podman_build.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_build.md"};function l(p,s,h,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e("",49)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_podman_podman_build.md.C_43Orab.js b/assets/en_guide_podman_podman_build.md.C_43Orab.js deleted file mode 100644 index dff26c9a30..0000000000 --- a/assets/en_guide_podman_podman_build.md.C_43Orab.js +++ /dev/null @@ -1,13 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_build.md","filePath":"en/guide/podman/podman_build.md","lastUpdated":1772422214000}'),e={name:"en/guide/podman/podman_build.md"};function l(h,s,p,d,r,k){return t(),a("div",null,s[0]||(s[0]=[n(`

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single Podman container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and podman-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

Example

Supported variables for running:

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
podman ps -a

Enter container

shell
podman exec -it ct1 bash

Enter Alpine container

shell
podman exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
podman rm -f ct1

View container logs

shell
podman logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
-chmod +x create_podman.sh
-./create_podman.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
-chmod +x create_podman.sh
-./create_podman.sh

Query Batch Container Information

shell
cat ctlog

Output format:

container_name ssh_port root_password cpu_cores memory_mb start_port end_port disk_gb

One line per container.

Remove All Containers and Images

shell
podman ps -aq | xargs -r podman rm -f
-podman images -aq | xargs -r podman rmi -f
-podman volume prune -f
-podman system prune -af
-rm -rf ctlog

Restart All Containers After Host Reboot

Podman supports systemd integration. Generate auto-start service for a container:

shell
# Generate systemd service for a specific container
-podman generate systemd --name ct1 > /etc/systemd/system/container-ct1.service
-systemctl enable container-ct1

Or manually start all stopped containers:

shell
podman ps -aq -f status=exited | xargs -r podman start
`,49)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_podman_podman_build.md.C_43Orab.lean.js b/assets/en_guide_podman_podman_build.md.C_43Orab.lean.js deleted file mode 100644 index a4a904a7eb..0000000000 --- a/assets/en_guide_podman_podman_build.md.C_43Orab.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_build.md","filePath":"en/guide/podman/podman_build.md","lastUpdated":1772422214000}'),e={name:"en/guide/podman/podman_build.md"};function l(h,s,p,d,r,k){return t(),a("div",null,s[0]||(s[0]=[n("",49)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/en_guide_podman_podman_install.md.B9wNVd_o.js b/assets/en_guide_podman_podman_install.md.B9wNVd_o.js deleted file mode 100644 index 503ace2e32..0000000000 --- a/assets/en_guide_podman_podman_install.md.B9wNVd_o.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_install.md","filePath":"en/guide/podman/podman_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/podman/podman_install.md"};function l(p,i,o,h,r,d){return e(),a("div",null,i[0]||(i[0]=[t('

Preface

Install the Podman environment, including podman + network configuration + DNS liveness check service.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs Podman via each distribution's official packages (daemonless architecture, no Docker daemon required)
  • Automatically configures Podman network (podman-net: 172.21.0.0/16)
  • Detects public IPv6 address; if present, automatically creates podman-ipv6 network and starts NDP Responder
  • Installs DNS liveness check service (check-dns-podman.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

After installation, run podman ps -a to verify the Podman environment is working correctly.

Uninstall Podman Environment

One-click uninstall of the entire Podman environment, including all containers, images, networks, and auxiliary files:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and Podman network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

',21)]))}const m=s(n,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_install.md.B9wNVd_o.lean.js b/assets/en_guide_podman_podman_install.md.B9wNVd_o.lean.js deleted file mode 100644 index 8f888b5f97..0000000000 --- a/assets/en_guide_podman_podman_install.md.B9wNVd_o.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_install.md","filePath":"en/guide/podman/podman_install.md","lastUpdated":1772422214000}'),n={name:"en/guide/podman/podman_install.md"};function l(p,i,o,h,r,d){return e(),a("div",null,i[0]||(i[0]=[t("",21)]))}const m=s(n,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.js b/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.js new file mode 100644 index 0000000000..df4b527212 --- /dev/null +++ b/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_install.md","filePath":"en/guide/podman/podman_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_install.md"};function l(p,i,r,o,h,d){return e(),a("div",null,i[0]||(i[0]=[n('

Preface

Install the Podman environment, including podman + network configuration + DNS liveness check service.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs Podman via each distribution's official packages (daemonless architecture, no Docker daemon required)
  • Automatically configures Podman network (podman-net: 172.21.0.0/16)
  • Detects public IPv6 address; if present, automatically creates podman-ipv6 network and starts NDP Responder
  • Installs DNS liveness check service (check-dns-podman.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

After installation, run podman ps -a to verify the Podman environment is working correctly.

Uninstall Podman Environment

One-click uninstall of the entire Podman environment, including all containers, images, networks, and auxiliary files:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and Podman network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

',21)]))}const m=s(t,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.lean.js b/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.lean.js new file mode 100644 index 0000000000..3ccdb9ae56 --- /dev/null +++ b/assets/en_guide_podman_podman_install.md.Lkx1-Z0c.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_install.md","filePath":"en/guide/podman/podman_install.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_install.md"};function l(p,i,r,o,h,d){return e(),a("div",null,i[0]||(i[0]=[n("",21)]))}const m=s(t,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.js b/assets/en_guide_podman_podman_precheck.md.BLEI_OBX.js similarity index 73% rename from assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.js rename to assets/en_guide_podman_podman_precheck.md.BLEI_OBX.js index 3c5778ecf9..a1abdf3178 100644 --- a/assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.js +++ b/assets/en_guide_podman_podman_precheck.md.BLEI_OBX.js @@ -1 +1 @@ -import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_precheck.md","filePath":"en/guide/podman/podman_precheck.md","lastUpdated":1772422214000}'),d={name:"en/guide/podman/podman_precheck.md"};function n(r,t,o,l,p,c){return a(),i("div",null,t[0]||(t[0]=[s('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The Podman solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/podman

Project Features

Bulk or individual NAT server provisioning based on Podman (daemonless architecture) runtime

  • Uses each distribution's official packages to install Podman (no daemon, daemonless architecture)
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to ghcr.io images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Supports lxcfs mounting (if lxcfs is installed on the host), providing real /proc view inside containers
  • Native rootless support (this solution runs as root to simplify network configuration)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with containerd and Docker

Featurepodman (this project)containerddocker
DaemonNone (daemonless)Lightweight containerdHeavy Docker daemon
Runtimecrun/runcruncrunc
CLIpodmannerdctldocker
Rootless supportNativeRequires configRequires config
Image formatOCIOCIOCI
Network backendnetavark/CNICNIDocker bridge
Container supportLinux containers (LXC)Linux containers (LXC)Linux containers + KVM VMs
InstallationSystem package managernerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',16)]))}const m=e(d,[["render",n]]);export{u as __pageData,m as default}; +import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_precheck.md","filePath":"en/guide/podman/podman_precheck.md","lastUpdated":1772424525000}'),n={name:"en/guide/podman/podman_precheck.md"};function d(r,t,o,l,p,c){return a(),i("div",null,t[0]||(t[0]=[s('

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The Podman solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/podman

Project Features

Bulk or individual NAT server provisioning based on Podman (daemonless architecture) runtime

  • Uses each distribution's official packages to install Podman (no daemon, daemonless architecture)
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to ghcr.io images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Supports lxcfs mounting (if lxcfs is installed on the host), providing real /proc view inside containers
  • Native rootless support (this solution runs as root to simplify network configuration)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with containerd and Docker

Featurepodman (this project)containerddocker
DaemonNone (daemonless)Lightweight containerdHeavy Docker daemon
Runtimecrun/runcruncrunc
CLIpodmannerdctldocker
Rootless supportNativeRequires configRequires config
Image formatOCIOCIOCI
Network backendnetavark/CNICNIDocker bridge
Container supportLinux containers (LXC)Linux containers (LXC)Linux containers + KVM VMs
InstallationSystem package managernerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',16)]))}const m=e(n,[["render",d]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_precheck.md.BLEI_OBX.lean.js b/assets/en_guide_podman_podman_precheck.md.BLEI_OBX.lean.js new file mode 100644 index 0000000000..732fc7d5fb --- /dev/null +++ b/assets/en_guide_podman_podman_precheck.md.BLEI_OBX.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_precheck.md","filePath":"en/guide/podman/podman_precheck.md","lastUpdated":1772424525000}'),n={name:"en/guide/podman/podman_precheck.md"};function d(r,t,o,l,p,c){return a(),i("div",null,t[0]||(t[0]=[s("",16)]))}const m=e(n,[["render",d]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.lean.js b/assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.lean.js deleted file mode 100644 index 3e6fc8fbc3..0000000000 --- a/assets/en_guide_podman_podman_precheck.md.Bq_n2Sge.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"Introduction","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_precheck.md","filePath":"en/guide/podman/podman_precheck.md","lastUpdated":1772422214000}'),d={name:"en/guide/podman/podman_precheck.md"};function n(r,t,o,l,p,c){return a(),i("div",null,t[0]||(t[0]=[s("",16)]))}const m=e(d,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_qa.md.BPJJEAHk.js b/assets/en_guide_podman_podman_qa.md.BPJJEAHk.js deleted file mode 100644 index cbaa981842..0000000000 --- a/assets/en_guide_podman_podman_qa.md.BPJJEAHk.js +++ /dev/null @@ -1,7 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_qa.md","filePath":"en/guide/podman/podman_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/podman/podman_qa.md"};function l(h,s,p,o,d,k){return t(),a("div",null,s[0]||(s[0]=[e(`

FAQ

podman: command not found

The Podman environment is not correctly installed. Re-run the installation script:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Container cannot access external network (IPv4)

Check if iptables NAT rules exist:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

If not present, add manually:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
-iptables -A FORWARD -s 172.21.0.0/16 -j ACCEPT
-iptables -A FORWARD -d 172.21.0.0/16 -j ACCEPT

Container IPv6 not working

  1. Confirm the host has a public IPv6 address
  2. Check if the podman-ipv6 network exists:
shell
podman network ls | grep ipv6
  1. Check if the ndpresponder container is running:
shell
podman ps | grep ndpresponder

Podman vs Docker command comparison

FunctionDocker commandPodman command
List containersdocker ps -apodman ps -a
Enter containerdocker exec -itpodman exec -it
Delete containerdocker rm -fpodman rm -f
List imagesdocker imagespodman images
Delete imagedocker rmipodman rmi
View logsdocker logspodman logs

Image pull failed

Images are prioritized from GitHub Releases as offline tar packages, with fallback to ghcr.io:

shell
ghcr.io/oneclickvirt/podman:<os>-amd64
-ghcr.io/oneclickvirt/podman:<os>-arm64
-ghcr.io/oneclickvirt/podman:<os>   # multi-arch manifest

Manually pull image example:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

How to completely reset the Podman environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
-bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman vs containerd: which to choose?

  • For daemonless architecture with no background daemon, or if you prefer the system package manager, choose Podman
  • For a lightweight daemon + nerdctl CLI experience, choose containerd
  • For KVM virtual machines (Windows/macOS/Android), choose docker or PVE/Incus/LXD solutions

DNS issues

Podman installation configures the check-dns-podman.service. Check if it's running:

shell
systemctl status check-dns-podman

Manual DNS fix:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
-echo "nameserver 1.1.1.1" >> /etc/resolv.conf
`,31)]))}const g=i(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_podman_podman_qa.md.BPJJEAHk.lean.js b/assets/en_guide_podman_podman_qa.md.BPJJEAHk.lean.js deleted file mode 100644 index 09e0f36871..0000000000 --- a/assets/en_guide_podman_podman_qa.md.BPJJEAHk.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_qa.md","filePath":"en/guide/podman/podman_qa.md","lastUpdated":1772422214000}'),n={name:"en/guide/podman/podman_qa.md"};function l(h,s,p,o,d,k){return t(),a("div",null,s[0]||(s[0]=[e("",31)]))}const g=i(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.js b/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.js new file mode 100644 index 0000000000..35229e84cf --- /dev/null +++ b/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.js @@ -0,0 +1,7 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_qa.md","filePath":"en/guide/podman/podman_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_qa.md"};function l(h,s,p,d,r,o){return e(),a("div",null,s[0]||(s[0]=[n(`

FAQ

podman: command not found

The Podman environment is not correctly installed. Re-run the installation script:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Container cannot access external network (IPv4)

Check if iptables NAT rules exist:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

If not present, add manually:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
+iptables -A FORWARD -s 172.21.0.0/16 -j ACCEPT
+iptables -A FORWARD -d 172.21.0.0/16 -j ACCEPT

Container IPv6 not working

  1. Confirm the host has a public IPv6 address
  2. Check if the podman-ipv6 network exists:
shell
podman network ls | grep ipv6
  1. Check if the ndpresponder container is running:
shell
podman ps | grep ndpresponder

Podman vs Docker command comparison

FunctionDocker commandPodman command
List containersdocker ps -apodman ps -a
Enter containerdocker exec -itpodman exec -it
Delete containerdocker rm -fpodman rm -f
List imagesdocker imagespodman images
Delete imagedocker rmipodman rmi
View logsdocker logspodman logs

Image pull failed

Images are prioritized from GitHub Releases as offline tar packages, with fallback to ghcr.io:

shell
ghcr.io/oneclickvirt/podman:<os>-amd64
+ghcr.io/oneclickvirt/podman:<os>-arm64
+ghcr.io/oneclickvirt/podman:<os>   # multi-arch manifest

Manually pull image example:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

How to completely reset the Podman environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman vs containerd: which to choose?

  • For daemonless architecture with no background daemon, or if you prefer the system package manager, choose Podman
  • For a lightweight daemon + nerdctl CLI experience, choose containerd
  • For KVM virtual machines (Windows/macOS/Android), choose docker or PVE/Incus/LXD solutions

DNS issues

Podman installation configures the check-dns-podman.service. Check if it's running:

shell
systemctl status check-dns-podman

Manual DNS fix:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
+echo "nameserver 1.1.1.1" >> /etc/resolv.conf
`,31)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.lean.js b/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.lean.js new file mode 100644 index 0000000000..6a17e79815 --- /dev/null +++ b/assets/en_guide_podman_podman_qa.md.Ccq4IBpf.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"FAQ","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/podman/podman_qa.md","filePath":"en/guide/podman/podman_qa.md","lastUpdated":1772424525000}'),t={name:"en/guide/podman/podman_qa.md"};function l(h,s,p,d,r,o){return e(),a("div",null,s[0]||(s[0]=[n("",31)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_thanks.md.CImpy_u-.js b/assets/en_guide_podman_podman_thanks.md.Czg7rcqs.js similarity index 89% rename from assets/en_guide_podman_podman_thanks.md.CImpy_u-.js rename to assets/en_guide_podman_podman_thanks.md.Czg7rcqs.js index 1162ac5a4c..14710b0ce2 100644 --- a/assets/en_guide_podman_podman_thanks.md.CImpy_u-.js +++ b/assets/en_guide_podman_podman_thanks.md.Czg7rcqs.js @@ -1 +1 @@ -import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/podman/podman_thanks.md","filePath":"en/guide/podman/podman_thanks.md","lastUpdated":1772422214000}'),o={name:"en/guide/podman/podman_thanks.md"};function s(p,e,i,c,h,l){return a(),r("div",null,e[0]||(e[0]=[n('

Acknowledgements

https://github.com/containers/podman

https://github.com/containers/buildah

https://github.com/containers/netavark

https://github.com/containers/crun

https://github.com/opencontainers/runc

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/

',10)]))}const m=t(o,[["render",s]]);export{u as __pageData,m as default}; +import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/podman/podman_thanks.md","filePath":"en/guide/podman/podman_thanks.md","lastUpdated":1772424525000}'),o={name:"en/guide/podman/podman_thanks.md"};function s(p,e,i,c,h,l){return a(),r("div",null,e[0]||(e[0]=[n('

Acknowledgements

https://github.com/containers/podman

https://github.com/containers/buildah

https://github.com/containers/netavark

https://github.com/containers/crun

https://github.com/opencontainers/runc

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/

',10)]))}const m=t(o,[["render",s]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_podman_podman_thanks.md.CImpy_u-.lean.js b/assets/en_guide_podman_podman_thanks.md.Czg7rcqs.lean.js similarity index 58% rename from assets/en_guide_podman_podman_thanks.md.CImpy_u-.lean.js rename to assets/en_guide_podman_podman_thanks.md.Czg7rcqs.lean.js index 33df5d114a..0350def52a 100644 --- a/assets/en_guide_podman_podman_thanks.md.CImpy_u-.lean.js +++ b/assets/en_guide_podman_podman_thanks.md.Czg7rcqs.lean.js @@ -1 +1 @@ -import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/podman/podman_thanks.md","filePath":"en/guide/podman/podman_thanks.md","lastUpdated":1772422214000}'),o={name:"en/guide/podman/podman_thanks.md"};function s(p,e,i,c,h,l){return a(),r("div",null,e[0]||(e[0]=[n("",10)]))}const m=t(o,[["render",s]]);export{u as __pageData,m as default}; +import{_ as t,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/podman/podman_thanks.md","filePath":"en/guide/podman/podman_thanks.md","lastUpdated":1772424525000}'),o={name:"en/guide/podman/podman_thanks.md"};function s(p,e,i,c,h,l){return a(),r("div",null,e[0]||(e[0]=[n("",10)]))}const m=t(o,[["render",s]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_images_readme.md.97RFG-CG.js b/assets/en_guide_pve_images_readme.md.CdhBxXXN.js similarity index 59% rename from assets/en_guide_pve_images_readme.md.97RFG-CG.js rename to assets/en_guide_pve_images_readme.md.CdhBxXXN.js index 79115e0147..0d5ab3eb5d 100644 --- a/assets/en_guide_pve_images_readme.md.97RFG-CG.js +++ b/assets/en_guide_pve_images_readme.md.CdhBxXXN.js @@ -1 +1 @@ -import{_ as a,c as t,o as r,j as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/images/readme.md","filePath":"en/guide/pve/images/readme.md","lastUpdated":1772422214000}'),d={name:"en/guide/pve/images/readme.md"};function n(o,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",n]]);export{u as __pageData,_ as default}; +import{_ as a,c as t,o as r,j as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/images/readme.md","filePath":"en/guide/pve/images/readme.md","lastUpdated":1772424525000}'),d={name:"en/guide/pve/images/readme.md"};function n(o,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",n]]);export{u as __pageData,_ as default}; diff --git a/assets/en_guide_pve_images_readme.md.97RFG-CG.lean.js b/assets/en_guide_pve_images_readme.md.CdhBxXXN.lean.js similarity index 59% rename from assets/en_guide_pve_images_readme.md.97RFG-CG.lean.js rename to assets/en_guide_pve_images_readme.md.CdhBxXXN.lean.js index 79115e0147..0d5ab3eb5d 100644 --- a/assets/en_guide_pve_images_readme.md.97RFG-CG.lean.js +++ b/assets/en_guide_pve_images_readme.md.CdhBxXXN.lean.js @@ -1 +1 @@ -import{_ as a,c as t,o as r,j as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/images/readme.md","filePath":"en/guide/pve/images/readme.md","lastUpdated":1772422214000}'),d={name:"en/guide/pve/images/readme.md"};function n(o,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",n]]);export{u as __pageData,_ as default}; +import{_ as a,c as t,o as r,j as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/images/readme.md","filePath":"en/guide/pve/images/readme.md","lastUpdated":1772424525000}'),d={name:"en/guide/pve/images/readme.md"};function n(o,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",n]]);export{u as __pageData,_ as default}; diff --git a/assets/en_guide_pve_pve_android.md.ChwUrQct.js b/assets/en_guide_pve_pve_android.md.ChwUrQct.js new file mode 100644 index 0000000000..2191404fe8 --- /dev/null +++ b/assets/en_guide_pve_pve_android.md.ChwUrQct.js @@ -0,0 +1 @@ +import{_ as t,c as o,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/a1.DvgNELwZ.png",n="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",p="/assets/a4.BtVJtyBL.png",c="/assets/a5.CamDlEuL.png",l="/assets/a6.auUigeOH.png",d="/assets/a7.3_Is3HF1.png",h="/assets/a8.CkyIulFy.png",g="/assets/a9.Dg58RrTs.png",m="/assets/a10.CPK2ZJEJ.png",u="/assets/a11.Bq6vmveu.png",y="/assets/a12.bStrZLWw.png",f="/assets/a13.DRz8WTJR.png",_="/assets/a14.D56M6gMb.png",b="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",z="/assets/a17.B9keXK9k.png",w="/assets/a18.Bu92JFv5.png",v="/assets/a19.DZjr60Xs.png",x="/assets/a20.CesdkIR_.png",C="/assets/a21.BO8sy8n4.png",I="/assets/a22.COjD9r-B.png",B="/assets/a23.BxEEAckp.png",S="/assets/a24.BrCKYLHX.png",A="/assets/a25.CUB6zoiS.png",T="/assets/a26.zvaFRs59.png",P="/assets/ar.Dy_5EjFU.png",F="/assets/a27.QkS9Cjl7.png",O="/assets/a31.BiCzGFMR.png",q="/assets/a32.54sdf1AZ.png",D="/assets/a33.QYBAXO71.png",E="/assets/a34.BBqAz_kr.png",V="/assets/a35.B8NF_iJX.png",U="/assets/a36.CPvsggxV.png",M="/assets/a37.DJRI7pv9.png",R="/assets/a38.BhfuTk-3.png",K="/assets/a39.BNtfZ4xd.png",N="/assets/a40.DTfyEQe2.png",G="/assets/a41.Cb6MjiUm.png",j="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",L="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Y="/assets/b2.BnvPQMj3.png",Q="/assets/b3.DPn2dzFl.png",X="/assets/b4.JBQupWN9.png",Z="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ee="/assets/b7.5Fkbt05C.png",te="/assets/b8.BXlK1Dnb.png",oe="/assets/b9.CaK5eLKm.png",ae="/assets/b10.DGHfd73s.png",se="/assets/b11.DKZjwgY8.png",ie="/assets/b12.BISDj2Ri.png",ne="/assets/b13.WGr5jMeK.png",re="/assets/b14.BqBpvoFk.png",pe="/assets/b15.Cd3Rj7ju.png",ce="/assets/b16.BR7AHi1X.png",le="/assets/b17.Cn1C4e1e.png",de="/assets/b18.ElAa2UCQ.png",he="/assets/b19.BwC-oHOW.png",ge="/assets/b20.Dj-0rOwy.png",me="/assets/b21.CYRPkSXE.png",ue="/assets/b22.BH7kRZ3Z.png",ye="/assets/b23.JVX-KOL7.png",fe="/assets/b24.a2fv8lkf.png",_e="/assets/b25.BJrNgkiA.png",be="/assets/b26.5bTO5HK5.png",ke="/assets/b27.BSRz6moE.png",ze="/assets/b28.WNjJaEPB.png",we="/assets/b29.Bs69Ykqp.png",ve="/assets/b30.B96bh_Ou.png",xe="/assets/b31.BBIAIScF.png",Ce="/assets/b32.8G5Xy9mr.png",Ie="/assets/b33.RYxcR7vu.png",Be="/assets/b34.Dw6MyLex.png",Se="/assets/b35.DUCPsVIG.png",Ae="/assets/b36.7aKaNaLh.png",Te="/assets/b37.B5CHAJzN.png",Pe="/assets/br.CyzpZwsx.png",Fe="/assets/b38.Pnnij22W.png",Oe="/assets/b39.ajiHDdbx.png",qe="/assets/b40.B6FTkFUT.png",De="/assets/b41.DcCdod5l.png",Ee="/assets/b42.CT1JvTLX.png",Ve="/assets/b43.HthhPs5o.png",Ue="/assets/b44.C9NeP-UC.png",Me="/assets/b45.BWxBBH-l.png",Re="/assets/b46.B6Ds58im.png",Ye=JSON.parse('{"title":"Android Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_android.md","filePath":"en/guide/pve/pve_android.md","lastUpdated":1772424525000}'),Ke={name:"en/guide/pve/pve_android.md"};function Ne(Ge,e,je,He,Le,Je){return a(),o("div",null,e[0]||(e[0]=[s('

Android Virtual Machine

Android System Image Download

Download links for Android system version 9 and earlier:

International

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

Domestic (China)

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Download links for Android system version 10 and later:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

Virtual Machine Setup

Setting up an Android Virtual Machine with version 9 and earlier images

This guide demonstrates using:

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

as an example

1

Template Configuration

Create a virtual machine with VMID 100 and select the corresponding storage disk

2

Select the Android image, then choose Linux for Type and choose an option with version 2.6 for Version

3

Select Vmware compatible for Graphic card, other options are default as shown

4

Choose SATA for disk format, allocate at least 30GB of disk space (size can be chosen based on your needs)

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface

9

System Installation

After entering the boot menu, select the option starting with Installation

10

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it

11

Choose not to use GPT format

12

When the empty disk is displayed, select New

13

Select partition type Primary

14

Then you'll be prompted to specify the size of the space. Just press Enter to use all available space

15

Then select Flags, move to Bootable, press Enter until Boot appears under Flags

16

Then move to Write and press Enter to write changes

17

You'll be asked to confirm whether to continue. Type yes and press Enter to continue

18

After a progress bar completes, you'll return to the initial menu. Select Quit to exit the menu, everything is now ready

19

Then you'll return to the UI interface. Use the previously initialized disk and select the OK button

20

Use the arrow keys to select ext4 file system type, then select the OK button

21

Confirm formatting by selecting the Yes button

22

Confirm GRUB boot installation by selecting the OK button

23

Confirm the file system is readable and writable by selecting the OK button

24

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button

25

After a while, you'll enter the Android logo screen

26

Removing the Image

Then there will be a black screen. If it's still black after 3-5 minutes, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

ar

Then execute qm start 100 on the host machine again, and you should enter the Android system initialization interface

System Initialization

In the initialization interface, select the language and click the confirm button

27

It will try to connect to WiFi. Since our PVE installation uses a completely static network configuration, just skip this and set it up later

31

Click the next button to confirm the time settings

32

Click to cancel screen protection, confirm to skip again

33

After a period of black screen, the main screen application selection will appear. If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine as before, and it should display after entering VNC

Select Quickstep

34

Network Settings

After entering the desktop, you need to set up the network. Click the settings icon in the upper left corner

35

A dropdown appears, click and hold to pull down

36

Click the gear button

37

Enter Network & Internet settings

38

Double-click WIFI with the left mouse button

39

Modify the detected VirtWIFI. Right-click to bring up the selection box, then click Modify network

40

Advanced options appear, click to open hidden options

41

Configure the network settings as shown

IP address 172.16.1.xxx (replace xxx with your desired IP, I used 100 because my vmid is 100 for convenience)

Subnet mask 24

Default gateway 172.16.1.1

DNS 8.8.8.8 or 144.144.144.144

Then click the save button

42

At this point, the settings may still not be applied. Turn off WiFi and then turn it back on, it should then show as connected

43

Then exit to the main interface, click on Google Chrome, and try to open a webpage

44

You can see that opening this guide's URL works without problems, proving that the network is connected

45

Setting up an Android Virtual Machine with version 10 and later images

This guide demonstrates using:

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

as an example

1

Template Configuration

The host machine needs to execute the following command to install graphics environment dependencies

shell
apt install libgl1 libegl1 -y

Then start creating the virtual machine by clicking the Create VM button in the upper right corner. Fill in VMID, Name, Resource Pool

2

Select the Android image, then choose Linux for Type and an option with version 2.6 for Version

3

If the host machine has a GPU, select VirGL GPU for Graphic card.

If the host machine doesn't have a GPU, select VirtIO or Vmware compatible for Graphic card.

Select q35 for Machine, select OVMF (UEFI) for BIOS, and select local for EFI Storage.

4

Choose SATA for disk format. How much disk space to allocate is up to you, but at least 30GB is recommended

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface.

System Installation

After entering the boot menu, select the option ending with Installation

9

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it.

10

Choose not to use GPT format, continue using cfdisk format.

11

When the format selection box appears, select gpt.

12

When the empty disk is displayed, select New.

13

Because you need to create an EFI partition, you need to change the size rather than using the default. Change the number to 1 to allocate 1GB of disk space, then press Enter.

14

Then you'll return to the menu bar. Use the arrow keys to select Type, then press Enter to choose the format type for the partition

15

Use the arrow keys to select the first option EFI System, then press Enter

16

Now you're back at the menu bar. In the upper half of the page, you can see the specific partition size and format

17

Then press the down arrow key to select the next empty partition line

18

Select New from the menu bar, then press Enter

19

Here you need to fill in the partition size. Match it with the empty partition size shown in the upper right corner, then press Enter.

20

Return to the menu bar, select Write, press Enter to write the partition.

21

You'll be prompted to enter yes to confirm. Enter it and press Enter.

22

After a progress bar runs, you should return to the menu bar. Select Quit to exit the menu, everything is now ready

23

Then you'll return to the UI interface. Use the previously initialized 1GB disk and select the OK button

24

Use the arrow keys to select fat32 file system type, then select the OK button

25

Confirm not to modify the name by selecting the OK button

26

Confirm formatting by selecting the Yes button

27

Then you'll return to the initial UI bar. Select the second partition that is not 1GB in size and select the OK button

28

Use the arrow keys to select ext4 file system type, then select the OK button

29

Confirm not to modify the name by selecting the OK button

30

Confirm formatting by selecting the Yes button

31

Choose not to use extra space for updates by selecting the No button

32

Confirm GRUB2 EFI BootLoader by selecting the OK button

33

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button.

34

System Initialization

After a while, you'll enter the logo screen.

35

After some more time, you should enter the initial Android interface. You'll see a popup and the time. Hold the left mouse button and swipe up

36

The main screen application selection will appear. Select Quickstep

If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine, and it should display after entering VNC

37

Removing the Image

After the Android interface appears, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

br

Then execute qm start 100 on the host machine again, and you should enter the system's initial interface.

Network Settings

After entering the desktop, you need to set up the network. Hold the left mouse button in the indicated position and swipe up

38

A bunch of applications will pop up. Find the one called Bliss Ethernet Manager and click to open it

39

Click to open IP Assignment, select Static type, click the OK button to confirm

40

Click to open IP Address, enter 172.16.1.xxx/24 (I used 100 for xxx because my virtual machine VMID is 100 for easy identification), click the OK button to confirm

41

Click to open Gateway Address, enter 172.16.1.1, click the OK button to confirm

42

Click to open DNS Address, enter 8.8.8.8, click the OK button to confirm

43

Then in the application interface, click Interface Up and Refresh, then press the exit key on the keyboard to exit the program

44

Open the browser in the main interface to verify that the network is working properly

45

You can see that opening this guide works without problems, the network is functioning

46

',228)]))}const Qe=t(Ke,[["render",Ne]]);export{Ye as __pageData,Qe as default}; diff --git a/assets/en_guide_pve_pve_android.md.ChwUrQct.lean.js b/assets/en_guide_pve_pve_android.md.ChwUrQct.lean.js new file mode 100644 index 0000000000..c9d920358b --- /dev/null +++ b/assets/en_guide_pve_pve_android.md.ChwUrQct.lean.js @@ -0,0 +1 @@ +import{_ as t,c as o,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/a1.DvgNELwZ.png",n="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",p="/assets/a4.BtVJtyBL.png",c="/assets/a5.CamDlEuL.png",l="/assets/a6.auUigeOH.png",d="/assets/a7.3_Is3HF1.png",h="/assets/a8.CkyIulFy.png",g="/assets/a9.Dg58RrTs.png",m="/assets/a10.CPK2ZJEJ.png",u="/assets/a11.Bq6vmveu.png",y="/assets/a12.bStrZLWw.png",f="/assets/a13.DRz8WTJR.png",_="/assets/a14.D56M6gMb.png",b="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",z="/assets/a17.B9keXK9k.png",w="/assets/a18.Bu92JFv5.png",v="/assets/a19.DZjr60Xs.png",x="/assets/a20.CesdkIR_.png",C="/assets/a21.BO8sy8n4.png",I="/assets/a22.COjD9r-B.png",B="/assets/a23.BxEEAckp.png",S="/assets/a24.BrCKYLHX.png",A="/assets/a25.CUB6zoiS.png",T="/assets/a26.zvaFRs59.png",P="/assets/ar.Dy_5EjFU.png",F="/assets/a27.QkS9Cjl7.png",O="/assets/a31.BiCzGFMR.png",q="/assets/a32.54sdf1AZ.png",D="/assets/a33.QYBAXO71.png",E="/assets/a34.BBqAz_kr.png",V="/assets/a35.B8NF_iJX.png",U="/assets/a36.CPvsggxV.png",M="/assets/a37.DJRI7pv9.png",R="/assets/a38.BhfuTk-3.png",K="/assets/a39.BNtfZ4xd.png",N="/assets/a40.DTfyEQe2.png",G="/assets/a41.Cb6MjiUm.png",j="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",L="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Y="/assets/b2.BnvPQMj3.png",Q="/assets/b3.DPn2dzFl.png",X="/assets/b4.JBQupWN9.png",Z="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ee="/assets/b7.5Fkbt05C.png",te="/assets/b8.BXlK1Dnb.png",oe="/assets/b9.CaK5eLKm.png",ae="/assets/b10.DGHfd73s.png",se="/assets/b11.DKZjwgY8.png",ie="/assets/b12.BISDj2Ri.png",ne="/assets/b13.WGr5jMeK.png",re="/assets/b14.BqBpvoFk.png",pe="/assets/b15.Cd3Rj7ju.png",ce="/assets/b16.BR7AHi1X.png",le="/assets/b17.Cn1C4e1e.png",de="/assets/b18.ElAa2UCQ.png",he="/assets/b19.BwC-oHOW.png",ge="/assets/b20.Dj-0rOwy.png",me="/assets/b21.CYRPkSXE.png",ue="/assets/b22.BH7kRZ3Z.png",ye="/assets/b23.JVX-KOL7.png",fe="/assets/b24.a2fv8lkf.png",_e="/assets/b25.BJrNgkiA.png",be="/assets/b26.5bTO5HK5.png",ke="/assets/b27.BSRz6moE.png",ze="/assets/b28.WNjJaEPB.png",we="/assets/b29.Bs69Ykqp.png",ve="/assets/b30.B96bh_Ou.png",xe="/assets/b31.BBIAIScF.png",Ce="/assets/b32.8G5Xy9mr.png",Ie="/assets/b33.RYxcR7vu.png",Be="/assets/b34.Dw6MyLex.png",Se="/assets/b35.DUCPsVIG.png",Ae="/assets/b36.7aKaNaLh.png",Te="/assets/b37.B5CHAJzN.png",Pe="/assets/br.CyzpZwsx.png",Fe="/assets/b38.Pnnij22W.png",Oe="/assets/b39.ajiHDdbx.png",qe="/assets/b40.B6FTkFUT.png",De="/assets/b41.DcCdod5l.png",Ee="/assets/b42.CT1JvTLX.png",Ve="/assets/b43.HthhPs5o.png",Ue="/assets/b44.C9NeP-UC.png",Me="/assets/b45.BWxBBH-l.png",Re="/assets/b46.B6Ds58im.png",Ye=JSON.parse('{"title":"Android Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_android.md","filePath":"en/guide/pve/pve_android.md","lastUpdated":1772424525000}'),Ke={name:"en/guide/pve/pve_android.md"};function Ne(Ge,e,je,He,Le,Je){return a(),o("div",null,e[0]||(e[0]=[s("",228)]))}const Qe=t(Ke,[["render",Ne]]);export{Ye as __pageData,Qe as default}; diff --git a/assets/en_guide_pve_pve_android.md.yoFL8Xty.js b/assets/en_guide_pve_pve_android.md.yoFL8Xty.js deleted file mode 100644 index 382ca8cace..0000000000 --- a/assets/en_guide_pve_pve_android.md.yoFL8Xty.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as s,o,ag as a}from"./chunks/framework.CSeR4K32.js";const i="/assets/a1.DvgNELwZ.png",n="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",p="/assets/a4.BtVJtyBL.png",c="/assets/a5.CamDlEuL.png",d="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",h="/assets/a8.CkyIulFy.png",m="/assets/a9.Dg58RrTs.png",g="/assets/a10.CPK2ZJEJ.png",u="/assets/a11.Bq6vmveu.png",f="/assets/a12.bStrZLWw.png",_="/assets/a13.DRz8WTJR.png",b="/assets/a14.D56M6gMb.png",y="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",w="/assets/a17.B9keXK9k.png",v="/assets/a18.Bu92JFv5.png",x="/assets/a19.DZjr60Xs.png",C="/assets/a20.CesdkIR_.png",I="/assets/a21.BO8sy8n4.png",B="/assets/a22.COjD9r-B.png",S="/assets/a23.BxEEAckp.png",A="/assets/a24.BrCKYLHX.png",T="/assets/a25.CUB6zoiS.png",P="/assets/a26.zvaFRs59.png",F="/assets/ar.Dy_5EjFU.png",O="/assets/a27.QkS9Cjl7.png",q="/assets/a31.BiCzGFMR.png",D="/assets/a32.54sdf1AZ.png",z="/assets/a33.QYBAXO71.png",E="/assets/a34.BBqAz_kr.png",V="/assets/a35.B8NF_iJX.png",U="/assets/a36.CPvsggxV.png",M="/assets/a37.DJRI7pv9.png",R="/assets/a38.BhfuTk-3.png",K="/assets/a39.BNtfZ4xd.png",N="/assets/a40.DTfyEQe2.png",G="/assets/a41.Cb6MjiUm.png",j="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",L="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Y="/assets/b2.BnvPQMj3.png",Q="/assets/b3.DPn2dzFl.png",X="/assets/b4.JBQupWN9.png",Z="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ee="/assets/b7.5Fkbt05C.png",te="/assets/b8.BXlK1Dnb.png",se="/assets/b9.CaK5eLKm.png",oe="/assets/b10.DGHfd73s.png",ae="/assets/b11.DKZjwgY8.png",ie="/assets/b12.BISDj2Ri.png",ne="/assets/b13.WGr5jMeK.png",re="/assets/b14.BqBpvoFk.png",pe="/assets/b15.Cd3Rj7ju.png",ce="/assets/b16.BR7AHi1X.png",de="/assets/b17.Cn1C4e1e.png",le="/assets/b18.ElAa2UCQ.png",he="/assets/b19.BwC-oHOW.png",me="/assets/b20.Dj-0rOwy.png",ge="/assets/b21.CYRPkSXE.png",ue="/assets/b22.BH7kRZ3Z.png",fe="/assets/b23.JVX-KOL7.png",_e="/assets/b24.a2fv8lkf.png",be="/assets/b25.BJrNgkiA.png",ye="/assets/b26.5bTO5HK5.png",ke="/assets/b27.BSRz6moE.png",we="/assets/b28.WNjJaEPB.png",ve="/assets/b29.Bs69Ykqp.png",xe="/assets/b30.B96bh_Ou.png",Ce="/assets/b31.BBIAIScF.png",Ie="/assets/b32.8G5Xy9mr.png",Be="/assets/b33.RYxcR7vu.png",Se="/assets/b34.Dw6MyLex.png",Ae="/assets/b35.DUCPsVIG.png",Te="/assets/b36.7aKaNaLh.png",Pe="/assets/b37.B5CHAJzN.png",Fe="/assets/br.CyzpZwsx.png",Oe="/assets/b38.Pnnij22W.png",qe="/assets/b39.ajiHDdbx.png",De="/assets/b40.B6FTkFUT.png",ze="/assets/b41.DcCdod5l.png",Ee="/assets/b42.CT1JvTLX.png",Ve="/assets/b43.HthhPs5o.png",Ue="/assets/b44.C9NeP-UC.png",Me="/assets/b45.BWxBBH-l.png",Re="/assets/b46.B6Ds58im.png",Ye=JSON.parse('{"title":"Android Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_android.md","filePath":"en/guide/pve/pve_android.md","lastUpdated":1772422214000}'),Ke={name:"en/guide/pve/pve_android.md"};function Ne(Ge,e,je,He,Le,Je){return o(),s("div",null,e[0]||(e[0]=[a('

Android Virtual Machine

Android System Image Download

Download links for Android system version 9 and earlier:

International

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

Domestic (China)

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Download links for Android system version 10 and later:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

Virtual Machine Setup

Setting up an Android Virtual Machine with version 9 and earlier images

This guide demonstrates using:

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

as an example

1

Template Configuration

Create a virtual machine with VMID 100 and select the corresponding storage disk

2

Select the Android image, then choose Linux for Type and choose an option with version 2.6 for Version

3

Select Vmware compatible for Graphic card, other options are default as shown

4

Choose SATA for disk format, allocate at least 30GB of disk space (size can be chosen based on your needs)

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface

9

System Installation

After entering the boot menu, select the option starting with Installation

10

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it

11

Choose not to use GPT format

12

When the empty disk is displayed, select New

13

Select partition type Primary

14

Then you'll be prompted to specify the size of the space. Just press Enter to use all available space

15

Then select Flags, move to Bootable, press Enter until Boot appears under Flags

16

Then move to Write and press Enter to write changes

17

You'll be asked to confirm whether to continue. Type yes and press Enter to continue

18

After a progress bar completes, you'll return to the initial menu. Select Quit to exit the menu, everything is now ready

19

Then you'll return to the UI interface. Use the previously initialized disk and select the OK button

20

Use the arrow keys to select ext4 file system type, then select the OK button

21

Confirm formatting by selecting the Yes button

22

Confirm GRUB boot installation by selecting the OK button

23

Confirm the file system is readable and writable by selecting the OK button

24

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button

25

After a while, you'll enter the Android logo screen

26

Removing the Image

Then there will be a black screen. If it's still black after 3-5 minutes, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

ar

Then execute qm start 100 on the host machine again, and you should enter the Android system initialization interface

System Initialization

In the initialization interface, select the language and click the confirm button

27

It will try to connect to WiFi. Since our PVE installation uses a completely static network configuration, just skip this and set it up later

31

Click the next button to confirm the time settings

32

Click to cancel screen protection, confirm to skip again

33

After a period of black screen, the main screen application selection will appear. If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine as before, and it should display after entering VNC

Select Quickstep

34

Network Settings

After entering the desktop, you need to set up the network. Click the settings icon in the upper left corner

35

A dropdown appears, click and hold to pull down

36

Click the gear button

37

Enter Network & Internet settings

38

Double-click WIFI with the left mouse button

39

Modify the detected VirtWIFI. Right-click to bring up the selection box, then click Modify network

40

Advanced options appear, click to open hidden options

41

Configure the network settings as shown

IP address 172.16.1.xxx (replace xxx with your desired IP, I used 100 because my vmid is 100 for convenience)

Subnet mask 24

Default gateway 172.16.1.1

DNS 8.8.8.8 or 144.144.144.144

Then click the save button

42

At this point, the settings may still not be applied. Turn off WiFi and then turn it back on, it should then show as connected

43

Then exit to the main interface, click on Google Chrome, and try to open a webpage

44

You can see that opening this guide's URL works without problems, proving that the network is connected

45

Setting up an Android Virtual Machine with version 10 and later images

This guide demonstrates using:

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

as an example

1

Template Configuration

The host machine needs to execute the following command to install graphics environment dependencies

shell
apt install libgl1 libegl1 -y

Then start creating the virtual machine by clicking the Create VM button in the upper right corner. Fill in VMID, Name, Resource Pool

2

Select the Android image, then choose Linux for Type and an option with version 2.6 for Version

3

If the host machine has a GPU, select VirGL GPU for Graphic card.

If the host machine doesn't have a GPU, select VirtIO or Vmware compatible for Graphic card.

Select q35 for Machine, select OVMF (UEFI) for BIOS, and select local for EFI Storage.

4

Choose SATA for disk format. How much disk space to allocate is up to you, but at least 30GB is recommended

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface.

System Installation

After entering the boot menu, select the option ending with Installation

9

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it.

10

Choose not to use GPT format, continue using cfdisk format.

11

When the format selection box appears, select gpt.

12

When the empty disk is displayed, select New.

13

Because you need to create an EFI partition, you need to change the size rather than using the default. Change the number to 1 to allocate 1GB of disk space, then press Enter.

14

Then you'll return to the menu bar. Use the arrow keys to select Type, then press Enter to choose the format type for the partition

15

Use the arrow keys to select the first option EFI System, then press Enter

16

Now you're back at the menu bar. In the upper half of the page, you can see the specific partition size and format

17

Then press the down arrow key to select the next empty partition line

18

Select New from the menu bar, then press Enter

19

Here you need to fill in the partition size. Match it with the empty partition size shown in the upper right corner, then press Enter.

20

Return to the menu bar, select Write, press Enter to write the partition.

21

You'll be prompted to enter yes to confirm. Enter it and press Enter.

22

After a progress bar runs, you should return to the menu bar. Select Quit to exit the menu, everything is now ready

23

Then you'll return to the UI interface. Use the previously initialized 1GB disk and select the OK button

24

Use the arrow keys to select fat32 file system type, then select the OK button

25

Confirm not to modify the name by selecting the OK button

26

Confirm formatting by selecting the Yes button

27

Then you'll return to the initial UI bar. Select the second partition that is not 1GB in size and select the OK button

28

Use the arrow keys to select ext4 file system type, then select the OK button

29

Confirm not to modify the name by selecting the OK button

30

Confirm formatting by selecting the Yes button

31

Choose not to use extra space for updates by selecting the No button

32

Confirm GRUB2 EFI BootLoader by selecting the OK button

33

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button.

34

System Initialization

After a while, you'll enter the logo screen.

35

After some more time, you should enter the initial Android interface. You'll see a popup and the time. Hold the left mouse button and swipe up

36

The main screen application selection will appear. Select Quickstep

If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine, and it should display after entering VNC

37

Removing the Image

After the Android interface appears, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

br

Then execute qm start 100 on the host machine again, and you should enter the system's initial interface.

Network Settings

After entering the desktop, you need to set up the network. Hold the left mouse button in the indicated position and swipe up

38

A bunch of applications will pop up. Find the one called Bliss Ethernet Manager and click to open it

39

Click to open IP Assignment, select Static type, click the OK button to confirm

40

Click to open IP Address, enter 172.16.1.xxx/24 (I used 100 for xxx because my virtual machine VMID is 100 for easy identification), click the OK button to confirm

41

Click to open Gateway Address, enter 172.16.1.1, click the OK button to confirm

42

Click to open DNS Address, enter 8.8.8.8, click the OK button to confirm

43

Then in the application interface, click Interface Up and Refresh, then press the exit key on the keyboard to exit the program

44

Open the browser in the main interface to verify that the network is working properly

45

You can see that opening this guide works without problems, the network is functioning

46

',228)]))}const Qe=t(Ke,[["render",Ne]]);export{Ye as __pageData,Qe as default}; diff --git a/assets/en_guide_pve_pve_android.md.yoFL8Xty.lean.js b/assets/en_guide_pve_pve_android.md.yoFL8Xty.lean.js deleted file mode 100644 index 085c32494d..0000000000 --- a/assets/en_guide_pve_pve_android.md.yoFL8Xty.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as s,o,ag as a}from"./chunks/framework.CSeR4K32.js";const i="/assets/a1.DvgNELwZ.png",n="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",p="/assets/a4.BtVJtyBL.png",c="/assets/a5.CamDlEuL.png",d="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",h="/assets/a8.CkyIulFy.png",m="/assets/a9.Dg58RrTs.png",g="/assets/a10.CPK2ZJEJ.png",u="/assets/a11.Bq6vmveu.png",f="/assets/a12.bStrZLWw.png",_="/assets/a13.DRz8WTJR.png",b="/assets/a14.D56M6gMb.png",y="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",w="/assets/a17.B9keXK9k.png",v="/assets/a18.Bu92JFv5.png",x="/assets/a19.DZjr60Xs.png",C="/assets/a20.CesdkIR_.png",I="/assets/a21.BO8sy8n4.png",B="/assets/a22.COjD9r-B.png",S="/assets/a23.BxEEAckp.png",A="/assets/a24.BrCKYLHX.png",T="/assets/a25.CUB6zoiS.png",P="/assets/a26.zvaFRs59.png",F="/assets/ar.Dy_5EjFU.png",O="/assets/a27.QkS9Cjl7.png",q="/assets/a31.BiCzGFMR.png",D="/assets/a32.54sdf1AZ.png",z="/assets/a33.QYBAXO71.png",E="/assets/a34.BBqAz_kr.png",V="/assets/a35.B8NF_iJX.png",U="/assets/a36.CPvsggxV.png",M="/assets/a37.DJRI7pv9.png",R="/assets/a38.BhfuTk-3.png",K="/assets/a39.BNtfZ4xd.png",N="/assets/a40.DTfyEQe2.png",G="/assets/a41.Cb6MjiUm.png",j="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",L="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Y="/assets/b2.BnvPQMj3.png",Q="/assets/b3.DPn2dzFl.png",X="/assets/b4.JBQupWN9.png",Z="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ee="/assets/b7.5Fkbt05C.png",te="/assets/b8.BXlK1Dnb.png",se="/assets/b9.CaK5eLKm.png",oe="/assets/b10.DGHfd73s.png",ae="/assets/b11.DKZjwgY8.png",ie="/assets/b12.BISDj2Ri.png",ne="/assets/b13.WGr5jMeK.png",re="/assets/b14.BqBpvoFk.png",pe="/assets/b15.Cd3Rj7ju.png",ce="/assets/b16.BR7AHi1X.png",de="/assets/b17.Cn1C4e1e.png",le="/assets/b18.ElAa2UCQ.png",he="/assets/b19.BwC-oHOW.png",me="/assets/b20.Dj-0rOwy.png",ge="/assets/b21.CYRPkSXE.png",ue="/assets/b22.BH7kRZ3Z.png",fe="/assets/b23.JVX-KOL7.png",_e="/assets/b24.a2fv8lkf.png",be="/assets/b25.BJrNgkiA.png",ye="/assets/b26.5bTO5HK5.png",ke="/assets/b27.BSRz6moE.png",we="/assets/b28.WNjJaEPB.png",ve="/assets/b29.Bs69Ykqp.png",xe="/assets/b30.B96bh_Ou.png",Ce="/assets/b31.BBIAIScF.png",Ie="/assets/b32.8G5Xy9mr.png",Be="/assets/b33.RYxcR7vu.png",Se="/assets/b34.Dw6MyLex.png",Ae="/assets/b35.DUCPsVIG.png",Te="/assets/b36.7aKaNaLh.png",Pe="/assets/b37.B5CHAJzN.png",Fe="/assets/br.CyzpZwsx.png",Oe="/assets/b38.Pnnij22W.png",qe="/assets/b39.ajiHDdbx.png",De="/assets/b40.B6FTkFUT.png",ze="/assets/b41.DcCdod5l.png",Ee="/assets/b42.CT1JvTLX.png",Ve="/assets/b43.HthhPs5o.png",Ue="/assets/b44.C9NeP-UC.png",Me="/assets/b45.BWxBBH-l.png",Re="/assets/b46.B6Ds58im.png",Ye=JSON.parse('{"title":"Android Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_android.md","filePath":"en/guide/pve/pve_android.md","lastUpdated":1772422214000}'),Ke={name:"en/guide/pve/pve_android.md"};function Ne(Ge,e,je,He,Le,Je){return o(),s("div",null,e[0]||(e[0]=[a("",228)]))}const Qe=t(Ke,[["render",Ne]]);export{Ye as __pageData,Qe as default}; diff --git a/assets/en_guide_pve_pve_custom.md.CQtl_dNW.js b/assets/en_guide_pve_pve_custom.md.CQtl_dNW.js new file mode 100644 index 0000000000..0938b9a6f0 --- /dev/null +++ b/assets/en_guide_pve_pve_custom.md.CQtl_dNW.js @@ -0,0 +1,34 @@ +import{_ as e,c as a,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Customized partitions","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_custom.md","filePath":"en/guide/pve/pve_custom.md","lastUpdated":1772424525000}'),t={name:"en/guide/pve/pve_custom.md"};function p(l,s,o,r,h,c){return i(),a("div",null,s[0]||(s[0]=[n(`

Customized partitions

Installing Proxmox VE 7 on a non-Debian system

Minimum local hardware requirements are the same as for the previous normal installation.

You need to install docker first.

curl -sSL https://get.docker.com/ | sh
+curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
+chmod +x /usr/local/bin/docker-compose
+docker-compose --version

Then use uname -m to query the architecture and use the command corresponding to the architecture

The opened PVE panel information is:

Login username and password are both root, after logging in be sure to use web SSH to change the password to avoid being blown up.

When using host SSH, be sure to log into the corresponding https://IPV4:8006 to use SSH on the web panel, do not use the host's port 22 to manipulate the PVE.

Because the SSH on the web panel is inside Docker, it does not support subsequent one-click configurations, so please configure your own gateway, etc. to use it.

X86 architecture

bash
docker run -idt --network host \\
+--privileged \\
+--name pve \\
+--add-host pve:10.13.14.101 \\
+--hostname pve \\
+spiritlhl/pve:7_x86_64

ARM architecture

bash
docker run -idt --network host \\
+--privileged \\
+--name pve \\
+--add-host pve:10.13.14.101 \\
+--hostname pve \\
+spiritlhl/pve:7_aarch64

The web panel is actually opened in the container, but the network has used the host mode, the port of the PVE is about the same as the port of the host used.

But here the login username and password become root and root, if you need to change it please docker exec -it pve /bin/bash enter and change the password of root, then press ctrl key and A+D to exit.

There are many bugs need to be fixed, welcome to PR to solve the problem, the actual test on the Ubuntu system host machine to install Proxmox VE panel success, solved the problem of installing Proxmox VE over the network can only be used to use the Debian system as a host machine!

Optimizing the memory footprint of Proxmox-VE on low-configuration systems

The following optimization can reduce at least 400M memory occupation, some machines can reduce more than 6GB, the actual reduction of how much memory occupation to test by yourself.

Reduce the number of max_workers

Execute the following command to query

cd /usr/share/perl5/PVE/Service
+grep 'max_workers => 3' *

you can see

pvedaemon.pm:    max_workers => 3,
+pveproxy.pm:    max_workers => 3,
+spiceproxy.pm:    max_workers => 3, # todo: do we need more?

The default max_workers is 3, you can modify the corresponding file, the minimum max_workers can be 1, you can use the following commands to modify them:

sed -i "s/max_workers => 3/max_workers => 1/g" /usr/share/perl5/PVE/Service/*

Deactivation of HA services

Clusters (multi-nodes) can use the HA service, if it is a single node, or there is no need for HA use, you can execute the following command:

systemctl stop pve-ha-lrm.service 
+systemctl stop pve-ha-crm.service 
+systemctl disable pve-ha-lrm.service 
+systemctl disable pve-ha-crm.service

Disable firewall service

The service can be deactivated by executing the following command:

systemctl stop pve-firewall.service 
+systemctl disable pve-firewall.service

Discontinuation of cheduler service

If you don't need scheduled tasks, such as backups and synchronizations, you can deactivate the service by executing the following command:

systemctl stop pvescheduler.service
+systemctl disable pvescheduler.service

Discontinuation of Spiceproxy service

If you do not need to use Spice for VM/container linking (the Arm version itself does not support Spice), you can deactivate the service by executing the following command:

systemctl stop spiceproxy.service 
+systemctl disable spiceproxy.service

Deleting the memory cache using a timed task

Clearing different types of caches and performing TRIM operations on file systems

shell
TEMP_CRON=$(mktemp)
+sudo crontab -l > $TEMP_CRON
+echo "*/5 * * * * echo 1 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 60; echo 2 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 120; echo 3 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 180; fstrim -av" >> $TEMP_CRON
+sudo crontab $TEMP_CRON
+rm $TEMP_CRON

The above commands require the sudo and crontab commands to be available on the host itself.

Self-mapping of public ports on KVM VMs with open NATs

All of the following operations are performed on the PVE host computer

Use the nano or vim command to modify the file to add port mapping:

/etc/iptables/rules.v4

For example, if I have a KVM VM with an intranet IP of 172.16.1.152 (VMs can view the intranet IP address on the web side no matter what system they are on), and MYSQL has been set up to listen to 3306, and I need to use the tcp protocol to map out to the 33306 port on the host IP, I would add the following line to the COMMIT line in the file above, then add the following line

-A PREROUTING -i vmbr0 -p tcp -m tcp -dport 33306 -j DNAT --to-destination 172.16.1.152:3306

If it's udp protocol, just change tcp to udp in the code above

Save the file and exit file editing and then execute:

service netfilter-persistent restart

Reload Port Mapping

At this point, on the host machine, execute the

lsof -i:33306

To see if the port mapping rule is in effect

Customizing the CPU TYPE when opening a Linux virtual machine

On the host computer, use something like

shell
echo "kvm64" > /usr/local/bin/cpu_type

Specifying the default CPU TYPE in this way allows you to replace kvm64 with the type you want

When creating virtual machines or containers, you must use a custom IPv6 list

Enter each IPv6 address to be assigned on a separate line in /usr/local/bin/pve_appended_content.txt, such as:

shell
2a01:4f8:1c1c:94de::2
+2a01:4f8:1c1c:94de::3
+2a01:4f8:1c1c:94de::4
+2a01:4f8:1c1c:94de::5
+2a01:4f8:1c1c:94de::6

This approach can be used when the host machine has not been fully allocated a subnet larger than /80, possesses only a few IPv6 addresses, yet requires the creation of instances with independent IPv6 addresses.

`,63)]))}const m=e(t,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_pve_custom.md.CQtl_dNW.lean.js b/assets/en_guide_pve_pve_custom.md.CQtl_dNW.lean.js new file mode 100644 index 0000000000..f334a91045 --- /dev/null +++ b/assets/en_guide_pve_pve_custom.md.CQtl_dNW.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Customized partitions","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_custom.md","filePath":"en/guide/pve/pve_custom.md","lastUpdated":1772424525000}'),t={name:"en/guide/pve/pve_custom.md"};function p(l,s,o,r,h,c){return i(),a("div",null,s[0]||(s[0]=[n("",63)]))}const m=e(t,[["render",p]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_pve_custom.md.DMTzM6ai.js b/assets/en_guide_pve_pve_custom.md.DMTzM6ai.js deleted file mode 100644 index 28ac890c5c..0000000000 --- a/assets/en_guide_pve_pve_custom.md.DMTzM6ai.js +++ /dev/null @@ -1,34 +0,0 @@ -import{_ as e,c as a,o as i,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Customized partitions","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_custom.md","filePath":"en/guide/pve/pve_custom.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_custom.md"};function o(p,s,l,h,c,r){return i(),a("div",null,s[0]||(s[0]=[t(`

Customized partitions

Installing Proxmox VE 7 on a non-Debian system

Minimum local hardware requirements are the same as for the previous normal installation.

You need to install docker first.

curl -sSL https://get.docker.com/ | sh
-curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
-chmod +x /usr/local/bin/docker-compose
-docker-compose --version

Then use uname -m to query the architecture and use the command corresponding to the architecture

The opened PVE panel information is:

Login username and password are both root, after logging in be sure to use web SSH to change the password to avoid being blown up.

When using host SSH, be sure to log into the corresponding https://IPV4:8006 to use SSH on the web panel, do not use the host's port 22 to manipulate the PVE.

Because the SSH on the web panel is inside Docker, it does not support subsequent one-click configurations, so please configure your own gateway, etc. to use it.

X86 architecture

bash
docker run -idt --network host \\
---privileged \\
---name pve \\
---add-host pve:10.13.14.101 \\
---hostname pve \\
-spiritlhl/pve:7_x86_64

ARM architecture

bash
docker run -idt --network host \\
---privileged \\
---name pve \\
---add-host pve:10.13.14.101 \\
---hostname pve \\
-spiritlhl/pve:7_aarch64

The web panel is actually opened in the container, but the network has used the host mode, the port of the PVE is about the same as the port of the host used.

But here the login username and password become root and root, if you need to change it please docker exec -it pve /bin/bash enter and change the password of root, then press ctrl key and A+D to exit.

There are many bugs need to be fixed, welcome to PR to solve the problem, the actual test on the Ubuntu system host machine to install Proxmox VE panel success, solved the problem of installing Proxmox VE over the network can only be used to use the Debian system as a host machine!

Optimizing the memory footprint of Proxmox-VE on low-configuration systems

The following optimization can reduce at least 400M memory occupation, some machines can reduce more than 6GB, the actual reduction of how much memory occupation to test by yourself.

Reduce the number of max_workers

Execute the following command to query

cd /usr/share/perl5/PVE/Service
-grep 'max_workers => 3' *

you can see

pvedaemon.pm:    max_workers => 3,
-pveproxy.pm:    max_workers => 3,
-spiceproxy.pm:    max_workers => 3, # todo: do we need more?

The default max_workers is 3, you can modify the corresponding file, the minimum max_workers can be 1, you can use the following commands to modify them:

sed -i "s/max_workers => 3/max_workers => 1/g" /usr/share/perl5/PVE/Service/*

Deactivation of HA services

Clusters (multi-nodes) can use the HA service, if it is a single node, or there is no need for HA use, you can execute the following command:

systemctl stop pve-ha-lrm.service 
-systemctl stop pve-ha-crm.service 
-systemctl disable pve-ha-lrm.service 
-systemctl disable pve-ha-crm.service

Disable firewall service

The service can be deactivated by executing the following command:

systemctl stop pve-firewall.service 
-systemctl disable pve-firewall.service

Discontinuation of cheduler service

If you don't need scheduled tasks, such as backups and synchronizations, you can deactivate the service by executing the following command:

systemctl stop pvescheduler.service
-systemctl disable pvescheduler.service

Discontinuation of Spiceproxy service

If you do not need to use Spice for VM/container linking (the Arm version itself does not support Spice), you can deactivate the service by executing the following command:

systemctl stop spiceproxy.service 
-systemctl disable spiceproxy.service

Deleting the memory cache using a timed task

Clearing different types of caches and performing TRIM operations on file systems

shell
TEMP_CRON=$(mktemp)
-sudo crontab -l > $TEMP_CRON
-echo "*/5 * * * * echo 1 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 60; echo 2 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 120; echo 3 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 180; fstrim -av" >> $TEMP_CRON
-sudo crontab $TEMP_CRON
-rm $TEMP_CRON

The above commands require the sudo and crontab commands to be available on the host itself.

Self-mapping of public ports on KVM VMs with open NATs

All of the following operations are performed on the PVE host computer

Use the nano or vim command to modify the file to add port mapping:

/etc/iptables/rules.v4

For example, if I have a KVM VM with an intranet IP of 172.16.1.152 (VMs can view the intranet IP address on the web side no matter what system they are on), and MYSQL has been set up to listen to 3306, and I need to use the tcp protocol to map out to the 33306 port on the host IP, I would add the following line to the COMMIT line in the file above, then add the following line

-A PREROUTING -i vmbr0 -p tcp -m tcp -dport 33306 -j DNAT --to-destination 172.16.1.152:3306

If it's udp protocol, just change tcp to udp in the code above

Save the file and exit file editing and then execute:

service netfilter-persistent restart

Reload Port Mapping

At this point, on the host machine, execute the

lsof -i:33306

To see if the port mapping rule is in effect

Customizing the CPU TYPE when opening a Linux virtual machine

On the host computer, use something like

shell
echo "kvm64" > /usr/local/bin/cpu_type

Specifying the default CPU TYPE in this way allows you to replace kvm64 with the type you want

When creating virtual machines or containers, you must use a custom IPv6 list

Enter each IPv6 address to be assigned on a separate line in /usr/local/bin/pve_appended_content.txt, such as:

shell
2a01:4f8:1c1c:94de::2
-2a01:4f8:1c1c:94de::3
-2a01:4f8:1c1c:94de::4
-2a01:4f8:1c1c:94de::5
-2a01:4f8:1c1c:94de::6

This approach can be used when the host machine has not been fully allocated a subnet larger than /80, possesses only a few IPv6 addresses, yet requires the creation of instances with independent IPv6 addresses.

`,63)]))}const u=e(n,[["render",o]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_custom.md.DMTzM6ai.lean.js b/assets/en_guide_pve_pve_custom.md.DMTzM6ai.lean.js deleted file mode 100644 index 1ab77e974e..0000000000 --- a/assets/en_guide_pve_pve_custom.md.DMTzM6ai.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as i,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Customized partitions","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_custom.md","filePath":"en/guide/pve/pve_custom.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_custom.md"};function o(p,s,l,h,c,r){return i(),a("div",null,s[0]||(s[0]=[t("",63)]))}const u=e(n,[["render",o]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_install.md.B28IFOVT.js b/assets/en_guide_pve_pve_install.md.B28IFOVT.js new file mode 100644 index 0000000000..752f829ea2 --- /dev/null +++ b/assets/en_guide_pve_pve_install.md.B28IFOVT.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"PVE Body Installation","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_install.md","filePath":"en/guide/pve/pve_install.md","lastUpdated":1772424525000}'),o={name:"en/guide/pve/pve_install.md"};function n(l,e,r,h,d,c){return s(),i("div",null,e[0]||(e[0]=[a('

PVE Body Installation

If you don't know how to choose an option during installation, just press enter.

TIP

For low-configuration hosts, it is recommended to check the contents of the Custom partition after all the content has been installed to perform memory tuning and reduce the memory footprint.

Installation on non-physical machines

Proxmox installed by this method can subsequently use all scripts of this project.

One-click PVE installation

TIP

Suggest debian12+, the actual test part of the independent server debian11 system will appear a reboot network will be lost, debian12 does not have such a problem!

  • The installation is the latest PVE from the apt source at the moment.
  • For example, debian10 is pve6.4, debian11 is pve7.x, debian12 is pve8.x, debian13 is pve9.x
  • Changes to the /etc/hosts file (to fix the wrong hostname setting for merchants and to add the required content for PVE)
  • /etc/cloud/cloud.cfg file modification (to avoid overwriting modified hostname etc.)
  • /etc/network/interfaces file modification (fix auto, dhcp type to static, add vmbr0 gateway)
  • Detect whether it is China IP, if it is China IP use Tsinghua mirror source, otherwise use the official source, and at the same time deal with the source of apt and the corresponding nameserver, to avoid disconnections
  • Create vmbr0 (independent IP gateway), the host allows addr and gateway for intranet IP or extranet IP, has been automatically recognized
  • vmbr0 creation support to open pure IPV4, pure IPV6, dual-stack virtual machine, automatic identification of IPV4 address and IPV6 address, automatic identification of the corresponding IP interval
  • Installation of the necessary toolkit for PVE to open a virtual machine
  • x86_64 replace enterprise subscriptions in apt sources with community sources, arm sources built using third-party patches for fixes
  • Print query Linux system kernel and PVE kernel installed or not
  • Setting up DNS detection 8.8.8.8.8 for boot add DNS systemd service
  • Download PVE and printout of login information after adding APT source link for PVE

All modified files have been set to read-only mode to avoid overwriting after reboot.

If you want to modify the file, please use` chattr -i file path to cancel the read-only lock, and run chattr +i file path to lock the read-only lock when you finish modifying the file.

You will be prompted to reboot your system once during the execution process, After rebooting, be sure to wait at least 20 seconds to make sure the system does not reboot automatically again.

Because the original environment may be missing ifupdown or ifupdown2 environment, there is a self-installation daemon loaded for the installation, after the installation of the system will automatically reboot the system again, wait for 20 seconds without reboot to ensure that the installation has been run.

If the host itself exists SLAAC assigned IPV6 address, will be able to choose whether to use the largest IPV6 subnet range, the default carriage return does not use the largest IPV6 subnet range only use the local IPV6, if you subsequently need to attach a separate IPV6 address to the virtual machine/container, the option must be selected y.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

or

shell
bash install_pve.sh

TIP

After successful installation, the web page may not be safe to open, click on Advanced or More Options and insist on accessing it!

The login information is your SSH account and password.

Pre-configure the environment

  • Creating a resource pool mypool
  • Remove the subscription popup
  • Attempt to enable hardware passthrough
  • Detect and auto-install AppArmor modules.
  • Before rebooting the system, it is recommended to hook up nezha probe to facilitate the use of the command line in the background without SSH, to avoid the possibility that SSH may lead to the loss of the root password after the reboot due to the merchant's strange presets.
  • Before executing reboot, you need to wait for the background task to finish executing, some host system apt command execution is very slow, you have to wait for a while to finish executing, of course, most of the machines are not so bad!

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

Automatically configure the host's gateway

WARNING

Before using this command, please make sure that you have restarted the server and that PVE can use the WEB terminal normally before executing this command. Do not execute this command immediately after restarting the machine, wait for at least 1 minute after the WEB terminal is successfully started before executing this command. If the WEB side doesn't start, run systemctl status pveproxy to see if it starts, if it's stuck, run systemctl start pveproxy to start the WEB side.

TIP

This step is most likely to cause SSH disconnections, the reason is to modify the network without waiting for the PVE kernel to start, which will result in setting conflicts, so wait at least a few minutes until the kernel is started, that is, the WEB side is started successfully before execution.

TIP

If the host needs to attach an IPV6 tunnel (add an IPV6 subnet to a host that does not have an IPV6 address) before executing this command, please check the IPV6 free subnet attachment section to attach to the corresponding configuration file, but please ignore 'initial environment modifications' and attach directly, and then execute the following one-click gateway configuration commands after verifying that you have an IPV6 address.

  • If vmbr0 is not created, it is automatically created with the same logic as the main installation
  • Create vmbr1 (NAT gateway) to support IPV4 servers that open NAT for IPV6 networks with NAT.
  • Create vmbr2 (standalone IPV6 gateway), use ndppd to solve the problem of MAC verification of IPV6 addresses by the host, support the opening of servers with standalone IPV6 networks.
  • If you want to see the complete settings, you can execute cat /etc/network/interfaces to see, if you need to modify the gateway you need to modify the file, the web site can not be modified!
  • Load iptables and set back to source and allow NAT port forwarding.

In short, vmbr0 is responsible for v4 standalone IPs, and vmbr1 is responsible for complex v4/v6 NATs, vmbr2 is responsible for v6 standalone IPs.

Open independent IPV4 virtual machine using vmbr0, gateway with the host, IPV4/CIDR using the same network segment address and the same subnet mask, using the host's unbound IPV4 address for IPV4/CIDR, of course, if the subsequent use of this script does not need to pay attention to this point of the nuances of the thing

Use vmbr1 for IPV4 VM with NAT, 172.16.1.1 for gateway, 172.16.1.x/24 for IPV4/CIDR, where x can't be 1, but of course you don't need to pay attention to this minutia if you use this script later.

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

This step may require you to reboot your system after a few minutes of successful execution, see the final execution of the script at the end of the tip. However, a reboot will ensure that some of the hidden settings are loaded successfully, so be sure to reboot the server once if you are in a position to do so.

To this point the main body is installed.

Installation on a physical machine

Proxmox installed by this method NOT to be used subsequently with all scripts of this project.

This method has not been tested and adapted on a large scale, only I installed PVE8.4 on the local machine, the router itself is not automatically obtain an IP address but fixed IP address connection way, if there is a problem corresponding to the warehouse open issues.

U disk burning official ISO

Official ISO download address:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

You need to download it locally in advance.

You also need a USB flash drive with a good read/write rate for making a boot disk, as the boot disk needs to be formatted using rufus for boot disk making, you need to make sure that the USB flash drive is empty before making the disk

rufus download address (download to your local, not USB flash drive):

https://rufus.ie/zh/

or

https://github.com/pbatard/rufus

Burning needs to use DD method to burn, the original data of the USB flash disk will be completely erased after burning.

PVE installation

Find out how to get into the BIOS on the host itself, and modify two things after entering the BIOS

  1. Safe boot needs to be turned off

  2. the order of the boot needs to be moved to the first USB order

Then save the settings, then insert the USB flash drive, reboot the system, and choose to use the graphical interface for installation.

FQDN need to fill in a URL, you can fill in something like pve.spiritlhl.net, preferably a sub-domain of the domain name you own, not the actual domain name if you write it as something like pve.localsite.com will also work, the subsequent may not be used!

After the installation will automatically shut down and restart, reboot after the black screen can be unplugged USB, to avoid restarting the installation from the USB flash drive, of course, if you forget to reboot to the installation page, shut down the machine after unplugging the USB flash drive and then start up is also OK!

Wireless Network Configuration

Download the required zip file and shell scripts

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

After downloading, unzip the zip file, drag the wireless folder into the root directory of a new USB flash drive, and the wireless.sh file has to be put into the root directory as well.

After the flash drive is plugged into the physical machine, you need to mount the flash drive, here sdx1 is the actual path of the flash drive queried by the first command, you need to modify it yourself

shell
fdisk -l \nmount /dev/sdx1 /mnt

The wireless.zip on the USB flash drive should be unzipped and opened to see the deb file.

At this point, run the one-click configuration

shell
bash /mnt/wireless.sh

After the configuration is complete, the system will automatically reboot and the public network will be available after the reboot.

During the execution of the configuration script, you will be prompted to enter the name and password of the WIFI. Since there is no Chinese input method in the pure CI environment, the name of the WIFI must be composed of English numbers only, and the password must be the same.

Cautions

Physical machine after the installation of unlimited modules can not use NAT to connect directly to the virtual machine to access the network, so the subsequent tutorials of this project does not support this method of access to the bridge, the subsequent scripts of this project does not support this method of installation of Proxmox.

Currently feasible wireless module used on the PVE success stories, are required to WIFI router access to the network is automatically obtain an IP address (DHCP) (the subsequent use of openwrt or ikuai or directly nat after the network available within the virtual machine), or can be modified in the router static routing table, if the WIFI router to use a fixed IP address Connection to the network, for the time being did not find success stories.

',69)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_pve_install.md.CYQ4ijbc.lean.js b/assets/en_guide_pve_pve_install.md.B28IFOVT.lean.js similarity index 60% rename from assets/en_guide_pve_pve_install.md.CYQ4ijbc.lean.js rename to assets/en_guide_pve_pve_install.md.B28IFOVT.lean.js index 526a14591b..aa884c84ee 100644 --- a/assets/en_guide_pve_pve_install.md.CYQ4ijbc.lean.js +++ b/assets/en_guide_pve_pve_install.md.B28IFOVT.lean.js @@ -1 +1 @@ -import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"PVE Body Installation","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_install.md","filePath":"en/guide/pve/pve_install.md","lastUpdated":1772422214000}'),o={name:"en/guide/pve/pve_install.md"};function n(l,e,r,h,d,c){return s(),i("div",null,e[0]||(e[0]=[a("",69)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; +import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"PVE Body Installation","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_install.md","filePath":"en/guide/pve/pve_install.md","lastUpdated":1772424525000}'),o={name:"en/guide/pve/pve_install.md"};function n(l,e,r,h,d,c){return s(),i("div",null,e[0]||(e[0]=[a("",69)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_pve_install.md.CYQ4ijbc.js b/assets/en_guide_pve_pve_install.md.CYQ4ijbc.js deleted file mode 100644 index abfc9b338b..0000000000 --- a/assets/en_guide_pve_pve_install.md.CYQ4ijbc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"PVE Body Installation","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_install.md","filePath":"en/guide/pve/pve_install.md","lastUpdated":1772422214000}'),o={name:"en/guide/pve/pve_install.md"};function n(l,e,r,h,d,c){return s(),i("div",null,e[0]||(e[0]=[a('

PVE Body Installation

If you don't know how to choose an option during installation, just press enter.

TIP

For low-configuration hosts, it is recommended to check the contents of the Custom partition after all the content has been installed to perform memory tuning and reduce the memory footprint.

Installation on non-physical machines

Proxmox installed by this method can subsequently use all scripts of this project.

One-click PVE installation

TIP

Suggest debian12+, the actual test part of the independent server debian11 system will appear a reboot network will be lost, debian12 does not have such a problem!

  • The installation is the latest PVE from the apt source at the moment.
  • For example, debian10 is pve6.4, debian11 is pve7.x, debian12 is pve8.x, debian13 is pve9.x
  • Changes to the /etc/hosts file (to fix the wrong hostname setting for merchants and to add the required content for PVE)
  • /etc/cloud/cloud.cfg file modification (to avoid overwriting modified hostname etc.)
  • /etc/network/interfaces file modification (fix auto, dhcp type to static, add vmbr0 gateway)
  • Detect whether it is China IP, if it is China IP use Tsinghua mirror source, otherwise use the official source, and at the same time deal with the source of apt and the corresponding nameserver, to avoid disconnections
  • Create vmbr0 (independent IP gateway), the host allows addr and gateway for intranet IP or extranet IP, has been automatically recognized
  • vmbr0 creation support to open pure IPV4, pure IPV6, dual-stack virtual machine, automatic identification of IPV4 address and IPV6 address, automatic identification of the corresponding IP interval
  • Installation of the necessary toolkit for PVE to open a virtual machine
  • x86_64 replace enterprise subscriptions in apt sources with community sources, arm sources built using third-party patches for fixes
  • Print query Linux system kernel and PVE kernel installed or not
  • Setting up DNS detection 8.8.8.8.8 for boot add DNS systemd service
  • Download PVE and printout of login information after adding APT source link for PVE

All modified files have been set to read-only mode to avoid overwriting after reboot.

If you want to modify the file, please use` chattr -i file path to cancel the read-only lock, and run chattr +i file path to lock the read-only lock when you finish modifying the file.

You will be prompted to reboot your system once during the execution process, After rebooting, be sure to wait at least 20 seconds to make sure the system does not reboot automatically again.

Because the original environment may be missing ifupdown or ifupdown2 environment, there is a self-installation daemon loaded for the installation, after the installation of the system will automatically reboot the system again, wait for 20 seconds without reboot to ensure that the installation has been run.

If the host itself exists SLAAC assigned IPV6 address, will be able to choose whether to use the largest IPV6 subnet range, the default carriage return does not use the largest IPV6 subnet range only use the local IPV6, if you subsequently need to attach a separate IPV6 address to the virtual machine/container, the option must be selected y.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

or

shell
bash install_pve.sh

TIP

After successful installation, the web page may not be safe to open, click on Advanced or More Options and insist on accessing it!

The login information is your SSH account and password.

Pre-configure the environment

  • Creating a resource pool mypool
  • Remove the subscription popup
  • Attempt to enable hardware passthrough
  • Detect and auto-install AppArmor modules.
  • Before rebooting the system, it is recommended to hook up nezha probe to facilitate the use of the command line in the background without SSH, to avoid the possibility that SSH may lead to the loss of the root password after the reboot due to the merchant's strange presets.
  • Before executing reboot, you need to wait for the background task to finish executing, some host system apt command execution is very slow, you have to wait for a while to finish executing, of course, most of the machines are not so bad!

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

Automatically configure the host's gateway

WARNING

Before using this command, please make sure that you have restarted the server and that PVE can use the WEB terminal normally before executing this command. Do not execute this command immediately after restarting the machine, wait for at least 1 minute after the WEB terminal is successfully started before executing this command. If the WEB side doesn't start, run systemctl status pveproxy to see if it starts, if it's stuck, run systemctl start pveproxy to start the WEB side.

TIP

This step is most likely to cause SSH disconnections, the reason is to modify the network without waiting for the PVE kernel to start, which will result in setting conflicts, so wait at least a few minutes until the kernel is started, that is, the WEB side is started successfully before execution.

TIP

If the host needs to attach an IPV6 tunnel (add an IPV6 subnet to a host that does not have an IPV6 address) before executing this command, please check the IPV6 free subnet attachment section to attach to the corresponding configuration file, but please ignore 'initial environment modifications' and attach directly, and then execute the following one-click gateway configuration commands after verifying that you have an IPV6 address.

  • If vmbr0 is not created, it is automatically created with the same logic as the main installation
  • Create vmbr1 (NAT gateway) to support IPV4 servers that open NAT for IPV6 networks with NAT.
  • Create vmbr2 (standalone IPV6 gateway), use ndppd to solve the problem of MAC verification of IPV6 addresses by the host, support the opening of servers with standalone IPV6 networks.
  • If you want to see the complete settings, you can execute cat /etc/network/interfaces to see, if you need to modify the gateway you need to modify the file, the web site can not be modified!
  • Load iptables and set back to source and allow NAT port forwarding.

In short, vmbr0 is responsible for v4 standalone IPs, and vmbr1 is responsible for complex v4/v6 NATs, vmbr2 is responsible for v6 standalone IPs.

Open independent IPV4 virtual machine using vmbr0, gateway with the host, IPV4/CIDR using the same network segment address and the same subnet mask, using the host's unbound IPV4 address for IPV4/CIDR, of course, if the subsequent use of this script does not need to pay attention to this point of the nuances of the thing

Use vmbr1 for IPV4 VM with NAT, 172.16.1.1 for gateway, 172.16.1.x/24 for IPV4/CIDR, where x can't be 1, but of course you don't need to pay attention to this minutia if you use this script later.

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

This step may require you to reboot your system after a few minutes of successful execution, see the final execution of the script at the end of the tip. However, a reboot will ensure that some of the hidden settings are loaded successfully, so be sure to reboot the server once if you are in a position to do so.

To this point the main body is installed.

Installation on a physical machine

Proxmox installed by this method NOT to be used subsequently with all scripts of this project.

This method has not been tested and adapted on a large scale, only I installed PVE8.4 on the local machine, the router itself is not automatically obtain an IP address but fixed IP address connection way, if there is a problem corresponding to the warehouse open issues.

U disk burning official ISO

Official ISO download address:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

You need to download it locally in advance.

You also need a USB flash drive with a good read/write rate for making a boot disk, as the boot disk needs to be formatted using rufus for boot disk making, you need to make sure that the USB flash drive is empty before making the disk

rufus download address (download to your local, not USB flash drive):

https://rufus.ie/zh/

or

https://github.com/pbatard/rufus

Burning needs to use DD method to burn, the original data of the USB flash disk will be completely erased after burning.

PVE installation

Find out how to get into the BIOS on the host itself, and modify two things after entering the BIOS

  1. Safe boot needs to be turned off

  2. the order of the boot needs to be moved to the first USB order

Then save the settings, then insert the USB flash drive, reboot the system, and choose to use the graphical interface for installation.

FQDN need to fill in a URL, you can fill in something like pve.spiritlhl.net, preferably a sub-domain of the domain name you own, not the actual domain name if you write it as something like pve.localsite.com will also work, the subsequent may not be used!

After the installation will automatically shut down and restart, reboot after the black screen can be unplugged USB, to avoid restarting the installation from the USB flash drive, of course, if you forget to reboot to the installation page, shut down the machine after unplugging the USB flash drive and then start up is also OK!

Wireless Network Configuration

Download the required zip file and shell scripts

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

After downloading, unzip the zip file, drag the wireless folder into the root directory of a new USB flash drive, and the wireless.sh file has to be put into the root directory as well.

After the flash drive is plugged into the physical machine, you need to mount the flash drive, here sdx1 is the actual path of the flash drive queried by the first command, you need to modify it yourself

shell
fdisk -l \nmount /dev/sdx1 /mnt

The wireless.zip on the USB flash drive should be unzipped and opened to see the deb file.

At this point, run the one-click configuration

shell
bash /mnt/wireless.sh

After the configuration is complete, the system will automatically reboot and the public network will be available after the reboot.

During the execution of the configuration script, you will be prompted to enter the name and password of the WIFI. Since there is no Chinese input method in the pure CI environment, the name of the WIFI must be composed of English numbers only, and the password must be the same.

Cautions

Physical machine after the installation of unlimited modules can not use NAT to connect directly to the virtual machine to access the network, so the subsequent tutorials of this project does not support this method of access to the bridge, the subsequent scripts of this project does not support this method of installation of Proxmox.

Currently feasible wireless module used on the PVE success stories, are required to WIFI router access to the network is automatically obtain an IP address (DHCP) (the subsequent use of openwrt or ikuai or directly nat after the network available within the virtual machine), or can be modified in the router static routing table, if the WIFI router to use a fixed IP address Connection to the network, for the time being did not find success stories.

',69)]))}const m=t(o,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_guide_pve_pve_kvm.md.EedGwoAp.js b/assets/en_guide_pve_pve_kvm.md.EedGwoAp.js new file mode 100644 index 0000000000..3854470c9e --- /dev/null +++ b/assets/en_guide_pve_pve_kvm.md.EedGwoAp.js @@ -0,0 +1,12 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Linux Virtual Machine (KVM/TCG Virtualization)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_kvm.md","filePath":"en/guide/pve/pve_kvm.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_kvm.md"};function l(r,s,d,h,o,p){return a(),e("div",null,s[0]||(s[0]=[t(`

Linux Virtual Machine (KVM/TCG Virtualization)

SSH Login Instructions

When open a virtual machine, the default generated username can be something other than root, in which case you need to run sudo -i to switch to root!

If the default username is not root, the default unset root password is password or oneclickvirt.

After logging into SSH and switching to root privileges, be sure to change the root password, which can be changed using the following command:

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

Considerations for opening a virtual machine with an IPV6 address

Due to long-term inactivity IPV6 does not use may lead to NDP broadcast cache invalidation reset, generally idle for about 50 minutes will appear IPV6 unavailable, commonly known as "IPV6 cutoff", at this time it is necessary to set up a timer task.

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

Executing the above commands in the opened virtual machine ensures that the IPV6 network is always used and does not fail over.

Images available for creating virtual machines

  • Pre-installed with cloud-init enabled.
  • Enabled SSH login.
  • Pre-configured SSH to listen on ports 22 for both IPv4 and IPv6.
  • Enabled password authentication for login.
  • Enabled root login.
  • Partially pre-installed QEMU guest agent.
  • System support:
    • See pve_kvm_images or kvm_images for details on the x86_64 architecture, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.
    • For arm architecture, see the systems listed in ubuntu or debian, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.

Virtual machines with standalone NAT configuration.

  • Automatically deploy NAT servers with the default Debian 10 image, chosen for its minimal footprint.
  • It's possible to customize the image used through the command, and pre-configured images are available. These images come with storage settings ranging from 2 to 10 GB of disk space. For regular use, at least 10 GB of disk space is recommended. You can increase the disk size if certain images fail to start.
  • The command allows for specifying the storage disk location. When not specified, it defaults to the local disk, which is the system disk. It can also be set to a mount disk as displayed in PVE.
  • Recommended custom memory size is 512 MB.
  • Automatic internal and external port mapping, including ports 22, 80, 443, and 25 other port numbers shared between internal and external networks.
  • After generation, there's a wait time for the virtual machine's internal cloud-init configuration to establish network and login information. This process takes approximately 5 minutes.
  • Pertinent virtual machine information will be stored in the NOTES section of the corresponding VM on the web interface, accessible for viewing through the web portal.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically added. However, there won't be any public IPV6 addresses.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

TIP

Note that usernames consisting of only numbers may cause issues with cloud-init. It's preferable to use usernames that are entirely in English or start with an English character.

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

Meaning of each parameter

shell
# ./buildvm.sh VMID Username Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Public_Port_Start Public_Port_End System Storage_Disk Independent_IPV6_address(leave default N blank)

TIP

Note that the Password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the Password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

After setup is completed, you can execute cat vm111 to view the information or check the NOTES section for the corresponding VM on the WEB interface.

Below is the information for the example VM that has been set up:

AttributeValue
VMID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size10G
SSH Port40001
Port 8040002
Port 44340003
Port Range for NAT50000 to 50025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific VM

  • Stop VM
  • Delete VM
  • Delete port mapping
  • Restart network
  • Delete log files

Download Script

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

Meaning of each parameter

You can delete the VM with the corresponding VMID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each VMID, and more than one can be deleted at a time.

Batch Creation of Virtual Machines with NAT

WARNING

Before initial use, ensure that the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port forwarding, as conflicting settings may result in bugs.

TIP

Before initiating the batch creation process, please use the 'screen' command to execute it in the background. This will help avoid interruptions due to the instability of SSH caused by extended batch creation times.

  • The batch creation process can be run multiple times to generate multiple virtual machines (VMs).
  • NAT servers are automatically created during the process. If left blank, the default Debian 11 image will be used. You can also customize the image name. Refer to the list of supported images in the previous section.
  • Automatic internal and external port mapping is performed, including ports 22, 80, 443, and other ports with identical internal and external numbers (25 ports in total).
  • After generation, a waiting period is required for the cloud-init configuration of the VM's network and login information to be set up. This process takes approximately 5 minutes. There is a 60-second interval between creating each VM to avoid potential performance issues.
  • The default network configuration for VMs created in batches includes port mappings for ports 22, 80, 443, and a range of 25 ports for internal and external communication.
  • You can customize the number of CPU cores, memory size, disk size, and which storage disk on the host machine to use for batch creation. Ensure you calculate available resources before proceeding.
  • Relevant information about the virtual machines will be stored in the 'NOTES' section of the corresponding VM on the web interface, where you can view them.
  • If the host machine comes with an IPv6 subnet, an IPv6 network will be automatically attached, although there will be no public IPv6 addresses available.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

After the setup is completed, you can execute cat vmlog to view the information, or check the NOTES in the corresponding VM on the web interface.

Delete All Virtual Machines

  • Delete all VMs
  • Delete all NAT port mappings
  • Restart the network
  • Delete log files
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
+iptables -t nat -F
+iptables -t filter -F
+service networking restart
+systemctl restart networking.service
+systemctl restart ndpresponder.service
+iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
+iptables-save > /etc/iptables/rules.v4
+rm -rf vmlog
+rm -rf vm*

TIP

Before modifying the VM configuration for PVE, you must shut it down first. After making the configuration changes, start it again to avoid configuration reload errors.

Setting Up Virtual Machines with Dedicated IPv4 Addresses

Three scripts, each with its own advantages and disadvantages.

The first two scripts don't require an additional IPV4 address to be bound to the vmbr0 interface beforehand, and the opened VM will directly bind the additional IPV4 address.

The last script requires additional IPV4 addresses to be bound to the vmbr0 interface beforehand, and the opened VM will do NAT full port mapping to the intranet IPV4 address, **without directly binding additional IPV4 addresses.

Automatically selects additional IPV4 addresses on the same subnet as the host machine to open the virtual machine

WARNING

Before use, ensure that the current host machine has at least 2 available IP addresses within its IP range, and there are unallocated IP addresses. These unallocated IP addresses should not be bound to the host machine.

TIP

At this point, the IPV4 address appended is the address following the host's current IPV4 address in sequence. For example, if the current host address is 1.1.1.32 and then 1.1.1.33 there is already a virtual machine, then this script appends an IP address of 1.1.1.34.

  • Automatically detect available IP ranges. Use ping to identify unallocated IP addresses and select one to bind to the virtual machine.
  • If the host machine has an accompanying IPv6 subnet, there will be an option to attach an IPv6 address.
  • Relevant system information will be stored in the corresponding virtual machine's NOTE section, accessible for viewing on the web interface.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.
  • The automatically appended IPV4 address is within the same subnet as the host's IPV4 address (IP address prefix is the same)
  • Inbound and outbound traffic in and out of the VM goes to the additional IPV4 address of the binding

Usage Instructions

Download Script

shell
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

Meaning of each parameter

shell
# ./buildvm_extra_ip.sh VMID Username Password Number_of_CPU_Cores Memory_Size_in_MB Disk_Size_in_GB OS Storage_Disk Attach_IPV6(Default is N)

TIP

Note that the Password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the Password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_extra_ip.sh 152 root oneclick123 1 1024 10 debian12 local N

The above command is used to create a virtual machine with a dedicated IPv4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
OSdebian12
Storagelocal disk
IPv6 AddonNot attached by default

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Manually Assign Additional IPV4 Addresses to Open Virtual Machines

  • Manual specification of IPV4 address with subnet length in the command is required.
  • If the host machine comes with an IPV6 subnet, you can choose whether to add an IPV6 address additionally.
  • If the vendor has provided an IPV4 address and subnet length, please carefully compare and write the parameters in the command format shown below.
  • Relevant system information will be stored in the NOTE of the corresponding virtual machine and can be viewed on the WEB end.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.
  • Manually appended IPV4 addresses that are in different subnets from the host's IPV4 address (different IP address prefixes) will use the host's IP address as the gateway
  • Manually appended IPV4 addresses that are within the same subnet as the host's IPV4 address (same IP address prefix) will use the host's gateway as the gateway
  • Optionally specify the MAC address of the virtual machine
  • Inbound and outbound traffic in and out of the VM goes to the additional IPV4 address of the binding

TIP

If IP addresses within different subnets are appended without a MAC address, the router will not recognize the source MAC address, and the traffic will be flagged as “misuse” and “may” cause the server to be blocked. (If you are using a Hetzner standalone server, it is recommended that you provide the MAC address of the attached IPV4 address to prevent abuse from being reported.)

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

Meaning of each parameter

shell
# ./buildvm_manual_ip.sh VMID USERNAME PASSWORD CPU_CORES MEMORY_SIZE_GB STORAGE_SIZE_GB OS STORAGE_DISK IPV4_ADDRESS ATTACH_IPV6(defaults to N) MAC_ADDRESS(Optional whether to specify)

TIP

Note that the PASSWORD here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the PASSWORD due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_manual_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d/24 N

The above command is used to create a virtual machine with an independent IPV4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage DiskLocal Disk (System Disk)
IPV4 Addressa.b.c.d
Subnet/24 Subnet
IPV6None
MAC_ADDRESSNone

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Host manually appends an additional IPV4 address and then specifies the IPV4 address to open the virtual machine

  • You need to add the extra IPV4 address to vmbr0 in /etc/network/interfaces (note that chattr -i unlocks the file and then chattr +i locks it back).
  • Other features are similar to opening a NAT-enabled VM, except that here the mapping is no longer partial port mapping or mapping to the host's IPV4 address, but full-port one-by-one mapping to additional IPV4 addresses
  • Traffic coming into the VM from outside the VM goes to the bound additional IPV4 address, and traffic going out of the VM goes to the original host's IPV4 address

TIP

Make sure you can SSH into the host with the extra IPV4 address before opening, but curl ip.sb still shows the original host IPV4 address.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

Meaning of each parameter

shell
# ./buildvm_fullnat_ip.sh VMID USERNAME PASSWORD CPU_CORES MEMORY_SIZE_GB STORAGE_SIZE_GB OS STORAGE_DISK IPV4_ADDRESS ATTACH_IPV6(defaults to N)

TIP

Note that the PASSWORD here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the PASSWORD due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_fullnat_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d N

The above command is used to create a virtual machine with an independent IPV4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage DiskLocal Disk (System Disk)
IPV4 Addressa.b.c.d
IPV6None
MAC_ADDRESSNone

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Incoming and outgoing traffic goes to the bound IPV4 address

execute

line="-A POSTROUTING -s 172.16.1.0\\/24 -o vmbr0 -j MASQUERADE"
+sed -i "\\|$line|d" /etc/iptables/rules.v4
+service netfilter-persistent restart

This will cause the host to lose the ability to open VMs/containers with NAT that do not have a separate IPV4 address, so be careful!

After this, You will only be able to open VMs with separate IPV4 addresses.

Creating Virtual Machines with Pure IPv6 Addresses

The prerequisite is that the host provides an IPv6 subnet instead of just a standalone IPv6 address, and the host does not have MAC address verification enabled.

Automatic Selection of IPv6 Addresses without Manual Specification

  • Pure IPV6 refers to a bound public IPV6 address, where the actual VM still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address, based on the virtual machine's number, to the virtual machine.
  • System-related information will be stored in the NOTES section of the respective virtual machine, accessible for viewing on the web interface.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

Meaning of each parameter

shell
# ./buildvm_onlyv6.sh VMID username password CPU_cores memory_GB disk_GB operating_system storage_disk

TIP

Note that the password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

The above command is used to create a virtual machine with only IPv6 addresses.

ParameterValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage Disklocal

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

`,113)]))}const k=i(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_pve_pve_kvm.md.EedGwoAp.lean.js b/assets/en_guide_pve_pve_kvm.md.EedGwoAp.lean.js new file mode 100644 index 0000000000..2980037f87 --- /dev/null +++ b/assets/en_guide_pve_pve_kvm.md.EedGwoAp.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"Linux Virtual Machine (KVM/TCG Virtualization)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_kvm.md","filePath":"en/guide/pve/pve_kvm.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_kvm.md"};function l(r,s,d,h,o,p){return a(),e("div",null,s[0]||(s[0]=[t("",113)]))}const k=i(n,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.js b/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.js deleted file mode 100644 index d2bd524217..0000000000 --- a/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.js +++ /dev/null @@ -1,12 +0,0 @@ -import{_ as t,c as i,o as e,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Linux Virtual Machine (KVM/TCG Virtualization)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_kvm.md","filePath":"en/guide/pve/pve_kvm.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_kvm.md"};function l(h,s,o,r,d,p){return e(),i("div",null,s[0]||(s[0]=[a(`

Linux Virtual Machine (KVM/TCG Virtualization)

SSH Login Instructions

When open a virtual machine, the default generated username can be something other than root, in which case you need to run sudo -i to switch to root!

If the default username is not root, the default unset root password is password or oneclickvirt.

After logging into SSH and switching to root privileges, be sure to change the root password, which can be changed using the following command:

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

Considerations for opening a virtual machine with an IPV6 address

Due to long-term inactivity IPV6 does not use may lead to NDP broadcast cache invalidation reset, generally idle for about 50 minutes will appear IPV6 unavailable, commonly known as "IPV6 cutoff", at this time it is necessary to set up a timer task.

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

Executing the above commands in the opened virtual machine ensures that the IPV6 network is always used and does not fail over.

Images available for creating virtual machines

  • Pre-installed with cloud-init enabled.
  • Enabled SSH login.
  • Pre-configured SSH to listen on ports 22 for both IPv4 and IPv6.
  • Enabled password authentication for login.
  • Enabled root login.
  • Partially pre-installed QEMU guest agent.
  • System support:
    • See pve_kvm_images or kvm_images for details on the x86_64 architecture, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.
    • For arm architecture, see the systems listed in ubuntu or debian, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.

Virtual machines with standalone NAT configuration.

  • Automatically deploy NAT servers with the default Debian 10 image, chosen for its minimal footprint.
  • It's possible to customize the image used through the command, and pre-configured images are available. These images come with storage settings ranging from 2 to 10 GB of disk space. For regular use, at least 10 GB of disk space is recommended. You can increase the disk size if certain images fail to start.
  • The command allows for specifying the storage disk location. When not specified, it defaults to the local disk, which is the system disk. It can also be set to a mount disk as displayed in PVE.
  • Recommended custom memory size is 512 MB.
  • Automatic internal and external port mapping, including ports 22, 80, 443, and 25 other port numbers shared between internal and external networks.
  • After generation, there's a wait time for the virtual machine's internal cloud-init configuration to establish network and login information. This process takes approximately 5 minutes.
  • Pertinent virtual machine information will be stored in the NOTES section of the corresponding VM on the web interface, accessible for viewing through the web portal.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically added. However, there won't be any public IPV6 addresses.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

TIP

Note that usernames consisting of only numbers may cause issues with cloud-init. It's preferable to use usernames that are entirely in English or start with an English character.

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

Meaning of each parameter

shell
# ./buildvm.sh VMID Username Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Public_Port_Start Public_Port_End System Storage_Disk Independent_IPV6_address(leave default N blank)

TIP

Note that the Password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the Password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

After setup is completed, you can execute cat vm111 to view the information or check the NOTES section for the corresponding VM on the WEB interface.

Below is the information for the example VM that has been set up:

AttributeValue
VMID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size10G
SSH Port40001
Port 8040002
Port 44340003
Port Range for NAT50000 to 50025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific VM

  • Stop VM
  • Delete VM
  • Delete port mapping
  • Restart network
  • Delete log files

Download Script

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

Meaning of each parameter

You can delete the VM with the corresponding VMID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each VMID, and more than one can be deleted at a time.

Batch Creation of Virtual Machines with NAT

WARNING

Before initial use, ensure that the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port forwarding, as conflicting settings may result in bugs.

TIP

Before initiating the batch creation process, please use the 'screen' command to execute it in the background. This will help avoid interruptions due to the instability of SSH caused by extended batch creation times.

  • The batch creation process can be run multiple times to generate multiple virtual machines (VMs).
  • NAT servers are automatically created during the process. If left blank, the default Debian 11 image will be used. You can also customize the image name. Refer to the list of supported images in the previous section.
  • Automatic internal and external port mapping is performed, including ports 22, 80, 443, and other ports with identical internal and external numbers (25 ports in total).
  • After generation, a waiting period is required for the cloud-init configuration of the VM's network and login information to be set up. This process takes approximately 5 minutes. There is a 60-second interval between creating each VM to avoid potential performance issues.
  • The default network configuration for VMs created in batches includes port mappings for ports 22, 80, 443, and a range of 25 ports for internal and external communication.
  • You can customize the number of CPU cores, memory size, disk size, and which storage disk on the host machine to use for batch creation. Ensure you calculate available resources before proceeding.
  • Relevant information about the virtual machines will be stored in the 'NOTES' section of the corresponding VM on the web interface, where you can view them.
  • If the host machine comes with an IPv6 subnet, an IPv6 network will be automatically attached, although there will be no public IPv6 addresses available.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

After the setup is completed, you can execute cat vmlog to view the information, or check the NOTES in the corresponding VM on the web interface.

Delete All Virtual Machines

  • Delete all VMs
  • Delete all NAT port mappings
  • Restart the network
  • Delete log files
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
-iptables -t nat -F
-iptables -t filter -F
-service networking restart
-systemctl restart networking.service
-systemctl restart ndpresponder.service
-iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
-iptables-save > /etc/iptables/rules.v4
-rm -rf vmlog
-rm -rf vm*

TIP

Before modifying the VM configuration for PVE, you must shut it down first. After making the configuration changes, start it again to avoid configuration reload errors.

Setting Up Virtual Machines with Dedicated IPv4 Addresses

Three scripts, each with its own advantages and disadvantages.

The first two scripts don't require an additional IPV4 address to be bound to the vmbr0 interface beforehand, and the opened VM will directly bind the additional IPV4 address.

The last script requires additional IPV4 addresses to be bound to the vmbr0 interface beforehand, and the opened VM will do NAT full port mapping to the intranet IPV4 address, **without directly binding additional IPV4 addresses.

Automatically selects additional IPV4 addresses on the same subnet as the host machine to open the virtual machine

WARNING

Before use, ensure that the current host machine has at least 2 available IP addresses within its IP range, and there are unallocated IP addresses. These unallocated IP addresses should not be bound to the host machine.

TIP

At this point, the IPV4 address appended is the address following the host's current IPV4 address in sequence. For example, if the current host address is 1.1.1.32 and then 1.1.1.33 there is already a virtual machine, then this script appends an IP address of 1.1.1.34.

  • Automatically detect available IP ranges. Use ping to identify unallocated IP addresses and select one to bind to the virtual machine.
  • If the host machine has an accompanying IPv6 subnet, there will be an option to attach an IPv6 address.
  • Relevant system information will be stored in the corresponding virtual machine's NOTE section, accessible for viewing on the web interface.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.
  • The automatically appended IPV4 address is within the same subnet as the host's IPV4 address (IP address prefix is the same)
  • Inbound and outbound traffic in and out of the VM goes to the additional IPV4 address of the binding

Usage Instructions

Download Script

shell
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

Meaning of each parameter

shell
# ./buildvm_extra_ip.sh VMID Username Password Number_of_CPU_Cores Memory_Size_in_MB Disk_Size_in_GB OS Storage_Disk Attach_IPV6(Default is N)

TIP

Note that the Password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the Password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_extra_ip.sh 152 root oneclick123 1 1024 10 debian12 local N

The above command is used to create a virtual machine with a dedicated IPv4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
OSdebian12
Storagelocal disk
IPv6 AddonNot attached by default

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Manually Assign Additional IPV4 Addresses to Open Virtual Machines

  • Manual specification of IPV4 address with subnet length in the command is required.
  • If the host machine comes with an IPV6 subnet, you can choose whether to add an IPV6 address additionally.
  • If the vendor has provided an IPV4 address and subnet length, please carefully compare and write the parameters in the command format shown below.
  • Relevant system information will be stored in the NOTE of the corresponding virtual machine and can be viewed on the WEB end.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.
  • Manually appended IPV4 addresses that are in different subnets from the host's IPV4 address (different IP address prefixes) will use the host's IP address as the gateway
  • Manually appended IPV4 addresses that are within the same subnet as the host's IPV4 address (same IP address prefix) will use the host's gateway as the gateway
  • Optionally specify the MAC address of the virtual machine
  • Inbound and outbound traffic in and out of the VM goes to the additional IPV4 address of the binding

TIP

If IP addresses within different subnets are appended without a MAC address, the router will not recognize the source MAC address, and the traffic will be flagged as “misuse” and “may” cause the server to be blocked. (If you are using a Hetzner standalone server, it is recommended that you provide the MAC address of the attached IPV4 address to prevent abuse from being reported.)

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

Meaning of each parameter

shell
# ./buildvm_manual_ip.sh VMID USERNAME PASSWORD CPU_CORES MEMORY_SIZE_GB STORAGE_SIZE_GB OS STORAGE_DISK IPV4_ADDRESS ATTACH_IPV6(defaults to N) MAC_ADDRESS(Optional whether to specify)

TIP

Note that the PASSWORD here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the PASSWORD due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_manual_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d/24 N

The above command is used to create a virtual machine with an independent IPV4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage DiskLocal Disk (System Disk)
IPV4 Addressa.b.c.d
Subnet/24 Subnet
IPV6None
MAC_ADDRESSNone

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Host manually appends an additional IPV4 address and then specifies the IPV4 address to open the virtual machine

  • You need to add the extra IPV4 address to vmbr0 in /etc/network/interfaces (note that chattr -i unlocks the file and then chattr +i locks it back).
  • Other features are similar to opening a NAT-enabled VM, except that here the mapping is no longer partial port mapping or mapping to the host's IPV4 address, but full-port one-by-one mapping to additional IPV4 addresses
  • Traffic coming into the VM from outside the VM goes to the bound additional IPV4 address, and traffic going out of the VM goes to the original host's IPV4 address

TIP

Make sure you can SSH into the host with the extra IPV4 address before opening, but curl ip.sb still shows the original host IPV4 address.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

Meaning of each parameter

shell
# ./buildvm_fullnat_ip.sh VMID USERNAME PASSWORD CPU_CORES MEMORY_SIZE_GB STORAGE_SIZE_GB OS STORAGE_DISK IPV4_ADDRESS ATTACH_IPV6(defaults to N)

TIP

Note that the PASSWORD here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the PASSWORD due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_fullnat_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d N

The above command is used to create a virtual machine with an independent IPV4 address.

AttributeValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage DiskLocal Disk (System Disk)
IPV4 Addressa.b.c.d
IPV6None
MAC_ADDRESSNone

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Incoming and outgoing traffic goes to the bound IPV4 address

execute

line="-A POSTROUTING -s 172.16.1.0\\/24 -o vmbr0 -j MASQUERADE"
-sed -i "\\|$line|d" /etc/iptables/rules.v4
-service netfilter-persistent restart

This will cause the host to lose the ability to open VMs/containers with NAT that do not have a separate IPV4 address, so be careful!

After this, You will only be able to open VMs with separate IPV4 addresses.

Creating Virtual Machines with Pure IPv6 Addresses

The prerequisite is that the host provides an IPv6 subnet instead of just a standalone IPv6 address, and the host does not have MAC address verification enabled.

Automatic Selection of IPv6 Addresses without Manual Specification

  • Pure IPV6 refers to a bound public IPV6 address, where the actual VM still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address, based on the virtual machine's number, to the virtual machine.
  • System-related information will be stored in the NOTES section of the respective virtual machine, accessible for viewing on the web interface.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

Meaning of each parameter

shell
# ./buildvm_onlyv6.sh VMID username password CPU_cores memory_GB disk_GB operating_system storage_disk

TIP

Note that the password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

The above command is used to create a virtual machine with only IPv6 addresses.

ParameterValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage Disklocal

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

`,113)]))}const u=t(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.lean.js b/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.lean.js deleted file mode 100644 index d77a17c54b..0000000000 --- a/assets/en_guide_pve_pve_kvm.md.aJ5jU-2g.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as e,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Linux Virtual Machine (KVM/TCG Virtualization)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_kvm.md","filePath":"en/guide/pve/pve_kvm.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_kvm.md"};function l(h,s,o,r,d,p){return e(),i("div",null,s[0]||(s[0]=[a("",113)]))}const u=t(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.js b/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.js new file mode 100644 index 0000000000..12bd4d9040 --- /dev/null +++ b/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.js @@ -0,0 +1,12 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"LXC Virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_lxc.md","filePath":"en/guide/pve/pve_lxc.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_lxc.md"};function l(r,s,h,o,p,d){return a(),e("div",null,s[0]||(s[0]=[t(`

LXC Virtualization

WARNING

If you need to open more than 200 LXC containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Images available for creating LXC Containers

x86_64:

Auto-patching images: https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

Automated daily pulls for compilation and patching

Self-patching images: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

Some of these images are flawed and not guaranteed to be available for all PVEs, with names like ubuntu16.04, debian6, centos7, opensuse42.2, opensuse42.3 Don't use them unless necessary.

and

Run pveam available --section system to see the names and version numbers of the officially available systems.

Priority: Self-patching images (not supported by Proxmox-VE 5 and below) > Official default images (both supported) image

The version has been automatically recognized by a script to use the corresponding image.

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

Supported systems can be viewed in the file above, which lists debian and ubuntu systems do not use the aliases in it, just use the numeric designators.

TIP

All system parameters are lowercase system names spliced with version numbers, e.g. debian11, ubuntu22, etc. (Self-patched images support some out-of-the-way systems, such as centos6, centos7, debian8, debian9, etc.)

The default CT username for all systems is root

TIP

Of course, sometimes there are special cases where the version may be current/base, in which case it is sufficient to use only the English system name, e.g. archlinux, gentoo, kali.

Creating Individual LXC Containers for Virtualization

WARNING

Before initial use, ensure that the current PVE (Proxmox Virtual Environment) is clean and the host machine has not undergone any port mapping, as conflicts in settings could lead to bugs.

TIP

Before creating containers, use the 'screen' command to run them in the background. This helps to avoid extended creation times that might lead to interruptions due to unstable SSH connections.

  • Automatically create NAT servers using the default Debian 11 image, or customize the system image as needed.
  • Automatically perform internal and external network port mapping, including ports 22, 80, 443, and 25 additional ports with identical numbers for both internal and external networks.
  • After generation, allow some time for the virtual machine to configure its internal network and login information. This process takes approximately 3 minutes.
  • The default network configuration includes port mappings for 22, 80, 443, and a range of 25 ports for both internal and external networks.
  • Customize the number of cores, memory size, disk size, and the storage disk on the host machine for allocation. Ensure that you calculate available resources before creating containers.
  • Optionally specify the storage disk location in the command. When not specified, it defaults to the local disk, which is the system disk. Alternatively, you can specify a mount disk as displayed in PVE.
  • The created containers are enabled with SSH by default, allowing root login. They are also configured to support nested virtualization for Docker.
  • Relevant container information will be stored in the respective container's notes, accessible through the web interface.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically attached, but no public IPV6 addresses will be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

Meaning of each parameter

shell
# ./buildct.sh CTID Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Start_Public_Port End_Public_Port System Storage_Disk Independent_IPV6_address(leave default N blank)

Test Example

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

After setting up, you can execute cat ct111 to view the information, or check the NOTES section on the web interface.

Here is the information for the created example CT:

Please note that "CT" and other technical terms might have specific meanings in different contexts. If "CT" stands for something specific in your domain, you might want to provide additional context for accurate translation.

AttributeValue
CTID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size5G
SSH Port20001
Port 8020002
Port 44320003
Port Range for NAT30000 to 30025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific CT

  • Stop CT
  • Delete CT
  • Delete Port Mapping
  • Restart Network
  • Delete Log Files

Download Script

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

Meaning of each parameter

You can delete the CT with the corresponding CTID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each CTID, and more than one can be deleted at a time.

Batch Creation of LXC Containers with NAT

WARNING

Make sure the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port mapping before the first use, as conflicting settings may result in bugs.

TIP

Before initiating the creation process, it's recommended to use the 'screen' command to execute the batch creation. This will prevent interruptions due to potential instability in SSH during the extended creation time.

  • It is possible to run the batch container creation process multiple times. However, please be mindful of allocating enough memory to the host machine to prevent system crashes. For adding swap space, refer to this link.
  • There is a 60-second interval between creating each container to avoid sudden performance bottlenecks.
  • Customization options include selecting the number of CPU cores, memory size, disk size, and the storage drive on the host machine. Ensure that you have calculated available resources appropriately before initiating the process.
  • The created containers have SSH enabled by default, allowing root login. Additionally, they are configured to support nested virtualization for Docker usage.
  • Relevant information about the containers will be stored in the corresponding container's notes, which can be viewed on the web interface.
  • If the host machine has an IPv6 subnet, it will be automatically assigned to the containers. However, public IPv6 addresses will not be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

After the setup is complete, you can execute cat ctlog to view the information, or check in the NOTES section on the web interface.

Delete All CT

  • Delete all CTs
  • Delete port mappings for all NATs
  • Restart the network
  • Delete log files
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
+rm -rf ct*
+iptables -t nat -F
+iptables -t filter -F
+ip6tables -t nat -F
+ip6tables -t filter -F
+rm -rf /usr/local/bin/ipv6_nat_rules.sh
+service networking restart
+systemctl restart networking.service
+systemctl restart ndpresponder.service
+iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
+iptables-save > /etc/iptables/rules.v4

Creating Virtual Machines with Pure IPv6 Addresses

The premise is that the host provides an IPv6 subnet rather than a standalone IPv6 address, and the host does not have MAC address filtering enabled.

Automatic Selection of IPv6 Addresses, No Manual Configuration Needed

  • Pure IPV6 refers to a bound public IPV6 address, where the actual container still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address based on the container number to the container.
  • Relevant system information will be stored in the NOTES of the corresponding container, accessible for viewing on the web interface.

Download script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

Example Usage

shell
./buildct_onlyv6.sh CTID Password Number_of_CPU_Cores Memory_Size_in_MB Disk_Size_in_GB Operating_System Storage_Disk
shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

The above command signifies the creation of a container with a pure IPV6 address.

AttributeValue
Container TypeCT
CTID152
Usernameroot
Passwordoneclick123
CPU Cores1
Memory1024MB
Disk10G
Operating Systemdebian13
Storage DiskLocal Disk (System Disk)

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

`,66)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.lean.js b/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.lean.js new file mode 100644 index 0000000000..63a040db4c --- /dev/null +++ b/assets/en_guide_pve_pve_lxc.md.A4xPAQIV.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"LXC Virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_lxc.md","filePath":"en/guide/pve/pve_lxc.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_lxc.md"};function l(r,s,h,o,p,d){return a(),e("div",null,s[0]||(s[0]=[t("",66)]))}const u=i(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.js b/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.js deleted file mode 100644 index 001b528491..0000000000 --- a/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.js +++ /dev/null @@ -1,12 +0,0 @@ -import{_ as s,c as t,o as e,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"LXC Virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_lxc.md","filePath":"en/guide/pve/pve_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_lxc.md"};function l(r,i,h,o,p,d){return e(),t("div",null,i[0]||(i[0]=[a(`

LXC Virtualization

WARNING

If you need to open more than 200 LXC containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Images available for creating LXC Containers

x86_64:

Auto-patching images: https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

Automated daily pulls for compilation and patching

Self-patching images: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

Some of these images are flawed and not guaranteed to be available for all PVEs, with names like ubuntu16.04, debian6, centos7, opensuse42.2, opensuse42.3 Don't use them unless necessary.

and

Run pveam available --section system to see the names and version numbers of the officially available systems.

Priority: Self-patching images (not supported by Proxmox-VE 5 and below) > Official default images (both supported) image

The version has been automatically recognized by a script to use the corresponding image.

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

Supported systems can be viewed in the file above, which lists debian and ubuntu systems do not use the aliases in it, just use the numeric designators.

TIP

All system parameters are lowercase system names spliced with version numbers, e.g. debian11, ubuntu22, etc. (Self-patched images support some out-of-the-way systems, such as centos6, centos7, debian8, debian9, etc.)

The default CT username for all systems is root

TIP

Of course, sometimes there are special cases where the version may be current/base, in which case it is sufficient to use only the English system name, e.g. archlinux, gentoo, kali.

Creating Individual LXC Containers for Virtualization

WARNING

Before initial use, ensure that the current PVE (Proxmox Virtual Environment) is clean and the host machine has not undergone any port mapping, as conflicts in settings could lead to bugs.

TIP

Before creating containers, use the 'screen' command to run them in the background. This helps to avoid extended creation times that might lead to interruptions due to unstable SSH connections.

  • Automatically create NAT servers using the default Debian 11 image, or customize the system image as needed.
  • Automatically perform internal and external network port mapping, including ports 22, 80, 443, and 25 additional ports with identical numbers for both internal and external networks.
  • After generation, allow some time for the virtual machine to configure its internal network and login information. This process takes approximately 3 minutes.
  • The default network configuration includes port mappings for 22, 80, 443, and a range of 25 ports for both internal and external networks.
  • Customize the number of cores, memory size, disk size, and the storage disk on the host machine for allocation. Ensure that you calculate available resources before creating containers.
  • Optionally specify the storage disk location in the command. When not specified, it defaults to the local disk, which is the system disk. Alternatively, you can specify a mount disk as displayed in PVE.
  • The created containers are enabled with SSH by default, allowing root login. They are also configured to support nested virtualization for Docker.
  • Relevant container information will be stored in the respective container's notes, accessible through the web interface.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically attached, but no public IPV6 addresses will be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

Meaning of each parameter

shell
# ./buildct.sh CTID Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Start_Public_Port End_Public_Port System Storage_Disk Independent_IPV6_address(leave default N blank)

Test Example

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

After setting up, you can execute cat ct111 to view the information, or check the NOTES section on the web interface.

Here is the information for the created example CT:

Please note that "CT" and other technical terms might have specific meanings in different contexts. If "CT" stands for something specific in your domain, you might want to provide additional context for accurate translation.

AttributeValue
CTID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size5G
SSH Port20001
Port 8020002
Port 44320003
Port Range for NAT30000 to 30025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific CT

  • Stop CT
  • Delete CT
  • Delete Port Mapping
  • Restart Network
  • Delete Log Files

Download Script

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

Meaning of each parameter

You can delete the CT with the corresponding CTID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each CTID, and more than one can be deleted at a time.

Batch Creation of LXC Containers with NAT

WARNING

Make sure the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port mapping before the first use, as conflicting settings may result in bugs.

TIP

Before initiating the creation process, it's recommended to use the 'screen' command to execute the batch creation. This will prevent interruptions due to potential instability in SSH during the extended creation time.

  • It is possible to run the batch container creation process multiple times. However, please be mindful of allocating enough memory to the host machine to prevent system crashes. For adding swap space, refer to this link.
  • There is a 60-second interval between creating each container to avoid sudden performance bottlenecks.
  • Customization options include selecting the number of CPU cores, memory size, disk size, and the storage drive on the host machine. Ensure that you have calculated available resources appropriately before initiating the process.
  • The created containers have SSH enabled by default, allowing root login. Additionally, they are configured to support nested virtualization for Docker usage.
  • Relevant information about the containers will be stored in the corresponding container's notes, which can be viewed on the web interface.
  • If the host machine has an IPv6 subnet, it will be automatically assigned to the containers. However, public IPv6 addresses will not be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

After the setup is complete, you can execute cat ctlog to view the information, or check in the NOTES section on the web interface.

Delete All CT

  • Delete all CTs
  • Delete port mappings for all NATs
  • Restart the network
  • Delete log files
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
-rm -rf ct*
-iptables -t nat -F
-iptables -t filter -F
-ip6tables -t nat -F
-ip6tables -t filter -F
-rm -rf /usr/local/bin/ipv6_nat_rules.sh
-service networking restart
-systemctl restart networking.service
-systemctl restart ndpresponder.service
-iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
-iptables-save > /etc/iptables/rules.v4

Creating Virtual Machines with Pure IPv6 Addresses

The premise is that the host provides an IPv6 subnet rather than a standalone IPv6 address, and the host does not have MAC address filtering enabled.

Automatic Selection of IPv6 Addresses, No Manual Configuration Needed

  • Pure IPV6 refers to a bound public IPV6 address, where the actual container still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address based on the container number to the container.
  • Relevant system information will be stored in the NOTES of the corresponding container, accessible for viewing on the web interface.

Download script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

Example Usage

shell
./buildct_onlyv6.sh CTID Password Number_of_CPU_Cores Memory_Size_in_MB Disk_Size_in_GB Operating_System Storage_Disk
shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

The above command signifies the creation of a container with a pure IPV6 address.

AttributeValue
Container TypeCT
CTID152
Usernameroot
Passwordoneclick123
CPU Cores1
Memory1024MB
Disk10G
Operating Systemdebian13
Storage DiskLocal Disk (System Disk)

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

`,66)]))}const g=s(n,[["render",l]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.lean.js b/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.lean.js deleted file mode 100644 index cfb58eda93..0000000000 --- a/assets/en_guide_pve_pve_lxc.md.DDRD6LMP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as e,ag as a}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"LXC Virtualization","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_lxc.md","filePath":"en/guide/pve/pve_lxc.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_lxc.md"};function l(r,i,h,o,p,d){return e(),t("div",null,i[0]||(i[0]=[a("",66)]))}const g=s(n,[["render",l]]);export{k as __pageData,g as default}; diff --git a/assets/en_guide_pve_pve_macos.md.BqWDs-pN.js b/assets/en_guide_pve_pve_macos.md.BqWDs-pN.js deleted file mode 100644 index e0ed2762ea..0000000000 --- a/assets/en_guide_pve_pve_macos.md.BqWDs-pN.js +++ /dev/null @@ -1,9 +0,0 @@ -import{_ as t}from"./chunks/wk7.BpuwpIoq.js";import{_ as a,c as s,o as i,ag as n}from"./chunks/framework.CSeR4K32.js";const o="/assets/mac0.CofQ9vw_.png",l="/assets/mac00.DelKhhmr.png",r="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",p="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",h="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",u="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",k="/assets/mac9.DIA9P3VH.png",y="/assets/mac10.CZg7Yifb.png",b="/assets/mac11.P11nsmhn.png",f="/assets/mac12.DHTBO7ih.png",v="/assets/mac13.DDrsH3zK.png",F="/assets/mac14.dLHoMtJy.png",C="/assets/mac15.vkr7IxY1.png",_="/assets/mac16.CeB_3pKz.png",w="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",B="/assets/mac19.C_d085-7.png",S="/assets/mac20.DsWyqQaw.png",T=JSON.parse('{"title":"Setting Up MacOS Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_macos.md","filePath":"en/guide/pve/pve_macos.md","lastUpdated":1772422214000}'),E={name:"en/guide/pve/pve_macos.md"};function P(I,e,M,q,A,V){return i(),s("div",null,e[0]||(e[0]=[n(`

Setting Up MacOS Virtual Machine

Prerequisites

System and hardware configuration requirements left bar --> Configuration requirements

You can only set up a MacOS virtual machine when the environment detection confirms that the host machine supports KVM nested virtualization. Otherwise, it will be detected by hardware and cannot be set up.

Setting Up the Prerequisites

  • Automatically identify CPU type (AMD or Intel) and set nested virtualization parameters according to the type.
  • Modify GRUB boot parameters to enable IOMMU and disable default framebuffer.
  • Add VFIO module support for hardware device passthrough.
  • Blacklist sound card and graphics card driver modules to avoid conflicts with macOS.
  • Configure KVM-related kernel parameters, ignore MSR errors, and improve compatibility.
  • Patch Proxmox frontend status detection logic to bypass status restrictions.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

After successful execution, it will show that the system will restart in 15 seconds. This is the normal process, as kernel parameters cannot take effect without restarting.

System Image Download

  • All images have pre-installed components and are relatively large (minimum about 4.9GB). Download and extraction tasks will run in the background.
  • Images are complete systems with all components and can be booted and used without internet connection.
  • If the free space on the system disk is less than twice the size of the image, the download will be rejected.
  • Images are in 7z compressed format and need to be extracted before use.
  • You can check the status of current download and extraction tasks at any time. Virtual machines can only be created after completion.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh --lang=en

Or

shell
bash install_macos_images.sh --lang=en

After the background download task starts, you can close the SSH window and wait for 30 minutes to 3 hours (depending on your server bandwidth and connectivity) to download the ISO 7z compressed package.

When the download task is complete and the current download task query shows empty, you can choose to execute the extraction task. The waiting time for extraction depends on your server's CPU performance.

When the extraction task is complete and the current extraction task query shows empty, all preparations are ready.

Tasks of the same type can run concurrently, and any task can be canceled at any time by entering the PID value.

Build from https://github.com/oneclickvirt/macos currently supported image compressed packages:

# Listed by system release date from old to new
-high-sierra.iso.7z (Size: 5.23GB)
-mojave.iso.7z (Size: 6.03GB)
-catalina.iso.7z (Size: 8.33GB)
-big‑sur.iso.7z (Size: 12.21GB)
-monterey.iso.7z (Size: 12.36GB)
-ventura.iso.7z (Size: 12.31GB)
-sonoma.iso.7z (Size: 14.41GB)
-sequoia.iso.7z (Size: 15.02GB)

MACOS Virtual Machine Template Setup

  • Systems high-sierra, mojave, catalina require at least 2 cores, 4G of RAM and 40G of hard disk to run.
  • big-sur and newer MACOS systems require at least 6 cores, 6G RAM and 50G hard disk.
  • The newer the version of the system (the later the serial number of the download), the more hardware is required.
  • All images are boot disk images without any personal data, so disk allocation, login information setup, and network settings need to be manually configured according to the instructions.
  • You need to manually start the virtual machine from the web interface. Before starting, you can check if all templates meet your expectations.

Download Template Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

Parameter Meanings

shell
# ./buildvm_macos.sh VMID CPU_cores Memory Disk SSH_port VNC_port System Storage_disk Independent_IPV6(default_N_if_empty)

TIP

The disk size here is only the size of the virtual machine's disk. During the actual setup process, the program will also mount the boot disk and system image, so the actual disk requirement for setting up a virtual machine is virtual machine disk size + image size + boot disk size (500MB). Always be aware of whether your disk space is sufficient for setting up virtual machines.

Example Command

Using the oldest version (high-sierra) as an example, the supported configuration is as follows (very laggy)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

After the template is set up, you can run cat vm100 to view information, or check the NOTES in the corresponding VM in the WEB interface.

TIP

If you did not install PVE on Debian through this project, but installed PVE directly using the official ISO, and did not merge the local and local-lvm partitions, or the local partition is not enabled to support the VM disk type, then the local in the one-click command above should be changed to local-lvm, and you need to use a VM disk-supporting Partitioning for virtual machine creation

Here is the information for the example VM:

PropertyValue
VMID100
CPU cores2
Memory size4096MB
Disk size45G
SSH port44022
VNC port45901
Systemhigh-sierra
Host storage disklocal
Independent IPV6N

TIP

Note that VMID can only use numbers from 100 to 256, other numbers are not available

MACOS System Boot and Installation

After completing the previous steps, you can see a gray virtual machine waiting to be started in the panel.

mac0

After clicking start, enter the VNC panel. The selection box on the left has a full-screen button. It is recommended to operate in full screen to avoid resolution issues.

mac00

After about 3 minutes of boot disk loading, a startup disk will be displayed on the left center of the screen. Click directly or press Enter.

After another 3-5 minutes of startup disk loading, four selection boxes will appear. Select Disk Utility and click to enter.

mac1

After entering, you can see three disks and one image. Find the disk larger than 40G named QEMU HARDDISK Media, and click Erase.

mac2

A pop-up window will appear, requiring you to rename the name to macos for easy identification and use later, then click Erase to continue initialization.

mac3

After initialization is complete, click Done.

mac4

Now you need to exit the Disk Utility interface. Click Disk Utility in the upper right corner and select Quit Disk Utility to exit the current selection box.

mac5

Then you return to the previous four selection boxes. Select Install macOS XXXX (since I am using Big Sur as an example, XXXX is Big Sur), and click continue.

mac6

In the following steps, continue clicking continue, then click Agree, and then Agree again.

mac7

mac8

mac9

Until those three disks appear again, but here you can see the disk larger than 40G named macos. Select it and click continue.

mac10

After a period of file copying and disk loading (about 12 minutes), you will formally enter the system installation phase. Choose your region based on where the host machine is located.

mac11

After selecting the region, continue clicking continue.

mac12

mac13

Until the Migration Assistant data migration option appears, select Not Now in the lower left corner to not import user data.

mac14

Then you will be prompted to create a user. Fill in the username, account name, and login password. After setting up, click continue.

mac15

After that, you will continue clicking continue until the system installation is complete.

Network Configuration

Since the system installation was performed in an offline environment, you need to manually configure a static network connection to the host's bridge.

Click the WIFI button in the upper right corner, turn off WIFI, and then click Network Preferences ...

mac16

After entering the settings interface, click the Advanced button to enter the advanced settings interface.

mac17

Fill in the static network configuration in the TCP/IP tab.

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx (replace xxx with the IP you want to bind, my vmid is 100, so I wrote 100 for convenience)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

If you need to configure an IPV6 network, similar to the IPV4 settings above, you will need to fill in the public IPV6 address bound to the virtual machine (written in the Note box in the PVE panel), subnet mask 128, and the default gateway obtained by executing cat /usr/local/bin/pve_check_ipv6 on the host.

mac18

Fill in the static network DNS configuration in the DNS tab.

Generally, adding 8.8.8.8 and 1.1.1.1 is sufficient. For use in mainland China, use 114.114.114.114.

mac19

After filling in and applying, the top left of the settings will show that the network is connected.

mac20

Now, opening the default browser and visiting any website will allow you to access public network resources, proving that the network has worked.

Remove ISO

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Macos system is to uninstall opencore.iso and xxxx (the system image used for installation).iso, similar to the Windows system uninstallation of win image and virtio image in the example picture above.

',91)]))}const O=a(E,[["render",P]]);export{T as __pageData,O as default}; diff --git a/assets/en_guide_pve_pve_macos.md.C-ydY8bK.js b/assets/en_guide_pve_pve_macos.md.C-ydY8bK.js new file mode 100644 index 0000000000..bed36c9286 --- /dev/null +++ b/assets/en_guide_pve_pve_macos.md.C-ydY8bK.js @@ -0,0 +1,9 @@ +import{_ as a}from"./chunks/wk7.BpuwpIoq.js";import{_ as s,c as t,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o="/assets/mac0.CofQ9vw_.png",l="/assets/mac00.DelKhhmr.png",r="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",p="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",h="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",u="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",k="/assets/mac9.DIA9P3VH.png",b="/assets/mac10.CZg7Yifb.png",y="/assets/mac11.P11nsmhn.png",f="/assets/mac12.DHTBO7ih.png",v="/assets/mac13.DDrsH3zK.png",w="/assets/mac14.dLHoMtJy.png",F="/assets/mac15.vkr7IxY1.png",C="/assets/mac16.CeB_3pKz.png",_="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",B="/assets/mac19.C_d085-7.png",S="/assets/mac20.DsWyqQaw.png",T=JSON.parse('{"title":"Setting Up MacOS Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_macos.md","filePath":"en/guide/pve/pve_macos.md","lastUpdated":1772424525000}'),z={name:"en/guide/pve/pve_macos.md"};function E(P,e,I,M,q,A){return i(),t("div",null,e[0]||(e[0]=[n(`

Setting Up MacOS Virtual Machine

Prerequisites

System and hardware configuration requirements left bar --> Configuration requirements

You can only set up a MacOS virtual machine when the environment detection confirms that the host machine supports KVM nested virtualization. Otherwise, it will be detected by hardware and cannot be set up.

Setting Up the Prerequisites

  • Automatically identify CPU type (AMD or Intel) and set nested virtualization parameters according to the type.
  • Modify GRUB boot parameters to enable IOMMU and disable default framebuffer.
  • Add VFIO module support for hardware device passthrough.
  • Blacklist sound card and graphics card driver modules to avoid conflicts with macOS.
  • Configure KVM-related kernel parameters, ignore MSR errors, and improve compatibility.
  • Patch Proxmox frontend status detection logic to bypass status restrictions.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

After successful execution, it will show that the system will restart in 15 seconds. This is the normal process, as kernel parameters cannot take effect without restarting.

System Image Download

  • All images have pre-installed components and are relatively large (minimum about 4.9GB). Download and extraction tasks will run in the background.
  • Images are complete systems with all components and can be booted and used without internet connection.
  • If the free space on the system disk is less than twice the size of the image, the download will be rejected.
  • Images are in 7z compressed format and need to be extracted before use.
  • You can check the status of current download and extraction tasks at any time. Virtual machines can only be created after completion.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh --lang=en

Or

shell
bash install_macos_images.sh --lang=en

After the background download task starts, you can close the SSH window and wait for 30 minutes to 3 hours (depending on your server bandwidth and connectivity) to download the ISO 7z compressed package.

When the download task is complete and the current download task query shows empty, you can choose to execute the extraction task. The waiting time for extraction depends on your server's CPU performance.

When the extraction task is complete and the current extraction task query shows empty, all preparations are ready.

Tasks of the same type can run concurrently, and any task can be canceled at any time by entering the PID value.

Build from https://github.com/oneclickvirt/macos currently supported image compressed packages:

# Listed by system release date from old to new
+high-sierra.iso.7z (Size: 5.23GB)
+mojave.iso.7z (Size: 6.03GB)
+catalina.iso.7z (Size: 8.33GB)
+big‑sur.iso.7z (Size: 12.21GB)
+monterey.iso.7z (Size: 12.36GB)
+ventura.iso.7z (Size: 12.31GB)
+sonoma.iso.7z (Size: 14.41GB)
+sequoia.iso.7z (Size: 15.02GB)

MACOS Virtual Machine Template Setup

  • Systems high-sierra, mojave, catalina require at least 2 cores, 4G of RAM and 40G of hard disk to run.
  • big-sur and newer MACOS systems require at least 6 cores, 6G RAM and 50G hard disk.
  • The newer the version of the system (the later the serial number of the download), the more hardware is required.
  • All images are boot disk images without any personal data, so disk allocation, login information setup, and network settings need to be manually configured according to the instructions.
  • You need to manually start the virtual machine from the web interface. Before starting, you can check if all templates meet your expectations.

Download Template Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

Parameter Meanings

shell
# ./buildvm_macos.sh VMID CPU_cores Memory Disk SSH_port VNC_port System Storage_disk Independent_IPV6(default_N_if_empty)

TIP

The disk size here is only the size of the virtual machine's disk. During the actual setup process, the program will also mount the boot disk and system image, so the actual disk requirement for setting up a virtual machine is virtual machine disk size + image size + boot disk size (500MB). Always be aware of whether your disk space is sufficient for setting up virtual machines.

Example Command

Using the oldest version (high-sierra) as an example, the supported configuration is as follows (very laggy)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

After the template is set up, you can run cat vm100 to view information, or check the NOTES in the corresponding VM in the WEB interface.

TIP

If you did not install PVE on Debian through this project, but installed PVE directly using the official ISO, and did not merge the local and local-lvm partitions, or the local partition is not enabled to support the VM disk type, then the local in the one-click command above should be changed to local-lvm, and you need to use a VM disk-supporting Partitioning for virtual machine creation

Here is the information for the example VM:

PropertyValue
VMID100
CPU cores2
Memory size4096MB
Disk size45G
SSH port44022
VNC port45901
Systemhigh-sierra
Host storage disklocal
Independent IPV6N

TIP

Note that VMID can only use numbers from 100 to 256, other numbers are not available

MACOS System Boot and Installation

After completing the previous steps, you can see a gray virtual machine waiting to be started in the panel.

mac0

After clicking start, enter the VNC panel. The selection box on the left has a full-screen button. It is recommended to operate in full screen to avoid resolution issues.

mac00

After about 3 minutes of boot disk loading, a startup disk will be displayed on the left center of the screen. Click directly or press Enter.

After another 3-5 minutes of startup disk loading, four selection boxes will appear. Select Disk Utility and click to enter.

mac1

After entering, you can see three disks and one image. Find the disk larger than 40G named QEMU HARDDISK Media, and click Erase.

mac2

A pop-up window will appear, requiring you to rename the name to macos for easy identification and use later, then click Erase to continue initialization.

mac3

After initialization is complete, click Done.

mac4

Now you need to exit the Disk Utility interface. Click Disk Utility in the upper right corner and select Quit Disk Utility to exit the current selection box.

mac5

Then you return to the previous four selection boxes. Select Install macOS XXXX (since I am using Big Sur as an example, XXXX is Big Sur), and click continue.

mac6

In the following steps, continue clicking continue, then click Agree, and then Agree again.

mac7

mac8

mac9

Until those three disks appear again, but here you can see the disk larger than 40G named macos. Select it and click continue.

mac10

After a period of file copying and disk loading (about 12 minutes), you will formally enter the system installation phase. Choose your region based on where the host machine is located.

mac11

After selecting the region, continue clicking continue.

mac12

mac13

Until the Migration Assistant data migration option appears, select Not Now in the lower left corner to not import user data.

mac14

Then you will be prompted to create a user. Fill in the username, account name, and login password. After setting up, click continue.

mac15

After that, you will continue clicking continue until the system installation is complete.

Network Configuration

Since the system installation was performed in an offline environment, you need to manually configure a static network connection to the host's bridge.

Click the WIFI button in the upper right corner, turn off WIFI, and then click Network Preferences ...

mac16

After entering the settings interface, click the Advanced button to enter the advanced settings interface.

mac17

Fill in the static network configuration in the TCP/IP tab.

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx (replace xxx with the IP you want to bind, my vmid is 100, so I wrote 100 for convenience)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

If you need to configure an IPV6 network, similar to the IPV4 settings above, you will need to fill in the public IPV6 address bound to the virtual machine (written in the Note box in the PVE panel), subnet mask 128, and the default gateway obtained by executing cat /usr/local/bin/pve_check_ipv6 on the host.

mac18

Fill in the static network DNS configuration in the DNS tab.

Generally, adding 8.8.8.8 and 1.1.1.1 is sufficient. For use in mainland China, use 114.114.114.114.

mac19

After filling in and applying, the top left of the settings will show that the network is connected.

mac20

Now, opening the default browser and visiting any website will allow you to access public network resources, proving that the network has worked.

Remove ISO

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Macos system is to uninstall opencore.iso and xxxx (the system image used for installation).iso, similar to the Windows system uninstallation of win image and virtio image in the example picture above.

',91)]))}const O=s(z,[["render",E]]);export{T as __pageData,O as default}; diff --git a/assets/en_guide_pve_pve_macos.md.BqWDs-pN.lean.js b/assets/en_guide_pve_pve_macos.md.C-ydY8bK.lean.js similarity index 53% rename from assets/en_guide_pve_pve_macos.md.BqWDs-pN.lean.js rename to assets/en_guide_pve_pve_macos.md.C-ydY8bK.lean.js index b8b5f070d2..659342042e 100644 --- a/assets/en_guide_pve_pve_macos.md.BqWDs-pN.lean.js +++ b/assets/en_guide_pve_pve_macos.md.C-ydY8bK.lean.js @@ -1 +1 @@ -import{_ as t}from"./chunks/wk7.BpuwpIoq.js";import{_ as a,c as s,o as i,ag as n}from"./chunks/framework.CSeR4K32.js";const o="/assets/mac0.CofQ9vw_.png",l="/assets/mac00.DelKhhmr.png",r="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",p="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",h="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",u="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",k="/assets/mac9.DIA9P3VH.png",y="/assets/mac10.CZg7Yifb.png",b="/assets/mac11.P11nsmhn.png",f="/assets/mac12.DHTBO7ih.png",v="/assets/mac13.DDrsH3zK.png",F="/assets/mac14.dLHoMtJy.png",C="/assets/mac15.vkr7IxY1.png",_="/assets/mac16.CeB_3pKz.png",w="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",B="/assets/mac19.C_d085-7.png",S="/assets/mac20.DsWyqQaw.png",T=JSON.parse('{"title":"Setting Up MacOS Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_macos.md","filePath":"en/guide/pve/pve_macos.md","lastUpdated":1772422214000}'),E={name:"en/guide/pve/pve_macos.md"};function P(I,e,M,q,A,V){return i(),s("div",null,e[0]||(e[0]=[n("",91)]))}const O=a(E,[["render",P]]);export{T as __pageData,O as default}; +import{_ as a}from"./chunks/wk7.BpuwpIoq.js";import{_ as s,c as t,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o="/assets/mac0.CofQ9vw_.png",l="/assets/mac00.DelKhhmr.png",r="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",p="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",h="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",u="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",k="/assets/mac9.DIA9P3VH.png",b="/assets/mac10.CZg7Yifb.png",y="/assets/mac11.P11nsmhn.png",f="/assets/mac12.DHTBO7ih.png",v="/assets/mac13.DDrsH3zK.png",w="/assets/mac14.dLHoMtJy.png",F="/assets/mac15.vkr7IxY1.png",C="/assets/mac16.CeB_3pKz.png",_="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",B="/assets/mac19.C_d085-7.png",S="/assets/mac20.DsWyqQaw.png",T=JSON.parse('{"title":"Setting Up MacOS Virtual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_macos.md","filePath":"en/guide/pve/pve_macos.md","lastUpdated":1772424525000}'),z={name:"en/guide/pve/pve_macos.md"};function E(P,e,I,M,q,A){return i(),t("div",null,e[0]||(e[0]=[n("",91)]))}const O=s(z,[["render",E]]);export{T as __pageData,O as default}; diff --git a/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.js b/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.js deleted file mode 100644 index 3b13267828..0000000000 --- a/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.js +++ /dev/null @@ -1,3 +0,0 @@ -import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.CSeR4K32.js";const n="/assets/pve_kvm_1.BEDy-Dxt.png",o="/assets/pve_kvm_2.C98l0GO8.png",r="/assets/pve_kvm_3.DzuyyWMo.png",g=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_precheck.md","filePath":"en/guide/pve/pve_precheck.md","lastUpdated":1772422214000}'),l={name:"en/guide/pve/pve_precheck.md"};function h(p,e,c,d,u,m){return s(),i("div",null,e[0]||(e[0]=[a(`

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If there are unadapted merchants or machines welcome to contact @spiritlhl_bot, will try to support it sometime!

WARNING

Will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running it.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/pve

Various requirements

It is recommended that debian try to use the latest stable version of the system before use.

Warning: This project only supports servers with a dedicated public IPv4 address

This project relies on a fixed IPv4 address for network allocation and does not support the following scenarios:

  • Environments with dynamic IPv4 (e.g., servers whose IP address changes after reboot)
  • Environments without a dedicated public IPv4 address (e.g., accessing the internet via home router NAT and requiring DHCP to obtain an address)

If your server does not have a publicly routable static IPv4 address, please do not use this project.

The one-click installation script of this project only adapts to Debian systems, non-Debian can not be installed through the APT source, the official only gives the image of Debian, other systems can only use the ISO installation, or use custom partitions and other ways to solve the problem in the FAQ partition.

  • System requirements: Debian 8+

TIP

It is recommended to install debian11 instead of debian12+, because the latter is a beta version, and the debian11 installation is the stable version.

  • Hardware requirements: 2 cores 2G RAM x86_64 or arm architecture server hard disk at least 20G
  • Hardware requirements for KVM: VM-X or AMD-V support (some VPS and all Dedicated servers support).
  • If hardware or system requirements are not met, you can use incus to batch open LXC containers Jump

If you use IPV6 tunnels for IPV6 subnet attachment on the host, be sure to add the contents in the corresponding file when PVE is successfully installed but the gateway is not automatically set, and do not add IPV6 tunnels at the very beginning (without installing PVE).

Warning: If the host is a standalone server without IPMI can not reinstall the system themselves, do not use this script, please directly entrust the technician to manually ISO install PVE, do not use this project, otherwise it may result in loss of connectivity (some of the standalone servers network settings do not support hot-plugging)

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Detecting the environment

  • This project related scripts must be executed before the execution of this script to detect the environment, if it does not meet the requirements of the installation of PVE will not be able to use the subsequent scripts
  • Detection of the local IPV6 network configuration (with or without IPV6 can be installed, just query)
  • Detection of the hardware configuration meets the minimum requirements
  • Detection of the hardware environment can be nested virtualization KVM type of servers, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • Detect whether the system environment can be nested virtualization KVM type of server, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • can not be nested virtualization KVM servers do not recommend the installation of the PVE, it is better to use incus for better performance.

Command:

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

If you need to update the IPV6 information before querying, then execute the following command before querying

bash
rm -rf /usr/local/bin/pve_ipv6*
-rm -rf /usr/local/bin/pve_check_ipv6*
-rm -rf /usr/local/bin/pve_last_ipv6*

Commands to set up the testing environment for executing this project are as follows:

图片

To perform the above-mentioned query, you only need to use the one-click script below to automatically create a virtual machine. There is no need to manually modify settings on the web interface.

图片

After creating the virtual machines using the subsequent script as mentioned above, it may be necessary to manually modify the settings on the web interface. You will need to disable hardware nested virtualization for each respective virtual machine, as shown in the following diagram.

图片

Stop the virtual machine before making modifications. After the modifications are done, you can start the machine to use NOVNC. Failure to close it may result in bugs that render this virtual machine unusable.

If you forcibly install PVE to enable KVM, even if the startup fails, you can also disable this option and try to start the virtual machine to see if it works.

The reason for these issues is what was stated above, the host does not support nested virtualized KVMs for acceleration.

TIP

Please use the "screen" command to suspend execution before launching the virtual machine, in order to avoid prolonged startup times. Unstable SSH connections could lead to interruptions during the intermediate execution.



',44)]))}const b=t(l,[["render",h]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.lean.js b/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.lean.js deleted file mode 100644 index 61fa91c8ba..0000000000 --- a/assets/en_guide_pve_pve_precheck.md.D-gVsGB_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as s,ag as a}from"./chunks/framework.CSeR4K32.js";const n="/assets/pve_kvm_1.BEDy-Dxt.png",o="/assets/pve_kvm_2.C98l0GO8.png",r="/assets/pve_kvm_3.DzuyyWMo.png",g=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_precheck.md","filePath":"en/guide/pve/pve_precheck.md","lastUpdated":1772422214000}'),l={name:"en/guide/pve/pve_precheck.md"};function h(p,e,c,d,u,m){return s(),i("div",null,e[0]||(e[0]=[a("",44)]))}const b=t(l,[["render",h]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_precheck.md.ctexfw-q.js b/assets/en_guide_pve_pve_precheck.md.ctexfw-q.js new file mode 100644 index 0000000000..ad59784bf0 --- /dev/null +++ b/assets/en_guide_pve_pve_precheck.md.ctexfw-q.js @@ -0,0 +1,3 @@ +import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/pve_kvm_1.BEDy-Dxt.png",r="/assets/pve_kvm_2.C98l0GO8.png",o="/assets/pve_kvm_3.DzuyyWMo.png",k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_precheck.md","filePath":"en/guide/pve/pve_precheck.md","lastUpdated":1772424525000}'),l={name:"en/guide/pve/pve_precheck.md"};function h(p,e,c,d,u,m){return i(),s("div",null,e[0]||(e[0]=[a(`

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If there are unadapted merchants or machines welcome to contact @spiritlhl_bot, will try to support it sometime!

WARNING

Will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running it.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/pve

Various requirements

It is recommended that debian try to use the latest stable version of the system before use.

Warning: This project only supports servers with a dedicated public IPv4 address

This project relies on a fixed IPv4 address for network allocation and does not support the following scenarios:

  • Environments with dynamic IPv4 (e.g., servers whose IP address changes after reboot)
  • Environments without a dedicated public IPv4 address (e.g., accessing the internet via home router NAT and requiring DHCP to obtain an address)

If your server does not have a publicly routable static IPv4 address, please do not use this project.

The one-click installation script of this project only adapts to Debian systems, non-Debian can not be installed through the APT source, the official only gives the image of Debian, other systems can only use the ISO installation, or use custom partitions and other ways to solve the problem in the FAQ partition.

  • System requirements: Debian 8+

TIP

It is recommended to install debian11 instead of debian12+, because the latter is a beta version, and the debian11 installation is the stable version.

  • Hardware requirements: 2 cores 2G RAM x86_64 or arm architecture server hard disk at least 20G
  • Hardware requirements for KVM: VM-X or AMD-V support (some VPS and all Dedicated servers support).
  • If hardware or system requirements are not met, you can use incus to batch open LXC containers Jump

If you use IPV6 tunnels for IPV6 subnet attachment on the host, be sure to add the contents in the corresponding file when PVE is successfully installed but the gateway is not automatically set, and do not add IPV6 tunnels at the very beginning (without installing PVE).

Warning: If the host is a standalone server without IPMI can not reinstall the system themselves, do not use this script, please directly entrust the technician to manually ISO install PVE, do not use this project, otherwise it may result in loss of connectivity (some of the standalone servers network settings do not support hot-plugging)

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Detecting the environment

  • This project related scripts must be executed before the execution of this script to detect the environment, if it does not meet the requirements of the installation of PVE will not be able to use the subsequent scripts
  • Detection of the local IPV6 network configuration (with or without IPV6 can be installed, just query)
  • Detection of the hardware configuration meets the minimum requirements
  • Detection of the hardware environment can be nested virtualization KVM type of servers, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • Detect whether the system environment can be nested virtualization KVM type of server, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • can not be nested virtualization KVM servers do not recommend the installation of the PVE, it is better to use incus for better performance.

Command:

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

If you need to update the IPV6 information before querying, then execute the following command before querying

bash
rm -rf /usr/local/bin/pve_ipv6*
+rm -rf /usr/local/bin/pve_check_ipv6*
+rm -rf /usr/local/bin/pve_last_ipv6*

Commands to set up the testing environment for executing this project are as follows:

图片

To perform the above-mentioned query, you only need to use the one-click script below to automatically create a virtual machine. There is no need to manually modify settings on the web interface.

图片

After creating the virtual machines using the subsequent script as mentioned above, it may be necessary to manually modify the settings on the web interface. You will need to disable hardware nested virtualization for each respective virtual machine, as shown in the following diagram.

图片

Stop the virtual machine before making modifications. After the modifications are done, you can start the machine to use NOVNC. Failure to close it may result in bugs that render this virtual machine unusable.

If you forcibly install PVE to enable KVM, even if the startup fails, you can also disable this option and try to start the virtual machine to see if it works.

The reason for these issues is what was stated above, the host does not support nested virtualized KVMs for acceleration.

TIP

Please use the "screen" command to suspend execution before launching the virtual machine, in order to avoid prolonged startup times. Unstable SSH connections could lead to interruptions during the intermediate execution.



',44)]))}const b=t(l,[["render",h]]);export{k as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_precheck.md.ctexfw-q.lean.js b/assets/en_guide_pve_pve_precheck.md.ctexfw-q.lean.js new file mode 100644 index 0000000000..9cdff1586a --- /dev/null +++ b/assets/en_guide_pve_pve_precheck.md.ctexfw-q.lean.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/pve_kvm_1.BEDy-Dxt.png",r="/assets/pve_kvm_2.C98l0GO8.png",o="/assets/pve_kvm_3.DzuyyWMo.png",k=JSON.parse('{"title":"Preface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_precheck.md","filePath":"en/guide/pve/pve_precheck.md","lastUpdated":1772424525000}'),l={name:"en/guide/pve/pve_precheck.md"};function h(p,e,c,d,u,m){return i(),s("div",null,e[0]||(e[0]=[a("",44)]))}const b=t(l,[["render",h]]);export{k as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_qa.md.CZudjDP3.js b/assets/en_guide_pve_pve_qa.md.CZudjDP3.js deleted file mode 100644 index e2b2be5bcf..0000000000 --- a/assets/en_guide_pve_pve_qa.md.CZudjDP3.js +++ /dev/null @@ -1,14 +0,0 @@ -import{_ as s,c as t,o as a,ag as i}from"./chunks/framework.CSeR4K32.js";const n="/assets/onlinepkg.-C5qKOrj.png",r="/assets/dns0.DDagSewr.png",g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_qa.md","filePath":"en/guide/pve/pve_qa.md","lastUpdated":1772422214000}'),o={name:"en/guide/pve/pve_qa.md"};function l(h,e,p,d,c,u){return a(),t("div",null,e[0]||(e[0]=[i(`

Solve the puzzle

Within 30 seconds of executing the script, the machine dropped.

Original system execution

systemctl restart networking

See if it is not directly offline, if so that is the machine native problem, hot plug or dhcp caused by the network can not restart, it is recommended to replace the host system or DD a new system to try!

Generally speaking, this situation occurs in the exclusive service Debian11 system, switch to Debian12+ system will not be a problem!

Installation of PVE fails with an error saying that some packages do not exist.

Execute the following command to query the source of apt

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

If you see

deb file://
-deb cdrom:[

A line starting like this proves that the host is using local sources instead of network sources, and you need to replace the sources in /etc/apt/sources.list with a line such as

pct

Replace the network source with the same to install using the PVE one-click install script.

Replacing the network source can be done using the following command for apt source replacement

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

Successful PVE Installation but Lost Connection After Reboot

If the machine successfully installs PVE and the web interface is accessible, but loses connection after a reboot, please execute the following commands after a successful PVE installation and before rebooting:

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
-if ! grep -q "^post-up /sbin/ethtool" /etc/network/interfaces; then
-    chattr -i /etc/network/interfaces
-    echo "post-up /sbin/ethtool -K $auto_interface tx off rx off" >> /etc/network/interfaces
-    chattr +i /etc/network/interfaces
-fi

Then report the rebooted disconnected machine to @spiritlhl_bot for the script to be updated and repaired automatically.

Successful PVE Installation but can not resolve host after reboot

Common in low version of Debian system (cloud server) after installing PVE reboot no matter what URL to visit the report error

curl: (6) Could not resolve host:

View the file at this time

cat /etc/resolv.conf

Statements beginning with nameserver may be found to be absent.

You need to set up DNS on this web page

screenshot-1708136079861

After setting up the DNS, check the file again and you will find the following content

search .
-nameserver 8.8.8.8
-nameserver 8.8.4.4

At this point, requesting any URL again will resolve it successfully

PVE Installation Failed

If you encounter any issues with installing on certain machines, and if you're in a hurry, you can try using the scripts from the following repository to reinstall as Debian 11 first.

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

The system username after dd at this point is root, and the password is oneclickvirt139.

If it doesn't work, check the issues and descriptions in https://github.com/leitbogioro/Tools A common problem is that the machine is raid0 not raid10, and you need to add a parameter to specify the value of the raid.

If you have time or if it's still not working, please contact @spiritlhl_bot for assistance.

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the \`\`\`/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT\`\`, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

What to do if you accidentally delete a NAT mapping rule

Use the following command to map back

shell
iptables -t nat -F
-iptables -t filter -F
-service networking restart
-systemctl restart networking.service
-cat /etc/iptables/rules.v4 | iptables-restore

Detect whether the merchant has falsely declared the IPV6 subnet size, resulting in the inability to set up virtual machines/containers with independent IPV6 addresses.

Use the following command to test the actual subnet mask size on a clean machine that does not have Proxmox VE installed.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

If the test result is 128, it proves that the merchant has falsely labelled the subnet size, and only one IPV6 address cannot be additionally allocated to virtual machines/containers.

Another situation is that the merchant only gives permission to add, but does not actually give the complete IPV6 subnet to the machine. A typical example is virtfusion, which requires adding IPV6 IPs one by one in the background. In this case, it is also impossible to open.

virtfusion's customer service explanation for this situation:

All of the blocks you get for IPv6 are 1 x /64 however you need to add and route them to the VPS.
-Once you add 1 IPv6 you need to ping the gateway (its in the panel under networking) and then ping the IPv6 address, then repeat for every IPv6 address you add.

Host IPv6 Subnet Change Requires Corresponding Configuration Updates

Three areas require updating:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ Files containing IPv6 addresses

After completing the update, restart the host machine and proceed with the setup. You should then be able to use the new network segment.

Adding a New Node to an Existing PVE Cluster (Create / Join Cluster)

To form a cluster from two independent Proxmox VE instances, the following prerequisites must be met:

Cluster Prerequisites

  1. Unique Hostnames
    The hostname of each node must be unique to avoid conflicts. It is recommended to use names like pve1, pve2, etc.

  2. Unique VMIDs
    There must be no duplicate VMIDs across the two PVE nodes. If conflicts exist, adjust the VMIDs beforehand to prevent issues during cluster merge.

  3. Network Connectivity & Low Latency
    Both nodes must be able to ping each other. A low-latency network (LAN or high-speed public connection) is recommended for reliable cluster communication.

Creating the Cluster (Run on Any Node)

  1. Log in to the web interface of the node where the cluster will be created (e.g., pve1).
  2. Navigate to: Datacenter → Cluster → Create Cluster.
  3. Enter a name for the cluster (Cluster Name).
  4. Select the network interface to be used for cluster communication (e.g., public IP if only one interface is available).
  5. Click Create to initialize the cluster.
  6. Once the cluster is created, click Join Information and copy the displayed information for use on the joining node.

Note: The cluster has no "master" or "slave" nodes—any node can be the one that initiates the cluster.

Joining the Cluster (Run on the Second Node)

  1. Log in to the web interface of the node to be added (e.g., pve2).
  2. Navigate to: Datacenter → Cluster → Join Cluster.
  3. Paste the Join Information from pve1 into the input field.
  4. Enter the password of root user on pve1 in the Peer Password field.
  5. Click Join to begin the joining process.
  6. Wait until the process completes successfully, then refresh the page or re-login. You should now see both nodes in the same cluster.

Cluster Benefits

  • Nodes can share resources and migrate virtual machines.
  • ISO images and templates can be transferred more conveniently between nodes.

Verified VPS Providers

VPS Providers Offering KVM Virtualization with NAT

spartanhost Debian12 on a Dedicated Server (Debian11 has problems)

interserver VPS or dedicated servers

frantech Las Vegas Tier 2

eugamehost US Phoenix Black Friday Special

amhost Testing version

digitalocean Perminu Intel and Regular 4-core versions

skrime Lowest configuration of AMD Ryzen KVM Server

webdock AMD KVM Server

4vps Russian and Greek testing versions

adtaq Storage KVM server with lowest configuration

nocix Dedicated servers

online.net Debian12 on a Dedicated Server (Debian11 has problems)

OVH Public Cloud needs to be installed after dd as a pure system using the following command

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd ' oneclickvirt139' --network "static"

At this point, the system username after dd is root, and the password is oneclickvirt139.

If it doesn't work, please check the issues and instructions in https://github.com/leitbogioro/Tools. A common problem is that OVH standalone servers are dd'd, which requires the source system to be remounted as raid1 on debian12 by default, and then parameterized to specify dd'd as raid0 in order to be successful, using the following command

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

VPS Providers Offering NAT with LXC Virtualization

Tencent Cloud Worry-Free and Student editions

spectraip KVM servers

Linode Lowest configuration with dedicated CPU

hosthatch Special high-configuration servers

hetzner Cloud servers

rackdog Servers with floating IP

vultr Standard Cloud servers

azure Standard machines

scaleway ARM architecture servers

aws EC2 servers

Google cloud platform - GCP AMD servers

`,104)]))}const f=s(o,[["render",l]]);export{g as __pageData,f as default}; diff --git a/assets/en_guide_pve_pve_qa.md.CZudjDP3.lean.js b/assets/en_guide_pve_pve_qa.md.CZudjDP3.lean.js deleted file mode 100644 index 9b2d32c874..0000000000 --- a/assets/en_guide_pve_pve_qa.md.CZudjDP3.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as a,ag as i}from"./chunks/framework.CSeR4K32.js";const n="/assets/onlinepkg.-C5qKOrj.png",r="/assets/dns0.DDagSewr.png",g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_qa.md","filePath":"en/guide/pve/pve_qa.md","lastUpdated":1772422214000}'),o={name:"en/guide/pve/pve_qa.md"};function l(h,e,p,d,c,u){return a(),t("div",null,e[0]||(e[0]=[i("",104)]))}const f=s(o,[["render",l]]);export{g as __pageData,f as default}; diff --git a/assets/en_guide_pve_pve_qa.md.DgIBo7yj.js b/assets/en_guide_pve_pve_qa.md.DgIBo7yj.js new file mode 100644 index 0000000000..0f2aa55c22 --- /dev/null +++ b/assets/en_guide_pve_pve_qa.md.DgIBo7yj.js @@ -0,0 +1,14 @@ +import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/onlinepkg.-C5qKOrj.png",r="/assets/dns0.DDagSewr.png",g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_qa.md","filePath":"en/guide/pve/pve_qa.md","lastUpdated":1772424525000}'),l={name:"en/guide/pve/pve_qa.md"};function o(h,e,p,d,c,u){return t(),a("div",null,e[0]||(e[0]=[i(`

Solve the puzzle

Within 30 seconds of executing the script, the machine dropped.

Original system execution

systemctl restart networking

See if it is not directly offline, if so that is the machine native problem, hot plug or dhcp caused by the network can not restart, it is recommended to replace the host system or DD a new system to try!

Generally speaking, this situation occurs in the exclusive service Debian11 system, switch to Debian12+ system will not be a problem!

Installation of PVE fails with an error saying that some packages do not exist.

Execute the following command to query the source of apt

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

If you see

deb file://
+deb cdrom:[

A line starting like this proves that the host is using local sources instead of network sources, and you need to replace the sources in /etc/apt/sources.list with a line such as

pct

Replace the network source with the same to install using the PVE one-click install script.

Replacing the network source can be done using the following command for apt source replacement

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

Successful PVE Installation but Lost Connection After Reboot

If the machine successfully installs PVE and the web interface is accessible, but loses connection after a reboot, please execute the following commands after a successful PVE installation and before rebooting:

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
+if ! grep -q "^post-up /sbin/ethtool" /etc/network/interfaces; then
+    chattr -i /etc/network/interfaces
+    echo "post-up /sbin/ethtool -K $auto_interface tx off rx off" >> /etc/network/interfaces
+    chattr +i /etc/network/interfaces
+fi

Then report the rebooted disconnected machine to @spiritlhl_bot for the script to be updated and repaired automatically.

Successful PVE Installation but can not resolve host after reboot

Common in low version of Debian system (cloud server) after installing PVE reboot no matter what URL to visit the report error

curl: (6) Could not resolve host:

View the file at this time

cat /etc/resolv.conf

Statements beginning with nameserver may be found to be absent.

You need to set up DNS on this web page

screenshot-1708136079861

After setting up the DNS, check the file again and you will find the following content

search .
+nameserver 8.8.8.8
+nameserver 8.8.4.4

At this point, requesting any URL again will resolve it successfully

PVE Installation Failed

If you encounter any issues with installing on certain machines, and if you're in a hurry, you can try using the scripts from the following repository to reinstall as Debian 11 first.

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

The system username after dd at this point is root, and the password is oneclickvirt139.

If it doesn't work, check the issues and descriptions in https://github.com/leitbogioro/Tools A common problem is that the machine is raid0 not raid10, and you need to add a parameter to specify the value of the raid.

If you have time or if it's still not working, please contact @spiritlhl_bot for assistance.

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the \`\`\`/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT\`\`, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

What to do if you accidentally delete a NAT mapping rule

Use the following command to map back

shell
iptables -t nat -F
+iptables -t filter -F
+service networking restart
+systemctl restart networking.service
+cat /etc/iptables/rules.v4 | iptables-restore

Detect whether the merchant has falsely declared the IPV6 subnet size, resulting in the inability to set up virtual machines/containers with independent IPV6 addresses.

Use the following command to test the actual subnet mask size on a clean machine that does not have Proxmox VE installed.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

If the test result is 128, it proves that the merchant has falsely labelled the subnet size, and only one IPV6 address cannot be additionally allocated to virtual machines/containers.

Another situation is that the merchant only gives permission to add, but does not actually give the complete IPV6 subnet to the machine. A typical example is virtfusion, which requires adding IPV6 IPs one by one in the background. In this case, it is also impossible to open.

virtfusion's customer service explanation for this situation:

All of the blocks you get for IPv6 are 1 x /64 however you need to add and route them to the VPS.
+Once you add 1 IPv6 you need to ping the gateway (its in the panel under networking) and then ping the IPv6 address, then repeat for every IPv6 address you add.

Host IPv6 Subnet Change Requires Corresponding Configuration Updates

Three areas require updating:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ Files containing IPv6 addresses

After completing the update, restart the host machine and proceed with the setup. You should then be able to use the new network segment.

Adding a New Node to an Existing PVE Cluster (Create / Join Cluster)

To form a cluster from two independent Proxmox VE instances, the following prerequisites must be met:

Cluster Prerequisites

  1. Unique Hostnames
    The hostname of each node must be unique to avoid conflicts. It is recommended to use names like pve1, pve2, etc.

  2. Unique VMIDs
    There must be no duplicate VMIDs across the two PVE nodes. If conflicts exist, adjust the VMIDs beforehand to prevent issues during cluster merge.

  3. Network Connectivity & Low Latency
    Both nodes must be able to ping each other. A low-latency network (LAN or high-speed public connection) is recommended for reliable cluster communication.

Creating the Cluster (Run on Any Node)

  1. Log in to the web interface of the node where the cluster will be created (e.g., pve1).
  2. Navigate to: Datacenter → Cluster → Create Cluster.
  3. Enter a name for the cluster (Cluster Name).
  4. Select the network interface to be used for cluster communication (e.g., public IP if only one interface is available).
  5. Click Create to initialize the cluster.
  6. Once the cluster is created, click Join Information and copy the displayed information for use on the joining node.

Note: The cluster has no "master" or "slave" nodes—any node can be the one that initiates the cluster.

Joining the Cluster (Run on the Second Node)

  1. Log in to the web interface of the node to be added (e.g., pve2).
  2. Navigate to: Datacenter → Cluster → Join Cluster.
  3. Paste the Join Information from pve1 into the input field.
  4. Enter the password of root user on pve1 in the Peer Password field.
  5. Click Join to begin the joining process.
  6. Wait until the process completes successfully, then refresh the page or re-login. You should now see both nodes in the same cluster.

Cluster Benefits

  • Nodes can share resources and migrate virtual machines.
  • ISO images and templates can be transferred more conveniently between nodes.

Verified VPS Providers

VPS Providers Offering KVM Virtualization with NAT

spartanhost Debian12 on a Dedicated Server (Debian11 has problems)

interserver VPS or dedicated servers

frantech Las Vegas Tier 2

eugamehost US Phoenix Black Friday Special

amhost Testing version

digitalocean Perminu Intel and Regular 4-core versions

skrime Lowest configuration of AMD Ryzen KVM Server

webdock AMD KVM Server

4vps Russian and Greek testing versions

adtaq Storage KVM server with lowest configuration

nocix Dedicated servers

online.net Debian12 on a Dedicated Server (Debian11 has problems)

OVH Public Cloud needs to be installed after dd as a pure system using the following command

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd ' oneclickvirt139' --network "static"

At this point, the system username after dd is root, and the password is oneclickvirt139.

If it doesn't work, please check the issues and instructions in https://github.com/leitbogioro/Tools. A common problem is that OVH standalone servers are dd'd, which requires the source system to be remounted as raid1 on debian12 by default, and then parameterized to specify dd'd as raid0 in order to be successful, using the following command

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

VPS Providers Offering NAT with LXC Virtualization

Tencent Cloud Worry-Free and Student editions

spectraip KVM servers

Linode Lowest configuration with dedicated CPU

hosthatch Special high-configuration servers

hetzner Cloud servers

rackdog Servers with floating IP

vultr Standard Cloud servers

azure Standard machines

scaleway ARM architecture servers

aws EC2 servers

Google cloud platform - GCP AMD servers

`,104)]))}const b=s(l,[["render",o]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_qa.md.DgIBo7yj.lean.js b/assets/en_guide_pve_pve_qa.md.DgIBo7yj.lean.js new file mode 100644 index 0000000000..f8df83c252 --- /dev/null +++ b/assets/en_guide_pve_pve_qa.md.DgIBo7yj.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/onlinepkg.-C5qKOrj.png",r="/assets/dns0.DDagSewr.png",g=JSON.parse('{"title":"Solve the puzzle","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_qa.md","filePath":"en/guide/pve/pve_qa.md","lastUpdated":1772424525000}'),l={name:"en/guide/pve/pve_qa.md"};function o(h,e,p,d,c,u){return t(),a("div",null,e[0]||(e[0]=[i("",104)]))}const b=s(l,[["render",o]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_thanks.md.BYc4eCgn.js b/assets/en_guide_pve_pve_thanks.md.y42sMaye.js similarity index 95% rename from assets/en_guide_pve_pve_thanks.md.BYc4eCgn.js rename to assets/en_guide_pve_pve_thanks.md.y42sMaye.js index 026b03bfab..c1d5b9ea51 100644 --- a/assets/en_guide_pve_pve_thanks.md.BYc4eCgn.js +++ b/assets/en_guide_pve_pve_thanks.md.y42sMaye.js @@ -1 +1 @@ -import{_ as r,c as t,o,ag as a}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/pve_thanks.md","filePath":"en/guide/pve/pve_thanks.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_thanks.md"};function p(i,e,s,l,h,m){return o(),t("div",null,e[0]||(e[0]=[a('

Acknowledgements

https://forum.proxmox.com/

https://blog.ilolicon.com/archives/615

https://github.com/Ella-Alinda/somescripts/blob/main/nat.sh

https://pve.proxmox.com/pve-docs/qm.1.html

https://down.idc.wiki/Image/realServer-Template/

https://mirrors.tuna.tsinghua.edu.cn/proxmox/

https://github.com/roacn/pve/blob/main/pve.sh

https://github.com/spiritLHLS/lxc

https://github.com/leitbogioro/Tools

https://github.com/jiangcuo/Proxmox-Port

https://gitlab.com/minkebox/pimox

https://github.com/jiangcuo/run_proxmox_in_docker

https://github.com/yoursunny/ndpresponder

https://github.com/SuperManito/LinuxMirrors

Thank @Ella-Alinda for providing PVE guidance.

',16)]))}const b=r(n,[["render",p]]);export{g as __pageData,b as default}; +import{_ as r,c as t,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/pve_thanks.md","filePath":"en/guide/pve/pve_thanks.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_thanks.md"};function p(i,e,s,l,h,m){return o(),t("div",null,e[0]||(e[0]=[a('

Acknowledgements

https://forum.proxmox.com/

https://blog.ilolicon.com/archives/615

https://github.com/Ella-Alinda/somescripts/blob/main/nat.sh

https://pve.proxmox.com/pve-docs/qm.1.html

https://down.idc.wiki/Image/realServer-Template/

https://mirrors.tuna.tsinghua.edu.cn/proxmox/

https://github.com/roacn/pve/blob/main/pve.sh

https://github.com/spiritLHLS/lxc

https://github.com/leitbogioro/Tools

https://github.com/jiangcuo/Proxmox-Port

https://gitlab.com/minkebox/pimox

https://github.com/jiangcuo/run_proxmox_in_docker

https://github.com/yoursunny/ndpresponder

https://github.com/SuperManito/LinuxMirrors

Thank @Ella-Alinda for providing PVE guidance.

',16)]))}const b=r(n,[["render",p]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_thanks.md.BYc4eCgn.lean.js b/assets/en_guide_pve_pve_thanks.md.y42sMaye.lean.js similarity index 70% rename from assets/en_guide_pve_pve_thanks.md.BYc4eCgn.lean.js rename to assets/en_guide_pve_pve_thanks.md.y42sMaye.lean.js index 9660396e83..c25a919dd1 100644 --- a/assets/en_guide_pve_pve_thanks.md.BYc4eCgn.lean.js +++ b/assets/en_guide_pve_pve_thanks.md.y42sMaye.lean.js @@ -1 +1 @@ -import{_ as r,c as t,o,ag as a}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/pve_thanks.md","filePath":"en/guide/pve/pve_thanks.md","lastUpdated":1772422214000}'),n={name:"en/guide/pve/pve_thanks.md"};function p(i,e,s,l,h,m){return o(),t("div",null,e[0]||(e[0]=[a("",16)]))}const b=r(n,[["render",p]]);export{g as __pageData,b as default}; +import{_ as r,c as t,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/pve/pve_thanks.md","filePath":"en/guide/pve/pve_thanks.md","lastUpdated":1772424525000}'),n={name:"en/guide/pve/pve_thanks.md"};function p(i,e,s,l,h,m){return o(),t("div",null,e[0]||(e[0]=[a("",16)]))}const b=r(n,[["render",p]]);export{g as __pageData,b as default}; diff --git a/assets/en_guide_pve_pve_windows.md.BnnPOUCS.js b/assets/en_guide_pve_pve_windows.md.BnnPOUCS.js new file mode 100644 index 0000000000..eba1560165 --- /dev/null +++ b/assets/en_guide_pve_pve_windows.md.BnnPOUCS.js @@ -0,0 +1,2 @@ +import{_ as o}from"./chunks/wk7.BpuwpIoq.js";import{_ as t,c as i,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const s="/assets/dlwiniso.BxXucu9m.png",r="/assets/dlwiniso1.CQyxWlSu.png",d="/assets/general.BkOp2iK4.png",c="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",p="/assets/disks.BJniy5pO.png",h="/assets/cpu.DedcVQ_T.png",g="/assets/memory.CH7Gxf76.png",m="/assets/network.DPXM5W42.png",u="/assets/finish.Cf6DgPp1.png",w="/assets/start.vjgB4hml.png",k="/assets/gic1.XkdPXihx.png",f="/assets/gic2.s5VB7-xp.png",y="/assets/gic3.2zLznATL.png",v="/assets/gic4.CX3t8C19.png",_="/assets/gic5.pjwHWuhn.png",I="/assets/gic6.BnmyenL0.png",b="/assets/gic7.ZYHWzF5W.png",C="/assets/gic8.BwCbmRgC.png",x="/assets/gic9.62-9wTBo.png",z="/assets/net1.CUyp8ayS.png",V="/assets/net2.BP2m5XnQ.png",O="/assets/net3.BJFg7Me5.png",S="/assets/net4.CANZtcPE.png",P="/assets/virtio.CUVhk14O.png",D="/assets/lower2.SPGPKJ4N.png",q="/assets/lower1.DFw6c1iw.png",N="/assets/nodisk.CH47I8Tu.png",M="/assets/nodisk1.gZ09o2py.png",T="/assets/nodisk2.Do6XEKMW.png",U="/assets/nodisk3.1vBQc75S.png",B="/assets/nodisk4.CJjHGgtp.png",E="/assets/wk4.K5XvE6uQ.png",W="/assets/wk5.BEJ5BAWW.png",A="/assets/wk6.D9MKwk3w.png",K="/assets/wk1.BGnwsbrE.png",L="/assets/wk2.BasdNK2d.png",F="/assets/wk3.CWstwLHH.png",Z=JSON.parse('{"title":"Setting Up Windows Visual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_windows.md","filePath":"en/guide/pve/pve_windows.md","lastUpdated":1772424525000}'),G={name:"en/guide/pve/pve_windows.md"};function H(X,e,R,Q,J,j){return a(),i("div",null,e[0]||(e[0]=[n('

Setting Up Windows Visual Machine

Choose KVM virtualization or QEMU's TCG emulation at startup

The host itself, if it supports nested virtualization, can use host or kvm64 or qemu64 type CPUs

In terms of performance, host > kvm64 > qemu64

The qemu type of virtualization has a lot of performance loss

If you don't support nested virtualization, you can only use qemu64 type CPU, and you need to change KVM hardware virtualization in Options before you start the VM

Set it to no to uncheck Enabled[enabled].

If you're really not sure if your machine supports nested virtualization, then check System and Hardware Configuration Requirements --> Detecting the Environment Detecting to ensure it's available (with attempts to enable the feature)

The main logic for this is in the

https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

It is recommended to use PVE's System and Hardware Requirements --> Environment Detection in this tutorial for one-click detection, or the following detection logic:

egrep -c '(vmx|svm)' /proc/cpuinfo if it is 1

cat /sys/module/kvm_intel/parameters/nested if it exists and is 1

lsmod | grep -q kvm if it is loaded.

If all of these are supported, choose the host type to be 100% problem-free, in other cases there may be unknown errors try it yourself.

Using ISO Image with VirtIO for VM Setup

1. Download the Image

Before installation, you need to download the image file via local(pve) --> ISO images --> Download from URL

For the download link (URL:), you can use files from: https://github.com/ILLKX/Windows-VirtIO

Enter win.iso as the File Name:

download

Click Download. After downloading is complete, you can see the file size of win.iso on the current page, confirming it's in ISO format.

downloaded

2. Setting Up the Template

Click Create VM in the top right corner of the page.

In the General window, select mypool for Resource Pool:, enter win for Name, then click Next.

general

In the OS window, select win.iso for ISO image. For Guest OS, select Microsoft Windows as the Type and choose the appropriate Version for your ISO. For example, if you downloaded Windows 2022, select 11/2022, then click Next.

OS

In the System window, select VirtIO-GPU for Graphic card, q35 for Machine, VirtIO SCSI for SCSI Controller, and Default (SeaBIOS) for BIOS, then click Next.

system

In the Disk window, select Write Back for Cache, enter your desired disk size in Disk size (GiB) (generally not less than 20), and choose the storage location in Storage. In this example, only the system disk local is available, so local is selected. Then click Next.

disk

In the CPU window, enter the number of cores needed in Cores, then click Next.

cpu

In the Memory window, enter the desired memory size in Memory (MiB), then click Next.

memory

In the Network window, select vmbr1 for Bridge, VirtIO (paravirtualized) for Model, uncheck Firewall, then click Next.

Network

In the Confirm window, click Finish.

finish

3. Graphical Installation Configuration

Click on the template you've set up on the left, click Start in the upper right corner to start the virtual machine, then click Console to enter the VNC interface and wait for the operating system to boot.

console

In the VNC, click Next, then Install now, then I don't have a product key, check Accept license, click Next, and then select Custom installation.

win0win1win2win3win4

If the image comes with VirtIO drivers, you should be able to see the available system storage disk and its size. Select it and click Next.

win5win6

Wait for the system to install. It may restart automatically several times and could take more than 10 minutes.

win7

After installation is complete, you'll be asked to set a password during first login.

win8

Once setup is complete, there's a pop-up box on the left side of the NOVNC page. Click the first button, then follow the login prompt by pressing Ctrl+Alt+last button to enter the login page.

4. Network Initialization

Since the PVE is set up with a static network through this project, you need to manually modify the bound IP address after logging in, rather than using DHCP.

Right-click in the bottom right corner of the desktop and select Open Network and Internet settings. In the settings page that appears, click Change adapter options. win9

In the Network Connections, select Ethernet and click Change settings of this connection. win10

In the popup window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties. win11

In the new dialog box, select Use the following IP address and enter: IP address(I): 172.16.1.xxx (replace xxx with your desired IP, I used 100 for convenience as my vmid is 100) Subnet mask(U): 255.255.255.0 Default gateway(D): 172.16.1.1

Then select Use the following DNS server addresses and enter:

8.8.8.8
+144.144.144.144

Click OK in the bottom right corner, and make sure Validate settings upon exit is NOT checked.

win12

Click OK and Yes for any other dialog boxes, and your virtual machine will now have network connectivity.

5. Unmounting the CD Drive

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Using ISO Images without VirtIO for VM Installation

1. Download Images

For Windows images without VirtIO, you can use:

https://github.com/ILLKX/Windows

For VirtIO ISO images, you can use:

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

Alternatively, you can download just the MSI package, package it into an ISO format locally, and then upload it to ProxmoxVE.

This way, the package is smaller. The official package contains support for all Windows images and is about 500MB, while a self-packaged one is around 5MB.

2. VirtIO Import

Note that in ProxmoxVE version 8.x and later, you can select VirtIO boot loading by default in the OS section, as shown in the image:

virtio

In lower versions of ProxmoxVE, such as 7.x and 6.x, you cannot select VirtIO boot loading by default in the OS section:

lower

You need to manually add CD/DVD Drive by clicking Add in the Hardware section and selecting the downloaded VirtIO ISO file:

lower

Then proceed as usual until you reach:

nodisk

At this point, you can't find the hard disk. You need to select Load Driver:

nodisk

Then select the VirtIO as your driver disk, click open, and import the corresponding system driver from the amd64 directory:

nodisk

I'm using a Windows Server 2019 image, so I imported the 2k19 driver. After importing, select the imported driver and click Next:

nodisk

nodisk

Now you should be able to see the hard disk. Select it and continue with the installation steps as in the previous tutorial until the system installation is complete and you reach the desktop.

3. Installing Drivers via virtio-win-guest-tools

Once successfully installed and at the desktop, you still need to manually install the drivers.

Open the VirtIO driver's CD drive directory. At the bottom, there's a virtio-win-guest-tools program that will install the required VirtIO drivers, including the VirtIO network card driver:

wk

wk

wk

After clicking install, the network card driver will be installed. For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

4. Installing Network Card Driver (Alternative)

After successful installation and reaching the desktop, you may still need to manually install the network card driver to connect to the network:

  1. Open Control PanelDevice Manager
  2. Find the Ethernet Controller, right-click and select Update Driver
  3. Select Browse my computer for driver software (R)
  4. Browse to the VirtIO driver's CD drive directory
  5. Open the NetKVM folder
  6. Select the driver folder corresponding to your current system version (like the above operation, I would choose the 2k19 folder with amd64 drivers)
  7. Confirm the installation, and after completion, the VirtIO network card driver will be successfully loaded

wk

wk

wk

For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

5. Unmounting the CD Drive

In the ProxmoxVE web interface, manually click on the corresponding CD in the Hardware section, select Remove, and then restart the virtual machine. This way, you can use it directly:

wk

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

',113)]))}const ee=t(G,[["render",H]]);export{Z as __pageData,ee as default}; diff --git a/assets/en_guide_pve_pve_windows.md.BnnPOUCS.lean.js b/assets/en_guide_pve_pve_windows.md.BnnPOUCS.lean.js new file mode 100644 index 0000000000..92e4346f9a --- /dev/null +++ b/assets/en_guide_pve_pve_windows.md.BnnPOUCS.lean.js @@ -0,0 +1 @@ +import{_ as o}from"./chunks/wk7.BpuwpIoq.js";import{_ as t,c as i,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const s="/assets/dlwiniso.BxXucu9m.png",r="/assets/dlwiniso1.CQyxWlSu.png",d="/assets/general.BkOp2iK4.png",c="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",p="/assets/disks.BJniy5pO.png",h="/assets/cpu.DedcVQ_T.png",g="/assets/memory.CH7Gxf76.png",m="/assets/network.DPXM5W42.png",u="/assets/finish.Cf6DgPp1.png",w="/assets/start.vjgB4hml.png",k="/assets/gic1.XkdPXihx.png",f="/assets/gic2.s5VB7-xp.png",y="/assets/gic3.2zLznATL.png",v="/assets/gic4.CX3t8C19.png",_="/assets/gic5.pjwHWuhn.png",I="/assets/gic6.BnmyenL0.png",b="/assets/gic7.ZYHWzF5W.png",C="/assets/gic8.BwCbmRgC.png",x="/assets/gic9.62-9wTBo.png",z="/assets/net1.CUyp8ayS.png",V="/assets/net2.BP2m5XnQ.png",O="/assets/net3.BJFg7Me5.png",S="/assets/net4.CANZtcPE.png",P="/assets/virtio.CUVhk14O.png",D="/assets/lower2.SPGPKJ4N.png",q="/assets/lower1.DFw6c1iw.png",N="/assets/nodisk.CH47I8Tu.png",M="/assets/nodisk1.gZ09o2py.png",T="/assets/nodisk2.Do6XEKMW.png",U="/assets/nodisk3.1vBQc75S.png",B="/assets/nodisk4.CJjHGgtp.png",E="/assets/wk4.K5XvE6uQ.png",W="/assets/wk5.BEJ5BAWW.png",A="/assets/wk6.D9MKwk3w.png",K="/assets/wk1.BGnwsbrE.png",L="/assets/wk2.BasdNK2d.png",F="/assets/wk3.CWstwLHH.png",Z=JSON.parse('{"title":"Setting Up Windows Visual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_windows.md","filePath":"en/guide/pve/pve_windows.md","lastUpdated":1772424525000}'),G={name:"en/guide/pve/pve_windows.md"};function H(X,e,R,Q,J,j){return a(),i("div",null,e[0]||(e[0]=[n("",113)]))}const ee=t(G,[["render",H]]);export{Z as __pageData,ee as default}; diff --git a/assets/en_guide_pve_pve_windows.md.nzEI2uVe.js b/assets/en_guide_pve_pve_windows.md.nzEI2uVe.js deleted file mode 100644 index e4ca680bc6..0000000000 --- a/assets/en_guide_pve_pve_windows.md.nzEI2uVe.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as t}from"./chunks/wk7.BpuwpIoq.js";import{_ as o,c as i,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const s="/assets/dlwiniso.BxXucu9m.png",r="/assets/dlwiniso1.CQyxWlSu.png",c="/assets/general.BkOp2iK4.png",d="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",p="/assets/disks.BJniy5pO.png",h="/assets/cpu.DedcVQ_T.png",m="/assets/memory.CH7Gxf76.png",g="/assets/network.DPXM5W42.png",u="/assets/finish.Cf6DgPp1.png",w="/assets/start.vjgB4hml.png",k="/assets/gic1.XkdPXihx.png",f="/assets/gic2.s5VB7-xp.png",v="/assets/gic3.2zLznATL.png",_="/assets/gic4.CX3t8C19.png",y="/assets/gic5.pjwHWuhn.png",I="/assets/gic6.BnmyenL0.png",b="/assets/gic7.ZYHWzF5W.png",C="/assets/gic8.BwCbmRgC.png",x="/assets/gic9.62-9wTBo.png",V="/assets/net1.CUyp8ayS.png",O="/assets/net2.BP2m5XnQ.png",S="/assets/net3.BJFg7Me5.png",P="/assets/net4.CANZtcPE.png",D="/assets/virtio.CUVhk14O.png",q="/assets/lower2.SPGPKJ4N.png",N="/assets/lower1.DFw6c1iw.png",M="/assets/nodisk.CH47I8Tu.png",T="/assets/nodisk1.gZ09o2py.png",U="/assets/nodisk2.Do6XEKMW.png",B="/assets/nodisk3.1vBQc75S.png",E="/assets/nodisk4.CJjHGgtp.png",W="/assets/wk4.K5XvE6uQ.png",z="/assets/wk5.BEJ5BAWW.png",A="/assets/wk6.D9MKwk3w.png",K="/assets/wk1.BGnwsbrE.png",L="/assets/wk2.BasdNK2d.png",F="/assets/wk3.CWstwLHH.png",Z=JSON.parse('{"title":"Setting Up Windows Visual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_windows.md","filePath":"en/guide/pve/pve_windows.md","lastUpdated":1772422214000}'),G={name:"en/guide/pve/pve_windows.md"};function H(X,e,R,Q,J,j){return n(),i("div",null,e[0]||(e[0]=[a('

Setting Up Windows Visual Machine

Choose KVM virtualization or QEMU's TCG emulation at startup

The host itself, if it supports nested virtualization, can use host or kvm64 or qemu64 type CPUs

In terms of performance, host > kvm64 > qemu64

The qemu type of virtualization has a lot of performance loss

If you don't support nested virtualization, you can only use qemu64 type CPU, and you need to change KVM hardware virtualization in Options before you start the VM

Set it to no to uncheck Enabled[enabled].

If you're really not sure if your machine supports nested virtualization, then check System and Hardware Configuration Requirements --> Detecting the Environment Detecting to ensure it's available (with attempts to enable the feature)

The main logic for this is in the

https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

It is recommended to use PVE's System and Hardware Requirements --> Environment Detection in this tutorial for one-click detection, or the following detection logic:

egrep -c '(vmx|svm)' /proc/cpuinfo if it is 1

cat /sys/module/kvm_intel/parameters/nested if it exists and is 1

lsmod | grep -q kvm if it is loaded.

If all of these are supported, choose the host type to be 100% problem-free, in other cases there may be unknown errors try it yourself.

Using ISO Image with VirtIO for VM Setup

1. Download the Image

Before installation, you need to download the image file via local(pve) --> ISO images --> Download from URL

For the download link (URL:), you can use files from: https://github.com/ILLKX/Windows-VirtIO

Enter win.iso as the File Name:

download

Click Download. After downloading is complete, you can see the file size of win.iso on the current page, confirming it's in ISO format.

downloaded

2. Setting Up the Template

Click Create VM in the top right corner of the page.

In the General window, select mypool for Resource Pool:, enter win for Name, then click Next.

general

In the OS window, select win.iso for ISO image. For Guest OS, select Microsoft Windows as the Type and choose the appropriate Version for your ISO. For example, if you downloaded Windows 2022, select 11/2022, then click Next.

OS

In the System window, select VirtIO-GPU for Graphic card, q35 for Machine, VirtIO SCSI for SCSI Controller, and Default (SeaBIOS) for BIOS, then click Next.

system

In the Disk window, select Write Back for Cache, enter your desired disk size in Disk size (GiB) (generally not less than 20), and choose the storage location in Storage. In this example, only the system disk local is available, so local is selected. Then click Next.

disk

In the CPU window, enter the number of cores needed in Cores, then click Next.

cpu

In the Memory window, enter the desired memory size in Memory (MiB), then click Next.

memory

In the Network window, select vmbr1 for Bridge, VirtIO (paravirtualized) for Model, uncheck Firewall, then click Next.

Network

In the Confirm window, click Finish.

finish

3. Graphical Installation Configuration

Click on the template you've set up on the left, click Start in the upper right corner to start the virtual machine, then click Console to enter the VNC interface and wait for the operating system to boot.

console

In the VNC, click Next, then Install now, then I don't have a product key, check Accept license, click Next, and then select Custom installation.

win0win1win2win3win4

If the image comes with VirtIO drivers, you should be able to see the available system storage disk and its size. Select it and click Next.

win5win6

Wait for the system to install. It may restart automatically several times and could take more than 10 minutes.

win7

After installation is complete, you'll be asked to set a password during first login.

win8

Once setup is complete, there's a pop-up box on the left side of the NOVNC page. Click the first button, then follow the login prompt by pressing Ctrl+Alt+last button to enter the login page.

4. Network Initialization

Since the PVE is set up with a static network through this project, you need to manually modify the bound IP address after logging in, rather than using DHCP.

Right-click in the bottom right corner of the desktop and select Open Network and Internet settings. In the settings page that appears, click Change adapter options. win9

In the Network Connections, select Ethernet and click Change settings of this connection. win10

In the popup window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties. win11

In the new dialog box, select Use the following IP address and enter: IP address(I): 172.16.1.xxx (replace xxx with your desired IP, I used 100 for convenience as my vmid is 100) Subnet mask(U): 255.255.255.0 Default gateway(D): 172.16.1.1

Then select Use the following DNS server addresses and enter:

8.8.8.8
-144.144.144.144

Click OK in the bottom right corner, and make sure Validate settings upon exit is NOT checked.

win12

Click OK and Yes for any other dialog boxes, and your virtual machine will now have network connectivity.

5. Unmounting the CD Drive

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Using ISO Images without VirtIO for VM Installation

1. Download Images

For Windows images without VirtIO, you can use:

https://github.com/ILLKX/Windows

For VirtIO ISO images, you can use:

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

Alternatively, you can download just the MSI package, package it into an ISO format locally, and then upload it to ProxmoxVE.

This way, the package is smaller. The official package contains support for all Windows images and is about 500MB, while a self-packaged one is around 5MB.

2. VirtIO Import

Note that in ProxmoxVE version 8.x and later, you can select VirtIO boot loading by default in the OS section, as shown in the image:

virtio

In lower versions of ProxmoxVE, such as 7.x and 6.x, you cannot select VirtIO boot loading by default in the OS section:

lower

You need to manually add CD/DVD Drive by clicking Add in the Hardware section and selecting the downloaded VirtIO ISO file:

lower

Then proceed as usual until you reach:

nodisk

At this point, you can't find the hard disk. You need to select Load Driver:

nodisk

Then select the VirtIO as your driver disk, click open, and import the corresponding system driver from the amd64 directory:

nodisk

I'm using a Windows Server 2019 image, so I imported the 2k19 driver. After importing, select the imported driver and click Next:

nodisk

nodisk

Now you should be able to see the hard disk. Select it and continue with the installation steps as in the previous tutorial until the system installation is complete and you reach the desktop.

3. Installing Drivers via virtio-win-guest-tools

Once successfully installed and at the desktop, you still need to manually install the drivers.

Open the VirtIO driver's CD drive directory. At the bottom, there's a virtio-win-guest-tools program that will install the required VirtIO drivers, including the VirtIO network card driver:

wk

wk

wk

After clicking install, the network card driver will be installed. For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

4. Installing Network Card Driver (Alternative)

After successful installation and reaching the desktop, you may still need to manually install the network card driver to connect to the network:

  1. Open Control PanelDevice Manager
  2. Find the Ethernet Controller, right-click and select Update Driver
  3. Select Browse my computer for driver software (R)
  4. Browse to the VirtIO driver's CD drive directory
  5. Open the NetKVM folder
  6. Select the driver folder corresponding to your current system version (like the above operation, I would choose the 2k19 folder with amd64 drivers)
  7. Confirm the installation, and after completion, the VirtIO network card driver will be successfully loaded

wk

wk

wk

For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

5. Unmounting the CD Drive

In the ProxmoxVE web interface, manually click on the corresponding CD in the Hardware section, select Remove, and then restart the virtual machine. This way, you can use it directly:

wk

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

',113)]))}const ee=o(G,[["render",H]]);export{Z as __pageData,ee as default}; diff --git a/assets/en_guide_pve_pve_windows.md.nzEI2uVe.lean.js b/assets/en_guide_pve_pve_windows.md.nzEI2uVe.lean.js deleted file mode 100644 index 119e0f37dc..0000000000 --- a/assets/en_guide_pve_pve_windows.md.nzEI2uVe.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t}from"./chunks/wk7.BpuwpIoq.js";import{_ as o,c as i,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const s="/assets/dlwiniso.BxXucu9m.png",r="/assets/dlwiniso1.CQyxWlSu.png",c="/assets/general.BkOp2iK4.png",d="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",p="/assets/disks.BJniy5pO.png",h="/assets/cpu.DedcVQ_T.png",m="/assets/memory.CH7Gxf76.png",g="/assets/network.DPXM5W42.png",u="/assets/finish.Cf6DgPp1.png",w="/assets/start.vjgB4hml.png",k="/assets/gic1.XkdPXihx.png",f="/assets/gic2.s5VB7-xp.png",v="/assets/gic3.2zLznATL.png",_="/assets/gic4.CX3t8C19.png",y="/assets/gic5.pjwHWuhn.png",I="/assets/gic6.BnmyenL0.png",b="/assets/gic7.ZYHWzF5W.png",C="/assets/gic8.BwCbmRgC.png",x="/assets/gic9.62-9wTBo.png",V="/assets/net1.CUyp8ayS.png",O="/assets/net2.BP2m5XnQ.png",S="/assets/net3.BJFg7Me5.png",P="/assets/net4.CANZtcPE.png",D="/assets/virtio.CUVhk14O.png",q="/assets/lower2.SPGPKJ4N.png",N="/assets/lower1.DFw6c1iw.png",M="/assets/nodisk.CH47I8Tu.png",T="/assets/nodisk1.gZ09o2py.png",U="/assets/nodisk2.Do6XEKMW.png",B="/assets/nodisk3.1vBQc75S.png",E="/assets/nodisk4.CJjHGgtp.png",W="/assets/wk4.K5XvE6uQ.png",z="/assets/wk5.BEJ5BAWW.png",A="/assets/wk6.D9MKwk3w.png",K="/assets/wk1.BGnwsbrE.png",L="/assets/wk2.BasdNK2d.png",F="/assets/wk3.CWstwLHH.png",Z=JSON.parse('{"title":"Setting Up Windows Visual Machine","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/pve/pve_windows.md","filePath":"en/guide/pve/pve_windows.md","lastUpdated":1772422214000}'),G={name:"en/guide/pve/pve_windows.md"};function H(X,e,R,Q,J,j){return n(),i("div",null,e[0]||(e[0]=[a("",113)]))}const ee=o(G,[["render",H]]);export{Z as __pageData,ee as default}; diff --git a/assets/en_incomplete_bashvm.md.B7Y_cvFp.js b/assets/en_incomplete_bashvm.md.7tk-ZEu5.js similarity index 90% rename from assets/en_incomplete_bashvm.md.B7Y_cvFp.js rename to assets/en_incomplete_bashvm.md.7tk-ZEu5.js index 29cd83895e..bc762c69f7 100644 --- a/assets/en_incomplete_bashvm.md.B7Y_cvFp.js +++ b/assets/en_incomplete_bashvm.md.7tk-ZEu5.js @@ -1 +1 @@ -import{_ as e,c as t,o,ag as r}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/bashvm.md","filePath":"en/incomplete/bashvm.md","lastUpdated":1772422214000}'),s={name:"en/incomplete/bashvm.md"};function n(i,a,p,h,d,l){return o(),t("div",null,a[0]||(a[0]=[r('

Repo

https://github.com/babywhale321/bashvm

https://bashvm.com/

Description

If you want to go deeper into how to open a VM and how to forward ports, then this program will start completely from the bottom and teach you step by step how to open a VM!

Disadvantages

Very tedious and time consuming, not as fast as other programs to set up a network and open a VM

',7)]))}const b=e(s,[["render",n]]);export{c as __pageData,b as default}; +import{_ as e,c as t,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/bashvm.md","filePath":"en/incomplete/bashvm.md","lastUpdated":1772424525000}'),s={name:"en/incomplete/bashvm.md"};function n(i,a,p,h,d,l){return o(),t("div",null,a[0]||(a[0]=[r('

Repo

https://github.com/babywhale321/bashvm

https://bashvm.com/

Description

If you want to go deeper into how to open a VM and how to forward ports, then this program will start completely from the bottom and teach you step by step how to open a VM!

Disadvantages

Very tedious and time consuming, not as fast as other programs to set up a network and open a VM

',7)]))}const b=e(s,[["render",n]]);export{c as __pageData,b as default}; diff --git a/assets/en_incomplete_bashvm.md.B7Y_cvFp.lean.js b/assets/en_incomplete_bashvm.md.7tk-ZEu5.lean.js similarity index 71% rename from assets/en_incomplete_bashvm.md.B7Y_cvFp.lean.js rename to assets/en_incomplete_bashvm.md.7tk-ZEu5.lean.js index 087d30c663..3dbbf21cb4 100644 --- a/assets/en_incomplete_bashvm.md.B7Y_cvFp.lean.js +++ b/assets/en_incomplete_bashvm.md.7tk-ZEu5.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o,ag as r}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/bashvm.md","filePath":"en/incomplete/bashvm.md","lastUpdated":1772422214000}'),s={name:"en/incomplete/bashvm.md"};function n(i,a,p,h,d,l){return o(),t("div",null,a[0]||(a[0]=[r("",7)]))}const b=e(s,[["render",n]]);export{c as __pageData,b as default}; +import{_ as e,c as t,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/bashvm.md","filePath":"en/incomplete/bashvm.md","lastUpdated":1772424525000}'),s={name:"en/incomplete/bashvm.md"};function n(i,a,p,h,d,l){return o(),t("div",null,a[0]||(a[0]=[r("",7)]))}const b=e(s,[["render",n]]);export{c as __pageData,b as default}; diff --git a/assets/en_incomplete_cockpit.md.DCpKTS7w.js b/assets/en_incomplete_cockpit.md.DCpKTS7w.js deleted file mode 100644 index 09bd31f56d..0000000000 --- a/assets/en_incomplete_cockpit.md.DCpKTS7w.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/cockpit.md","filePath":"en/incomplete/cockpit.md","lastUpdated":1772422214000}'),l={name:"en/incomplete/cockpit.md"};function n(h,s,p,o,r,c){return t(),i("div",null,s[0]||(s[0]=[e('

Repo

hits

https://github.com/oneclickvirt/cockpit

Installation

Supported Systems: Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

Install only with Podman containers

shell
bash install.sh --ct

Install only with virtual machines

shell
bash install.sh --vm

Panel Mount Only

shell
bash install.sh

Both container and VM dependencies are installed

shell
bash install.sh --all

Disadvantages

The network is self-configuring, the mirrors are self-importing, the ports are self-mapped, and there is just one more GUI interface than the command line.

Thanks

https://cockpit-project.org/running.html

',18)]))}const g=a(l,[["render",n]]);export{k as __pageData,g as default}; diff --git a/assets/en_incomplete_cockpit.md.DCpKTS7w.lean.js b/assets/en_incomplete_cockpit.md.DCpKTS7w.lean.js deleted file mode 100644 index 4e31268e21..0000000000 --- a/assets/en_incomplete_cockpit.md.DCpKTS7w.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/cockpit.md","filePath":"en/incomplete/cockpit.md","lastUpdated":1772422214000}'),l={name:"en/incomplete/cockpit.md"};function n(h,s,p,o,r,c){return t(),i("div",null,s[0]||(s[0]=[e("",18)]))}const g=a(l,[["render",n]]);export{k as __pageData,g as default}; diff --git a/assets/en_incomplete_cockpit.md.aU_2U-XH.js b/assets/en_incomplete_cockpit.md.aU_2U-XH.js new file mode 100644 index 0000000000..4f84224f8b --- /dev/null +++ b/assets/en_incomplete_cockpit.md.aU_2U-XH.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/cockpit.md","filePath":"en/incomplete/cockpit.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/cockpit.md"};function l(p,s,h,r,o,d){return e(),i("div",null,s[0]||(s[0]=[t('

Repo

hits

https://github.com/oneclickvirt/cockpit

Installation

Supported Systems: Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

Install only with Podman containers

shell
bash install.sh --ct

Install only with virtual machines

shell
bash install.sh --vm

Panel Mount Only

shell
bash install.sh

Both container and VM dependencies are installed

shell
bash install.sh --all

Disadvantages

The network is self-configuring, the mirrors are self-importing, the ports are self-mapped, and there is just one more GUI interface than the command line.

Thanks

https://cockpit-project.org/running.html

',18)]))}const u=a(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_incomplete_cockpit.md.aU_2U-XH.lean.js b/assets/en_incomplete_cockpit.md.aU_2U-XH.lean.js new file mode 100644 index 0000000000..6cd61d3bc3 --- /dev/null +++ b/assets/en_incomplete_cockpit.md.aU_2U-XH.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/cockpit.md","filePath":"en/incomplete/cockpit.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/cockpit.md"};function l(p,s,h,r,o,d){return e(),i("div",null,s[0]||(s[0]=[t("",18)]))}const u=a(n,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_incomplete_convoy.md.BnLEXvtr.js b/assets/en_incomplete_convoy.md.BnLEXvtr.js new file mode 100644 index 0000000000..a614429059 --- /dev/null +++ b/assets/en_incomplete_convoy.md.BnLEXvtr.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as s,ag as i}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/convoy.md","filePath":"en/incomplete/convoy.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/convoy.md"};function l(o,a,r,p,h,c){return s(),t("div",null,a[0]||(a[0]=[i('

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

One-click installation of convoy panel

Prerequisites for installation:

  • PVE is installed, but not the same node(not the same machine)
  • System is debian 11
  • CPU at least 2 cores, hard disk at least 20G, memory at least 4G (memory covers swap)

I don't guarantee that this script is error-free, it's just for my own amusement.

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

',13)]))}const m=e(n,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_incomplete_convoy.md.BnLEXvtr.lean.js b/assets/en_incomplete_convoy.md.BnLEXvtr.lean.js new file mode 100644 index 0000000000..28e9529d50 --- /dev/null +++ b/assets/en_incomplete_convoy.md.BnLEXvtr.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as s,ag as i}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/convoy.md","filePath":"en/incomplete/convoy.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/convoy.md"};function l(o,a,r,p,h,c){return s(),t("div",null,a[0]||(a[0]=[i("",13)]))}const m=e(n,[["render",l]]);export{k as __pageData,m as default}; diff --git a/assets/en_incomplete_convoy.md.Uri2ipsZ.js b/assets/en_incomplete_convoy.md.Uri2ipsZ.js deleted file mode 100644 index 89436e6ed4..0000000000 --- a/assets/en_incomplete_convoy.md.Uri2ipsZ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/convoy.md","filePath":"en/incomplete/convoy.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/convoy.md"};function o(l,a,r,p,h,c){return s(),e("div",null,a[0]||(a[0]=[i('

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

One-click installation of convoy panel

Prerequisites for installation:

  • PVE is installed, but not the same node(not the same machine)
  • System is debian 11
  • CPU at least 2 cores, hard disk at least 20G, memory at least 4G (memory covers swap)

I don't guarantee that this script is error-free, it's just for my own amusement.

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

',13)]))}const m=t(n,[["render",o]]);export{d as __pageData,m as default}; diff --git a/assets/en_incomplete_convoy.md.Uri2ipsZ.lean.js b/assets/en_incomplete_convoy.md.Uri2ipsZ.lean.js deleted file mode 100644 index 97b83ebaef..0000000000 --- a/assets/en_incomplete_convoy.md.Uri2ipsZ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/convoy.md","filePath":"en/incomplete/convoy.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/convoy.md"};function o(l,a,r,p,h,c){return s(),e("div",null,a[0]||(a[0]=[i("",13)]))}const m=t(n,[["render",o]]);export{d as __pageData,m as default}; diff --git a/assets/en_incomplete_index.md.ROTpedW8.js b/assets/en_incomplete_index.md.CMWZwnav.js similarity index 91% rename from assets/en_incomplete_index.md.ROTpedW8.js rename to assets/en_incomplete_index.md.CMWZwnav.js index f810982d0d..40e3378041 100644 --- a/assets/en_incomplete_index.md.ROTpedW8.js +++ b/assets/en_incomplete_index.md.CMWZwnav.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse(`{"title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","description":"","frontmatter":{"layout":"home","title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","hero":{"name":"Other Virtualization Projects","text":"Some incomplete virtualization projects","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"View Projects →","link":"/en/incomplete/webvirtcloud"}]},"features":[{"title":"Notes","details":"Each item in this block has a corresponding drawback, and each item is not as easy to use as the previous ones, and has a certain learning cost."},{"title":"Degree of difficulty","details":"Based on the difficulty of using the program itself, sorted from easiest to hardest, the further back you go the less guidance you'll get with this guide."},{"title":"Project disadvantages","details":"Each project has some drawbacks that result in it not being considered a complete one-click project, and there are some operations that require manual execution of commands that cannot be one-clicked."}]},"headers":[],"relativePath":"en/incomplete/index.md","filePath":"en/incomplete/index.md","lastUpdated":1772422214000}`),i={name:"en/incomplete/index.md"};function o(n,r,s,c,l,d){return a(),t("div")}const p=e(i,[["render",o]]);export{m as __pageData,p as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse(`{"title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","description":"","frontmatter":{"layout":"home","title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","hero":{"name":"Other Virtualization Projects","text":"Some incomplete virtualization projects","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"View Projects →","link":"/en/incomplete/webvirtcloud"}]},"features":[{"title":"Notes","details":"Each item in this block has a corresponding drawback, and each item is not as easy to use as the previous ones, and has a certain learning cost."},{"title":"Degree of difficulty","details":"Based on the difficulty of using the program itself, sorted from easiest to hardest, the further back you go the less guidance you'll get with this guide."},{"title":"Project disadvantages","details":"Each project has some drawbacks that result in it not being considered a complete one-click project, and there are some operations that require manual execution of commands that cannot be one-clicked."}]},"headers":[],"relativePath":"en/incomplete/index.md","filePath":"en/incomplete/index.md","lastUpdated":1772424525000}`),i={name:"en/incomplete/index.md"};function o(n,r,s,c,l,d){return a(),t("div")}const p=e(i,[["render",o]]);export{m as __pageData,p as default}; diff --git a/assets/en_incomplete_index.md.ROTpedW8.lean.js b/assets/en_incomplete_index.md.CMWZwnav.lean.js similarity index 91% rename from assets/en_incomplete_index.md.ROTpedW8.lean.js rename to assets/en_incomplete_index.md.CMWZwnav.lean.js index f810982d0d..40e3378041 100644 --- a/assets/en_incomplete_index.md.ROTpedW8.lean.js +++ b/assets/en_incomplete_index.md.CMWZwnav.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse(`{"title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","description":"","frontmatter":{"layout":"home","title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","hero":{"name":"Other Virtualization Projects","text":"Some incomplete virtualization projects","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"View Projects →","link":"/en/incomplete/webvirtcloud"}]},"features":[{"title":"Notes","details":"Each item in this block has a corresponding drawback, and each item is not as easy to use as the previous ones, and has a certain learning cost."},{"title":"Degree of difficulty","details":"Based on the difficulty of using the program itself, sorted from easiest to hardest, the further back you go the less guidance you'll get with this guide."},{"title":"Project disadvantages","details":"Each project has some drawbacks that result in it not being considered a complete one-click project, and there are some operations that require manual execution of commands that cannot be one-clicked."}]},"headers":[],"relativePath":"en/incomplete/index.md","filePath":"en/incomplete/index.md","lastUpdated":1772422214000}`),i={name:"en/incomplete/index.md"};function o(n,r,s,c,l,d){return a(),t("div")}const p=e(i,[["render",o]]);export{m as __pageData,p as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse(`{"title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","description":"","frontmatter":{"layout":"home","title":"Other Virtualization Projects","titleTemplate":"Other Incomplete Virtualization Projects","hero":{"name":"Other Virtualization Projects","text":"Some incomplete virtualization projects","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"View Projects →","link":"/en/incomplete/webvirtcloud"}]},"features":[{"title":"Notes","details":"Each item in this block has a corresponding drawback, and each item is not as easy to use as the previous ones, and has a certain learning cost."},{"title":"Degree of difficulty","details":"Based on the difficulty of using the program itself, sorted from easiest to hardest, the further back you go the less guidance you'll get with this guide."},{"title":"Project disadvantages","details":"Each project has some drawbacks that result in it not being considered a complete one-click project, and there are some operations that require manual execution of commands that cannot be one-clicked."}]},"headers":[],"relativePath":"en/incomplete/index.md","filePath":"en/incomplete/index.md","lastUpdated":1772424525000}`),i={name:"en/incomplete/index.md"};function o(n,r,s,c,l,d){return a(),t("div")}const p=e(i,[["render",o]]);export{m as __pageData,p as default}; diff --git a/assets/en_incomplete_pterodactyl.md.DfF3WZHL.js b/assets/en_incomplete_pterodactyl.md.DfF3WZHL.js deleted file mode 100644 index 41fcb76292..0000000000 --- a/assets/en_incomplete_pterodactyl.md.DfF3WZHL.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as a,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/pterodactyl.md","filePath":"en/incomplete/pterodactyl.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/pterodactyl.md"};function h(l,s,p,r,d,o){return a(),i("div",null,s[0]||(s[0]=[e('

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

After further research, it was found that creating servers and binding users is too cumbersome compared to using native Docker directly, so further development is currently suspended.

Description

Currently supported systems:

OS TypeVersion RangeNotes
Ubuntu20.04 (recommended), 22.04, 24.04Supported
Debian11 (Bullseye), 12 (Bookworm)Supported

Panel

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

On the wings side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

This will generate a command to be executed on the wings side.

After executing the generated command, wait for more than 20 seconds to avoid issues caused by unfinished initialization processes. Then on the wings side, run:

shell
bash install_wings.sh

Then go to http://<your_ip>/admin/nodes and you should see your node has been automatically added and managed, with a green heartbeat.

Thanks

https://pterodactyl.io/

',23)]))}const g=t(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/en_incomplete_pterodactyl.md.DfF3WZHL.lean.js b/assets/en_incomplete_pterodactyl.md.DfF3WZHL.lean.js deleted file mode 100644 index 8ac7d89ce5..0000000000 --- a/assets/en_incomplete_pterodactyl.md.DfF3WZHL.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as a,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/pterodactyl.md","filePath":"en/incomplete/pterodactyl.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/pterodactyl.md"};function h(l,s,p,r,d,o){return a(),i("div",null,s[0]||(s[0]=[e("",23)]))}const g=t(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/en_incomplete_pterodactyl.md.DuCiAjw4.js b/assets/en_incomplete_pterodactyl.md.DuCiAjw4.js new file mode 100644 index 0000000000..a2a4159b1d --- /dev/null +++ b/assets/en_incomplete_pterodactyl.md.DuCiAjw4.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/pterodactyl.md","filePath":"en/incomplete/pterodactyl.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/pterodactyl.md"};function l(h,s,p,r,d,o){return t(),a("div",null,s[0]||(s[0]=[e('

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

After further research, it was found that creating servers and binding users is too cumbersome compared to using native Docker directly, so further development is currently suspended.

Description

Currently supported systems:

OS TypeVersion RangeNotes
Ubuntu20.04 (recommended), 22.04, 24.04Supported
Debian11 (Bullseye), 12 (Bookworm)Supported

Panel

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

On the wings side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

This will generate a command to be executed on the wings side.

After executing the generated command, wait for more than 20 seconds to avoid issues caused by unfinished initialization processes. Then on the wings side, run:

shell
bash install_wings.sh

Then go to http://<your_ip>/admin/nodes and you should see your node has been automatically added and managed, with a green heartbeat.

Thanks

https://pterodactyl.io/

',23)]))}const g=i(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_incomplete_pterodactyl.md.DuCiAjw4.lean.js b/assets/en_incomplete_pterodactyl.md.DuCiAjw4.lean.js new file mode 100644 index 0000000000..2fdab00772 --- /dev/null +++ b/assets/en_incomplete_pterodactyl.md.DuCiAjw4.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/pterodactyl.md","filePath":"en/incomplete/pterodactyl.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/pterodactyl.md"};function l(h,s,p,r,d,o){return t(),a("div",null,s[0]||(s[0]=[e("",23)]))}const g=i(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_incomplete_virtfusion.md.7zslYcjH.js b/assets/en_incomplete_virtfusion.md.7zslYcjH.js new file mode 100644 index 0000000000..8d4263d642 --- /dev/null +++ b/assets/en_incomplete_virtfusion.md.7zslYcjH.js @@ -0,0 +1,7 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtfusion.md","filePath":"en/incomplete/virtfusion.md","lastUpdated":1772424525000}'),e={name:"en/incomplete/virtfusion.md"};function t(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[l(`

Official Documents

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

One-click Installation

debian11

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
+curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
+curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

Disadvantages

Only one 30-day trial certificate per server per mailbox, no permanent free certificates

Supports only amd64/x86_64 architectures

`,18)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default}; diff --git a/assets/en_incomplete_virtfusion.md.7zslYcjH.lean.js b/assets/en_incomplete_virtfusion.md.7zslYcjH.lean.js new file mode 100644 index 0000000000..dbe21e5e8b --- /dev/null +++ b/assets/en_incomplete_virtfusion.md.7zslYcjH.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtfusion.md","filePath":"en/incomplete/virtfusion.md","lastUpdated":1772424525000}'),e={name:"en/incomplete/virtfusion.md"};function t(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[l("",18)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default}; diff --git a/assets/en_incomplete_virtfusion.md.CVteYwBX.js b/assets/en_incomplete_virtfusion.md.CVteYwBX.js deleted file mode 100644 index 4c6cc9ddb4..0000000000 --- a/assets/en_incomplete_virtfusion.md.CVteYwBX.js +++ /dev/null @@ -1,7 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtfusion.md","filePath":"en/incomplete/virtfusion.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/virtfusion.md"};function e(h,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[l(`

Official Documents

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

One-click Installation

debian11

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

Disadvantages

Only one 30-day trial certificate per server per mailbox, no permanent free certificates

Supports only amd64/x86_64 architectures

`,18)]))}const c=i(n,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/en_incomplete_virtfusion.md.CVteYwBX.lean.js b/assets/en_incomplete_virtfusion.md.CVteYwBX.lean.js deleted file mode 100644 index 5dd0fb7bed..0000000000 --- a/assets/en_incomplete_virtfusion.md.CVteYwBX.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtfusion.md","filePath":"en/incomplete/virtfusion.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/virtfusion.md"};function e(h,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[l("",18)]))}const c=i(n,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/en_incomplete_virtualizor-docker.md.DHYC54sl.js b/assets/en_incomplete_virtualizor-docker.md.CYmV5ays.js similarity index 91% rename from assets/en_incomplete_virtualizor-docker.md.DHYC54sl.js rename to assets/en_incomplete_virtualizor-docker.md.CYmV5ays.js index 2a76d7a634..1e95dab6e5 100644 --- a/assets/en_incomplete_virtualizor-docker.md.DHYC54sl.js +++ b/assets/en_incomplete_virtualizor-docker.md.CYmV5ays.js @@ -1 +1 @@ -import{_ as t,c as a,o,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtualizor-docker.md","filePath":"en/incomplete/virtualizor-docker.md","lastUpdated":1772422214000}'),i={name:"en/incomplete/virtualizor-docker.md"};function n(s,e,d,l,p,c){return o(),a("div",null,e[0]||(e[0]=[r('

Repo

https://github.com/ivstiv/virtualizor-docker

Description

The virtualizor opened in the docker

The certificate used is a trial certificate, valid for one day, and only the OpenVZ virtualization method is installed by default

Disadvantages

There is no community, so you have to figure it out on your own.

Ports for admin panel Don't look at the script's prompt messages, go with the repository instructions.

',8)]))}const m=t(i,[["render",n]]);export{u as __pageData,m as default}; +import{_ as t,c as a,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtualizor-docker.md","filePath":"en/incomplete/virtualizor-docker.md","lastUpdated":1772424525000}'),i={name:"en/incomplete/virtualizor-docker.md"};function n(s,e,d,l,p,c){return o(),a("div",null,e[0]||(e[0]=[r('

Repo

https://github.com/ivstiv/virtualizor-docker

Description

The virtualizor opened in the docker

The certificate used is a trial certificate, valid for one day, and only the OpenVZ virtualization method is installed by default

Disadvantages

There is no community, so you have to figure it out on your own.

Ports for admin panel Don't look at the script's prompt messages, go with the repository instructions.

',8)]))}const m=t(i,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_incomplete_virtualizor-docker.md.DHYC54sl.lean.js b/assets/en_incomplete_virtualizor-docker.md.CYmV5ays.lean.js similarity index 73% rename from assets/en_incomplete_virtualizor-docker.md.DHYC54sl.lean.js rename to assets/en_incomplete_virtualizor-docker.md.CYmV5ays.lean.js index 80cf35f6bc..409fb8d8e0 100644 --- a/assets/en_incomplete_virtualizor-docker.md.DHYC54sl.lean.js +++ b/assets/en_incomplete_virtualizor-docker.md.CYmV5ays.lean.js @@ -1 +1 @@ -import{_ as t,c as a,o,ag as r}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtualizor-docker.md","filePath":"en/incomplete/virtualizor-docker.md","lastUpdated":1772422214000}'),i={name:"en/incomplete/virtualizor-docker.md"};function n(s,e,d,l,p,c){return o(),a("div",null,e[0]||(e[0]=[r("",8)]))}const m=t(i,[["render",n]]);export{u as __pageData,m as default}; +import{_ as t,c as a,o,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/virtualizor-docker.md","filePath":"en/incomplete/virtualizor-docker.md","lastUpdated":1772424525000}'),i={name:"en/incomplete/virtualizor-docker.md"};function n(s,e,d,l,p,c){return o(),a("div",null,e[0]||(e[0]=[r("",8)]))}const m=t(i,[["render",n]]);export{u as __pageData,m as default}; diff --git a/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.js b/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.js new file mode 100644 index 0000000000..386d533e37 --- /dev/null +++ b/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.js @@ -0,0 +1,45 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/admin.DfyN1XBs.png",l="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",F=JSON.parse('{"title":"WebVirtCloud Installation Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud.md","filePath":"en/incomplete/webvirtcloud.md","lastUpdated":1772424525000}'),r={name:"en/incomplete/webvirtcloud.md"};function h(o,s,d,k,c,g){return e(),a("div",null,s[0]||(s[0]=[n('

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

The original official deleted the project is no longer maintained, here can only be deployed with my personal fixes and changes to the code.

Rendering display

admin

user

1. Controller Installation

System Requirements

Minimum Requirements:

  • CPU: 1 core
  • Memory: 1 GB RAM
  • Storage: 10 GB free space
  • System: Debian11+, Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

Default Login Information

  • Username: admin@spiritlhl.net
  • Password: admin

Panel Access

  • User Panel: https://192-168-0-114.nip.io
  • Admin Backend: https://192-168-0-114.nip.io/admin

Note: Replace 192.168.0.114 with your public IP to get the actual accessible address.

Installation Command

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
+&& chmod +x install_webvirt_cloud.sh \\
+&& bash install_webvirt_cloud.sh

TIP

The execution process may be stuck in the clone repository has not been moving, at this time, press ctrl + c to exit the implementation, re-execution of the installation script on the line, the Department of Docker installation is stuck in the stage of the build project.

2. Compute Node Installation

Important: Hypervisor and Controller cannot be installed on the same virtual machine, otherwise network conflicts will occur.

System Requirements

Recommended Configuration:

  • CPU: 2 cores
  • Memory: 4 GB RAM
  • Storage: 40 GB free space
  • System: AlmaLinux8+, RockyLinux8+

Additional Notes:

  • Higher configurations are recommended for actual use; the test environment is only sufficient for running 4 minimal virtual machines.
  • Servers with KVM nested virtualization support are recommended. If VM-x/AMD-V/Hyper-V is not enabled, it will automatically switch to QEMU using TCG emulation to set up virtual machines, though performance will be reduced.
  • The installation skips environment checks and uses binary files directly, so no dependencies need to be installed.

Environment Check

Check if the server supports KVM nested virtualization:

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

Select hardware individual test

Compute Node Installation Steps

  1. Download the installation script:

    bash
    curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    +&& chmod +x install_hypervisor.sh
  2. Execute installation (replace with your Controller IP):

    bash
    bash install_hypervisor.sh x.x.x.x

    Replace x.x.x.x with the actual IP address of your Controller.

  3. Node Management in Panel
    After execution, there will be prompts for information needed in the Controller panel.
    In the panel, the Hostname to be entered is the current compute node's IPv4 address, and you need to enter the Token to identify the node.

NetworkManager Version Issue

During installation, you may encounter the following error:

Connection 'eth0' (bed050e9-ff49-4665-8112-24ddf2a1cd3c) successfully deleted.
+Warning: nmcli (1.48.10) and NetworkManager (1.42.2) versions don't match. Restarting NetworkManager is advised.
+Error: Failed to add 'br-ext' connection: connection.autoconnect-ports: unknown property

Solution: Restart the server and re-execute the installation command.

Installation Time Note

  • The entire process takes approximately 10-25 minutes.
  • Most of the time is spent downloading finnix-125.iso to /var/lib/libvirt/isos/finnix-125.iso.
  • This part cannot be accelerated, so it's recommended to use tmux or screen to prevent interruption.

Adding Compute Node to Control Panel

After installation, a Token will be generated for adding the compute node in the control panel (Admin panel):

Path: Admin Panel > Computers > Add Computer

  • HostName should be filled with the compute node's public IPv4 address
  • Token should be filled with the token key obtained on the compute node

3. Public IPv4 Port Mapping

3.1 Automatic Mapping

Automatic mapping features:

  • Automatic Monitoring: Real-time monitoring of virtual machine status changes, automatically applying or cleaning up port mapping rules
  • Intelligent Port Allocation: Automatically calculating and allocating non-conflicting ports based on VM IP addresses
  • Rule Persistence: Using firewall-cmd to ensure port mapping rules remain effective after host restart
  • Mapping Records: Automatically maintaining mapping information records for easy viewing and management
  • Conflict Prevention: Intelligently detecting and avoiding port conflicts, ensuring each VM has unique port mappings

Installation Method

  1. Download the script to a temporary directory:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh
  2. Add execution permission:

    bash
    chmod +x /tmp/vm_port_mapping_setup.sh
  3. Run the installer:

    bash
    /tmp/vm_port_mapping_setup.sh

The script will automatically complete the following operations:

  • Copy itself to the system directory /usr/local/sbin/vm_port_mapping_daemon.sh
  • Create a systemd service unit file
  • Enable and start the service

Port Mapping Rules

The daemon will assign the following ports for each virtual machine:

  1. SSH Port:

    • Calculation formula: (Last segment of IP) × 100 + 22 + 10000
    • Example: For IP address 192.168.33.114, the mapped SSH port is 114×100+22+10000 = 21422
  2. Extra Ports:

    • 10 additional ports are allocated for each VM
    • Starting port: 20000 + (Last segment of IP) × 100
    • Ending port: Starting port + 9
    • Example: For IP address 192.168.33.114, extra port range is 20000+(114×100) to 20000+(114×100)+9

If the calculated port is already occupied, the program will automatically find the next available port to ensure no conflicts occur.

Mapping File

All port mapping information is saved in the /etc/vm_port_mapping/mapping.txt file, in the format:

VM name IP address MAC address SSH mapped port Extra ports start Extra ports end

This can be viewed using the following command

shell
cat /etc/vm_port_mapping/mapping.txt

For example:

Virtance-1 192.168.33.114 52:54:00:5f:77:92 21422 31400 31409

Service Management

  • Check service status:

    bash
    systemctl status vm-port-mapping
  • Start service:

    bash
    systemctl start vm-port-mapping
  • Stop service:

    bash
    systemctl stop vm-port-mapping
  • Disable auto-start:

    bash
    systemctl disable vm-port-mapping
  • View logs:

    bash
    journalctl -u vm-port-mapping
    +# or
    +cat /var/log/vm_port_mapping.log
  • Manually trigger rule update:

    bash
    systemctl restart vm-port-mapping

Common Issues

Port mapping not working

Check the following:

  • Confirm the service is running: systemctl status vm-port-mapping
  • Check the log file: cat /var/log/vm_port_mapping.log
  • Ensure the firewall service is normal: systemctl status firewalld
  • Verify VM network interface configuration: virsh domiflist VM-name
Manually adding mapping rules

Usually, manual addition of rules is not needed, but if necessary:

  1. Stop the service:

    bash
    systemctl stop vm-port-mapping
  2. Edit the mapping file:

    bash
    nano /etc/vm_port_mapping/mapping.txt
  3. Start the service:

    bash
    systemctl start vm-port-mapping
Cleaning all rules
bash
systemctl stop vm-port-mapping
+grep -f /etc/vm_port_mapping/mapping.txt | while read -r vm_name ip_address mac ssh_port port_start port_end; do
+  firewall-cmd --permanent --remove-forward-port="port=$ssh_port:proto=tcp:toport=22:toaddr=$ip_address"
+  for ((port=port_start; port<=port_end; port++)); do
+    firewall-cmd --permanent --remove-forward-port="port=$port:proto=tcp:toport=$port:toaddr=$ip_address"
+  done
+done
+firewall-cmd --reload
Security Recommendations
  • Regularly check mapping files and logs to ensure there are no unauthorized mappings
  • Do not manually modify files in the /etc/vm_port_mapping/ directory unless you fully understand the impact
  • Make sure the firewalld service is running properly so that rules can be correctly persisted

Uninstallation Method

To uninstall this service:

bash
systemctl stop vm-port-mapping
+systemctl disable vm-port-mapping
+rm -f /etc/systemd/system/vm-port-mapping.service
+rm -f /usr/local/sbin/vm_port_mapping_daemon.sh
+rm -rf /etc/vm_port_mapping
+systemctl daemon-reload

3.2 Manual Mapping

Assume your virtual machine is shown in the user control panel as

wv1

and the host machine command ip a | head -n 15 result is

shell
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
+    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+    inet 127.0.0.1/8 scope host lo
+       valid_lft forever preferred_lft forever
+    inet6 ::1/128 scope host
+       valid_lft forever preferred_lft forever
+2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
+    link/ether 52:54:00:f1:d6:8b brd ff:ff:ff:ff:ff:ff
+    altname enp0s3
+    inet your_public_IPv4_address/corresponding_subnet_mask scope global noprefixroute ens3
+       valid_lft forever preferred_lft forever
+    inet6 2a0b:4140:4c60::2/48 scope global noprefixroute
+       valid_lft forever preferred_lft forever
+    inet6 fe80::5054:ff:fef1:d68b/64 scope link noprefixroute
+       valid_lft forever preferred_lft forever

It's evident that the public IPv4 address is bound to the ens3 interface, so we'll use ens3 in the following commands.

To map the current VM's port 22 to the public IPv4's port 3322, use:

shell
# Add DNAT rule: Forward public 3322 traffic to host local 192.168.33.130:22
+iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 3322 -j DNAT --to-destination 192.168.33.130:22
+# Add POSTROUTING: Local NAT masquerading for normal return connections
+iptables -t nat -A POSTROUTING -p tcp -d 192.168.33.130 --dport 22 -j MASQUERADE
+# Need to allow INPUT port 3322 through (firewalld is enabled by default)
+iptables -I INPUT -p tcp --dport 3322 -j ACCEPT

This way, the internal virtual machine is mapped out and can be remotely logged in directly.

4. Troubleshooting

Compute Node Addition Error Troubleshooting

Execute on the Controller:

shell
telnet <node ip> 8884

Execute on the compute node:

shell
systemctl status webvirtcompute
+systemctl status libvirtd
+systemctl status prometheus
+systemctl status prometheus-libvirt-exporter

If none of the above reveals the problem, then you need to execute on the Controller:

shell
docker exec -it webvirtcloud-backend /bin/sh
+vi webvirtcloud/settings/production.py

Change DEBUG=False to DEBUG=True, save the file, then execute in the container:

shell
UV_PROJECT_ENVIRONMENT=/usr/local uv sync --dev

Then exit the container and execute:

shell
docker restart webvirtcloud-backend
+sleep 3
+docker logs webvirtcloud-backend -f

Then trigger the error in the frontend, and you'll see the corresponding error in the real-time loaded logs.

Docker Containers Not Auto-Restarting After Controller Reboot

If Docker containers don't automatically restart after system reboot, execute:

bash
docker start $(docker ps -a -q)

5. Drawbacks

System images are hard-coded; you can't use your own custom images, nor export them for use.

This is not the same project as https://github.com/retspen/webvirtcloud, don't confuse them.

`,104)]))}const m=i(r,[["render",h]]);export{F as __pageData,m as default}; diff --git a/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.lean.js b/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.lean.js new file mode 100644 index 0000000000..8680853b0a --- /dev/null +++ b/assets/en_incomplete_webvirtcloud.md.6vLBPYN0.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/admin.DfyN1XBs.png",l="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",F=JSON.parse('{"title":"WebVirtCloud Installation Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud.md","filePath":"en/incomplete/webvirtcloud.md","lastUpdated":1772424525000}'),r={name:"en/incomplete/webvirtcloud.md"};function h(o,s,d,k,c,g){return e(),a("div",null,s[0]||(s[0]=[n("",104)]))}const m=i(r,[["render",h]]);export{F as __pageData,m as default}; diff --git a/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.js b/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.js deleted file mode 100644 index 22e1f98e31..0000000000 --- a/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.js +++ /dev/null @@ -1,45 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const n="/assets/admin.DfyN1XBs.png",l="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",u=JSON.parse('{"title":"WebVirtCloud Installation Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud.md","filePath":"en/incomplete/webvirtcloud.md","lastUpdated":1772422214000}'),h={name:"en/incomplete/webvirtcloud.md"};function r(o,s,k,d,c,g){return t(),a("div",null,s[0]||(s[0]=[e('

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

The original official deleted the project is no longer maintained, here can only be deployed with my personal fixes and changes to the code.

Rendering display

admin

user

1. Controller Installation

System Requirements

Minimum Requirements:

  • CPU: 1 core
  • Memory: 1 GB RAM
  • Storage: 10 GB free space
  • System: Debian11+, Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

Default Login Information

  • Username: admin@spiritlhl.net
  • Password: admin

Panel Access

  • User Panel: https://192-168-0-114.nip.io
  • Admin Backend: https://192-168-0-114.nip.io/admin

Note: Replace 192.168.0.114 with your public IP to get the actual accessible address.

Installation Command

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
-&& chmod +x install_webvirt_cloud.sh \\
-&& bash install_webvirt_cloud.sh

TIP

The execution process may be stuck in the clone repository has not been moving, at this time, press ctrl + c to exit the implementation, re-execution of the installation script on the line, the Department of Docker installation is stuck in the stage of the build project.

2. Compute Node Installation

Important: Hypervisor and Controller cannot be installed on the same virtual machine, otherwise network conflicts will occur.

System Requirements

Recommended Configuration:

  • CPU: 2 cores
  • Memory: 4 GB RAM
  • Storage: 40 GB free space
  • System: AlmaLinux8+, RockyLinux8+

Additional Notes:

  • Higher configurations are recommended for actual use; the test environment is only sufficient for running 4 minimal virtual machines.
  • Servers with KVM nested virtualization support are recommended. If VM-x/AMD-V/Hyper-V is not enabled, it will automatically switch to QEMU using TCG emulation to set up virtual machines, though performance will be reduced.
  • The installation skips environment checks and uses binary files directly, so no dependencies need to be installed.

Environment Check

Check if the server supports KVM nested virtualization:

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

Select hardware individual test

Compute Node Installation Steps

  1. Download the installation script:

    bash
    curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    -&& chmod +x install_hypervisor.sh
  2. Execute installation (replace with your Controller IP):

    bash
    bash install_hypervisor.sh x.x.x.x

    Replace x.x.x.x with the actual IP address of your Controller.

  3. Node Management in Panel
    After execution, there will be prompts for information needed in the Controller panel.
    In the panel, the Hostname to be entered is the current compute node's IPv4 address, and you need to enter the Token to identify the node.

NetworkManager Version Issue

During installation, you may encounter the following error:

Connection 'eth0' (bed050e9-ff49-4665-8112-24ddf2a1cd3c) successfully deleted.
-Warning: nmcli (1.48.10) and NetworkManager (1.42.2) versions don't match. Restarting NetworkManager is advised.
-Error: Failed to add 'br-ext' connection: connection.autoconnect-ports: unknown property

Solution: Restart the server and re-execute the installation command.

Installation Time Note

  • The entire process takes approximately 10-25 minutes.
  • Most of the time is spent downloading finnix-125.iso to /var/lib/libvirt/isos/finnix-125.iso.
  • This part cannot be accelerated, so it's recommended to use tmux or screen to prevent interruption.

Adding Compute Node to Control Panel

After installation, a Token will be generated for adding the compute node in the control panel (Admin panel):

Path: Admin Panel > Computers > Add Computer

  • HostName should be filled with the compute node's public IPv4 address
  • Token should be filled with the token key obtained on the compute node

3. Public IPv4 Port Mapping

3.1 Automatic Mapping

Automatic mapping features:

  • Automatic Monitoring: Real-time monitoring of virtual machine status changes, automatically applying or cleaning up port mapping rules
  • Intelligent Port Allocation: Automatically calculating and allocating non-conflicting ports based on VM IP addresses
  • Rule Persistence: Using firewall-cmd to ensure port mapping rules remain effective after host restart
  • Mapping Records: Automatically maintaining mapping information records for easy viewing and management
  • Conflict Prevention: Intelligently detecting and avoiding port conflicts, ensuring each VM has unique port mappings

Installation Method

  1. Download the script to a temporary directory:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh
  2. Add execution permission:

    bash
    chmod +x /tmp/vm_port_mapping_setup.sh
  3. Run the installer:

    bash
    /tmp/vm_port_mapping_setup.sh

The script will automatically complete the following operations:

  • Copy itself to the system directory /usr/local/sbin/vm_port_mapping_daemon.sh
  • Create a systemd service unit file
  • Enable and start the service

Port Mapping Rules

The daemon will assign the following ports for each virtual machine:

  1. SSH Port:

    • Calculation formula: (Last segment of IP) × 100 + 22 + 10000
    • Example: For IP address 192.168.33.114, the mapped SSH port is 114×100+22+10000 = 21422
  2. Extra Ports:

    • 10 additional ports are allocated for each VM
    • Starting port: 20000 + (Last segment of IP) × 100
    • Ending port: Starting port + 9
    • Example: For IP address 192.168.33.114, extra port range is 20000+(114×100) to 20000+(114×100)+9

If the calculated port is already occupied, the program will automatically find the next available port to ensure no conflicts occur.

Mapping File

All port mapping information is saved in the /etc/vm_port_mapping/mapping.txt file, in the format:

VM name IP address MAC address SSH mapped port Extra ports start Extra ports end

This can be viewed using the following command

shell
cat /etc/vm_port_mapping/mapping.txt

For example:

Virtance-1 192.168.33.114 52:54:00:5f:77:92 21422 31400 31409

Service Management

  • Check service status:

    bash
    systemctl status vm-port-mapping
  • Start service:

    bash
    systemctl start vm-port-mapping
  • Stop service:

    bash
    systemctl stop vm-port-mapping
  • Disable auto-start:

    bash
    systemctl disable vm-port-mapping
  • View logs:

    bash
    journalctl -u vm-port-mapping
    -# or
    -cat /var/log/vm_port_mapping.log
  • Manually trigger rule update:

    bash
    systemctl restart vm-port-mapping

Common Issues

Port mapping not working

Check the following:

  • Confirm the service is running: systemctl status vm-port-mapping
  • Check the log file: cat /var/log/vm_port_mapping.log
  • Ensure the firewall service is normal: systemctl status firewalld
  • Verify VM network interface configuration: virsh domiflist VM-name
Manually adding mapping rules

Usually, manual addition of rules is not needed, but if necessary:

  1. Stop the service:

    bash
    systemctl stop vm-port-mapping
  2. Edit the mapping file:

    bash
    nano /etc/vm_port_mapping/mapping.txt
  3. Start the service:

    bash
    systemctl start vm-port-mapping
Cleaning all rules
bash
systemctl stop vm-port-mapping
-grep -f /etc/vm_port_mapping/mapping.txt | while read -r vm_name ip_address mac ssh_port port_start port_end; do
-  firewall-cmd --permanent --remove-forward-port="port=$ssh_port:proto=tcp:toport=22:toaddr=$ip_address"
-  for ((port=port_start; port<=port_end; port++)); do
-    firewall-cmd --permanent --remove-forward-port="port=$port:proto=tcp:toport=$port:toaddr=$ip_address"
-  done
-done
-firewall-cmd --reload
Security Recommendations
  • Regularly check mapping files and logs to ensure there are no unauthorized mappings
  • Do not manually modify files in the /etc/vm_port_mapping/ directory unless you fully understand the impact
  • Make sure the firewalld service is running properly so that rules can be correctly persisted

Uninstallation Method

To uninstall this service:

bash
systemctl stop vm-port-mapping
-systemctl disable vm-port-mapping
-rm -f /etc/systemd/system/vm-port-mapping.service
-rm -f /usr/local/sbin/vm_port_mapping_daemon.sh
-rm -rf /etc/vm_port_mapping
-systemctl daemon-reload

3.2 Manual Mapping

Assume your virtual machine is shown in the user control panel as

wv1

and the host machine command ip a | head -n 15 result is

shell
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
-    inet 127.0.0.1/8 scope host lo
-       valid_lft forever preferred_lft forever
-    inet6 ::1/128 scope host
-       valid_lft forever preferred_lft forever
-2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
-    link/ether 52:54:00:f1:d6:8b brd ff:ff:ff:ff:ff:ff
-    altname enp0s3
-    inet your_public_IPv4_address/corresponding_subnet_mask scope global noprefixroute ens3
-       valid_lft forever preferred_lft forever
-    inet6 2a0b:4140:4c60::2/48 scope global noprefixroute
-       valid_lft forever preferred_lft forever
-    inet6 fe80::5054:ff:fef1:d68b/64 scope link noprefixroute
-       valid_lft forever preferred_lft forever

It's evident that the public IPv4 address is bound to the ens3 interface, so we'll use ens3 in the following commands.

To map the current VM's port 22 to the public IPv4's port 3322, use:

shell
# Add DNAT rule: Forward public 3322 traffic to host local 192.168.33.130:22
-iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 3322 -j DNAT --to-destination 192.168.33.130:22
-# Add POSTROUTING: Local NAT masquerading for normal return connections
-iptables -t nat -A POSTROUTING -p tcp -d 192.168.33.130 --dport 22 -j MASQUERADE
-# Need to allow INPUT port 3322 through (firewalld is enabled by default)
-iptables -I INPUT -p tcp --dport 3322 -j ACCEPT

This way, the internal virtual machine is mapped out and can be remotely logged in directly.

4. Troubleshooting

Compute Node Addition Error Troubleshooting

Execute on the Controller:

shell
telnet <node ip> 8884

Execute on the compute node:

shell
systemctl status webvirtcompute
-systemctl status libvirtd
-systemctl status prometheus
-systemctl status prometheus-libvirt-exporter

If none of the above reveals the problem, then you need to execute on the Controller:

shell
docker exec -it webvirtcloud-backend /bin/sh
-vi webvirtcloud/settings/production.py

Change DEBUG=False to DEBUG=True, save the file, then execute in the container:

shell
UV_PROJECT_ENVIRONMENT=/usr/local uv sync --dev

Then exit the container and execute:

shell
docker restart webvirtcloud-backend
-sleep 3
-docker logs webvirtcloud-backend -f

Then trigger the error in the frontend, and you'll see the corresponding error in the real-time loaded logs.

Docker Containers Not Auto-Restarting After Controller Reboot

If Docker containers don't automatically restart after system reboot, execute:

bash
docker start $(docker ps -a -q)

5. Drawbacks

System images are hard-coded; you can't use your own custom images, nor export them for use.

This is not the same project as https://github.com/retspen/webvirtcloud, don't confuse them.

`,104)]))}const m=i(h,[["render",r]]);export{u as __pageData,m as default}; diff --git a/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.lean.js b/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.lean.js deleted file mode 100644 index 748a509495..0000000000 --- a/assets/en_incomplete_webvirtcloud.md.DVqrZ1Rb.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const n="/assets/admin.DfyN1XBs.png",l="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",u=JSON.parse('{"title":"WebVirtCloud Installation Guide","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud.md","filePath":"en/incomplete/webvirtcloud.md","lastUpdated":1772422214000}'),h={name:"en/incomplete/webvirtcloud.md"};function r(o,s,k,d,c,g){return t(),a("div",null,s[0]||(s[0]=[e("",104)]))}const m=i(h,[["render",r]]);export{u as __pageData,m as default}; diff --git a/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.js b/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.js deleted file mode 100644 index 9e43b61b6c..0000000000 --- a/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.CSeR4K32.js";const n="/assets/vcr1.NRLOOynQ.jpg",o="/assets/vcr2.DC9j-Ib5.jpg",l="/assets/vcr3.Ea5Km6nQ.jpg",p="/assets/vcr4.B9DOiqQ8.jpg",r="/assets/vcr5.BajXu8XE.jpg",c="/assets/vcr6.CxN-b1o3.jpg",d="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",g="/assets/vcr9.B4apCqgi.jpg",u="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",k="/assets/vcr12.BNQe5j_u.jpg",v="/assets/vcr13.JV3PfcCZ.jpg",b="/assets/deadimage.BBBzAqkc.jpg",y="/assets/vcr14.Cjyr65Qp.jpg",f="/assets/resize.ppnxVOAW.jpg",q=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud_retspen.md","filePath":"en/incomplete/webvirtcloud_retspen.md","lastUpdated":1772422214000}'),_={name:"en/incomplete/webvirtcloud_retspen.md"};function F(w,e,C,B,x,j){return i(),s("div",null,e[0]||(e[0]=[a(`

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository::https://github.com/oneclickvirt/webvirtcloud_retspen

Controller Node and Computer Node Installation

  • Supported Systems: Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • Recommended system: Debian12+, Ubuntu22.04+.
  • Lower versions of the system will automatically compile the new version of python installation package before deployment, so it is recommended to use a new system without compiling directly installed!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
-&& chmod +x install_webvirt_cloud_retspen.sh \\
-&& bash install_webvirt_cloud_retspen.sh

After installation is complete, open the public IP address to access the login page.

The default login username and password are both admin. Make sure to change them after logging in.

Creating a Linux Virtual Machine

After entering the control panel and changing the admin password, you need to manually configure a compute node.

vcr1

Select the type as Local, and name it local.

vcr2

After creation, click the eye icon to enter the view.

vcr3

Under the Storage section, add a storage entry. Choose the type Dir and name it local. If you need to use an ISO for system boot, you’ll need to create a storage of type ISO. If not, just follow this guide and create only the Dir type.

vcr4

vcr5

After creation, download the appropriate qcow2 image for the system using the repository below:

https://github.com/oneclickvirt/pve_kvm_images/releases/tag/images

In the example, a Debian 12 qcow2 image is used:

shell
cd /var/lib/libvirt/images
-wget https://github.com/oneclickvirt/pve_kvm_images/releases/download/images/debian12.qcow2
-chmod 777 debian12.qcow2

Return to the instance page to create a new instance.

vcr6

Select local as the compute node.

vcr7

The default chipset is fine; changing it is optional.

vcr8

You can use predefined sizes for the virtual machine or customize it, depending on your preference.

vcr9

Note: the instance name must not duplicate the system name. For example, you cannot use debian12 as the instance name in this case.

vcr10

After successful creation, do not power it on immediately.

vcr11

You need to modify the disk settings first.

vcr12

Change the disk file to debian12.qcow2, which matches the qcow2 image you previously downloaded.

vcr13

After the modification is confirmed you will see a redundant disk in the local volume of the original compute node's storage, such as test.qcow2 here, which is best deleted to avoid hogging the disk

deadimage

Once confirmed and configured correctly, return to the power page and turn on the VM.

vcr14

The default login for the image is:

  • Username: root
  • Password: password or oneclickvirt

After booting, you will find that the hard disk is only the size of the original image, at this time you need to adjust the size of the hard disk, you need to shut down the computer again, at this time, you can see the buttons on the following page is available and the size of the hard disk is also recognized.

Without the first boot, the size of the hard disk is not recognized, recognition can not be modified, so the first switch is necessary.

resize

After the modification and restart the virtual machine, you will find that there is new disk space unallocated, at this time you need to follow the following method resize disk.

Check the disk path and remaining blank space unallocated:

shell
lsblk

Then use the following command to resizeen the disk

shell
fdisk /dev/vda

Do this in the following order:

Type d to delete the old partition (yes, you need to delete the old vda1, no data will be lost as it will not be formatted later).

Type n and enter to create a new partition.

Select primary for type (default p) and just enter.

Partition number is also 1.

The start position must be the same as the old partition (default is right), just press enter.

Show if you want to erase fingerprints, type Y and enter.

Press enter at the end position to use all the remaining space.

Type w to save and exit.

At this point, use lsblk to confirm that the new free disk has been successfully allocated.

Disadvantages

Networking is not auto-configured — not as smart as the previous project — you still need to configure it manually.

You need to be in the VNC of the opened VM, logged in and execute

shell
systemctl enable cloud-init
-reboot

Manually enable the configuration to self-start after reboot, then reboot the server and you have internet.

`,68)]))}const A=t(_,[["render",F]]);export{q as __pageData,A as default}; diff --git a/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.lean.js b/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.lean.js deleted file mode 100644 index f272c7b427..0000000000 --- a/assets/en_incomplete_webvirtcloud_retspen.md.BdNwnRZf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as s,o as i,ag as a}from"./chunks/framework.CSeR4K32.js";const n="/assets/vcr1.NRLOOynQ.jpg",o="/assets/vcr2.DC9j-Ib5.jpg",l="/assets/vcr3.Ea5Km6nQ.jpg",p="/assets/vcr4.B9DOiqQ8.jpg",r="/assets/vcr5.BajXu8XE.jpg",c="/assets/vcr6.CxN-b1o3.jpg",d="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",g="/assets/vcr9.B4apCqgi.jpg",u="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",k="/assets/vcr12.BNQe5j_u.jpg",v="/assets/vcr13.JV3PfcCZ.jpg",b="/assets/deadimage.BBBzAqkc.jpg",y="/assets/vcr14.Cjyr65Qp.jpg",f="/assets/resize.ppnxVOAW.jpg",q=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud_retspen.md","filePath":"en/incomplete/webvirtcloud_retspen.md","lastUpdated":1772422214000}'),_={name:"en/incomplete/webvirtcloud_retspen.md"};function F(w,e,C,B,x,j){return i(),s("div",null,e[0]||(e[0]=[a("",68)]))}const A=t(_,[["render",F]]);export{q as __pageData,A as default}; diff --git a/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.js b/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.js new file mode 100644 index 0000000000..6e1e1b5b9c --- /dev/null +++ b/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.js @@ -0,0 +1,6 @@ +import{_ as s,c as t,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/vcr1.NRLOOynQ.jpg",o="/assets/vcr2.DC9j-Ib5.jpg",l="/assets/vcr3.Ea5Km6nQ.jpg",r="/assets/vcr4.B9DOiqQ8.jpg",p="/assets/vcr5.BajXu8XE.jpg",d="/assets/vcr6.CxN-b1o3.jpg",c="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",g="/assets/vcr9.B4apCqgi.jpg",u="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",k="/assets/vcr12.BNQe5j_u.jpg",b="/assets/vcr13.JV3PfcCZ.jpg",v="/assets/deadimage.BBBzAqkc.jpg",y="/assets/vcr14.Cjyr65Qp.jpg",f="/assets/resize.ppnxVOAW.jpg",E=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud_retspen.md","filePath":"en/incomplete/webvirtcloud_retspen.md","lastUpdated":1772424525000}'),_={name:"en/incomplete/webvirtcloud_retspen.md"};function w(F,e,C,B,z,x){return i(),t("div",null,e[0]||(e[0]=[a(`

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository::https://github.com/oneclickvirt/webvirtcloud_retspen

Controller Node and Computer Node Installation

  • Supported Systems: Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • Recommended system: Debian12+, Ubuntu22.04+.
  • Lower versions of the system will automatically compile the new version of python installation package before deployment, so it is recommended to use a new system without compiling directly installed!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
+&& chmod +x install_webvirt_cloud_retspen.sh \\
+&& bash install_webvirt_cloud_retspen.sh

After installation is complete, open the public IP address to access the login page.

The default login username and password are both admin. Make sure to change them after logging in.

Creating a Linux Virtual Machine

After entering the control panel and changing the admin password, you need to manually configure a compute node.

vcr1

Select the type as Local, and name it local.

vcr2

After creation, click the eye icon to enter the view.

vcr3

Under the Storage section, add a storage entry. Choose the type Dir and name it local. If you need to use an ISO for system boot, you’ll need to create a storage of type ISO. If not, just follow this guide and create only the Dir type.

vcr4

vcr5

After creation, download the appropriate qcow2 image for the system using the repository below:

https://github.com/oneclickvirt/pve_kvm_images/releases/tag/images

In the example, a Debian 12 qcow2 image is used:

shell
cd /var/lib/libvirt/images
+wget https://github.com/oneclickvirt/pve_kvm_images/releases/download/images/debian12.qcow2
+chmod 777 debian12.qcow2

Return to the instance page to create a new instance.

vcr6

Select local as the compute node.

vcr7

The default chipset is fine; changing it is optional.

vcr8

You can use predefined sizes for the virtual machine or customize it, depending on your preference.

vcr9

Note: the instance name must not duplicate the system name. For example, you cannot use debian12 as the instance name in this case.

vcr10

After successful creation, do not power it on immediately.

vcr11

You need to modify the disk settings first.

vcr12

Change the disk file to debian12.qcow2, which matches the qcow2 image you previously downloaded.

vcr13

After the modification is confirmed you will see a redundant disk in the local volume of the original compute node's storage, such as test.qcow2 here, which is best deleted to avoid hogging the disk

deadimage

Once confirmed and configured correctly, return to the power page and turn on the VM.

vcr14

The default login for the image is:

  • Username: root
  • Password: password or oneclickvirt

After booting, you will find that the hard disk is only the size of the original image, at this time you need to adjust the size of the hard disk, you need to shut down the computer again, at this time, you can see the buttons on the following page is available and the size of the hard disk is also recognized.

Without the first boot, the size of the hard disk is not recognized, recognition can not be modified, so the first switch is necessary.

resize

After the modification and restart the virtual machine, you will find that there is new disk space unallocated, at this time you need to follow the following method resize disk.

Check the disk path and remaining blank space unallocated:

shell
lsblk

Then use the following command to resizeen the disk

shell
fdisk /dev/vda

Do this in the following order:

Type d to delete the old partition (yes, you need to delete the old vda1, no data will be lost as it will not be formatted later).

Type n and enter to create a new partition.

Select primary for type (default p) and just enter.

Partition number is also 1.

The start position must be the same as the old partition (default is right), just press enter.

Show if you want to erase fingerprints, type Y and enter.

Press enter at the end position to use all the remaining space.

Type w to save and exit.

At this point, use lsblk to confirm that the new free disk has been successfully allocated.

Disadvantages

Networking is not auto-configured — not as smart as the previous project — you still need to configure it manually.

You need to be in the VNC of the opened VM, logged in and execute

shell
systemctl enable cloud-init
+reboot

Manually enable the configuration to self-start after reboot, then reboot the server and you have internet.

`,68)]))}const q=s(_,[["render",w]]);export{E as __pageData,q as default}; diff --git a/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.lean.js b/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.lean.js new file mode 100644 index 0000000000..5f15b2d51d --- /dev/null +++ b/assets/en_incomplete_webvirtcloud_retspen.md.NfY8LdF5.lean.js @@ -0,0 +1 @@ +import{_ as s,c as t,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const n="/assets/vcr1.NRLOOynQ.jpg",o="/assets/vcr2.DC9j-Ib5.jpg",l="/assets/vcr3.Ea5Km6nQ.jpg",r="/assets/vcr4.B9DOiqQ8.jpg",p="/assets/vcr5.BajXu8XE.jpg",d="/assets/vcr6.CxN-b1o3.jpg",c="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",g="/assets/vcr9.B4apCqgi.jpg",u="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",k="/assets/vcr12.BNQe5j_u.jpg",b="/assets/vcr13.JV3PfcCZ.jpg",v="/assets/deadimage.BBBzAqkc.jpg",y="/assets/vcr14.Cjyr65Qp.jpg",f="/assets/resize.ppnxVOAW.jpg",E=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtcloud_retspen.md","filePath":"en/incomplete/webvirtcloud_retspen.md","lastUpdated":1772424525000}'),_={name:"en/incomplete/webvirtcloud_retspen.md"};function w(F,e,C,B,z,x){return i(),t("div",null,e[0]||(e[0]=[a("",68)]))}const q=s(_,[["render",w]]);export{E as __pageData,q as default}; diff --git a/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.js b/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.js deleted file mode 100644 index 5717615b50..0000000000 --- a/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.js +++ /dev/null @@ -1,3 +0,0 @@ -import{_ as i,c as e,o as a,ag as s}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtmgr.md","filePath":"en/incomplete/webvirtmgr.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/webvirtmgr.md"};function l(r,t,o,h,p,d){return a(),e("div",null,t[0]||(t[0]=[s(`

WebVirtMgr Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository: https://github.com/retspen/webvirtmgr

Control nodes and compute nodes installed at the same time

  • Supported systems: Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • The system will automatically compile python 2.7 installer and then deployed, there will be an error in the compilation process but do not pay attention to it, as long as the scripts are still running, it means that everything is fine!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
-&& chmod +x install_webvirtmgr.sh \\
-&& bash install_webvirtmgr.sh

Disadvantages

The origin project is no longer maintained and is not recommended at all.

`,9)]))}const g=i(n,[["render",l]]);export{m as __pageData,g as default}; diff --git a/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.lean.js b/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.lean.js deleted file mode 100644 index 2fc499e520..0000000000 --- a/assets/en_incomplete_webvirtmgr.md.ByGC7MIC.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as s}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtmgr.md","filePath":"en/incomplete/webvirtmgr.md","lastUpdated":1772422214000}'),n={name:"en/incomplete/webvirtmgr.md"};function l(r,t,o,h,p,d){return a(),e("div",null,t[0]||(t[0]=[s("",9)]))}const g=i(n,[["render",l]]);export{m as __pageData,g as default}; diff --git a/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.js b/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.js new file mode 100644 index 0000000000..2fd5441df0 --- /dev/null +++ b/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.js @@ -0,0 +1,3 @@ +import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtmgr.md","filePath":"en/incomplete/webvirtmgr.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/webvirtmgr.md"};function l(r,t,o,p,h,d){return a(),i("div",null,t[0]||(t[0]=[s(`

WebVirtMgr Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository: https://github.com/retspen/webvirtmgr

Control nodes and compute nodes installed at the same time

  • Supported systems: Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • The system will automatically compile python 2.7 installer and then deployed, there will be an error in the compilation process but do not pay attention to it, as long as the scripts are still running, it means that everything is fine!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
+&& chmod +x install_webvirtmgr.sh \\
+&& bash install_webvirtmgr.sh

Disadvantages

The origin project is no longer maintained and is not recommended at all.

`,9)]))}const g=e(n,[["render",l]]);export{m as __pageData,g as default}; diff --git a/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.lean.js b/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.lean.js new file mode 100644 index 0000000000..1ec07cc6ae --- /dev/null +++ b/assets/en_incomplete_webvirtmgr.md.DdlBuLO9.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,o as a,ag as s}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/incomplete/webvirtmgr.md","filePath":"en/incomplete/webvirtmgr.md","lastUpdated":1772424525000}'),n={name:"en/incomplete/webvirtmgr.md"};function l(r,t,o,p,h,d){return a(),i("div",null,t[0]||(t[0]=[s("",9)]))}const g=e(n,[["render",l]]);export{m as __pageData,g as default}; diff --git a/assets/en_index.md.5EfnhCNh.js b/assets/en_index.md.BrEPoFob.js similarity index 93% rename from assets/en_index.md.5EfnhCNh.js rename to assets/en_index.md.BrEPoFob.js index 2640d47aa9..a7ad27e3dc 100644 --- a/assets/en_index.md.5EfnhCNh.js +++ b/assets/en_index.md.BrEPoFob.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse(`{"title":"K'thun","titleTemplate":"One Click Virtualization","description":"","frontmatter":{"layout":"home","title":"K'thun","titleTemplate":"One Click Virtualization","tagline":"Open source, easy to use server virtualization project","hero":{"name":"One Click Virtualization","text":"Open source, easy to use server virtualization project","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Learn More →","link":"/en/guide/dashboard"}]},"features":[{"title":"One Click Use","details":"Supports one-click command installation and use, easy to create virtual machines or containers on X86_64 and ARM architecture servers"},{"title":"Based on mainstream systems development","details":"Based on long-term maintenance releases of Debian, Ubuntu, Centos, etc., there is always a way to virtualize containers or virtual machines, no matter what the system is."},{"title":"Port forwarding and IP assignment automation","details":"Self-contained internal and external port forwarding and automatic IP address allocation (including IPV6、IPV4), including TCP, UDP, VNC, RDP and other protocols, without manual management"},{"title":"Batch Virtualization","details":"Supports batch opening of containers or virtual machines using KVM, LXC, Docker virtualization"},{"title":"Multi-system and multi-environment support","details":"Open containers or virtual machines that support mainstream systems, including Linux, Windows, MacOS, Android as well as pure browser or desktop environments."},{"title":"Self-limiting abuse","details":"Some virtualized containers or VMs support the setting of masks and loading limits to avoid being used for abuse."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772422214000}`),n={name:"en/index.md"};function i(o,s,r,l,c,d){return a(),t("div")}const p=e(n,[["render",i]]);export{m as __pageData,p as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse(`{"title":"K'thun","titleTemplate":"One Click Virtualization","description":"","frontmatter":{"layout":"home","title":"K'thun","titleTemplate":"One Click Virtualization","tagline":"Open source, easy to use server virtualization project","hero":{"name":"One Click Virtualization","text":"Open source, easy to use server virtualization project","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Learn More →","link":"/en/guide/dashboard"}]},"features":[{"title":"One Click Use","details":"Supports one-click command installation and use, easy to create virtual machines or containers on X86_64 and ARM architecture servers"},{"title":"Based on mainstream systems development","details":"Based on long-term maintenance releases of Debian, Ubuntu, Centos, etc., there is always a way to virtualize containers or virtual machines, no matter what the system is."},{"title":"Port forwarding and IP assignment automation","details":"Self-contained internal and external port forwarding and automatic IP address allocation (including IPV6、IPV4), including TCP, UDP, VNC, RDP and other protocols, without manual management"},{"title":"Batch Virtualization","details":"Supports batch opening of containers or virtual machines using KVM, LXC, Docker virtualization"},{"title":"Multi-system and multi-environment support","details":"Open containers or virtual machines that support mainstream systems, including Linux, Windows, MacOS, Android as well as pure browser or desktop environments."},{"title":"Self-limiting abuse","details":"Some virtualized containers or VMs support the setting of masks and loading limits to avoid being used for abuse."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772424525000}`),n={name:"en/index.md"};function i(o,s,r,l,c,d){return a(),t("div")}const p=e(n,[["render",i]]);export{m as __pageData,p as default}; diff --git a/assets/en_index.md.5EfnhCNh.lean.js b/assets/en_index.md.BrEPoFob.lean.js similarity index 93% rename from assets/en_index.md.5EfnhCNh.lean.js rename to assets/en_index.md.BrEPoFob.lean.js index 2640d47aa9..a7ad27e3dc 100644 --- a/assets/en_index.md.5EfnhCNh.lean.js +++ b/assets/en_index.md.BrEPoFob.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse(`{"title":"K'thun","titleTemplate":"One Click Virtualization","description":"","frontmatter":{"layout":"home","title":"K'thun","titleTemplate":"One Click Virtualization","tagline":"Open source, easy to use server virtualization project","hero":{"name":"One Click Virtualization","text":"Open source, easy to use server virtualization project","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Learn More →","link":"/en/guide/dashboard"}]},"features":[{"title":"One Click Use","details":"Supports one-click command installation and use, easy to create virtual machines or containers on X86_64 and ARM architecture servers"},{"title":"Based on mainstream systems development","details":"Based on long-term maintenance releases of Debian, Ubuntu, Centos, etc., there is always a way to virtualize containers or virtual machines, no matter what the system is."},{"title":"Port forwarding and IP assignment automation","details":"Self-contained internal and external port forwarding and automatic IP address allocation (including IPV6、IPV4), including TCP, UDP, VNC, RDP and other protocols, without manual management"},{"title":"Batch Virtualization","details":"Supports batch opening of containers or virtual machines using KVM, LXC, Docker virtualization"},{"title":"Multi-system and multi-environment support","details":"Open containers or virtual machines that support mainstream systems, including Linux, Windows, MacOS, Android as well as pure browser or desktop environments."},{"title":"Self-limiting abuse","details":"Some virtualized containers or VMs support the setting of masks and loading limits to avoid being used for abuse."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772422214000}`),n={name:"en/index.md"};function i(o,s,r,l,c,d){return a(),t("div")}const p=e(n,[["render",i]]);export{m as __pageData,p as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse(`{"title":"K'thun","titleTemplate":"One Click Virtualization","description":"","frontmatter":{"layout":"home","title":"K'thun","titleTemplate":"One Click Virtualization","tagline":"Open source, easy to use server virtualization project","hero":{"name":"One Click Virtualization","text":"Open source, easy to use server virtualization project","image":"https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"Learn More →","link":"/en/guide/dashboard"}]},"features":[{"title":"One Click Use","details":"Supports one-click command installation and use, easy to create virtual machines or containers on X86_64 and ARM architecture servers"},{"title":"Based on mainstream systems development","details":"Based on long-term maintenance releases of Debian, Ubuntu, Centos, etc., there is always a way to virtualize containers or virtual machines, no matter what the system is."},{"title":"Port forwarding and IP assignment automation","details":"Self-contained internal and external port forwarding and automatic IP address allocation (including IPV6、IPV4), including TCP, UDP, VNC, RDP and other protocols, without manual management"},{"title":"Batch Virtualization","details":"Supports batch opening of containers or virtual machines using KVM, LXC, Docker virtualization"},{"title":"Multi-system and multi-environment support","details":"Open containers or virtual machines that support mainstream systems, including Linux, Windows, MacOS, Android as well as pure browser or desktop environments."},{"title":"Self-limiting abuse","details":"Some virtualized containers or VMs support the setting of masks and loading limits to avoid being used for abuse."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1772424525000}`),n={name:"en/index.md"};function i(o,s,r,l,c,d){return a(),t("div")}const p=e(n,[["render",i]]);export{m as __pageData,p as default}; diff --git a/assets/guide_block_block_docker.md.DO91YDdH.js b/assets/guide_block_block_docker.md.Ch6FJWSI.js similarity index 81% rename from assets/guide_block_block_docker.md.DO91YDdH.js rename to assets/guide_block_block_docker.md.Ch6FJWSI.js index 5fd89a1aa0..ff0fcfb24a 100644 --- a/assets/guide_block_block_docker.md.DO91YDdH.js +++ b/assets/guide_block_block_docker.md.Ch6FJWSI.js @@ -1 +1 @@ -import{_ as o,c as t,o as r,j as a,a as c}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"待开发,敬请期待","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_docker.md","filePath":"guide/block/block_docker.md","lastUpdated":1772422214000}'),d={name:"guide/block/block_docker.md"};function l(s,e,n,i,k,p){return r(),t("div",null,e[0]||(e[0]=[a("h1",{id:"待开发-敬请期待",tabindex:"-1"},[c("待开发,敬请期待 "),a("a",{class:"header-anchor",href:"#待开发-敬请期待","aria-label":'Permalink to "待开发,敬请期待"'},"​")],-1)]))}const b=o(d,[["render",l]]);export{m as __pageData,b as default}; +import{_ as o,c as t,o as r,j as a,a as c}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"待开发,敬请期待","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_docker.md","filePath":"guide/block/block_docker.md","lastUpdated":1772424525000}'),d={name:"guide/block/block_docker.md"};function l(s,e,n,i,k,p){return r(),t("div",null,e[0]||(e[0]=[a("h1",{id:"待开发-敬请期待",tabindex:"-1"},[c("待开发,敬请期待 "),a("a",{class:"header-anchor",href:"#待开发-敬请期待","aria-label":'Permalink to "待开发,敬请期待"'},"​")],-1)]))}const b=o(d,[["render",l]]);export{m as __pageData,b as default}; diff --git a/assets/guide_block_block_docker.md.DO91YDdH.lean.js b/assets/guide_block_block_docker.md.Ch6FJWSI.lean.js similarity index 81% rename from assets/guide_block_block_docker.md.DO91YDdH.lean.js rename to assets/guide_block_block_docker.md.Ch6FJWSI.lean.js index 5fd89a1aa0..ff0fcfb24a 100644 --- a/assets/guide_block_block_docker.md.DO91YDdH.lean.js +++ b/assets/guide_block_block_docker.md.Ch6FJWSI.lean.js @@ -1 +1 @@ -import{_ as o,c as t,o as r,j as a,a as c}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"待开发,敬请期待","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_docker.md","filePath":"guide/block/block_docker.md","lastUpdated":1772422214000}'),d={name:"guide/block/block_docker.md"};function l(s,e,n,i,k,p){return r(),t("div",null,e[0]||(e[0]=[a("h1",{id:"待开发-敬请期待",tabindex:"-1"},[c("待开发,敬请期待 "),a("a",{class:"header-anchor",href:"#待开发-敬请期待","aria-label":'Permalink to "待开发,敬请期待"'},"​")],-1)]))}const b=o(d,[["render",l]]);export{m as __pageData,b as default}; +import{_ as o,c as t,o as r,j as a,a as c}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"待开发,敬请期待","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_docker.md","filePath":"guide/block/block_docker.md","lastUpdated":1772424525000}'),d={name:"guide/block/block_docker.md"};function l(s,e,n,i,k,p){return r(),t("div",null,e[0]||(e[0]=[a("h1",{id:"待开发-敬请期待",tabindex:"-1"},[c("待开发,敬请期待 "),a("a",{class:"header-anchor",href:"#待开发-敬请期待","aria-label":'Permalink to "待开发,敬请期待"'},"​")],-1)]))}const b=o(d,[["render",l]]);export{m as __pageData,b as default}; diff --git a/assets/guide_block_block_incus.md.D0lVhDxA.js b/assets/guide_block_block_incus.md.D0lVhDxA.js deleted file mode 100644 index f6c10cc96d..0000000000 --- a/assets/guide_block_block_incus.md.D0lVhDxA.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_incus.md","filePath":"guide/block/block_incus.md","lastUpdated":1772422214000}'),l={name:"guide/block/block_incus.md"};function e(n,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h('

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',13)]))}const F=i(l,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_incus.md.D0lVhDxA.lean.js b/assets/guide_block_block_incus.md.D0lVhDxA.lean.js deleted file mode 100644 index 4dca8966ba..0000000000 --- a/assets/guide_block_block_incus.md.D0lVhDxA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_incus.md","filePath":"guide/block/block_incus.md","lastUpdated":1772422214000}'),l={name:"guide/block/block_incus.md"};function e(n,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h("",13)]))}const F=i(l,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_incus.md.DrzhoJQy.js b/assets/guide_block_block_incus.md.DrzhoJQy.js new file mode 100644 index 0000000000..e3d92c93af --- /dev/null +++ b/assets/guide_block_block_incus.md.DrzhoJQy.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as l,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_incus.md","filePath":"guide/block/block_incus.md","lastUpdated":1772424525000}'),n={name:"guide/block/block_incus.md"};function t(h,s,p,r,k,d){return l(),a("div",null,s[0]||(s[0]=[e('

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',13)]))}const F=i(n,[["render",t]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_incus.md.DrzhoJQy.lean.js b/assets/guide_block_block_incus.md.DrzhoJQy.lean.js new file mode 100644 index 0000000000..e05c255465 --- /dev/null +++ b/assets/guide_block_block_incus.md.DrzhoJQy.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as l,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_incus.md","filePath":"guide/block/block_incus.md","lastUpdated":1772424525000}'),n={name:"guide/block/block_incus.md"};function t(h,s,p,r,k,d){return l(),a("div",null,s[0]||(s[0]=[e("",13)]))}const F=i(n,[["render",t]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_iptables.md.ChFFJPHH.lean.js b/assets/guide_block_block_iptables.md.ChFFJPHH.lean.js deleted file mode 100644 index 85c632c7f0..0000000000 --- a/assets/guide_block_block_iptables.md.ChFFJPHH.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"通过iptables屏蔽滥用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_iptables.md","filePath":"guide/block/block_iptables.md","lastUpdated":1772422214000}'),p={name:"guide/block/block_iptables.md"};function l(h,s,e,k,o,F){return n(),i("div",null,s[0]||(s[0]=[t("",37)]))}const c=a(p,[["render",l]]);export{r as __pageData,c as default}; diff --git a/assets/guide_block_block_iptables.md.ChFFJPHH.js b/assets/guide_block_block_iptables.md.Dx4FHQiC.js similarity index 50% rename from assets/guide_block_block_iptables.md.ChFFJPHH.js rename to assets/guide_block_block_iptables.md.Dx4FHQiC.js index 8d37eb66e7..0225f72eac 100644 --- a/assets/guide_block_block_iptables.md.ChFFJPHH.js +++ b/assets/guide_block_block_iptables.md.Dx4FHQiC.js @@ -1,4 +1,4 @@ -import{_ as a,c as i,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"通过iptables屏蔽滥用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_iptables.md","filePath":"guide/block/block_iptables.md","lastUpdated":1772422214000}'),p={name:"guide/block/block_iptables.md"};function l(h,s,e,k,o,F){return n(),i("div",null,s[0]||(s[0]=[t(`

通过iptables屏蔽滥用

iptables的基础使用说明

1. 启动 iptables

在大多数 Linux 发行版中,iptables 服务可以通过以下命令启动:

bash
sudo systemctl start iptables

2. 设置规则

在启动 iptables 后,可以设置相应的规则来屏蔽滥用流量。例如,以下命令将阻止来自特定IPV4地址的流量:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. 查询规则

设置完规则后,可以使用以下命令查看当前的 iptables 规则:

bash
sudo iptables -L

这将列出所有输入、输出和转发的规则。

4. 停止 iptables

如果需要停止 iptables 服务,可以使用以下命令:

bash
sudo systemctl stop iptables

5. 保存规则

为了确保在重启后规则依然生效,可以保存当前的规则:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. 恢复规则

在需要恢复规则时,可以使用以下命令:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. 其他常用命令

  • 列出规则(详细信息)

    bash
    sudo iptables -L -v
  • 删除特定规则

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • 清空所有规则

    bash
    sudo iptables -F

在宿主机上屏蔽滥用行为

屏蔽挖矿行为

strings=(
+import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"通过iptables屏蔽滥用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_iptables.md","filePath":"guide/block/block_iptables.md","lastUpdated":1772424525000}'),l={name:"guide/block/block_iptables.md"};function e(t,s,h,r,k,d){return i(),n("div",null,s[0]||(s[0]=[p(`

通过iptables屏蔽滥用

iptables的基础使用说明

1. 启动 iptables

在大多数 Linux 发行版中,iptables 服务可以通过以下命令启动:

bash
sudo systemctl start iptables

2. 设置规则

在启动 iptables 后,可以设置相应的规则来屏蔽滥用流量。例如,以下命令将阻止来自特定IPV4地址的流量:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. 查询规则

设置完规则后,可以使用以下命令查看当前的 iptables 规则:

bash
sudo iptables -L

这将列出所有输入、输出和转发的规则。

4. 停止 iptables

如果需要停止 iptables 服务,可以使用以下命令:

bash
sudo systemctl stop iptables

5. 保存规则

为了确保在重启后规则依然生效,可以保存当前的规则:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. 恢复规则

在需要恢复规则时,可以使用以下命令:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. 其他常用命令

  • 列出规则(详细信息)

    bash
    sudo iptables -L -v
  • 删除特定规则

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • 清空所有规则

    bash
    sudo iptables -F

在宿主机上屏蔽滥用行为

屏蔽挖矿行为

strings=(
     "ethermine.com"
     "ethermine.org"
     "antpool.one"
@@ -40,7 +40,7 @@ import{_ as a,c as i,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const r
 iptables -C OUTPUT -j MINING_BLOCK 2>/dev/null || iptables -A OUTPUT -j MINING_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A MINING_BLOCK -m string --string "$str" --algo bm -j DROP
-done

屏蔽BT行为

shell
strings=(
+done

屏蔽BT行为

shell
strings=(
     "BitTorrent"
     "BitTorrent protocol"
     "BitTorrent protocol\\x13"
@@ -69,7 +69,7 @@ import{_ as a,c as i,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const r
 iptables -C OUTPUT -j BT_BLOCK 2>/dev/null || iptables -A OUTPUT -j BT_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A BT_BLOCK -m string --string "$str" --algo bm -j DROP
-done

屏蔽测速行为

shell
strings=(
+done

屏蔽测速行为

shell
strings=(
     "speedtest"
     "fast.com"
     "speedtest.net"
@@ -96,10 +96,10 @@ import{_ as a,c as i,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const r
 iptables -C OUTPUT -j SPEED_BLOCK 2>/dev/null || iptables -A OUTPUT -j SPEED_BLOCK
 for str in "\${strings[@]}"; do
     iptables -A SPEED_BLOCK -m string --string "$str" --algo bm -j DROP
-done

解除屏蔽行为

解除挖矿限制

shell
iptables -D OUTPUT -j MINING_BLOCK
+done

解除屏蔽行为

解除挖矿限制

shell
iptables -D OUTPUT -j MINING_BLOCK
 iptables -F MINING_BLOCK
-iptables -X MINING_BLOCK

解除BT限制

shell
iptables -D OUTPUT -j BT_BLOCK
+iptables -X MINING_BLOCK

解除BT限制

shell
iptables -D OUTPUT -j BT_BLOCK
 iptables -F BT_BLOCK
-iptables -X BT_BLOCK

解除测速限制

shell
iptables -D OUTPUT -j SPEED_BLOCK
+iptables -X BT_BLOCK

解除测速限制

shell
iptables -D OUTPUT -j SPEED_BLOCK
 iptables -F SPEED_BLOCK
-iptables -X SPEED_BLOCK
`,37)]))}const c=a(p,[["render",l]]);export{r as __pageData,c as default}; +iptables -X SPEED_BLOCK
`,37)]))}const c=a(l,[["render",e]]);export{u as __pageData,c as default}; diff --git a/assets/guide_block_block_iptables.md.Dx4FHQiC.lean.js b/assets/guide_block_block_iptables.md.Dx4FHQiC.lean.js new file mode 100644 index 0000000000..de45d0392e --- /dev/null +++ b/assets/guide_block_block_iptables.md.Dx4FHQiC.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"通过iptables屏蔽滥用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_iptables.md","filePath":"guide/block/block_iptables.md","lastUpdated":1772424525000}'),l={name:"guide/block/block_iptables.md"};function e(t,s,h,r,k,d){return i(),n("div",null,s[0]||(s[0]=[p("",37)]))}const c=a(l,[["render",e]]);export{u as __pageData,c as default}; diff --git a/assets/guide_block_block_lxd.md.CX2Rj6-w.js b/assets/guide_block_block_lxd.md.CX2Rj6-w.js deleted file mode 100644 index 742ea8ef3f..0000000000 --- a/assets/guide_block_block_lxd.md.CX2Rj6-w.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as l,ag as t}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_lxd.md","filePath":"guide/block/block_lxd.md","lastUpdated":1772422214000}'),h={name:"guide/block/block_lxd.md"};function e(n,s,p,k,r,d){return l(),a("div",null,s[0]||(s[0]=[t('

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',13)]))}const F=i(h,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_lxd.md.CX2Rj6-w.lean.js b/assets/guide_block_block_lxd.md.CX2Rj6-w.lean.js deleted file mode 100644 index cf96faec1f..0000000000 --- a/assets/guide_block_block_lxd.md.CX2Rj6-w.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as l,ag as t}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_lxd.md","filePath":"guide/block/block_lxd.md","lastUpdated":1772422214000}'),h={name:"guide/block/block_lxd.md"};function e(n,s,p,k,r,d){return l(),a("div",null,s[0]||(s[0]=[t("",13)]))}const F=i(h,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_lxd.md.bAOyt_Yn.js b/assets/guide_block_block_lxd.md.bAOyt_Yn.js new file mode 100644 index 0000000000..3acd01159b --- /dev/null +++ b/assets/guide_block_block_lxd.md.bAOyt_Yn.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as l,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_lxd.md","filePath":"guide/block/block_lxd.md","lastUpdated":1772424525000}'),t={name:"guide/block/block_lxd.md"};function h(n,s,p,r,k,d){return l(),a("div",null,s[0]||(s[0]=[e('

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
',13)]))}const F=i(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_lxd.md.bAOyt_Yn.lean.js b/assets/guide_block_block_lxd.md.bAOyt_Yn.lean.js new file mode 100644 index 0000000000..21f5bc8b4e --- /dev/null +++ b/assets/guide_block_block_lxd.md.bAOyt_Yn.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as l,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"通过shell脚本屏蔽滥用行为","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_lxd.md","filePath":"guide/block/block_lxd.md","lastUpdated":1772424525000}'),t={name:"guide/block/block_lxd.md"};function h(n,s,p,r,k,d){return l(),a("div",null,s[0]||(s[0]=[e("",13)]))}const F=i(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/guide_block_block_pve.md.D9jjCIrc.js b/assets/guide_block_block_pve.md.D9jjCIrc.js new file mode 100644 index 0000000000..a867cc8153 --- /dev/null +++ b/assets/guide_block_block_pve.md.D9jjCIrc.js @@ -0,0 +1,4 @@ +import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const x=JSON.parse('{"title":"通过设置防火墙限制虚拟机使用的IP避免盗用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_pve.md","filePath":"guide/block/block_pve.md","lastUpdated":1772424525000}'),n={name:"guide/block/block_pve.md"};function l(p,s,r,o,c,d){return i(),e("div",null,s[0]||(s[0]=[t(`

通过设置防火墙限制虚拟机使用的IP避免盗用

在PVE的宿主机下创建以下文件

shell
/etc/pve/firewall/<VMID>.fw
+
+[IPSET ipfilter-<net0>]
+xxx.xxx.xxx.xxx

<VMID>替换为虚拟机的VMID数字,<net0>替换为网络设备中对应的别名(一般不用修改,除非你限制的IPV6),xxx.xxx.xxx.xxx替换为公网IP地址,注意此IP对应前面的网络设备。

这里的意思是net0只能使用xxx.xxx.xxx.xxx这个IP,如果使用其他的IP数据将会被丢弃,从而达到限制虚拟机只能使用此IP的目的。

这里可以有多个IP,一旦启用此规则该VM就无法使用除此之外的任何IP,如果你没有写IPv6地址则代表该VM无法使用IPv6地址。

TIP

本设置仅推荐在开设非NAT全端口映射的独立IP的虚拟机时使用,否则可能导致奇奇怪怪的问题造成服务器没网。

该方法不适合开设任何NAT虚拟机/容器的PVE上使用。

`,8)]))}const k=a(n,[["render",l]]);export{x as __pageData,k as default}; diff --git a/assets/guide_block_block_pve.md.D9jjCIrc.lean.js b/assets/guide_block_block_pve.md.D9jjCIrc.lean.js new file mode 100644 index 0000000000..3af92ed47d --- /dev/null +++ b/assets/guide_block_block_pve.md.D9jjCIrc.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as i,ag as t}from"./chunks/framework.QPV3Ar9-.js";const x=JSON.parse('{"title":"通过设置防火墙限制虚拟机使用的IP避免盗用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_pve.md","filePath":"guide/block/block_pve.md","lastUpdated":1772424525000}'),n={name:"guide/block/block_pve.md"};function l(p,s,r,o,c,d){return i(),e("div",null,s[0]||(s[0]=[t("",8)]))}const k=a(n,[["render",l]]);export{x as __pageData,k as default}; diff --git a/assets/guide_block_block_pve.md.DEJAOrSy.js b/assets/guide_block_block_pve.md.DEJAOrSy.js deleted file mode 100644 index 00b21cfb0c..0000000000 --- a/assets/guide_block_block_pve.md.DEJAOrSy.js +++ /dev/null @@ -1,4 +0,0 @@ -import{_ as a,c as e,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"通过设置防火墙限制虚拟机使用的IP避免盗用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_pve.md","filePath":"guide/block/block_pve.md","lastUpdated":1772422214000}'),l={name:"guide/block/block_pve.md"};function p(n,s,o,c,d,r){return t(),e("div",null,s[0]||(s[0]=[i(`

通过设置防火墙限制虚拟机使用的IP避免盗用

在PVE的宿主机下创建以下文件

shell
/etc/pve/firewall/<VMID>.fw
-
-[IPSET ipfilter-<net0>]
-xxx.xxx.xxx.xxx

<VMID>替换为虚拟机的VMID数字,<net0>替换为网络设备中对应的别名(一般不用修改,除非你限制的IPV6),xxx.xxx.xxx.xxx替换为公网IP地址,注意此IP对应前面的网络设备。

这里的意思是net0只能使用xxx.xxx.xxx.xxx这个IP,如果使用其他的IP数据将会被丢弃,从而达到限制虚拟机只能使用此IP的目的。

这里可以有多个IP,一旦启用此规则该VM就无法使用除此之外的任何IP,如果你没有写IPv6地址则代表该VM无法使用IPv6地址。

TIP

本设置仅推荐在开设非NAT全端口映射的独立IP的虚拟机时使用,否则可能导致奇奇怪怪的问题造成服务器没网。

该方法不适合开设任何NAT虚拟机/容器的PVE上使用。

`,8)]))}const k=a(l,[["render",p]]);export{h as __pageData,k as default}; diff --git a/assets/guide_block_block_pve.md.DEJAOrSy.lean.js b/assets/guide_block_block_pve.md.DEJAOrSy.lean.js deleted file mode 100644 index 69c6655181..0000000000 --- a/assets/guide_block_block_pve.md.DEJAOrSy.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"通过设置防火墙限制虚拟机使用的IP避免盗用","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/block/block_pve.md","filePath":"guide/block/block_pve.md","lastUpdated":1772422214000}'),l={name:"guide/block/block_pve.md"};function p(n,s,o,c,d,r){return t(),e("div",null,s[0]||(s[0]=[i("",8)]))}const k=a(l,[["render",p]]);export{h as __pageData,k as default}; diff --git a/assets/guide_containerd_containerd_build.md.DAYV_IX6.js b/assets/guide_containerd_containerd_build.md.DAYV_IX6.js deleted file mode 100644 index a30bd6a521..0000000000 --- a/assets/guide_containerd_containerd_build.md.DAYV_IX6.js +++ /dev/null @@ -1,9 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_build.md","filePath":"guide/containerd/containerd_build.md","lastUpdated":1772422214000}'),h={name:"guide/containerd/containerd_build.md"};function e(n,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[l(`

前言

两种开设方式

单独开设

  • 只生成一个 containerd 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 containerd-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

示例

运行支持的变量如下

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
nerdctl ps -a

进入容器

shell
nerdctl exec -it ct1 bash

进入 Alpine 容器

shell
nerdctl exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
nerdctl rm -f ct1

查看容器日志

shell
nerdctl logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
-chmod +x create_containerd.sh
-./create_containerd.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
-chmod +x create_containerd.sh
-./create_containerd.sh

查询批量开设的信息

shell
cat ctlog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息

删除所有容器和镜像

shell
nerdctl ps -aq | xargs -r nerdctl rm -f
-nerdctl images -q | xargs -r nerdctl rmi -f
-rm -rf ctlog

宿主机重启后重启所有容器

默认容器没有设置停止后自重启,需要执行以下命令启动所有停止的容器

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
`,47)]))}const o=i(h,[["render",e]]);export{F as __pageData,o as default}; diff --git a/assets/guide_containerd_containerd_build.md.DAYV_IX6.lean.js b/assets/guide_containerd_containerd_build.md.DAYV_IX6.lean.js deleted file mode 100644 index c4d12aa19a..0000000000 --- a/assets/guide_containerd_containerd_build.md.DAYV_IX6.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_build.md","filePath":"guide/containerd/containerd_build.md","lastUpdated":1772422214000}'),h={name:"guide/containerd/containerd_build.md"};function e(n,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[l("",47)]))}const o=i(h,[["render",e]]);export{F as __pageData,o as default}; diff --git a/assets/guide_containerd_containerd_build.md.DeyNG5NW.js b/assets/guide_containerd_containerd_build.md.DeyNG5NW.js new file mode 100644 index 0000000000..9d5ed4cb3e --- /dev/null +++ b/assets/guide_containerd_containerd_build.md.DeyNG5NW.js @@ -0,0 +1,9 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_build.md","filePath":"guide/containerd/containerd_build.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_build.md"};function l(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[n(`

前言

两种开设方式

单独开设

  • 只生成一个 containerd 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 containerd-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
+chmod +x onecontainerd.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
+chmod +x onecontainerd.sh

示例

运行支持的变量如下

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
nerdctl ps -a

进入容器

shell
nerdctl exec -it ct1 bash

进入 Alpine 容器

shell
nerdctl exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
nerdctl rm -f ct1

查看容器日志

shell
nerdctl logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+chmod +x create_containerd.sh
+./create_containerd.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+chmod +x create_containerd.sh
+./create_containerd.sh

查询批量开设的信息

shell
cat ctlog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息

删除所有容器和镜像

shell
nerdctl ps -aq | xargs -r nerdctl rm -f
+nerdctl images -q | xargs -r nerdctl rmi -f
+rm -rf ctlog

宿主机重启后重启所有容器

默认容器没有设置停止后自重启,需要执行以下命令启动所有停止的容器

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
`,47)]))}const F=i(t,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_build.md.DeyNG5NW.lean.js b/assets/guide_containerd_containerd_build.md.DeyNG5NW.lean.js new file mode 100644 index 0000000000..9145c6c54b --- /dev/null +++ b/assets/guide_containerd_containerd_build.md.DeyNG5NW.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_build.md","filePath":"guide/containerd/containerd_build.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_build.md"};function l(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[n("",47)]))}const F=i(t,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_install.md.DfvdP_aC.js b/assets/guide_containerd_containerd_install.md.DfvdP_aC.js deleted file mode 100644 index 76dcf8e0e6..0000000000 --- a/assets/guide_containerd_containerd_install.md.DfvdP_aC.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_install.md","filePath":"guide/containerd/containerd_install.md","lastUpdated":1772422214000}'),e={name:"guide/containerd/containerd_install.md"};function l(h,s,p,d,k,c){return t(),a("div",null,s[0]||(s[0]=[n('

前言

安装 containerd 环境,包含 containerd + runc + nerdctl + CNI + buildkitd 全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 安装 containerd + runc + nerdctl + CNI + buildkitd(通过 nerdctl-full bundle)
  • 自动配置 CNI 网络(containerd-net:172.20.0.0/16)并设置 iptables NAT 规则
  • 检测公网 IPV6 地址,若存在则自动创建 containerd-ipv6 CNI 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

安装完成后建议执行 nerdctl ps -a 验证 containerd 环境是否正常运行

卸载 containerd 环境

一键卸载 containerd 全套环境,包括所有容器、镜像、CNI 网络、systemd 服务、nerdctl/containerd 二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、CNI 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

',24)]))}const F=i(e,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_install.md.DfvdP_aC.lean.js b/assets/guide_containerd_containerd_install.md.DfvdP_aC.lean.js deleted file mode 100644 index 363cf08b3a..0000000000 --- a/assets/guide_containerd_containerd_install.md.DfvdP_aC.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_install.md","filePath":"guide/containerd/containerd_install.md","lastUpdated":1772422214000}'),e={name:"guide/containerd/containerd_install.md"};function l(h,s,p,d,k,c){return t(),a("div",null,s[0]||(s[0]=[n("",24)]))}const F=i(e,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_install.md.DpBuC67s.js b/assets/guide_containerd_containerd_install.md.DpBuC67s.js new file mode 100644 index 0000000000..de03c73076 --- /dev/null +++ b/assets/guide_containerd_containerd_install.md.DpBuC67s.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_install.md","filePath":"guide/containerd/containerd_install.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_install.md"};function l(p,s,h,d,r,c){return n(),a("div",null,s[0]||(s[0]=[e('

前言

安装 containerd 环境,包含 containerd + runc + nerdctl + CNI + buildkitd 全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 安装 containerd + runc + nerdctl + CNI + buildkitd(通过 nerdctl-full bundle)
  • 自动配置 CNI 网络(containerd-net:172.20.0.0/16)并设置 iptables NAT 规则
  • 检测公网 IPV6 地址,若存在则自动创建 containerd-ipv6 CNI 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

安装完成后建议执行 nerdctl ps -a 验证 containerd 环境是否正常运行

卸载 containerd 环境

一键卸载 containerd 全套环境,包括所有容器、镜像、CNI 网络、systemd 服务、nerdctl/containerd 二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、CNI 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

',24)]))}const u=i(t,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_containerd_containerd_install.md.DpBuC67s.lean.js b/assets/guide_containerd_containerd_install.md.DpBuC67s.lean.js new file mode 100644 index 0000000000..e6920c48f6 --- /dev/null +++ b/assets/guide_containerd_containerd_install.md.DpBuC67s.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_install.md","filePath":"guide/containerd/containerd_install.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_install.md"};function l(p,s,h,d,r,c){return n(),a("div",null,s[0]||(s[0]=[e("",24)]))}const u=i(t,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_containerd_containerd_precheck.md.NHg5HVsg.js b/assets/guide_containerd_containerd_precheck.md.DQrDdUYj.js similarity index 56% rename from assets/guide_containerd_containerd_precheck.md.NHg5HVsg.js rename to assets/guide_containerd_containerd_precheck.md.DQrDdUYj.js index cdc70f7e26..4dfdd005cd 100644 --- a/assets/guide_containerd_containerd_precheck.md.NHg5HVsg.js +++ b/assets/guide_containerd_containerd_precheck.md.DQrDdUYj.js @@ -1 +1 @@ -import{_ as a,c as i,o as s,ag as d}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_precheck.md","filePath":"guide/containerd/containerd_precheck.md","lastUpdated":1772422214000}'),e={name:"guide/containerd/containerd_precheck.md"};function n(l,t,r,h,p,o){return s(),i("div",null,t[0]||(t[0]=[d('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

containerd 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/containerd

项目特点

基于 containerd + nerdctl 运行时,通过批量或单独开设 NAT 服务器

  • 使用 nerdctl-full 安装 containerd + runc + nerdctl + CNI + buildkitd 全套组件
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到官方镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 默认创建非特权容器,支持 lxcfs 挂载(若宿主机安装了 lxcfs)
  • 支持磁盘限制参数(需 xfs/btrfs snapshotter 支持 storage-opt)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 docker 对比

特性containerddocker
运行时containerd + runcDocker daemon + runc
管理命令nerdctldocker
是否需要守护进程轻量级守护进程重量级 Docker daemon
容器支持Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',19)]))}const u=a(e,[["render",n]]);export{k as __pageData,u as default}; +import{_ as a,c as i,o as s,ag as e}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_precheck.md","filePath":"guide/containerd/containerd_precheck.md","lastUpdated":1772424525000}'),d={name:"guide/containerd/containerd_precheck.md"};function n(r,t,l,h,p,o){return s(),i("div",null,t[0]||(t[0]=[e('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

containerd 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/containerd

项目特点

基于 containerd + nerdctl 运行时,通过批量或单独开设 NAT 服务器

  • 使用 nerdctl-full 安装 containerd + runc + nerdctl + CNI + buildkitd 全套组件
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到官方镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 默认创建非特权容器,支持 lxcfs 挂载(若宿主机安装了 lxcfs)
  • 支持磁盘限制参数(需 xfs/btrfs snapshotter 支持 storage-opt)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 docker 对比

特性containerddocker
运行时containerd + runcDocker daemon + runc
管理命令nerdctldocker
是否需要守护进程轻量级守护进程重量级 Docker daemon
容器支持Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',19)]))}const u=a(d,[["render",n]]);export{k as __pageData,u as default}; diff --git a/assets/guide_containerd_containerd_precheck.md.DQrDdUYj.lean.js b/assets/guide_containerd_containerd_precheck.md.DQrDdUYj.lean.js new file mode 100644 index 0000000000..d7d1fe079a --- /dev/null +++ b/assets/guide_containerd_containerd_precheck.md.DQrDdUYj.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as s,ag as e}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_precheck.md","filePath":"guide/containerd/containerd_precheck.md","lastUpdated":1772424525000}'),d={name:"guide/containerd/containerd_precheck.md"};function n(r,t,l,h,p,o){return s(),i("div",null,t[0]||(t[0]=[e("",19)]))}const u=a(d,[["render",n]]);export{k as __pageData,u as default}; diff --git a/assets/guide_containerd_containerd_precheck.md.NHg5HVsg.lean.js b/assets/guide_containerd_containerd_precheck.md.NHg5HVsg.lean.js deleted file mode 100644 index 29e9a5ef57..0000000000 --- a/assets/guide_containerd_containerd_precheck.md.NHg5HVsg.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as s,ag as d}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_precheck.md","filePath":"guide/containerd/containerd_precheck.md","lastUpdated":1772422214000}'),e={name:"guide/containerd/containerd_precheck.md"};function n(l,t,r,h,p,o){return s(),i("div",null,t[0]||(t[0]=[d("",19)]))}const u=a(e,[["render",n]]);export{k as __pageData,u as default}; diff --git a/assets/guide_containerd_containerd_qa.md.CeB3tJNK.js b/assets/guide_containerd_containerd_qa.md.CeB3tJNK.js deleted file mode 100644 index e89817164e..0000000000 --- a/assets/guide_containerd_containerd_qa.md.CeB3tJNK.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_qa.md","filePath":"guide/containerd/containerd_qa.md","lastUpdated":1772422214000}'),l={name:"guide/containerd/containerd_qa.md"};function h(e,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[n(`

常见问题答疑

nerdctl: command not found

containerd 环境未正确安装或 /usr/local/bin 不在 PATH 中

解决方法:

shell
export PATH="/usr/local/bin:$PATH"
-echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/profile
-source /etc/profile

如果仍然没有,请重新执行安装脚本:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

containerd 服务未启动

shell
systemctl status containerd
-systemctl restart containerd

查看日志:

shell
journalctl -u containerd -f

容器无法访问外网(IPv4)

检查 iptables NAT 规则是否存在:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.20

如果没有,手动添加:

shell
iptables -t nat -A POSTROUTING -s 172.20.0.0/16 ! -d 172.20.0.0/16 -j MASQUERADE
-iptables -A FORWARD -s 172.20.0.0/16 -j ACCEPT
-iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

容器 IPv6 未生效

  1. 确认宿主机有公网 IPv6 地址
  2. 检查 containerd-ipv6 CNI 网络是否存在:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. 检查 ndpresponder 容器是否运行:
shell
nerdctl ps | grep ndpresponder

镜像拉取失败

优先尝试国内 CDN 加速,脚本内置 CDN 检测,也可手动切换:

shell
# 测试 CDN 是否可用
-curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

如何完全重置 containerd 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
-bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
-bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

lxcfs 相关问题

如果宿主机未安装 lxcfs,容器内查询的 CPU/内存为宿主机视图。安装 lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
-yum install -y lxcfs       # CentOS/RHEL

磁盘限制不生效

磁盘限制需要 xfs 或 btrfs snapshotter 支持,默认 overlay snapshotter 不支持容器级磁盘限制。

如需磁盘限制,请查看 docker 方案或 incus 方案中对应的说明。

`,39)]))}const o=i(l,[["render",h]]);export{F as __pageData,o as default}; diff --git a/assets/guide_containerd_containerd_qa.md.CeB3tJNK.lean.js b/assets/guide_containerd_containerd_qa.md.CeB3tJNK.lean.js deleted file mode 100644 index 1918d069b9..0000000000 --- a/assets/guide_containerd_containerd_qa.md.CeB3tJNK.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const F=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_qa.md","filePath":"guide/containerd/containerd_qa.md","lastUpdated":1772422214000}'),l={name:"guide/containerd/containerd_qa.md"};function h(e,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[n("",39)]))}const o=i(l,[["render",h]]);export{F as __pageData,o as default}; diff --git a/assets/guide_containerd_containerd_qa.md.DweiiNoU.js b/assets/guide_containerd_containerd_qa.md.DweiiNoU.js new file mode 100644 index 0000000000..e41959e868 --- /dev/null +++ b/assets/guide_containerd_containerd_qa.md.DweiiNoU.js @@ -0,0 +1,10 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_qa.md","filePath":"guide/containerd/containerd_qa.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_qa.md"};function l(h,s,p,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e(`

常见问题答疑

nerdctl: command not found

containerd 环境未正确安装或 /usr/local/bin 不在 PATH 中

解决方法:

shell
export PATH="/usr/local/bin:$PATH"
+echo 'export PATH="/usr/local/bin:$PATH"' >> /etc/profile
+source /etc/profile

如果仍然没有,请重新执行安装脚本:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

containerd 服务未启动

shell
systemctl status containerd
+systemctl restart containerd

查看日志:

shell
journalctl -u containerd -f

容器无法访问外网(IPv4)

检查 iptables NAT 规则是否存在:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.20

如果没有,手动添加:

shell
iptables -t nat -A POSTROUTING -s 172.20.0.0/16 ! -d 172.20.0.0/16 -j MASQUERADE
+iptables -A FORWARD -s 172.20.0.0/16 -j ACCEPT
+iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

容器 IPv6 未生效

  1. 确认宿主机有公网 IPv6 地址
  2. 检查 containerd-ipv6 CNI 网络是否存在:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. 检查 ndpresponder 容器是否运行:
shell
nerdctl ps | grep ndpresponder

镜像拉取失败

优先尝试国内 CDN 加速,脚本内置 CDN 检测,也可手动切换:

shell
# 测试 CDN 是否可用
+curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

如何完全重置 containerd 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

lxcfs 相关问题

如果宿主机未安装 lxcfs,容器内查询的 CPU/内存为宿主机视图。安装 lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
+yum install -y lxcfs       # CentOS/RHEL

磁盘限制不生效

磁盘限制需要 xfs 或 btrfs snapshotter 支持,默认 overlay snapshotter 不支持容器级磁盘限制。

如需磁盘限制,请查看 docker 方案或 incus 方案中对应的说明。

`,39)]))}const F=i(t,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_qa.md.DweiiNoU.lean.js b/assets/guide_containerd_containerd_qa.md.DweiiNoU.lean.js new file mode 100644 index 0000000000..29f5e0a747 --- /dev/null +++ b/assets/guide_containerd_containerd_qa.md.DweiiNoU.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/containerd/containerd_qa.md","filePath":"guide/containerd/containerd_qa.md","lastUpdated":1772424525000}'),t={name:"guide/containerd/containerd_qa.md"};function l(h,s,p,r,d,k){return n(),a("div",null,s[0]||(s[0]=[e("",39)]))}const F=i(t,[["render",l]]);export{o as __pageData,F as default}; diff --git a/assets/guide_containerd_containerd_thanks.md.CDt96ddx.js b/assets/guide_containerd_containerd_thanks.md.B8ocld4Z.js similarity index 88% rename from assets/guide_containerd_containerd_thanks.md.CDt96ddx.js rename to assets/guide_containerd_containerd_thanks.md.B8ocld4Z.js index 0e94b3626e..7b9dc4cf0d 100644 --- a/assets/guide_containerd_containerd_thanks.md.CDt96ddx.js +++ b/assets/guide_containerd_containerd_thanks.md.B8ocld4Z.js @@ -1 +1 @@ -import{_ as r,c as e,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/containerd/containerd_thanks.md","filePath":"guide/containerd/containerd_thanks.md","lastUpdated":1772422214000}'),o={name:"guide/containerd/containerd_thanks.md"};function i(c,t,p,h,s,d){return n(),e("div",null,t[0]||(t[0]=[a('

致谢

https://github.com/containerd/nerdctl

https://github.com/containerd/containerd

https://github.com/opencontainers/runc

https://github.com/containernetworking/cni

https://github.com/moby/buildkit

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

',9)]))}const _=r(o,[["render",i]]);export{u as __pageData,_ as default}; +import{_ as r,c as e,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/containerd/containerd_thanks.md","filePath":"guide/containerd/containerd_thanks.md","lastUpdated":1772424525000}'),o={name:"guide/containerd/containerd_thanks.md"};function i(c,t,p,h,s,d){return n(),e("div",null,t[0]||(t[0]=[a('

致谢

https://github.com/containerd/nerdctl

https://github.com/containerd/containerd

https://github.com/opencontainers/runc

https://github.com/containernetworking/cni

https://github.com/moby/buildkit

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

',9)]))}const _=r(o,[["render",i]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_containerd_containerd_thanks.md.CDt96ddx.lean.js b/assets/guide_containerd_containerd_thanks.md.B8ocld4Z.lean.js similarity index 59% rename from assets/guide_containerd_containerd_thanks.md.CDt96ddx.lean.js rename to assets/guide_containerd_containerd_thanks.md.B8ocld4Z.lean.js index c1f292345a..f4d72037f6 100644 --- a/assets/guide_containerd_containerd_thanks.md.CDt96ddx.lean.js +++ b/assets/guide_containerd_containerd_thanks.md.B8ocld4Z.lean.js @@ -1 +1 @@ -import{_ as r,c as e,o as n,ag as a}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/containerd/containerd_thanks.md","filePath":"guide/containerd/containerd_thanks.md","lastUpdated":1772422214000}'),o={name:"guide/containerd/containerd_thanks.md"};function i(c,t,p,h,s,d){return n(),e("div",null,t[0]||(t[0]=[a("",9)]))}const _=r(o,[["render",i]]);export{u as __pageData,_ as default}; +import{_ as r,c as e,o as n,ag as a}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/containerd/containerd_thanks.md","filePath":"guide/containerd/containerd_thanks.md","lastUpdated":1772424525000}'),o={name:"guide/containerd/containerd_thanks.md"};function i(c,t,p,h,s,d){return n(),e("div",null,t[0]||(t[0]=[a("",9)]))}const _=r(o,[["render",i]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_dashboard.md.BbordXN5.js b/assets/guide_dashboard.md.5DkCRi2q.js similarity index 57% rename from assets/guide_dashboard.md.BbordXN5.js rename to assets/guide_dashboard.md.5DkCRi2q.js index a53b62b3df..d0b85d6e51 100644 --- a/assets/guide_dashboard.md.BbordXN5.js +++ b/assets/guide_dashboard.md.5DkCRi2q.js @@ -1 +1 @@ -import{_ as e,c as a,o as r,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1772422214000}'),l={name:"guide/dashboard.md"};function o(s,t,c,n,h,p){return r(),a("div",null,t[0]||(t[0]=[i('

准备工作

需要虚拟化出服务器,你需要:

  1. 一台可以连接公网的服务器( VPS 或 Dedicated Server),最好能完美访问 Github 的 RAW 页面,部分项目部分组件可能未使用 CDN 加速

TIP

如果您位于中国大陆,访问 Github 有困难,请注意配套脚本和项目是否有说明已使用 CDN 加速

  1. 本地可以稳定连接SSH,如果不能稳定连接,请使用screen命令创建窗口后,在窗口内执行命令

TIP

不会用screen命令的,自行查找相关教程学习,或者用tmux替代也行

  1. 确保服务器的系统和硬件满足对应项目的要求,详见对应项目说明

本文档将以VPS作为范例,且该VPS纯净,无原生环境问题,如有必要请重装系统保证初始环境的纯净

WARNING

PVE项目可能造成宿主机出现问题,如果你不会看Bug和修复系统,那么不建议你在生产环境中使用,使用PVE相关脚本请确保宿主机随时可重装系统

项目仓库

欢迎Star和Fork,所有资源均开源,无非开源部分,转载以及使用请写上来源于本站,谢谢

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

',25)]))}const b=e(l,[["render",o]]);export{u as __pageData,b as default}; +import{_ as e,c as a,o as i,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1772424525000}'),l={name:"guide/dashboard.md"};function o(s,t,c,n,h,p){return i(),a("div",null,t[0]||(t[0]=[r('

准备工作

需要虚拟化出服务器,你需要:

  1. 一台可以连接公网的服务器( VPS 或 Dedicated Server),最好能完美访问 Github 的 RAW 页面,部分项目部分组件可能未使用 CDN 加速

TIP

如果您位于中国大陆,访问 Github 有困难,请注意配套脚本和项目是否有说明已使用 CDN 加速

  1. 本地可以稳定连接SSH,如果不能稳定连接,请使用screen命令创建窗口后,在窗口内执行命令

TIP

不会用screen命令的,自行查找相关教程学习,或者用tmux替代也行

  1. 确保服务器的系统和硬件满足对应项目的要求,详见对应项目说明

本文档将以VPS作为范例,且该VPS纯净,无原生环境问题,如有必要请重装系统保证初始环境的纯净

WARNING

PVE项目可能造成宿主机出现问题,如果你不会看Bug和修复系统,那么不建议你在生产环境中使用,使用PVE相关脚本请确保宿主机随时可重装系统

项目仓库

欢迎Star和Fork,所有资源均开源,无非开源部分,转载以及使用请写上来源于本站,谢谢

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

',25)]))}const b=e(l,[["render",o]]);export{u as __pageData,b as default}; diff --git a/assets/guide_dashboard.md.5DkCRi2q.lean.js b/assets/guide_dashboard.md.5DkCRi2q.lean.js new file mode 100644 index 0000000000..17755db38b --- /dev/null +++ b/assets/guide_dashboard.md.5DkCRi2q.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as i,ag as r}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1772424525000}'),l={name:"guide/dashboard.md"};function o(s,t,c,n,h,p){return i(),a("div",null,t[0]||(t[0]=[r("",25)]))}const b=e(l,[["render",o]]);export{u as __pageData,b as default}; diff --git a/assets/guide_dashboard.md.BbordXN5.lean.js b/assets/guide_dashboard.md.BbordXN5.lean.js deleted file mode 100644 index bf345a53fb..0000000000 --- a/assets/guide_dashboard.md.BbordXN5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as r,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1772422214000}'),l={name:"guide/dashboard.md"};function o(s,t,c,n,h,p){return r(),a("div",null,t[0]||(t[0]=[i("",25)]))}const b=e(l,[["render",o]]);export{u as __pageData,b as default}; diff --git a/assets/guide_dashboardq.md.Dywt66cz.js b/assets/guide_dashboardq.md.Dywt66cz.js new file mode 100644 index 0000000000..1af20de04c --- /dev/null +++ b/assets/guide_dashboardq.md.Dywt66cz.js @@ -0,0 +1 @@ +import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/wechat.BhfskdFa.jpg",m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1772424525000}'),n={name:"guide/dashboardq.md"};function r(d,a,l,o,c,h){return t(),s("div",null,a[0]||(a[0]=[i('

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
',8)]))}const u=e(n,[["render",r]]);export{m as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.Dywt66cz.lean.js b/assets/guide_dashboardq.md.Dywt66cz.lean.js new file mode 100644 index 0000000000..f3f7d779a1 --- /dev/null +++ b/assets/guide_dashboardq.md.Dywt66cz.lean.js @@ -0,0 +1 @@ +import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/wechat.BhfskdFa.jpg",m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1772424525000}'),n={name:"guide/dashboardq.md"};function r(d,a,l,o,c,h){return t(),s("div",null,a[0]||(a[0]=[i("",8)]))}const u=e(n,[["render",r]]);export{m as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.NJNDlMTa.js b/assets/guide_dashboardq.md.NJNDlMTa.js deleted file mode 100644 index 1d4526c551..0000000000 --- a/assets/guide_dashboardq.md.NJNDlMTa.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const p="/assets/wechat.BhfskdFa.jpg",_=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1772422214000}'),o={name:"guide/dashboardq.md"};function d(n,a,c,l,r,h){return t(),s("div",null,a[0]||(a[0]=[i('

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
',8)]))}const g=e(o,[["render",d]]);export{_ as __pageData,g as default}; diff --git a/assets/guide_dashboardq.md.NJNDlMTa.lean.js b/assets/guide_dashboardq.md.NJNDlMTa.lean.js deleted file mode 100644 index d02529f4f1..0000000000 --- a/assets/guide_dashboardq.md.NJNDlMTa.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const p="/assets/wechat.BhfskdFa.jpg",_=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1772422214000}'),o={name:"guide/dashboardq.md"};function d(n,a,c,l,r,h){return t(),s("div",null,a[0]||(a[0]=[i("",8)]))}const g=e(o,[["render",d]]);export{_ as __pageData,g as default}; diff --git a/assets/guide_docker_docker_android.md.7oUVq29z.js b/assets/guide_docker_docker_android.md.7oUVq29z.js deleted file mode 100644 index 1d0d7b4460..0000000000 --- a/assets/guide_docker_docker_android.md.7oUVq29z.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"在Docker中开设Android虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_android.md","filePath":"guide/docker/docker_android.md","lastUpdated":1772422214000}'),t={name:"guide/docker/docker_android.md"};function p(r,s,d,l,o,h){return e(),i("div",null,s[0]||(s[0]=[n(`

在Docker中开设Android虚拟机

一键开设

  • 自定义安卓版本
  • 自动创建带校验的web网站
  • 自动进行nginx安装和反向代理的配置,可选择是否绑定域名,默认回车不绑定使用80端口
  • 无需考虑宿主机是否支持嵌套虚拟化
  • 支持x86_64和ARM架构

宿主机的配置至少要有1核2G内存15G硬盘,否则开设可能会导致宿主机卡死

宿主机推荐 Ubuntu 系统,Debian 系统可能导致安卓屏幕白屏

安卓版本越新占用越大,以上的配置要求是最低版本安卓的配置要求 (个人测试到 12.0.0-latest 的tag可用,更高版本映射白屏了,自己测试哪个能用吧)

如果开设后,过了5分钟浏览器网页的登录验证还是一直失败,那么请查询安卓容器的日志,大概率安卓容器崩溃了,建议更换更低的安卓系统版本的容器进行安装

开设

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

命令执行后按照提示输入即可,注意选择版本输入的是序号,对应选项的数字序号,安装完毕后打开本机IPV4+80端口可登录

如果需要查询生成的安卓信息和web登录信息,执行cat /root/android_info可查询信息

默认的用户名 onea

默认密码 oneclick

远程的桌面点击H264 Converter跳转就是了

暂时只支持生成一个安卓容器,勿要重复生成,如需替换版本请执行后续命令删除后再次开设

暂时只支持开设后一直使用,不可重启服务器,重启后可能无法自重启映射成功,自测

删除

  • 删除容器
  • 删除容器对应镜像
  • 删除配置文件
docker rm -f android
-docker rmi $(docker images | grep "redroid" | awk '{print $3}')
-rm -rf /etc/nginx/sites-enabled/reverse-proxy
-rm -rf /etc/nginx/sites-available/reverse-proxy
-rm -rf /etc/nginx/passwd_scrcpy_web
-rm -rf /root/android_info

安装APK文件

点击list files打开文件目录,切换到/storage/emulated/0/Download目录,把apk拖拽进来进行安装,等待进度跑完,apk就上传到安卓容器里面了。

此时回到安卓的界面,打开文件管理器,就会显示你刚上传的文件,点击后可进行安装。

`,25)]))}const g=a(t,[["render",p]]);export{k as __pageData,g as default}; diff --git a/assets/guide_docker_docker_android.md.7oUVq29z.lean.js b/assets/guide_docker_docker_android.md.7oUVq29z.lean.js deleted file mode 100644 index 9e49ffc493..0000000000 --- a/assets/guide_docker_docker_android.md.7oUVq29z.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"在Docker中开设Android虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_android.md","filePath":"guide/docker/docker_android.md","lastUpdated":1772422214000}'),t={name:"guide/docker/docker_android.md"};function p(r,s,d,l,o,h){return e(),i("div",null,s[0]||(s[0]=[n("",25)]))}const g=a(t,[["render",p]]);export{k as __pageData,g as default}; diff --git a/assets/guide_docker_docker_android.md.DaSSuPZa.js b/assets/guide_docker_docker_android.md.DaSSuPZa.js new file mode 100644 index 0000000000..c68bae0816 --- /dev/null +++ b/assets/guide_docker_docker_android.md.DaSSuPZa.js @@ -0,0 +1,6 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"在Docker中开设Android虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_android.md","filePath":"guide/docker/docker_android.md","lastUpdated":1772424525000}'),p={name:"guide/docker/docker_android.md"};function r(t,s,l,d,o,h){return e(),i("div",null,s[0]||(s[0]=[n(`

在Docker中开设Android虚拟机

一键开设

  • 自定义安卓版本
  • 自动创建带校验的web网站
  • 自动进行nginx安装和反向代理的配置,可选择是否绑定域名,默认回车不绑定使用80端口
  • 无需考虑宿主机是否支持嵌套虚拟化
  • 支持x86_64和ARM架构

宿主机的配置至少要有1核2G内存15G硬盘,否则开设可能会导致宿主机卡死

宿主机推荐 Ubuntu 系统,Debian 系统可能导致安卓屏幕白屏

安卓版本越新占用越大,以上的配置要求是最低版本安卓的配置要求 (个人测试到 12.0.0-latest 的tag可用,更高版本映射白屏了,自己测试哪个能用吧)

如果开设后,过了5分钟浏览器网页的登录验证还是一直失败,那么请查询安卓容器的日志,大概率安卓容器崩溃了,建议更换更低的安卓系统版本的容器进行安装

开设

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

命令执行后按照提示输入即可,注意选择版本输入的是序号,对应选项的数字序号,安装完毕后打开本机IPV4+80端口可登录

如果需要查询生成的安卓信息和web登录信息,执行cat /root/android_info可查询信息

默认的用户名 onea

默认密码 oneclick

远程的桌面点击H264 Converter跳转就是了

暂时只支持生成一个安卓容器,勿要重复生成,如需替换版本请执行后续命令删除后再次开设

暂时只支持开设后一直使用,不可重启服务器,重启后可能无法自重启映射成功,自测

删除

  • 删除容器
  • 删除容器对应镜像
  • 删除配置文件
docker rm -f android
+docker rmi $(docker images | grep "redroid" | awk '{print $3}')
+rm -rf /etc/nginx/sites-enabled/reverse-proxy
+rm -rf /etc/nginx/sites-available/reverse-proxy
+rm -rf /etc/nginx/passwd_scrcpy_web
+rm -rf /root/android_info

安装APK文件

点击list files打开文件目录,切换到/storage/emulated/0/Download目录,把apk拖拽进来进行安装,等待进度跑完,apk就上传到安卓容器里面了。

此时回到安卓的界面,打开文件管理器,就会显示你刚上传的文件,点击后可进行安装。

`,25)]))}const g=a(p,[["render",r]]);export{k as __pageData,g as default}; diff --git a/assets/guide_docker_docker_android.md.DaSSuPZa.lean.js b/assets/guide_docker_docker_android.md.DaSSuPZa.lean.js new file mode 100644 index 0000000000..ecc29df943 --- /dev/null +++ b/assets/guide_docker_docker_android.md.DaSSuPZa.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"在Docker中开设Android虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_android.md","filePath":"guide/docker/docker_android.md","lastUpdated":1772424525000}'),p={name:"guide/docker/docker_android.md"};function r(t,s,l,d,o,h){return e(),i("div",null,s[0]||(s[0]=[n("",25)]))}const g=a(p,[["render",r]]);export{k as __pageData,g as default}; diff --git a/assets/guide_docker_docker_build.md.Bqjx65p4.js b/assets/guide_docker_docker_build.md.Bqjx65p4.js new file mode 100644 index 0000000000..9fb7d60057 --- /dev/null +++ b/assets/guide_docker_docker_build.md.Bqjx65p4.js @@ -0,0 +1,24 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_build.md","filePath":"guide/docker/docker_build.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_build.md"};function l(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e(`

前言

两种开设方式

单独开设

  • 只生成一个docker,这里有判断为国际服务器还是国内服务器,如果在国内服务器上开设,容器内的包管理源自动替换为清华源
  • 可配置绑定独立的IPV6地址,但需要先前使用本套脚本的环境安装命令安装的docker,且需要宿主机至少绑定了/112的IPV6子网
  • 支持x86_64和ARM架构的服务器

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

示例

运行支持的变量如下

bash
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

目前system仅支持选择

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

默认不填则是debian

硬盘大小仅在前面Docker安装时选择了支持限制硬盘大小的选项,这块才可填写数值设置硬盘大小,默认不填时不限制

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码123456
CPU核数1
内存大小512MB
SSH端口25000
内外网映射端口一致的区间34975到35000
系统debian
是否绑定独立的IPV6地址N
硬盘大小5G

相关操作

删除示例

shell
docker rm -f test
+rm -rf test
+ls

进入示例

shell
docker exec -it test /bin/bash

要退出容器就执行exit退出。

查询已开设的信息

shell
cat 容器名字

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止

docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的

批量开设

  • 批量多次运行继承配置生成
  • 生成多个时为避免SSH连接中断建议在screen中执行
  • 支持x86_64和ARM架构的服务器

运行

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -o create_docker.sh && chmod +x create_docker.sh && bash create_docker.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

查询批量开设的信息

shell
cat dclog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息,docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的

卸载所有docker容器和镜像

以下命令卸载会忽略ndpresponder,以防止IPV6的配置失效

shell
docker ps -a --format '{{.Names}}' | grep -vE '^ndpresponder' | xargs -r docker rm -f
+docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep -v 'ndpresponder' | awk '{print $2}' | xargs -r docker rmi
+rm -rf dclog test
+ls

更新上述所有脚本

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/onedocker.sh
+rm -rf /root/create_docker.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -O /root/onedocker.sh && chmod +x /root/onedocker.sh
+wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -O /root/create_docker.sh && chmod +x /root/create_docker.sh

宿主机重启后重启所有容器

默认容器没有设置停止后自重启,需要执行以下命令启动所有停止的容器

docker start $(docker ps -aq)

宿主机重启后启动所有容器的SSH服务

由于容器本身没有守护进程,所以SSH服务无法自启动,需要执行以下命令启动所有容器的SSH进程

container_ids=$(docker ps -q)
+for container_id in $container_ids
+do
+    docker exec -it $container_id bash -c "service ssh start"
+    docker exec -it $container_id bash -c "service sshd restart"
+    docker exec -it $container_id sh -c "service ssh start"
+    docker exec -it $container_id sh -c "/usr/sbin/sshd"
+done
`,56)]))}const o=i(t,[["render",l]]);export{F as __pageData,o as default}; diff --git a/assets/guide_docker_docker_build.md.Bqjx65p4.lean.js b/assets/guide_docker_docker_build.md.Bqjx65p4.lean.js new file mode 100644 index 0000000000..95d84135bf --- /dev/null +++ b/assets/guide_docker_docker_build.md.Bqjx65p4.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_build.md","filePath":"guide/docker/docker_build.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_build.md"};function l(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e("",56)]))}const o=i(t,[["render",l]]);export{F as __pageData,o as default}; diff --git a/assets/guide_docker_docker_build.md.CaFusQnP.js b/assets/guide_docker_docker_build.md.CaFusQnP.js deleted file mode 100644 index bdf21e96bf..0000000000 --- a/assets/guide_docker_docker_build.md.CaFusQnP.js +++ /dev/null @@ -1,24 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_build.md","filePath":"guide/docker/docker_build.md","lastUpdated":1772422214000}'),n={name:"guide/docker/docker_build.md"};function e(l,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h(`

前言

两种开设方式

单独开设

  • 只生成一个docker,这里有判断为国际服务器还是国内服务器,如果在国内服务器上开设,容器内的包管理源自动替换为清华源
  • 可配置绑定独立的IPV6地址,但需要先前使用本套脚本的环境安装命令安装的docker,且需要宿主机至少绑定了/112的IPV6子网
  • 支持x86_64和ARM架构的服务器

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

示例

运行支持的变量如下

bash
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

目前system仅支持选择

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

默认不填则是debian

硬盘大小仅在前面Docker安装时选择了支持限制硬盘大小的选项,这块才可填写数值设置硬盘大小,默认不填时不限制

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码123456
CPU核数1
内存大小512MB
SSH端口25000
内外网映射端口一致的区间34975到35000
系统debian
是否绑定独立的IPV6地址N
硬盘大小5G

相关操作

删除示例

shell
docker rm -f test
-rm -rf test
-ls

进入示例

shell
docker exec -it test /bin/bash

要退出容器就执行exit退出。

查询已开设的信息

shell
cat 容器名字

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止

docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的

批量开设

  • 批量多次运行继承配置生成
  • 生成多个时为避免SSH连接中断建议在screen中执行
  • 支持x86_64和ARM架构的服务器

运行

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -o create_docker.sh && chmod +x create_docker.sh && bash create_docker.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

查询批量开设的信息

shell
cat dclog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息,docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的

卸载所有docker容器和镜像

以下命令卸载会忽略ndpresponder,以防止IPV6的配置失效

shell
docker ps -a --format '{{.Names}}' | grep -vE '^ndpresponder' | xargs -r docker rm -f
-docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep -v 'ndpresponder' | awk '{print $2}' | xargs -r docker rmi
-rm -rf dclog test
-ls

更新上述所有脚本

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/onedocker.sh
-rm -rf /root/create_docker.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -O /root/onedocker.sh && chmod +x /root/onedocker.sh
-wget https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_docker.sh -O /root/create_docker.sh && chmod +x /root/create_docker.sh

宿主机重启后重启所有容器

默认容器没有设置停止后自重启,需要执行以下命令启动所有停止的容器

docker start $(docker ps -aq)

宿主机重启后启动所有容器的SSH服务

由于容器本身没有守护进程,所以SSH服务无法自启动,需要执行以下命令启动所有容器的SSH进程

container_ids=$(docker ps -q)
-for container_id in $container_ids
-do
-    docker exec -it $container_id bash -c "service ssh start"
-    docker exec -it $container_id bash -c "service sshd restart"
-    docker exec -it $container_id sh -c "service ssh start"
-    docker exec -it $container_id sh -c "/usr/sbin/sshd"
-done
`,56)]))}const o=i(n,[["render",e]]);export{c as __pageData,o as default}; diff --git a/assets/guide_docker_docker_build.md.CaFusQnP.lean.js b/assets/guide_docker_docker_build.md.CaFusQnP.lean.js deleted file mode 100644 index 1fc725bd10..0000000000 --- a/assets/guide_docker_docker_build.md.CaFusQnP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_build.md","filePath":"guide/docker/docker_build.md","lastUpdated":1772422214000}'),n={name:"guide/docker/docker_build.md"};function e(l,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h("",56)]))}const o=i(n,[["render",e]]);export{c as __pageData,o as default}; diff --git a/assets/guide_docker_docker_custom.md.DLz-IfHe.js b/assets/guide_docker_docker_custom.md.DLz-IfHe.js deleted file mode 100644 index e013c07d8c..0000000000 --- a/assets/guide_docker_docker_custom.md.DLz-IfHe.js +++ /dev/null @@ -1,11 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"使用Docker一键安装某些容器的脚本","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_custom.md","filePath":"guide/docker/docker_custom.md","lastUpdated":1772422214000}'),e={name:"guide/docker/docker_custom.md"};function l(p,s,n,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h(`

使用Docker一键安装某些容器的脚本

每个容器都有对应的配置要求,自行查看,内存不够的用https://github.com/spiritLHLS/addswap

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

开设虚拟内存补足也行

注意,以下脚本使用前务必使用本套教程中的环境安装脚本进行前期环境安装

一键开设Firefox浏览器的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置密码
  • 可自定义容器最大的内存占用
  • 可选是否开启VNC端口,默认不开启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 不支持声音映射,无论是WEB端还是VNC端都无法传输声音

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码1G硬盘

开设

如果未设置自定义密码,开设后默认的密码是oneclick

默认的web端口是3003,开设后打开本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

删除

修改以下端口号3003为你实际的端口号,然后执行命令回车两次即可删除容器、配置文件、对应镜像

shell
PORT="3003"
-docker stop firefox_\${PORT}
-docker rm -f firefox_\${PORT}
-rm -rf /usr/local/bin/firefox_\${PORT}
-docker rmi jlesage/firefox

一键开设Chrome浏览器的容器

  • 已设置崩溃自启
  • 自带web的校验,可自设置密码
  • 可自定义容器最大的内存占用
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 支持声音映射

宿主机需要至少1核2G内存10G硬盘,开设的容器大小将占用起码1G硬盘

首次安装过程中最好在screen中挂起执行,避免长时间运行SSH连接断开

开设

如果未设置自定义用户名,开设后默认的用户名是oneclick

如果未设置自定义密码,开设后默认的密码是oneclick

默认的http端口是3004,开设后打开http://本机IPV4:端口即可

默认的https端口是3005,开设后打开https://本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onechromium.sh -o onechromium.sh && chmod +x onechromium.sh && bash onechromium.sh

删除

修改以下端口号3004为你实际的http端口号,然后执行命令回车两次即可删除容器、配置文件、对应镜像

shell
PORT="3004"
-docker stop chromium_\${PORT}
-docker rm -f chromium_\${PORT}
-rm -rf /usr/local/bin/config_\${PORT}
-rm -rf /usr/local/bin/password_\${PORT}
-docker rmi lscr.io/linuxserver/chromium

注意事项

  • nginx,caddy等https映射的时候要映射3004的端口,不要映射3005端口
  • 部署以后安静的等待15分钟,不然中文库没安装全,会出现不可预料的错误
  • 进入远程桌面浏览器以后点击左侧的设置->点开输入法进行设置,不然没法输入中文

图片

一键开设Desktop的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置用户名和密码
  • 可自定义容器最大的内存占用
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 支持声音映射,WEB端可传输声音

完整的Linux桌面,可以在上面使用浏览器

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码3.2G硬盘

开设

开设后默认的用户名是onew,密码是oneclick,默认的内存最大占用是2GB

默认的http协议的web端口是3004,默认的https协议的web端口是3005,开设后打开对应协议的本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

删除

执行

shell
docker ps -a

查询name的前缀是webtop的容器,记录容器的ID用

shell
docker rm -f 容器的ID

删除所有关联的容器后可用

shell
docker rmi lscr.io/linuxserver/webtop

删除对应镜像

一键安装guacamole

一个网页端连接SSH或RDP等协议控制服务器的玩意

网址:http://你的IPV4地址:80/guacamole

默认用户: guacadmin

默认密码: guacadmin

安装完毕登录后自行修改

宿主机的配置至少要有1核2G内存10G硬盘,否则开设可能会导致宿主机卡死!

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

一键开设RustDesk的容器

  • 已设置崩溃自启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 传输质量看你的服务器和各端之间的连通性和延迟

一个跨端的远控中继端(非客户端),支持双向控制

宿主机需要至少1核1G内存10G硬盘,对带宽的需求极低

开设

安装后客户端在这里找 https://github.com/rustdesk/rustdesk/releases/latest

在设置中设置中继服务器的IP即可,支持 Android、Windows、Linux、浏览器 端,支持电脑远控手机

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onerustdesk.sh -o onerustdesk.sh && chmod +x onerustdesk.sh && bash onerustdesk.sh

删除

删除容器

shell
docker rm -f hbbs
-docker rm -f hbbr

删除对应镜像

shell
docker rmi rustdesk/rustdesk-server
`,71)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_docker_docker_custom.md.DLz-IfHe.lean.js b/assets/guide_docker_docker_custom.md.DLz-IfHe.lean.js deleted file mode 100644 index 6abcef01a2..0000000000 --- a/assets/guide_docker_docker_custom.md.DLz-IfHe.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"使用Docker一键安装某些容器的脚本","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_custom.md","filePath":"guide/docker/docker_custom.md","lastUpdated":1772422214000}'),e={name:"guide/docker/docker_custom.md"};function l(p,s,n,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h("",71)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_docker_docker_custom.md.MBT0wSpc.js b/assets/guide_docker_docker_custom.md.MBT0wSpc.js new file mode 100644 index 0000000000..9452e9672e --- /dev/null +++ b/assets/guide_docker_docker_custom.md.MBT0wSpc.js @@ -0,0 +1,11 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"使用Docker一键安装某些容器的脚本","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_custom.md","filePath":"guide/docker/docker_custom.md","lastUpdated":1772424525000}'),l={name:"guide/docker/docker_custom.md"};function p(t,s,h,r,k,d){return e(),a("div",null,s[0]||(s[0]=[n(`

使用Docker一键安装某些容器的脚本

每个容器都有对应的配置要求,自行查看,内存不够的用https://github.com/spiritLHLS/addswap

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

开设虚拟内存补足也行

注意,以下脚本使用前务必使用本套教程中的环境安装脚本进行前期环境安装

一键开设Firefox浏览器的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置密码
  • 可自定义容器最大的内存占用
  • 可选是否开启VNC端口,默认不开启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 不支持声音映射,无论是WEB端还是VNC端都无法传输声音

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码1G硬盘

开设

如果未设置自定义密码,开设后默认的密码是oneclick

默认的web端口是3003,开设后打开本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

删除

修改以下端口号3003为你实际的端口号,然后执行命令回车两次即可删除容器、配置文件、对应镜像

shell
PORT="3003"
+docker stop firefox_\${PORT}
+docker rm -f firefox_\${PORT}
+rm -rf /usr/local/bin/firefox_\${PORT}
+docker rmi jlesage/firefox

一键开设Chrome浏览器的容器

  • 已设置崩溃自启
  • 自带web的校验,可自设置密码
  • 可自定义容器最大的内存占用
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 支持声音映射

宿主机需要至少1核2G内存10G硬盘,开设的容器大小将占用起码1G硬盘

首次安装过程中最好在screen中挂起执行,避免长时间运行SSH连接断开

开设

如果未设置自定义用户名,开设后默认的用户名是oneclick

如果未设置自定义密码,开设后默认的密码是oneclick

默认的http端口是3004,开设后打开http://本机IPV4:端口即可

默认的https端口是3005,开设后打开https://本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onechromium.sh -o onechromium.sh && chmod +x onechromium.sh && bash onechromium.sh

删除

修改以下端口号3004为你实际的http端口号,然后执行命令回车两次即可删除容器、配置文件、对应镜像

shell
PORT="3004"
+docker stop chromium_\${PORT}
+docker rm -f chromium_\${PORT}
+rm -rf /usr/local/bin/config_\${PORT}
+rm -rf /usr/local/bin/password_\${PORT}
+docker rmi lscr.io/linuxserver/chromium

注意事项

  • nginx,caddy等https映射的时候要映射3004的端口,不要映射3005端口
  • 部署以后安静的等待15分钟,不然中文库没安装全,会出现不可预料的错误
  • 进入远程桌面浏览器以后点击左侧的设置->点开输入法进行设置,不然没法输入中文

图片

一键开设Desktop的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置用户名和密码
  • 可自定义容器最大的内存占用
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 支持声音映射,WEB端可传输声音

完整的Linux桌面,可以在上面使用浏览器

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码3.2G硬盘

开设

开设后默认的用户名是onew,密码是oneclick,默认的内存最大占用是2GB

默认的http协议的web端口是3004,默认的https协议的web端口是3005,开设后打开对应协议的本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

删除

执行

shell
docker ps -a

查询name的前缀是webtop的容器,记录容器的ID用

shell
docker rm -f 容器的ID

删除所有关联的容器后可用

shell
docker rmi lscr.io/linuxserver/webtop

删除对应镜像

一键安装guacamole

一个网页端连接SSH或RDP等协议控制服务器的玩意

网址:http://你的IPV4地址:80/guacamole

默认用户: guacadmin

默认密码: guacadmin

安装完毕登录后自行修改

宿主机的配置至少要有1核2G内存10G硬盘,否则开设可能会导致宿主机卡死!

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

一键开设RustDesk的容器

  • 已设置崩溃自启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 传输质量看你的服务器和各端之间的连通性和延迟

一个跨端的远控中继端(非客户端),支持双向控制

宿主机需要至少1核1G内存10G硬盘,对带宽的需求极低

开设

安装后客户端在这里找 https://github.com/rustdesk/rustdesk/releases/latest

在设置中设置中继服务器的IP即可,支持 Android、Windows、Linux、浏览器 端,支持电脑远控手机

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onerustdesk.sh -o onerustdesk.sh && chmod +x onerustdesk.sh && bash onerustdesk.sh

删除

删除容器

shell
docker rm -f hbbs
+docker rm -f hbbr

删除对应镜像

shell
docker rmi rustdesk/rustdesk-server
`,71)]))}const F=i(l,[["render",p]]);export{c as __pageData,F as default}; diff --git a/assets/guide_docker_docker_custom.md.MBT0wSpc.lean.js b/assets/guide_docker_docker_custom.md.MBT0wSpc.lean.js new file mode 100644 index 0000000000..39b48c4bf2 --- /dev/null +++ b/assets/guide_docker_docker_custom.md.MBT0wSpc.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"使用Docker一键安装某些容器的脚本","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_custom.md","filePath":"guide/docker/docker_custom.md","lastUpdated":1772424525000}'),l={name:"guide/docker/docker_custom.md"};function p(t,s,h,r,k,d){return e(),a("div",null,s[0]||(s[0]=[n("",71)]))}const F=i(l,[["render",p]]);export{c as __pageData,F as default}; diff --git a/assets/guide_docker_docker_install.md.BLH4X-Np.js b/assets/guide_docker_docker_install.md.BLH4X-Np.js new file mode 100644 index 0000000000..afd4a5a962 --- /dev/null +++ b/assets/guide_docker_docker_install.md.BLH4X-Np.js @@ -0,0 +1,2 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_install.md","filePath":"guide/docker/docker_install.md","lastUpdated":1772424525000}'),l={name:"guide/docker/docker_install.md"};function n(h,s,p,k,d,r){return e(),a("div",null,s[0]||(s[0]=[t(`

前言

支持开设 Docker 虚拟化的各系统,含 Linux、Android、Windows 系统

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存

TIP

内存开点swap免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 检测系统环境,安装对应组件
  • 安装docker和docker-compose,这里有判断为国际服务器还是国内服务器,自动安装对应源的docker
  • 下载默认需要的一些配置脚本,设置默认的网络配置
  • 检测如果存在IPV6地址,检测其是否大于或等于/112,如果符合条件,则配置docker的ipv6的网络
  • 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
  • 支持x86_64和ARM架构的服务器
  • 安装过程中会要求你输入一些选项,选择Docker安装路径,选择Docker安装是否可限制硬盘

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

bash dockerinstall.sh

TIP

环境安装过程中可能要求你重启服务器后再次执行脚本,详见脚本运行后的说明

检测Docker是否支持限制容器硬盘大小

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

或者指定不同的存储限制大小(单位:MB),默认测试500MB限制的容器是否限制成功

shell
# 1GB限制
+bash disk_test.sh 1000

卸载 Docker 环境

一键卸载 Docker 全套环境,包括所有容器、镜像、网络、systemd 服务、二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。薐删内容包括所有容器、镜像、网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

`,34)]))}const F=i(l,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_docker_docker_install.md.BLH4X-Np.lean.js b/assets/guide_docker_docker_install.md.BLH4X-Np.lean.js new file mode 100644 index 0000000000..2e2bd4cf32 --- /dev/null +++ b/assets/guide_docker_docker_install.md.BLH4X-Np.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_install.md","filePath":"guide/docker/docker_install.md","lastUpdated":1772424525000}'),l={name:"guide/docker/docker_install.md"};function n(h,s,p,k,d,r){return e(),a("div",null,s[0]||(s[0]=[t("",34)]))}const F=i(l,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_docker_docker_install.md.CvJp_NTo.js b/assets/guide_docker_docker_install.md.CvJp_NTo.js deleted file mode 100644 index 8dcddc323a..0000000000 --- a/assets/guide_docker_docker_install.md.CvJp_NTo.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_install.md","filePath":"guide/docker/docker_install.md","lastUpdated":1772422214000}'),l={name:"guide/docker/docker_install.md"};function e(p,s,n,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h(`

前言

支持开设 Docker 虚拟化的各系统,含 Linux、Android、Windows 系统

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存

TIP

内存开点swap免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 检测系统环境,安装对应组件
  • 安装docker和docker-compose,这里有判断为国际服务器还是国内服务器,自动安装对应源的docker
  • 下载默认需要的一些配置脚本,设置默认的网络配置
  • 检测如果存在IPV6地址,检测其是否大于或等于/112,如果符合条件,则配置docker的ipv6的网络
  • 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
  • 支持x86_64和ARM架构的服务器
  • 安装过程中会要求你输入一些选项,选择Docker安装路径,选择Docker安装是否可限制硬盘

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

bash dockerinstall.sh

TIP

环境安装过程中可能要求你重启服务器后再次执行脚本,详见脚本运行后的说明

检测Docker是否支持限制容器硬盘大小

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

或者指定不同的存储限制大小(单位:MB),默认测试500MB限制的容器是否限制成功

shell
# 1GB限制
-bash disk_test.sh 1000

卸载 Docker 环境

一键卸载 Docker 全套环境,包括所有容器、镜像、网络、systemd 服务、二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。薐删内容包括所有容器、镜像、网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

`,34)]))}const F=i(l,[["render",e]]);export{o as __pageData,F as default}; diff --git a/assets/guide_docker_docker_install.md.CvJp_NTo.lean.js b/assets/guide_docker_docker_install.md.CvJp_NTo.lean.js deleted file mode 100644 index 196ec5b7c9..0000000000 --- a/assets/guide_docker_docker_install.md.CvJp_NTo.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_install.md","filePath":"guide/docker/docker_install.md","lastUpdated":1772422214000}'),l={name:"guide/docker/docker_install.md"};function e(p,s,n,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h("",34)]))}const F=i(l,[["render",e]]);export{o as __pageData,F as default}; diff --git a/assets/guide_docker_docker_macos.md.BxM3fUyM.js b/assets/guide_docker_docker_macos.md.H8XECkrb.js similarity index 86% rename from assets/guide_docker_docker_macos.md.BxM3fUyM.js rename to assets/guide_docker_docker_macos.md.H8XECkrb.js index 9e765bbf73..6a5d82f1a2 100644 --- a/assets/guide_docker_docker_macos.md.BxM3fUyM.js +++ b/assets/guide_docker_docker_macos.md.H8XECkrb.js @@ -1 +1 @@ -import{_ as a,c as o,o as r,ag as t}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"在Docker中开设Macos虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_macos.md","filePath":"guide/docker/docker_macos.md","lastUpdated":1772422214000}'),c={name:"guide/docker/docker_macos.md"};function s(d,e,i,n,k,h){return r(),o("div",null,e[0]||(e[0]=[t('

在Docker中开设Macos虚拟机

通过dockur开设

原始项目

https://github.com/dockur/macos

通过OSX开设

原始项目

https://github.com/sickcodes/Docker-OSX

',7)]))}const p=a(c,[["render",s]]);export{_ as __pageData,p as default}; +import{_ as a,c as o,o as r,ag as t}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"在Docker中开设Macos虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_macos.md","filePath":"guide/docker/docker_macos.md","lastUpdated":1772424525000}'),c={name:"guide/docker/docker_macos.md"};function s(d,e,i,n,k,h){return r(),o("div",null,e[0]||(e[0]=[t('

在Docker中开设Macos虚拟机

通过dockur开设

原始项目

https://github.com/dockur/macos

通过OSX开设

原始项目

https://github.com/sickcodes/Docker-OSX

',7)]))}const p=a(c,[["render",s]]);export{_ as __pageData,p as default}; diff --git a/assets/guide_docker_docker_macos.md.BxM3fUyM.lean.js b/assets/guide_docker_docker_macos.md.H8XECkrb.lean.js similarity index 61% rename from assets/guide_docker_docker_macos.md.BxM3fUyM.lean.js rename to assets/guide_docker_docker_macos.md.H8XECkrb.lean.js index eed1504d58..0e3bf3a5b4 100644 --- a/assets/guide_docker_docker_macos.md.BxM3fUyM.lean.js +++ b/assets/guide_docker_docker_macos.md.H8XECkrb.lean.js @@ -1 +1 @@ -import{_ as a,c as o,o as r,ag as t}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"在Docker中开设Macos虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_macos.md","filePath":"guide/docker/docker_macos.md","lastUpdated":1772422214000}'),c={name:"guide/docker/docker_macos.md"};function s(d,e,i,n,k,h){return r(),o("div",null,e[0]||(e[0]=[t("",7)]))}const p=a(c,[["render",s]]);export{_ as __pageData,p as default}; +import{_ as a,c as o,o as r,ag as t}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"在Docker中开设Macos虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_macos.md","filePath":"guide/docker/docker_macos.md","lastUpdated":1772424525000}'),c={name:"guide/docker/docker_macos.md"};function s(d,e,i,n,k,h){return r(),o("div",null,e[0]||(e[0]=[t("",7)]))}const p=a(c,[["render",s]]);export{_ as __pageData,p as default}; diff --git a/assets/guide_docker_docker_precheck.md.Bnjd4dU1.js b/assets/guide_docker_docker_precheck.md.FwVDrBjS.js similarity index 93% rename from assets/guide_docker_docker_precheck.md.Bnjd4dU1.js rename to assets/guide_docker_docker_precheck.md.FwVDrBjS.js index 581e6b8f61..82f37f73c0 100644 --- a/assets/guide_docker_docker_precheck.md.Bnjd4dU1.js +++ b/assets/guide_docker_docker_precheck.md.FwVDrBjS.js @@ -1 +1 @@ -import{_ as r,c as o,o as a,ag as c}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_precheck.md","filePath":"guide/docker/docker_precheck.md","lastUpdated":1772422214000}'),t={name:"guide/docker/docker_precheck.md"};function d(p,e,i,n,s,l){return a(),o("div",null,e[0]||(e[0]=[c('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

WARNING

如果宿主机带IPV6网络的话,安装会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/docker

项目特点

通过docker批量或单独开设NAT服务器(Bulk or individual NAT server provisioning via docker)

默认使用debian系统可选alpine系统,每个容器自带1个外网ssh端口,25个内外网一致端口,可选择是否绑定IPV6地址

默认创建的是非特权容器,且不挂载与宿主机的docker的守护进程之间的通信,所以宿主机创建的docker虚拟化的NAT服务器内无法再嵌套虚拟化docker

默认安装并启用lxcfs,使得在容器内的查询资源时CPU和内存使用的是配置的视图而不是宿主机的视图

默认可选择是否共享宿主机的硬盘,在Docker安装的时候可选择是否安装为可限制硬盘大小的环境

配置要求

系统可安装docker即可用,网络能连接Github的raw界面就能用,硬件配置只要不拉跨就行,空闲硬盘有3G就行

(如果需要绑定IPV6地址,那么请保证使用本套脚本的环境预设脚本进行环境安装,需要它自动预设部分设置)

如果硬件资源只是好了一点,需要限制更多东西并需要限制硬盘大小,可使用incus分区的脚本批量开LXC虚拟化的容器

如果硬件非常好资源很多,可使用PVE分区的脚本批量开KVM虚拟化的虚拟机

推荐在开设NAT服务器前先增加部分SWAP虚拟内存,避免突发的内存占用导致宿主机卡死

',17)]))}const _=r(t,[["render",d]]);export{h as __pageData,_ as default}; +import{_ as r,c as o,o as a,ag as c}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_precheck.md","filePath":"guide/docker/docker_precheck.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_precheck.md"};function d(p,e,i,n,s,l){return a(),o("div",null,e[0]||(e[0]=[c('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

WARNING

如果宿主机带IPV6网络的话,安装会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/docker

项目特点

通过docker批量或单独开设NAT服务器(Bulk or individual NAT server provisioning via docker)

默认使用debian系统可选alpine系统,每个容器自带1个外网ssh端口,25个内外网一致端口,可选择是否绑定IPV6地址

默认创建的是非特权容器,且不挂载与宿主机的docker的守护进程之间的通信,所以宿主机创建的docker虚拟化的NAT服务器内无法再嵌套虚拟化docker

默认安装并启用lxcfs,使得在容器内的查询资源时CPU和内存使用的是配置的视图而不是宿主机的视图

默认可选择是否共享宿主机的硬盘,在Docker安装的时候可选择是否安装为可限制硬盘大小的环境

配置要求

系统可安装docker即可用,网络能连接Github的raw界面就能用,硬件配置只要不拉跨就行,空闲硬盘有3G就行

(如果需要绑定IPV6地址,那么请保证使用本套脚本的环境预设脚本进行环境安装,需要它自动预设部分设置)

如果硬件资源只是好了一点,需要限制更多东西并需要限制硬盘大小,可使用incus分区的脚本批量开LXC虚拟化的容器

如果硬件非常好资源很多,可使用PVE分区的脚本批量开KVM虚拟化的虚拟机

推荐在开设NAT服务器前先增加部分SWAP虚拟内存,避免突发的内存占用导致宿主机卡死

',17)]))}const _=r(t,[["render",d]]);export{h as __pageData,_ as default}; diff --git a/assets/guide_docker_docker_precheck.md.Bnjd4dU1.lean.js b/assets/guide_docker_docker_precheck.md.FwVDrBjS.lean.js similarity index 60% rename from assets/guide_docker_docker_precheck.md.Bnjd4dU1.lean.js rename to assets/guide_docker_docker_precheck.md.FwVDrBjS.lean.js index a415deac4d..bafe51103d 100644 --- a/assets/guide_docker_docker_precheck.md.Bnjd4dU1.lean.js +++ b/assets/guide_docker_docker_precheck.md.FwVDrBjS.lean.js @@ -1 +1 @@ -import{_ as r,c as o,o as a,ag as c}from"./chunks/framework.CSeR4K32.js";const h=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_precheck.md","filePath":"guide/docker/docker_precheck.md","lastUpdated":1772422214000}'),t={name:"guide/docker/docker_precheck.md"};function d(p,e,i,n,s,l){return a(),o("div",null,e[0]||(e[0]=[c("",17)]))}const _=r(t,[["render",d]]);export{h as __pageData,_ as default}; +import{_ as r,c as o,o as a,ag as c}from"./chunks/framework.QPV3Ar9-.js";const h=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_precheck.md","filePath":"guide/docker/docker_precheck.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_precheck.md"};function d(p,e,i,n,s,l){return a(),o("div",null,e[0]||(e[0]=[c("",17)]))}const _=r(t,[["render",d]]);export{h as __pageData,_ as default}; diff --git a/assets/guide_docker_docker_qa.md.B8nIoB11.js b/assets/guide_docker_docker_qa.md.B8nIoB11.js new file mode 100644 index 0000000000..854a940f44 --- /dev/null +++ b/assets/guide_docker_docker_qa.md.B8nIoB11.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const b=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_qa.md","filePath":"guide/docker/docker_qa.md","lastUpdated":1772424525000}'),p={name:"guide/docker/docker_qa.md"};function d(t,e,r,l,c,o){return n(),s("div",null,e[0]||(e[0]=[i('

解惑

常见的一些docker命令

查询某个容器的实时占用

docker stats 容器名字

进入某个容器

docker exec -it 容器名字 /bin/bash

清理 Docker 缓存,清理未使用的资源,包括镜像、容器、网络等

docker system prune -a

卸载所有docker的镜像和容器

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

查看对应容器日志

docker logs 容器名字或ID

查看docker整体的disk占用

docker system df

查看所有容器

docker ps -a

查看所有镜像

docker images

删除某个特定容器

docker rm -f 容器名字或ID

删除某个特定镜像

docker rmi 镜像名字或ID
',22)]))}const h=a(p,[["render",d]]);export{b as __pageData,h as default}; diff --git a/assets/guide_docker_docker_qa.md.B8nIoB11.lean.js b/assets/guide_docker_docker_qa.md.B8nIoB11.lean.js new file mode 100644 index 0000000000..e717dc3db5 --- /dev/null +++ b/assets/guide_docker_docker_qa.md.B8nIoB11.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as n,ag as i}from"./chunks/framework.QPV3Ar9-.js";const b=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_qa.md","filePath":"guide/docker/docker_qa.md","lastUpdated":1772424525000}'),p={name:"guide/docker/docker_qa.md"};function d(t,e,r,l,c,o){return n(),s("div",null,e[0]||(e[0]=[i("",22)]))}const h=a(p,[["render",d]]);export{b as __pageData,h as default}; diff --git a/assets/guide_docker_docker_qa.md.PKDeHpSh.js b/assets/guide_docker_docker_qa.md.PKDeHpSh.js deleted file mode 100644 index bfe2678a12..0000000000 --- a/assets/guide_docker_docker_qa.md.PKDeHpSh.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_qa.md","filePath":"guide/docker/docker_qa.md","lastUpdated":1772422214000}'),i={name:"guide/docker/docker_qa.md"};function n(d,a,c,o,l,r){return t(),s("div",null,a[0]||(a[0]=[p('

解惑

常见的一些docker命令

查询某个容器的实时占用

docker stats 容器名字

进入某个容器

docker exec -it 容器名字 /bin/bash

清理 Docker 缓存,清理未使用的资源,包括镜像、容器、网络等

docker system prune -a

卸载所有docker的镜像和容器

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

查看对应容器日志

docker logs 容器名字或ID

查看docker整体的disk占用

docker system df

查看所有容器

docker ps -a

查看所有镜像

docker images

删除某个特定容器

docker rm -f 容器名字或ID

删除某个特定镜像

docker rmi 镜像名字或ID
',22)]))}const u=e(i,[["render",n]]);export{g as __pageData,u as default}; diff --git a/assets/guide_docker_docker_qa.md.PKDeHpSh.lean.js b/assets/guide_docker_docker_qa.md.PKDeHpSh.lean.js deleted file mode 100644 index 9c2d10f7e6..0000000000 --- a/assets/guide_docker_docker_qa.md.PKDeHpSh.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as s,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_qa.md","filePath":"guide/docker/docker_qa.md","lastUpdated":1772422214000}'),i={name:"guide/docker/docker_qa.md"};function n(d,a,c,o,l,r){return t(),s("div",null,a[0]||(a[0]=[p("",22)]))}const u=e(i,[["render",n]]);export{g as __pageData,u as default}; diff --git a/assets/guide_docker_docker_thanks.md.BEt3j9gt.js b/assets/guide_docker_docker_thanks.md.BRma5Ogy.js similarity index 94% rename from assets/guide_docker_docker_thanks.md.BEt3j9gt.js rename to assets/guide_docker_docker_thanks.md.BRma5Ogy.js index d4b8da42a3..4c12d9da5a 100644 --- a/assets/guide_docker_docker_thanks.md.BEt3j9gt.js +++ b/assets/guide_docker_docker_thanks.md.BRma5Ogy.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/docker/docker_thanks.md","filePath":"guide/docker/docker_thanks.md","lastUpdated":1772422214000}'),n={name:"guide/docker/docker_thanks.md"};function p(h,r,c,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o('

致谢

https://hub.docker.com/_/debian

https://hub.docker.com/r/redroid/redroid

https://github.com/NetrisTV/ws-scrcpy

https://guacamole.apache.org/doc/gug/introduction.html

https://blog.imoeq.com/oracle-arm-run-android-by-docker

https://blog.imoeq.com/scrcpy-run-a-android-web-page

https://github.com/NetrisTV/ws-scrcpy

https://www.howtoforge.com/how-to-install-apache-guacamole-as-docker-container-on-ubuntu/

https://releases.hashicorp.com/vagrant/

https://github.com/hashicorp/vagrant/

https://app.vagrantup.com/peru

https://medium.com/axon-technologies/installing-a-windows-virtual-machine-in-a-linux-docker-container-c78e4c3f9ba1

https://forum.garudalinux.org/t/error-while-attempting-to-create-a-virtual-machine-with-virt-manager/18534/4

https://github.com/jlesage/docker-firefox

https://github.com/linuxserver/docker-webtop

https://github.com/rustdesk/rustdesk

https://github.com/yoursunny/ndpresponder

https://github.com/linuxserver/docker-chromium

https://github.com/SuperManito/LinuxMirrors

感谢 @Ella-Alinda 和 @CoiaPrant 提供的Docker指导

',21)]))}const d=e(n,[["render",p]]);export{g as __pageData,d as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/docker/docker_thanks.md","filePath":"guide/docker/docker_thanks.md","lastUpdated":1772424525000}'),n={name:"guide/docker/docker_thanks.md"};function p(h,r,c,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o('

致谢

https://hub.docker.com/_/debian

https://hub.docker.com/r/redroid/redroid

https://github.com/NetrisTV/ws-scrcpy

https://guacamole.apache.org/doc/gug/introduction.html

https://blog.imoeq.com/oracle-arm-run-android-by-docker

https://blog.imoeq.com/scrcpy-run-a-android-web-page

https://github.com/NetrisTV/ws-scrcpy

https://www.howtoforge.com/how-to-install-apache-guacamole-as-docker-container-on-ubuntu/

https://releases.hashicorp.com/vagrant/

https://github.com/hashicorp/vagrant/

https://app.vagrantup.com/peru

https://medium.com/axon-technologies/installing-a-windows-virtual-machine-in-a-linux-docker-container-c78e4c3f9ba1

https://forum.garudalinux.org/t/error-while-attempting-to-create-a-virtual-machine-with-virt-manager/18534/4

https://github.com/jlesage/docker-firefox

https://github.com/linuxserver/docker-webtop

https://github.com/rustdesk/rustdesk

https://github.com/yoursunny/ndpresponder

https://github.com/linuxserver/docker-chromium

https://github.com/SuperManito/LinuxMirrors

感谢 @Ella-Alinda 和 @CoiaPrant 提供的Docker指导

',21)]))}const d=e(n,[["render",p]]);export{g as __pageData,d as default}; diff --git a/assets/guide_docker_docker_thanks.md.BEt3j9gt.lean.js b/assets/guide_docker_docker_thanks.md.BRma5Ogy.lean.js similarity index 57% rename from assets/guide_docker_docker_thanks.md.BEt3j9gt.lean.js rename to assets/guide_docker_docker_thanks.md.BRma5Ogy.lean.js index a5a0759363..013c98e73f 100644 --- a/assets/guide_docker_docker_thanks.md.BEt3j9gt.lean.js +++ b/assets/guide_docker_docker_thanks.md.BRma5Ogy.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/docker/docker_thanks.md","filePath":"guide/docker/docker_thanks.md","lastUpdated":1772422214000}'),n={name:"guide/docker/docker_thanks.md"};function p(h,r,c,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o("",21)]))}const d=e(n,[["render",p]]);export{g as __pageData,d as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/docker/docker_thanks.md","filePath":"guide/docker/docker_thanks.md","lastUpdated":1772424525000}'),n={name:"guide/docker/docker_thanks.md"};function p(h,r,c,i,s,l){return a(),t("div",null,r[0]||(r[0]=[o("",21)]))}const d=e(n,[["render",p]]);export{g as __pageData,d as default}; diff --git a/assets/guide_docker_docker_windows.md.BYgcyuZP.js b/assets/guide_docker_docker_windows.md.BYgcyuZP.js deleted file mode 100644 index 6373472658..0000000000 --- a/assets/guide_docker_docker_windows.md.BYgcyuZP.js +++ /dev/null @@ -1,26 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在Docker中开设Windows系统虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_windows.md","filePath":"guide/docker/docker_windows.md","lastUpdated":1772422214000}'),e={name:"guide/docker/docker_windows.md"};function p(l,s,h,d,r,o){return t(),a("div",null,s[0]||(s[0]=[n(`

在Docker中开设Windows系统虚拟机

一键开设(通过vagrant)

  • 共享宿主机所有资源(CPU、内存、硬盘),基于docker所以只占用系统的大小,适合多开
  • 共享IP,做了docker的NAT映射,可选择是否映射到外网或仅内网
  • 设置的win系统默认最多占用为1核2G内存50G硬盘,实际占用看使用情况
  • 无需iptables进行NAT映射,删除容器时自动删除了端口的映射,方便维护
  • 需要考虑宿主机是否支持嵌套虚拟化,暂时只支持X86_64架构的系统

宿主机需要支持嵌套虚拟化,且暂时只支持X86_64架构的系统,否则不可开设

执行

egrep -c '(vmx|svm)' /proc/cpuinfo

结果需要大于或等于1,不能为0

然后需要先设置docker切换使用v1版cgroup启动

sed -i 's/GRUB_CMDLINE_LINUX="\\(.*\\)"/GRUB_CMDLINE_LINUX="\\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
-update-grub
-ls

如果执行都无报错,执行reboot重启系统以使得设置生效

支持的镜像

使用的自建的镜像:https://hub.docker.com/r/spiritlhl/wds

镜像名字镜像大小
1020G
202217.5G
201917G

创建出的容器大小会比镜像大小大一丢丢,但不多

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewindows.sh -o onewindows.sh && chmod +x onewindows.sh

使用方法

开设前务必在screen窗口中执行,避免SSH长期链接造成掉线卡死

./onewindows.sh 容器名字 系统版本 RDP的端口 是否为外网映射(留空则默认是N,可选Y)

开设前需要确认宿主机至少有镜像大小的两倍大小加10G硬盘的大小,因为docker在创建容器时得先将镜像拉到本地再创建

创建过程中,硬盘占用峰值为宿主机系统+镜像大小+容器大小

比如开设容器名字为test,占用最低的Windows 2019系统的容器,映射外网RDP端口为13389,设置为外网映射(映射到你的服务器外网IPV4地址)

./onewindows.sh test 2019 13389 Y

开设后默认的用户名是Administratorvagrant

默认的密码是vagrant

如果你选择开设映射的外网端口,务必登录后修改对应账户的密码(两个账户都可能有,自行尝试),否则可能被人爆破滥用

删除

需要删除对应镜像和容器,先执行docker ps -adocker images查询镜像是spiritlhl/wds的ID,然后对应使用

docker rm -f 容器的ID
-docker rmi 镜像的ID

删除后可开设别的版本的windows容器

(在宿主机上使用Docker安装Windows系统,好像绕过了某些商家不允许DD成Win系统的TOS限制)

手动开设(通过 Dockur 项目)

本项目支持在宿主机不支持嵌套虚拟化的情况下,使用 QEMU 进行虚拟机创建。

原始项目地址

注意事项:

  • 原始项目仅为启动器,不包含 Windows 镜像;

  • 使用时需下载镜像文件,在境内网络环境下首次启动容器需约 4 小时(含镜像下载和安装);

  • 默认要求宿主机具备以下最低硬件资源(可通过修改脚本进行调整):

    • CPU:至少 4 核
    • 内存:至少 4G
    • 硬盘:至少 64G

如需魔改启动脚本以减少资源占用或调整其他参数,可参考以下文章:

对于 x86_64 架构用户

提供一个已魔改的启动器(单文件版本),方便自行构建 Windows 镜像。该版本将系统文件和镜像直接写入 Docker 写入层中,无需额外挂载镜像文件

下载链接: https://github.com/oneclickvirt/docker/releases/download/amd64_builder/builder.tar

导入 Docker 镜像:

bash
docker load -i builder.tar

使用自定义 Windows ISO 镜像启动容器

首先从以下地址下载 Windows ISO 镜像: https://github.com/ILLKX/Windows

启动容器示例命令:

bash
docker run -it -d \\
-  -e RAM_SIZE="8G" \\
-  -e CPU_CORES="4" \\
-  --name win2022 \\
-  -p 8006:8006 \\
-  --device=/dev/kvm \\
-  --device=/dev/net/tun \\
-  --cap-add NET_ADMIN \\
-  -v "$(pwd)/Windows镜像文件.iso:/boot.iso" \\
-  --stop-timeout 120 \\
-  windows:builder

使用内置镜像(推荐快速部署)

我们也提供一个已集成系统镜像和配置的成品镜像,特点如下:

  • 镜像大小约 26G(包含系统镜像与默认配置);
  • 已集成自动磁盘扩容与开机任务;
  • 下载后导入 Docker 即可使用;
  • 注意:合并下载路径需要约 60G 空间。

下载与合并切片

bash
curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/mergew.sh -o mergew.sh
-chmod +x mergew.sh
-bash mergew.sh

启动容器

bash
docker load -i win2022.tar
-docker run -it -d \\
-  -e RAM_SIZE="4G" \\
-  -e CPU_CORES="2" \\
-  --name win2022 \\
-  -p 8006:8006 \\
-  --device=/dev/kvm \\
-  --device=/dev/net/tun \\
-  --cap-add NET_ADMIN \\
-  --stop-timeout 120 \\
-  windows:2022

注意事项

不建议在当前镜像基础上使用 docker commit 保存修改,因为写入层会不断叠加,导致二次生成的镜像体积可能超过 40G。

如需进行个性化配置或集成应用,请builder 镜像开始自行构建新镜像,以保持镜像整洁与可维护性。

`,58)]))}const g=i(e,[["render",p]]);export{c as __pageData,g as default}; diff --git a/assets/guide_docker_docker_windows.md.BYgcyuZP.lean.js b/assets/guide_docker_docker_windows.md.BYgcyuZP.lean.js deleted file mode 100644 index 06e33ff6ce..0000000000 --- a/assets/guide_docker_docker_windows.md.BYgcyuZP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在Docker中开设Windows系统虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_windows.md","filePath":"guide/docker/docker_windows.md","lastUpdated":1772422214000}'),e={name:"guide/docker/docker_windows.md"};function p(l,s,h,d,r,o){return t(),a("div",null,s[0]||(s[0]=[n("",58)]))}const g=i(e,[["render",p]]);export{c as __pageData,g as default}; diff --git a/assets/guide_docker_docker_windows.md.CyUC6-x6.js b/assets/guide_docker_docker_windows.md.CyUC6-x6.js new file mode 100644 index 0000000000..64cf499eab --- /dev/null +++ b/assets/guide_docker_docker_windows.md.CyUC6-x6.js @@ -0,0 +1,26 @@ +import{_ as a,c as i,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"在Docker中开设Windows系统虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_windows.md","filePath":"guide/docker/docker_windows.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_windows.md"};function p(l,s,r,h,d,o){return n(),i("div",null,s[0]||(s[0]=[e(`

在Docker中开设Windows系统虚拟机

一键开设(通过vagrant)

  • 共享宿主机所有资源(CPU、内存、硬盘),基于docker所以只占用系统的大小,适合多开
  • 共享IP,做了docker的NAT映射,可选择是否映射到外网或仅内网
  • 设置的win系统默认最多占用为1核2G内存50G硬盘,实际占用看使用情况
  • 无需iptables进行NAT映射,删除容器时自动删除了端口的映射,方便维护
  • 需要考虑宿主机是否支持嵌套虚拟化,暂时只支持X86_64架构的系统

宿主机需要支持嵌套虚拟化,且暂时只支持X86_64架构的系统,否则不可开设

执行

egrep -c '(vmx|svm)' /proc/cpuinfo

结果需要大于或等于1,不能为0

然后需要先设置docker切换使用v1版cgroup启动

sed -i 's/GRUB_CMDLINE_LINUX="\\(.*\\)"/GRUB_CMDLINE_LINUX="\\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
+update-grub
+ls

如果执行都无报错,执行reboot重启系统以使得设置生效

支持的镜像

使用的自建的镜像:https://hub.docker.com/r/spiritlhl/wds

镜像名字镜像大小
1020G
202217.5G
201917G

创建出的容器大小会比镜像大小大一丢丢,但不多

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewindows.sh -o onewindows.sh && chmod +x onewindows.sh

使用方法

开设前务必在screen窗口中执行,避免SSH长期链接造成掉线卡死

./onewindows.sh 容器名字 系统版本 RDP的端口 是否为外网映射(留空则默认是N,可选Y)

开设前需要确认宿主机至少有镜像大小的两倍大小加10G硬盘的大小,因为docker在创建容器时得先将镜像拉到本地再创建

创建过程中,硬盘占用峰值为宿主机系统+镜像大小+容器大小

比如开设容器名字为test,占用最低的Windows 2019系统的容器,映射外网RDP端口为13389,设置为外网映射(映射到你的服务器外网IPV4地址)

./onewindows.sh test 2019 13389 Y

开设后默认的用户名是Administratorvagrant

默认的密码是vagrant

如果你选择开设映射的外网端口,务必登录后修改对应账户的密码(两个账户都可能有,自行尝试),否则可能被人爆破滥用

删除

需要删除对应镜像和容器,先执行docker ps -adocker images查询镜像是spiritlhl/wds的ID,然后对应使用

docker rm -f 容器的ID
+docker rmi 镜像的ID

删除后可开设别的版本的windows容器

(在宿主机上使用Docker安装Windows系统,好像绕过了某些商家不允许DD成Win系统的TOS限制)

手动开设(通过 Dockur 项目)

本项目支持在宿主机不支持嵌套虚拟化的情况下,使用 QEMU 进行虚拟机创建。

原始项目地址

注意事项:

  • 原始项目仅为启动器,不包含 Windows 镜像;

  • 使用时需下载镜像文件,在境内网络环境下首次启动容器需约 4 小时(含镜像下载和安装);

  • 默认要求宿主机具备以下最低硬件资源(可通过修改脚本进行调整):

    • CPU:至少 4 核
    • 内存:至少 4G
    • 硬盘:至少 64G

如需魔改启动脚本以减少资源占用或调整其他参数,可参考以下文章:

对于 x86_64 架构用户

提供一个已魔改的启动器(单文件版本),方便自行构建 Windows 镜像。该版本将系统文件和镜像直接写入 Docker 写入层中,无需额外挂载镜像文件

下载链接: https://github.com/oneclickvirt/docker/releases/download/amd64_builder/builder.tar

导入 Docker 镜像:

bash
docker load -i builder.tar

使用自定义 Windows ISO 镜像启动容器

首先从以下地址下载 Windows ISO 镜像: https://github.com/ILLKX/Windows

启动容器示例命令:

bash
docker run -it -d \\
+  -e RAM_SIZE="8G" \\
+  -e CPU_CORES="4" \\
+  --name win2022 \\
+  -p 8006:8006 \\
+  --device=/dev/kvm \\
+  --device=/dev/net/tun \\
+  --cap-add NET_ADMIN \\
+  -v "$(pwd)/Windows镜像文件.iso:/boot.iso" \\
+  --stop-timeout 120 \\
+  windows:builder

使用内置镜像(推荐快速部署)

我们也提供一个已集成系统镜像和配置的成品镜像,特点如下:

  • 镜像大小约 26G(包含系统镜像与默认配置);
  • 已集成自动磁盘扩容与开机任务;
  • 下载后导入 Docker 即可使用;
  • 注意:合并下载路径需要约 60G 空间。

下载与合并切片

bash
curl https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/mergew.sh -o mergew.sh
+chmod +x mergew.sh
+bash mergew.sh

启动容器

bash
docker load -i win2022.tar
+docker run -it -d \\
+  -e RAM_SIZE="4G" \\
+  -e CPU_CORES="2" \\
+  --name win2022 \\
+  -p 8006:8006 \\
+  --device=/dev/kvm \\
+  --device=/dev/net/tun \\
+  --cap-add NET_ADMIN \\
+  --stop-timeout 120 \\
+  windows:2022

注意事项

不建议在当前镜像基础上使用 docker commit 保存修改,因为写入层会不断叠加,导致二次生成的镜像体积可能超过 40G。

如需进行个性化配置或集成应用,请builder 镜像开始自行构建新镜像,以保持镜像整洁与可维护性。

`,58)]))}const u=a(t,[["render",p]]);export{c as __pageData,u as default}; diff --git a/assets/guide_docker_docker_windows.md.CyUC6-x6.lean.js b/assets/guide_docker_docker_windows.md.CyUC6-x6.lean.js new file mode 100644 index 0000000000..7a188ef11e --- /dev/null +++ b/assets/guide_docker_docker_windows.md.CyUC6-x6.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"在Docker中开设Windows系统虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/docker/docker_windows.md","filePath":"guide/docker/docker_windows.md","lastUpdated":1772424525000}'),t={name:"guide/docker/docker_windows.md"};function p(l,s,r,h,d,o){return n(),i("div",null,s[0]||(s[0]=[e("",58)]))}const u=a(t,[["render",p]]);export{c as __pageData,u as default}; diff --git a/assets/guide_incus_incus_custom.md.CwQ9DXPv.js b/assets/guide_incus_incus_custom.md.CwQ9DXPv.js new file mode 100644 index 0000000000..a81e7f1f36 --- /dev/null +++ b/assets/guide_incus_incus_custom.md.CwQ9DXPv.js @@ -0,0 +1,82 @@ +import{_ as a,c as n,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",t="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",o="/assets/lxd7.EJ0s1ls2.png",u="/assets/lxd8.DAOueoww.png",b="/assets/lxd9.Dgmw4lpJ.png",h="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",v="/assets/lxd13.Dwv7xBpz.png",k="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",w="/assets/lxd16.CgeIdYJ2.png",f="/assets/lxd17.CWPY1pea.png",P="/assets/lxd18.DqnpcYcL.png",_="/assets/lxd19.B9_MB265.png",C="/assets/lxd20.rK3P3TT8.png",x="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_custom.md","filePath":"guide/incus/incus_custom.md","lastUpdated":1772424525000}'),F={name:"guide/incus/incus_custom.md"};function V(E,s,z,B,W,A){return e(),n("div",null,s[0]||(s[0]=[p(`

自定义

给incus启用官方的web面板进行控制

先查看 incus论坛活跃用户分享的第三方教程

不懂的部分见 给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://incusimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/incus_images 可见详细说明。

shell
incus remote remove spiritlhl
+incus remote add spiritlhl https://incusimages.spiritlhl.net --protocol simplestreams --public
+incus image list spiritlhl:debian

给宿主机附加免费的IPV6地址段

有的机器本身没有IPV6的/64子网,这里给出一个方法免费附加IPV6的子网。

这里是使用6in4方法解决宿主机本身没有IPV6地址的问题。

TIP

本页面的操作务必在原始系统上操作,保证未使用本项目的其他脚本安装环境(除了PVE,PVE需要先安装好),否则可能导致环境冲突

以下是2023年目前还在运行的免费提供IPV6子网的平台

支持的平台对应需要的安装包协议通道/子网数量
tunnelbroker.netifupdown 或 ifupdown2v4tunnel 或 sit3✖/64 或 5✖/64
tunnelbroker.chifupdown 或 ifupdown2v4tunnel 或 sit3✖/64
ip4market.ruifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
netassist.uaifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipip自定义

免费的平台只解决IPV6有没有的问题,不提供优质的IPV6带宽。

如需优质的带宽,请自建隧道,当ifupdown和ifupdown2都可时,先尝试ifupdown是否可安装成功,否则就安装ifupdown2.

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

初始环境修改

执行

touch /etc/cloud/cloud-init.disabled

关闭cloud-init的自动化覆写先,然后查看本机使用什么管理网络,执行

systemctl is-active systemd-networkd

systemctl is-active networking

看看属于哪种情况,如果是前者active,后者inactive,你需要重装/DD一个不是这样配置的系统,或者切换本机使用ifupdown/ifupdown2管理网络

# 是否需要禁用原网络管理自行评判
+# systemctl stop systemd-networkd
+# systemctl disable systemd-networkd
+# systemctl stop systemd-networkd.socket
+# systemctl disable systemd-networkd.socket

如果需要安装的是ifupdown控制网络,这个工具一般的主流linux系统都有

apt-get install ifupdown -y

如果需要安装的是ifupdown2进行网络管理,而这个工具一般只在debian系上可安装使用

apt-get install ifupdown2 -y

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

systemctl start networking
+systemctl enable networking

然后重启服务器,检验机器的网络是否会因为修改出现重启失联的情况,且执行uptime观察启动已超过1分钟后,再进行后续步骤

如果是是前者inactive,后者active,则不需要切换网络管理程序,直接进行后续操作即可。

由于部分服务器存在默认的内网IPV6路由会与隧道冲突,此时可使用以下命令删除默认的IPV6路由

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

这里假设了你的客户端的服务器的默认网卡是eth0,你可以使用ip -6 route查看默认的路由并替换它,默认路由以default via开头,使用dev指定默认网卡,你只需要按照这个规则找到它即可

目前收集且支持的平台

tunnelbroker_net

结合一键开设带IPV6地址的容器的脚本,就能给每个容器附加来自he的IPV6地址了

缺点是地址比较黑/脏,cloudflare的cdn极有可能套不上,自行测试

  1. https://tunnelbroker.net/ 注册账户,并点击左边的 Create Regular Tunnel

1

  1. 红框处填写你的服务器的IPV4地址,选择物理距离近的连接点,比如机器在美国洛杉矶,就选美国西海岸的连接点,然后显示绿框提示,点Create Tunnel创建即可

2

3

4

  1. 等待出以下界面,点击Example Configurations然后选择对应的系统,比如incus的宿主机那肯定就是Debian/Ubuntu了

5

6

  1. 框住的部分就是要修改的文件和需要复制的内容了

7

复制的时候不要带空行

  1. 转换格式后给你的网络配置文件附加IPV6的设置

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerNet,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改复制粘贴一下转换格式后的配置文件内容,然后执行此命令
+EOF

然后你可以使用cat /etc/network/interfaces查看配置文件是否正常写入了

  1. 如果上面都没问题,就需要启用网络接口即可
apt-get install net-tools iproute2 -y
+systemctl restart networking
  1. 然后你就可以测试IPV6网络是否已附加

执行ifconfig命令,这时应该有一个 he-ipv6 接口,类似下面这样:

8

或者执行:

curl ipv6.ip.sb

回传你绑定IPV6地址

  1. NAT VPS 的额外设置

IPv4 NAT VPS 除了前面提到的替换 IP 操作以外,可能还需要一些额外的设置,否则可能还是无法访问 IPv6 网络。

apt-get install ufw -y
+ufw allow 41

添加相关的路由规则

route -A inet6 add ::/0 dev he-ipv6
  1. 如果不需要该IPV6网络了,想要删除

删除 he-ipv6 网络接口配置(若没有删除重启后会自动启用),记得修改/etc/network/interfaces文件,删除之前红框添加的内容

然后重启服务器,就删除了

tunnelbroker_ch

类似上述的操作,先在 https://www.tunnelbroker.ch/ 注册一个账户先,注册后点击激活的邮件

然后就是填写你的服务器IPV4地址

创建后需要进入Config页面而不是详情页面

见到以下页面千万别使用,先刷新一下本页面,不要弹那个浅蓝色框后再停止刷新

记录以下页面的最后一个红框的内容,准备修改宿主机配置文件

页面的最后一个红框框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerCh,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

ip4market_ru

类似上述的操作,先在 https://tb.ip4market.ru 注册一个账户先,注册邮箱得是非常见邮箱,电话可随便写不验证的,IP填上你要附加的宿主机的IPV4地址

然后就是过Recaptcha的人机验证,点击注册

邮箱会收到激活邮件,里面附带有你的密码,记住它

然后在首页进行登录

然后就会进入这个页面

按住右键,然后复制红框框住的四行内容,也就是

Server IPv4:
+Client IPv4
+Server IPv6
+Client IPv6

这四行内容,按ctrl+c复制或者右键复制

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择Optionip4market,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

netassist_ua

这个平台你在切换网络管理时务必使用ifupdown2而不是ifupdown2安装包,该平台使用sit协议,而sit协议需要在ifupdown2控制的环境中使用

类似上述的操作,先在 https://tb.netassist.ua/ 注册一个账户先,注册后点击激活的邮件,激活页面会有密码显示,记得记录

然后就是填写你的服务器IPV4地址,这个后面可以自己修改,先随便填一个都没问题

然后就到了这个页面了

a

第一个红框是你宿主机的IPV4地址需要填写的位置,要修改就修改那里,然后点change保存

第二个下拉红框选择Linux,然后点击show

b

会出现上面的内容,全选框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionNetAssist,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

c

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

转移不同服务器之间的IPV6子网

相关仓库:https://github.com/oneclickvirt/6in4

该方法将提供一种方式,将A上的IPV6网段拆分一个子ipv6网段的出来,附加到B上使用

你需要在B所在的服务器上使用本套脚本给容器一键配置IPV6地址

功能

  • 自建sit/gre/ipip协议的IPv6隧道
  • 支持自定义要切分出来的IPV6子网大小,将自动计算出合适的CIDR格式的IPV6子网信息
  • 自动识别服务端的IPV6子网大小
  • 将自动设置隧道服务端并打印客户端需要执行的命令
  • 设置IPV6隧道的方法简单易懂,易于删除

环境准备

VPS(A)VPS(B)
一个IPV4地址(server_ipv4)一个IPV4地址(clinet_ipv4)
一个IPV6子网无IPV6地址
以下称之为服务端以下称之为客户端

使用方法

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

执行命令

./6in4.sh client_ipv4 <mode_type> <subnet_size>
选项可选的选项1可选的选项2可选的选项3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type>暂时只支持那三种协议,越靠前的越推荐,不填则默认为sit协议

<subnet_size>只要比原系统子网掩码大就行,且是8的倍数,不填则默认为80

记得client_ipv4替换为需要附加IPV6的机器的IPV4地址,执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可

为防止忘记复制命令,命令本身也将写入到当前路径下的6in4.log文件中,可使用cat 6in4.log查询客户端需要执行的命令

复制下来的命令,务必在 https://ipv6tunnel.spiritlhl.top/ 中选择选项6in4后进行转换

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

检测服务端

systemctl status ndpresponder
ip addr show

检测客户端

ip addr show
curl ipv6.ip.sb

删除隧道

服务端

ip link set server-ipv6 down
+ip tunnel del server-ipv6

客户端

ip link set user-ipv6 down
+ip tunnel del user-ipv6

以上删除的方式只是临时删除,永久删除务必修改删除/etc/network/interfaces文件中你之前增加的内容

后言

实际上 https://tunnelbroker.net/ 支持申请/48大小的IPV6子网,只需要在

图片

这里进行申请,然后转换格式的时候将原先/64的IPV6地址改成/48的IPV6地址,你就能获得一个更大的IPV6子网了

使用WARP给宿主机添加IP出口(IPv4/IPv6)

好处

  • 宿主机安装,能使所有开启的机器都能够享受 Warp 的优势,而无需为每台机器单独进行设置,从而节省资源和简化管理。
  • 宿主机使用内核态 WireGuard,相比于用户态的 WireGuard-Go,实现能够提供更高效的 WireGuard 运行。

手动安装

1.安装WireGuard依赖

  • Debian 和 Ubuntu 系统
# 更新依赖库
+apt update -y
+
+# 安装 WireGuard 运行依赖
+apt install -y --no-install-recommends net-tools openresolv dnsutils
+
+# 安装 WireGuard 协议兼容的工具集合
+apt install -y --no-install-recommends wireguard-tools
  • CentOS 系
# 更新依赖库
+yum update -y
+
+# 安装额外包组件
+yum install -y epel-release 
+
+# 安装 WireGuard 运行依赖
+yum install -y net-tools
+
+# 安装 WireGuard 协议兼容的工具集合
+yum install -y wireguard-tools

2.获取warp账户信息

访问 https://warp.cloudflare.now.cc/?run=register&format=yaml,记录下 private_key, v6 2个值

image.png

3.修改配置文件

  • 创建并编辑 /etc/wireguard/warp.conf 文件,包含<>(尖括号)的部分一起替换掉,这只是为了看起来明显。

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口

[Interface]
+PrivateKey = <替换 PrivateKey>
+Address = 172.16.0.2/32
+Address = <替换 Address v6 地址>/128
+DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = ::/0
+Endpoint = 162.159.193.10:2408
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口
[Interface]
+PrivateKey = <替换 PrivateKey>
+Address = 172.16.0.2/32
+Address = <替换 Address v6 地址>/128
+DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = 0.0.0.0/0
+Endpoint = [2606:4700:d0::a29f:c101]:2408
  • 针对双栈没有必要,毕竟原生的网络出口都会比通过 Warp 中转要好

4.设置地址解析优先级

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口,设置优先使用原生网络的 IPv4 出口
# IPv4 优先
+grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口,设置优先使用原生网络的 IPv6 出口
# IPv6 优先,默认即为 IPv6 优先
+sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

5.连接 Warp,并设置 systemd 进程守护

# 运行 wireguard 连接 Warp。如果这步卡死导致失联,后台重启宿主机即可解决
+wg-quick up warp
+
+# 查看 IPv4
+curl -A a https://api-ipv4.ip.sb/geoip
+
+# 查看 IPv6
+curl -A a https://api-ipv6.ip.sb/geoip
+
+# 测试成功后断开 Warp 连接
+wg-quick down warp
+
+# 重新连接并设置进程守护,以便重启后自动生效
+systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',202)]))}const T=a(F,[["render",V]]);export{D as __pageData,T as default}; diff --git a/assets/guide_incus_incus_custom.md.CwQ9DXPv.lean.js b/assets/guide_incus_incus_custom.md.CwQ9DXPv.lean.js new file mode 100644 index 0000000000..95392ee474 --- /dev/null +++ b/assets/guide_incus_incus_custom.md.CwQ9DXPv.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",t="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",o="/assets/lxd7.EJ0s1ls2.png",u="/assets/lxd8.DAOueoww.png",b="/assets/lxd9.Dgmw4lpJ.png",h="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",v="/assets/lxd13.Dwv7xBpz.png",k="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",w="/assets/lxd16.CgeIdYJ2.png",f="/assets/lxd17.CWPY1pea.png",P="/assets/lxd18.DqnpcYcL.png",_="/assets/lxd19.B9_MB265.png",C="/assets/lxd20.rK3P3TT8.png",x="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",D=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_custom.md","filePath":"guide/incus/incus_custom.md","lastUpdated":1772424525000}'),F={name:"guide/incus/incus_custom.md"};function V(E,s,z,B,W,A){return e(),n("div",null,s[0]||(s[0]=[p("",202)]))}const T=a(F,[["render",V]]);export{D as __pageData,T as default}; diff --git a/assets/guide_incus_incus_custom.md.DdIqjxSp.js b/assets/guide_incus_incus_custom.md.DdIqjxSp.js deleted file mode 100644 index a55a12a726..0000000000 --- a/assets/guide_incus_incus_custom.md.DdIqjxSp.js +++ /dev/null @@ -1,82 +0,0 @@ -import{_ as a,c as e,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const p="/assets/lxd1.CbGLa5s4.png",i="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",o="/assets/lxd4.CSfRHLxz.png",c="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",r="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",b="/assets/lxd11.D6E5sVW2.png",v="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",m="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",P="/assets/lxd17.CWPY1pea.png",_="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",w="/assets/lxd20.rK3P3TT8.png",x="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",T=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_custom.md","filePath":"guide/incus/incus_custom.md","lastUpdated":1772422214000}'),F={name:"guide/incus/incus_custom.md"};function V(E,s,B,W,A,O){return n(),e("div",null,s[0]||(s[0]=[t(`

自定义

给incus启用官方的web面板进行控制

先查看 incus论坛活跃用户分享的第三方教程

不懂的部分见 给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://incusimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/incus_images 可见详细说明。

shell
incus remote remove spiritlhl
-incus remote add spiritlhl https://incusimages.spiritlhl.net --protocol simplestreams --public
-incus image list spiritlhl:debian

给宿主机附加免费的IPV6地址段

有的机器本身没有IPV6的/64子网,这里给出一个方法免费附加IPV6的子网。

这里是使用6in4方法解决宿主机本身没有IPV6地址的问题。

TIP

本页面的操作务必在原始系统上操作,保证未使用本项目的其他脚本安装环境(除了PVE,PVE需要先安装好),否则可能导致环境冲突

以下是2023年目前还在运行的免费提供IPV6子网的平台

支持的平台对应需要的安装包协议通道/子网数量
tunnelbroker.netifupdown 或 ifupdown2v4tunnel 或 sit3✖/64 或 5✖/64
tunnelbroker.chifupdown 或 ifupdown2v4tunnel 或 sit3✖/64
ip4market.ruifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
netassist.uaifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipip自定义

免费的平台只解决IPV6有没有的问题,不提供优质的IPV6带宽。

如需优质的带宽,请自建隧道,当ifupdown和ifupdown2都可时,先尝试ifupdown是否可安装成功,否则就安装ifupdown2.

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

初始环境修改

执行

touch /etc/cloud/cloud-init.disabled

关闭cloud-init的自动化覆写先,然后查看本机使用什么管理网络,执行

systemctl is-active systemd-networkd

systemctl is-active networking

看看属于哪种情况,如果是前者active,后者inactive,你需要重装/DD一个不是这样配置的系统,或者切换本机使用ifupdown/ifupdown2管理网络

# 是否需要禁用原网络管理自行评判
-# systemctl stop systemd-networkd
-# systemctl disable systemd-networkd
-# systemctl stop systemd-networkd.socket
-# systemctl disable systemd-networkd.socket

如果需要安装的是ifupdown控制网络,这个工具一般的主流linux系统都有

apt-get install ifupdown -y

如果需要安装的是ifupdown2进行网络管理,而这个工具一般只在debian系上可安装使用

apt-get install ifupdown2 -y

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

systemctl start networking
-systemctl enable networking

然后重启服务器,检验机器的网络是否会因为修改出现重启失联的情况,且执行uptime观察启动已超过1分钟后,再进行后续步骤

如果是是前者inactive,后者active,则不需要切换网络管理程序,直接进行后续操作即可。

由于部分服务器存在默认的内网IPV6路由会与隧道冲突,此时可使用以下命令删除默认的IPV6路由

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

这里假设了你的客户端的服务器的默认网卡是eth0,你可以使用ip -6 route查看默认的路由并替换它,默认路由以default via开头,使用dev指定默认网卡,你只需要按照这个规则找到它即可

目前收集且支持的平台

tunnelbroker_net

结合一键开设带IPV6地址的容器的脚本,就能给每个容器附加来自he的IPV6地址了

缺点是地址比较黑/脏,cloudflare的cdn极有可能套不上,自行测试

  1. https://tunnelbroker.net/ 注册账户,并点击左边的 Create Regular Tunnel

1

  1. 红框处填写你的服务器的IPV4地址,选择物理距离近的连接点,比如机器在美国洛杉矶,就选美国西海岸的连接点,然后显示绿框提示,点Create Tunnel创建即可

2

3

4

  1. 等待出以下界面,点击Example Configurations然后选择对应的系统,比如incus的宿主机那肯定就是Debian/Ubuntu了

5

6

  1. 框住的部分就是要修改的文件和需要复制的内容了

7

复制的时候不要带空行

  1. 转换格式后给你的网络配置文件附加IPV6的设置

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerNet,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改复制粘贴一下转换格式后的配置文件内容,然后执行此命令
-EOF

然后你可以使用cat /etc/network/interfaces查看配置文件是否正常写入了

  1. 如果上面都没问题,就需要启用网络接口即可
apt-get install net-tools iproute2 -y
-systemctl restart networking
  1. 然后你就可以测试IPV6网络是否已附加

执行ifconfig命令,这时应该有一个 he-ipv6 接口,类似下面这样:

8

或者执行:

curl ipv6.ip.sb

回传你绑定IPV6地址

  1. NAT VPS 的额外设置

IPv4 NAT VPS 除了前面提到的替换 IP 操作以外,可能还需要一些额外的设置,否则可能还是无法访问 IPv6 网络。

apt-get install ufw -y
-ufw allow 41

添加相关的路由规则

route -A inet6 add ::/0 dev he-ipv6
  1. 如果不需要该IPV6网络了,想要删除

删除 he-ipv6 网络接口配置(若没有删除重启后会自动启用),记得修改/etc/network/interfaces文件,删除之前红框添加的内容

然后重启服务器,就删除了

tunnelbroker_ch

类似上述的操作,先在 https://www.tunnelbroker.ch/ 注册一个账户先,注册后点击激活的邮件

然后就是填写你的服务器IPV4地址

创建后需要进入Config页面而不是详情页面

见到以下页面千万别使用,先刷新一下本页面,不要弹那个浅蓝色框后再停止刷新

记录以下页面的最后一个红框的内容,准备修改宿主机配置文件

页面的最后一个红框框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerCh,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

ip4market_ru

类似上述的操作,先在 https://tb.ip4market.ru 注册一个账户先,注册邮箱得是非常见邮箱,电话可随便写不验证的,IP填上你要附加的宿主机的IPV4地址

然后就是过Recaptcha的人机验证,点击注册

邮箱会收到激活邮件,里面附带有你的密码,记住它

然后在首页进行登录

然后就会进入这个页面

按住右键,然后复制红框框住的四行内容,也就是

Server IPv4:
-Client IPv4
-Server IPv6
-Client IPv6

这四行内容,按ctrl+c复制或者右键复制

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择Optionip4market,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

netassist_ua

这个平台你在切换网络管理时务必使用ifupdown2而不是ifupdown2安装包,该平台使用sit协议,而sit协议需要在ifupdown2控制的环境中使用

类似上述的操作,先在 https://tb.netassist.ua/ 注册一个账户先,注册后点击激活的邮件,激活页面会有密码显示,记得记录

然后就是填写你的服务器IPV4地址,这个后面可以自己修改,先随便填一个都没问题

然后就到了这个页面了

a

第一个红框是你宿主机的IPV4地址需要填写的位置,要修改就修改那里,然后点change保存

第二个下拉红框选择Linux,然后点击show

b

会出现上面的内容,全选框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionNetAssist,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

c

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

转移不同服务器之间的IPV6子网

相关仓库:https://github.com/oneclickvirt/6in4

该方法将提供一种方式,将A上的IPV6网段拆分一个子ipv6网段的出来,附加到B上使用

你需要在B所在的服务器上使用本套脚本给容器一键配置IPV6地址

功能

  • 自建sit/gre/ipip协议的IPv6隧道
  • 支持自定义要切分出来的IPV6子网大小,将自动计算出合适的CIDR格式的IPV6子网信息
  • 自动识别服务端的IPV6子网大小
  • 将自动设置隧道服务端并打印客户端需要执行的命令
  • 设置IPV6隧道的方法简单易懂,易于删除

环境准备

VPS(A)VPS(B)
一个IPV4地址(server_ipv4)一个IPV4地址(clinet_ipv4)
一个IPV6子网无IPV6地址
以下称之为服务端以下称之为客户端

使用方法

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

执行命令

./6in4.sh client_ipv4 <mode_type> <subnet_size>
选项可选的选项1可选的选项2可选的选项3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type>暂时只支持那三种协议,越靠前的越推荐,不填则默认为sit协议

<subnet_size>只要比原系统子网掩码大就行,且是8的倍数,不填则默认为80

记得client_ipv4替换为需要附加IPV6的机器的IPV4地址,执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可

为防止忘记复制命令,命令本身也将写入到当前路径下的6in4.log文件中,可使用cat 6in4.log查询客户端需要执行的命令

复制下来的命令,务必在 https://ipv6tunnel.spiritlhl.top/ 中选择选项6in4后进行转换

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

检测服务端

systemctl status ndpresponder
ip addr show

检测客户端

ip addr show
curl ipv6.ip.sb

删除隧道

服务端

ip link set server-ipv6 down
-ip tunnel del server-ipv6

客户端

ip link set user-ipv6 down
-ip tunnel del user-ipv6

以上删除的方式只是临时删除,永久删除务必修改删除/etc/network/interfaces文件中你之前增加的内容

后言

实际上 https://tunnelbroker.net/ 支持申请/48大小的IPV6子网,只需要在

图片

这里进行申请,然后转换格式的时候将原先/64的IPV6地址改成/48的IPV6地址,你就能获得一个更大的IPV6子网了

使用WARP给宿主机添加IP出口(IPv4/IPv6)

好处

  • 宿主机安装,能使所有开启的机器都能够享受 Warp 的优势,而无需为每台机器单独进行设置,从而节省资源和简化管理。
  • 宿主机使用内核态 WireGuard,相比于用户态的 WireGuard-Go,实现能够提供更高效的 WireGuard 运行。

手动安装

1.安装WireGuard依赖

  • Debian 和 Ubuntu 系统
# 更新依赖库
-apt update -y
-
-# 安装 WireGuard 运行依赖
-apt install -y --no-install-recommends net-tools openresolv dnsutils
-
-# 安装 WireGuard 协议兼容的工具集合
-apt install -y --no-install-recommends wireguard-tools
  • CentOS 系
# 更新依赖库
-yum update -y
-
-# 安装额外包组件
-yum install -y epel-release 
-
-# 安装 WireGuard 运行依赖
-yum install -y net-tools
-
-# 安装 WireGuard 协议兼容的工具集合
-yum install -y wireguard-tools

2.获取warp账户信息

访问 https://warp.cloudflare.now.cc/?run=register&format=yaml,记录下 private_key, v6 2个值

image.png

3.修改配置文件

  • 创建并编辑 /etc/wireguard/warp.conf 文件,包含<>(尖括号)的部分一起替换掉,这只是为了看起来明显。

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口

[Interface]
-PrivateKey = <替换 PrivateKey>
-Address = 172.16.0.2/32
-Address = <替换 Address v6 地址>/128
-DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = ::/0
-Endpoint = 162.159.193.10:2408
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口
[Interface]
-PrivateKey = <替换 PrivateKey>
-Address = 172.16.0.2/32
-Address = <替换 Address v6 地址>/128
-DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = 0.0.0.0/0
-Endpoint = [2606:4700:d0::a29f:c101]:2408
  • 针对双栈没有必要,毕竟原生的网络出口都会比通过 Warp 中转要好

4.设置地址解析优先级

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口,设置优先使用原生网络的 IPv4 出口
# IPv4 优先
-grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口,设置优先使用原生网络的 IPv6 出口
# IPv6 优先,默认即为 IPv6 优先
-sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

5.连接 Warp,并设置 systemd 进程守护

# 运行 wireguard 连接 Warp。如果这步卡死导致失联,后台重启宿主机即可解决
-wg-quick up warp
-
-# 查看 IPv4
-curl -A a https://api-ipv4.ip.sb/geoip
-
-# 查看 IPv6
-curl -A a https://api-ipv6.ip.sb/geoip
-
-# 测试成功后断开 Warp 连接
-wg-quick down warp
-
-# 重新连接并设置进程守护,以便重启后自动生效
-systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
-wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',202)]))}const S=a(F,[["render",V]]);export{T as __pageData,S as default}; diff --git a/assets/guide_incus_incus_custom.md.DdIqjxSp.lean.js b/assets/guide_incus_incus_custom.md.DdIqjxSp.lean.js deleted file mode 100644 index 4a214afdfb..0000000000 --- a/assets/guide_incus_incus_custom.md.DdIqjxSp.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const p="/assets/lxd1.CbGLa5s4.png",i="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",o="/assets/lxd4.CSfRHLxz.png",c="/assets/lxd5.WUJi0qzd.png",d="/assets/lxd6.Cnds779U.png",r="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",b="/assets/lxd11.D6E5sVW2.png",v="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",m="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",P="/assets/lxd17.CWPY1pea.png",_="/assets/lxd18.DqnpcYcL.png",C="/assets/lxd19.B9_MB265.png",w="/assets/lxd20.rK3P3TT8.png",x="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",T=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_custom.md","filePath":"guide/incus/incus_custom.md","lastUpdated":1772422214000}'),F={name:"guide/incus/incus_custom.md"};function V(E,s,B,W,A,O){return n(),e("div",null,s[0]||(s[0]=[t("",202)]))}const S=a(F,[["render",V]]);export{T as __pageData,S as default}; diff --git a/assets/guide_incus_incus_extra_config.md.CEtpHMfg.js b/assets/guide_incus_incus_extra_config.md.CEtpHMfg.js deleted file mode 100644 index 7663e7e01e..0000000000 --- a/assets/guide_incus_incus_extra_config.md.CEtpHMfg.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_extra_config.md","filePath":"guide/incus/incus_extra_config.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_extra_config.md"};function p(h,s,e,k,d,F){return t(),a("div",null,s[0]||(s[0]=[n(`

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为incus创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
-ip6tables-legacy -t nat -F PREROUTING
-ip6tables-save > /etc/iptables/rules.v6
-netfilter-persistent save
-netfilter-persistent reload
-service netfilter-persistent restart

卸载IPV6地址绑定的守护进程和对应的文件可用:

shell
systemctl stop add-ipv6.service
-systemctl disable add-ipv6.service
-rm /etc/systemd/system/add-ipv6.service
-systemctl daemon-reload
-rm /usr/local/bin/add-ipv6.sh

一键安装开incus宿主机所需要的带vnstat环境的常用预配置环境

  • (非必须,该脚本仅仅是为了站点对接监控方便,不装的也没问题)

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

安装incus的官方可视化控制面板

  • (非必须,只是为了方便可视化操作,没有也没问题)
shell
apt-get install -y incus-ui-canonical
-incus config set core.https_address [::]

然后你可以在浏览器中输入

https://你的公网IPV4地址:8443

即可进入官方可视化操作面板,后续的操作配置按照UI提示操作即可

如果提示找不到ui安装包,那么说明你之前使用的是官方的incus源安装的环境,不是走的zabbly的源

此时需要额外添加源,假设你使用的是debian13系统,可使用以下命令添加源后再尝试安装:

shell
sudo -i
-mkdir -p /etc/apt/keyrings/
-curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
-sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
-Enabled: yes
-Types: deb
-URIs: https://pkgs.zabbly.com/incus/stable
-Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
-Components: main
-Architectures: $(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/zabbly.gpg
-EOF'
-apt-get update

其他系统如何添加源可参考 https://github.com/zabbly/incus?tab=readme-ov-file#installation 官方仓库的说明

`,37)]))}const g=i(l,[["render",p]]);export{c as __pageData,g as default}; diff --git a/assets/guide_incus_incus_extra_config.md.CEtpHMfg.lean.js b/assets/guide_incus_incus_extra_config.md.CEtpHMfg.lean.js deleted file mode 100644 index eb21bab6c4..0000000000 --- a/assets/guide_incus_incus_extra_config.md.CEtpHMfg.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_extra_config.md","filePath":"guide/incus/incus_extra_config.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_extra_config.md"};function p(h,s,e,k,d,F){return t(),a("div",null,s[0]||(s[0]=[n("",37)]))}const g=i(l,[["render",p]]);export{c as __pageData,g as default}; diff --git a/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.js b/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.js new file mode 100644 index 0000000000..76a1e6fedd --- /dev/null +++ b/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.js @@ -0,0 +1,23 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_extra_config.md","filePath":"guide/incus/incus_extra_config.md","lastUpdated":1772424525000}'),l={name:"guide/incus/incus_extra_config.md"};function p(t,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[e(`

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为incus创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
+ip6tables-legacy -t nat -F PREROUTING
+ip6tables-save > /etc/iptables/rules.v6
+netfilter-persistent save
+netfilter-persistent reload
+service netfilter-persistent restart

卸载IPV6地址绑定的守护进程和对应的文件可用:

shell
systemctl stop add-ipv6.service
+systemctl disable add-ipv6.service
+rm /etc/systemd/system/add-ipv6.service
+systemctl daemon-reload
+rm /usr/local/bin/add-ipv6.sh

一键安装开incus宿主机所需要的带vnstat环境的常用预配置环境

  • (非必须,该脚本仅仅是为了站点对接监控方便,不装的也没问题)

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

安装incus的官方可视化控制面板

  • (非必须,只是为了方便可视化操作,没有也没问题)
shell
apt-get install -y incus-ui-canonical
+incus config set core.https_address [::]

然后你可以在浏览器中输入

https://你的公网IPV4地址:8443

即可进入官方可视化操作面板,后续的操作配置按照UI提示操作即可

如果提示找不到ui安装包,那么说明你之前使用的是官方的incus源安装的环境,不是走的zabbly的源

此时需要额外添加源,假设你使用的是debian13系统,可使用以下命令添加源后再尝试安装:

shell
sudo -i
+mkdir -p /etc/apt/keyrings/
+curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
+sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
+Enabled: yes
+Types: deb
+URIs: https://pkgs.zabbly.com/incus/stable
+Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
+Components: main
+Architectures: $(dpkg --print-architecture)
+Signed-By: /etc/apt/keyrings/zabbly.gpg
+EOF'
+apt-get update

其他系统如何添加源可参考 https://github.com/zabbly/incus?tab=readme-ov-file#installation 官方仓库的说明

`,37)]))}const g=i(l,[["render",p]]);export{F as __pageData,g as default}; diff --git a/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.lean.js b/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.lean.js new file mode 100644 index 0000000000..91935888e4 --- /dev/null +++ b/assets/guide_incus_incus_extra_config.md.CJzw0Jvq.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_extra_config.md","filePath":"guide/incus/incus_extra_config.md","lastUpdated":1772424525000}'),l={name:"guide/incus/incus_extra_config.md"};function p(t,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[e("",37)]))}const g=i(l,[["render",p]]);export{F as __pageData,g as default}; diff --git a/assets/guide_incus_incus_install.md.Dzu8xto4.js b/assets/guide_incus_incus_install.md.Dzu8xto4.js new file mode 100644 index 0000000000..c49fb4cf7b --- /dev/null +++ b/assets/guide_incus_incus_install.md.Dzu8xto4.js @@ -0,0 +1,17 @@ +import{_ as a,c as i,o as n,ag as p}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_install.md","filePath":"guide/incus/incus_install.md","lastUpdated":1772424525000}'),e={name:"guide/incus/incus_install.md"};function l(t,s,h,r,d,c){return n(),i("div",null,s[0]||(s[0]=[p(`

Incus

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus主体安装

WARNING

如果是全新的服务器,务必保证curl命令可用且update无问题再执行本脚本。

  • 环境要求:Ubuntu 20+(不推荐Incus请使用LXD), Debian 11+(推荐), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

shell
bash incus_install.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

TIP

执行过程中可能会要求手动重启加载存储类型到内核中,安装完毕执行到最后会自动进行服务器重启,首次完整安装完毕后的自动重启最多大概耗时400~500秒,请耐心等待

WARNING

如果你需要在一台服务器上开启超过200个INCUS容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的Incus安装流程。

关闭防火墙

bash
apt update
+apt install curl wget sudo dos2unix ufw jq -y
+ufw disable

开设虚拟内存SWAP

内存看你开多少服务器,这里如果要开8个,换算需要2G内存,实际内存如果是512MB内存,还需要开1.5G,保守点开2G虚拟内存即可

执行下面命令,输入1,再输入2048,代表开2G虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

安装incus

下述命令直接通过zabbly源进行安装

sudo -i
+mkdir -p /etc/apt/keyrings/
+curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
+sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
+Enabled: yes
+Types: deb
+URIs: https://pkgs.zabbly.com/incus/stable
+Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
+Components: main
+Architectures: $(dpkg --print-architecture)
+Signed-By: /etc/apt/keyrings/zabbly.gpg
+EOF'
+apt-get update
+apt-get install incus -y
+incus -h

如果无异常,继续执行

incus admin init

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

incus -h
`,48)]))}const u=a(e,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_install.md.Dzu8xto4.lean.js b/assets/guide_incus_incus_install.md.Dzu8xto4.lean.js new file mode 100644 index 0000000000..7b17865b61 --- /dev/null +++ b/assets/guide_incus_incus_install.md.Dzu8xto4.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as n,ag as p}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_install.md","filePath":"guide/incus/incus_install.md","lastUpdated":1772424525000}'),e={name:"guide/incus/incus_install.md"};function l(t,s,h,r,d,c){return n(),i("div",null,s[0]||(s[0]=[p("",48)]))}const u=a(e,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_install.md._wqLKMk5.js b/assets/guide_incus_incus_install.md._wqLKMk5.js deleted file mode 100644 index 42613bb29f..0000000000 --- a/assets/guide_incus_incus_install.md._wqLKMk5.js +++ /dev/null @@ -1,17 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_install.md","filePath":"guide/incus/incus_install.md","lastUpdated":1772422214000}'),p={name:"guide/incus/incus_install.md"};function l(h,s,e,k,d,c){return t(),a("div",null,s[0]||(s[0]=[n(`

Incus

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus主体安装

WARNING

如果是全新的服务器,务必保证curl命令可用且update无问题再执行本脚本。

  • 环境要求:Ubuntu 20+(不推荐Incus请使用LXD), Debian 11+(推荐), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

shell
bash incus_install.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

TIP

执行过程中可能会要求手动重启加载存储类型到内核中,安装完毕执行到最后会自动进行服务器重启,首次完整安装完毕后的自动重启最多大概耗时400~500秒,请耐心等待

WARNING

如果你需要在一台服务器上开启超过200个INCUS容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的Incus安装流程。

关闭防火墙

bash
apt update
-apt install curl wget sudo dos2unix ufw jq -y
-ufw disable

开设虚拟内存SWAP

内存看你开多少服务器,这里如果要开8个,换算需要2G内存,实际内存如果是512MB内存,还需要开1.5G,保守点开2G虚拟内存即可

执行下面命令,输入1,再输入2048,代表开2G虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

安装incus

下述命令直接通过zabbly源进行安装

sudo -i
-mkdir -p /etc/apt/keyrings/
-curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --dearmor -o /etc/apt/keyrings/zabbly.gpg
-sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
-Enabled: yes
-Types: deb
-URIs: https://pkgs.zabbly.com/incus/stable
-Suites: $(. /etc/os-release && echo \${VERSION_CODENAME})
-Components: main
-Architectures: $(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/zabbly.gpg
-EOF'
-apt-get update
-apt-get install incus -y
-incus -h

如果无异常,继续执行

incus admin init

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

incus -h
`,48)]))}const g=i(p,[["render",l]]);export{o as __pageData,g as default}; diff --git a/assets/guide_incus_incus_install.md._wqLKMk5.lean.js b/assets/guide_incus_incus_install.md._wqLKMk5.lean.js deleted file mode 100644 index 2c47aa9795..0000000000 --- a/assets/guide_incus_incus_install.md._wqLKMk5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"Incus","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_install.md","filePath":"guide/incus/incus_install.md","lastUpdated":1772422214000}'),p={name:"guide/incus/incus_install.md"};function l(h,s,e,k,d,c){return t(),a("div",null,s[0]||(s[0]=[n("",48)]))}const g=i(p,[["render",l]]);export{o as __pageData,g as default}; diff --git a/assets/guide_incus_incus_lxc.md.B9bz-wqX.js b/assets/guide_incus_incus_lxc.md.B9bz-wqX.js new file mode 100644 index 0000000000..bbff7b9243 --- /dev/null +++ b/assets/guide_incus_incus_lxc.md.B9bz-wqX.js @@ -0,0 +1,25 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"在 Incus 中运行 LXC 容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_lxc.md","filePath":"guide/incus/incus_lxc.md","lastUpdated":1772424525000}'),l={name:"guide/incus/incus_lxc.md"};function t(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e(`

在 Incus 中运行 LXC 容器

开设LXC容器可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载脚本

下载开机脚本是非必须的,如果你使用过一键安装incus的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian11,注意传入参数为系统名字+版本号

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

需要进入容器内部则执行

incus exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
incus stop test
+incus delete test
+rm -rf test
+rm -rf test_v6
+ls

普通版本批量生成

开出的容器配置:

  • 1核256MB内存1GB硬盘限速300Mbit带宽
  • 带1个SSH端口,24个外网端口
  • 默认内存和硬盘大小

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

执行下面命令加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

下面命令为开容器名字前缀为tj10个容器

shell
./init.sh tj 10

有时候init.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

纯SSH端口版本批量生成

开出的容器配置:

  • 1核128MB内存1GB硬盘限速300Mbit带宽
  • 只有一个SSH端口
  • 无法挂载warp

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

下列命令最后一行为开容器名字前缀为tj10个容器

shell
./least.sh tj 10

有时候least.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

自定义批量生成版本

  • 可自定义内存和硬盘大小
  • 有执行过上面的手动批量生成过也没问题,配置是继承的不覆盖

如果需要多次批量生成容器,可使用

国际

curl -L https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

可多次运行批量生成容器,且继承前面已生成的部分在后面添加,可自定义内存和硬盘大小

查看已批量开设的信息

开完容器后,具体信息会生成在当前目录下的log文件中,格式如下

shell
1号容器名称 密码 ssh端口 外网端口起始 外网端口终止
+2号容器名称 密码 ssh端口 外网端口起始 外网端口终止

如果想要查看,只需在当前目录执行以下命令打印log文件即可

shell
cat log

WARNING

不要拿该脚本开出的容器当生产环境,LXC虚拟化不支持换内核,dd,开启bbr等操作

部分常用incus命令

查看所有

bash
incus list

查看个例

bash
incus info 容器名字

启动个例

bash
incus start 容器名字

停止个例

bash
incus stop 容器名字

删除个例

bash
incus delete -f 容器名字

进入内部

bash
incus exec 容器名字 /bin/bash

TIP

在alpine中不用/bin/bash而是用/bin/sh,常规的系统都是/bin/bash

退出则输入exit回车即可

删除所有LXC容器

bash
incus list -c n --format csv | xargs -I {} incus delete -f {}

在容器内执行删除无用日志

bash
sudo apt-get autoremove
+sudo apt-get clean
+sudo find /var/log -type f -delete
+sudo find /var/tmp -type f -delete
+sudo find /tmp -type f -delete
+sudo find /var/cache/apt/archives -type f -delete

更新上述所有一键脚本的相关命令

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/config.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/config.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/buildct.sh
+rm -rf /root/add_more.sh
+rm -rf /root/build_ipv6_network.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
+wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

`,95)]))}const o=i(l,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/guide_incus_incus_lxc.md.B9bz-wqX.lean.js b/assets/guide_incus_incus_lxc.md.B9bz-wqX.lean.js new file mode 100644 index 0000000000..beaae2e9bf --- /dev/null +++ b/assets/guide_incus_incus_lxc.md.B9bz-wqX.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"在 Incus 中运行 LXC 容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_lxc.md","filePath":"guide/incus/incus_lxc.md","lastUpdated":1772424525000}'),l={name:"guide/incus/incus_lxc.md"};function t(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[e("",95)]))}const o=i(l,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/guide_incus_incus_lxc.md.CnWeIYpK.js b/assets/guide_incus_incus_lxc.md.CnWeIYpK.js deleted file mode 100644 index cec4e786fb..0000000000 --- a/assets/guide_incus_incus_lxc.md.CnWeIYpK.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在 Incus 中运行 LXC 容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_lxc.md","filePath":"guide/incus/incus_lxc.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_lxc.md"};function n(p,s,e,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h(`

在 Incus 中运行 LXC 容器

开设LXC容器可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载脚本

下载开机脚本是非必须的,如果你使用过一键安装incus的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian11,注意传入参数为系统名字+版本号

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

需要进入容器内部则执行

incus exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
incus stop test
-incus delete test
-rm -rf test
-rm -rf test_v6
-ls

普通版本批量生成

开出的容器配置:

  • 1核256MB内存1GB硬盘限速300Mbit带宽
  • 带1个SSH端口,24个外网端口
  • 默认内存和硬盘大小

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

执行下面命令加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

下面命令为开容器名字前缀为tj10个容器

shell
./init.sh tj 10

有时候init.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

纯SSH端口版本批量生成

开出的容器配置:

  • 1核128MB内存1GB硬盘限速300Mbit带宽
  • 只有一个SSH端口
  • 无法挂载warp

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

下列命令最后一行为开容器名字前缀为tj10个容器

shell
./least.sh tj 10

有时候least.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

自定义批量生成版本

  • 可自定义内存和硬盘大小
  • 有执行过上面的手动批量生成过也没问题,配置是继承的不覆盖

如果需要多次批量生成容器,可使用

国际

curl -L https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/incus/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

可多次运行批量生成容器,且继承前面已生成的部分在后面添加,可自定义内存和硬盘大小

查看已批量开设的信息

开完容器后,具体信息会生成在当前目录下的log文件中,格式如下

shell
1号容器名称 密码 ssh端口 外网端口起始 外网端口终止
-2号容器名称 密码 ssh端口 外网端口起始 外网端口终止

如果想要查看,只需在当前目录执行以下命令打印log文件即可

shell
cat log

WARNING

不要拿该脚本开出的容器当生产环境,LXC虚拟化不支持换内核,dd,开启bbr等操作

部分常用incus命令

查看所有

bash
incus list

查看个例

bash
incus info 容器名字

启动个例

bash
incus start 容器名字

停止个例

bash
incus stop 容器名字

删除个例

bash
incus delete -f 容器名字

进入内部

bash
incus exec 容器名字 /bin/bash

TIP

在alpine中不用/bin/bash而是用/bin/sh,常规的系统都是/bin/bash

退出则输入exit回车即可

删除所有LXC容器

bash
incus list -c n --format csv | xargs -I {} incus delete -f {}

在容器内执行删除无用日志

bash
sudo apt-get autoremove
-sudo apt-get clean
-sudo find /var/log -type f -delete
-sudo find /var/tmp -type f -delete
-sudo find /tmp -type f -delete
-sudo find /var/cache/apt/archives -type f -delete

更新上述所有一键脚本的相关命令

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/config.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/config.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/buildct.sh
-rm -rf /root/add_more.sh
-rm -rf /root/build_ipv6_network.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
-wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

`,95)]))}const o=i(l,[["render",n]]);export{c as __pageData,o as default}; diff --git a/assets/guide_incus_incus_lxc.md.CnWeIYpK.lean.js b/assets/guide_incus_incus_lxc.md.CnWeIYpK.lean.js deleted file mode 100644 index 360b55db7d..0000000000 --- a/assets/guide_incus_incus_lxc.md.CnWeIYpK.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在 Incus 中运行 LXC 容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_lxc.md","filePath":"guide/incus/incus_lxc.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_lxc.md"};function n(p,s,e,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h("",95)]))}const o=i(l,[["render",n]]);export{c as __pageData,o as default}; diff --git a/assets/guide_incus_incus_precheck.md.D8FB1RBW.js b/assets/guide_incus_incus_precheck.md.B7EicS4v.js similarity index 72% rename from assets/guide_incus_incus_precheck.md.D8FB1RBW.js rename to assets/guide_incus_incus_precheck.md.B7EicS4v.js index 4e1fafef77..b7def00a43 100644 --- a/assets/guide_incus_incus_precheck.md.D8FB1RBW.js +++ b/assets/guide_incus_incus_precheck.md.B7EicS4v.js @@ -1 +1 @@ -import{_ as t,c as i,o as a,ag as c}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_precheck.md","filePath":"guide/incus/incus_precheck.md","lastUpdated":1772422214000}'),s={name:"guide/incus/incus_precheck.md"};function r(l,e,n,o,p,h){return a(),i("div",null,e[0]||(e[0]=[c('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/incus

要求

硬件要求:

  • 系统:Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • CPU:内核数最好大于或等于2,否则可能出现内核空转切片循环导致占用100%
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接Github的raw页面就行

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu24Debian12,别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换(优先级: btrfs > lvm > zfs > ceph > dir )

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加各种第三方镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像(含自修复镜像)

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
',17)]))}const b=t(s,[["render",r]]);export{u as __pageData,b as default}; +import{_ as i,c as a,o as t,ag as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_precheck.md","filePath":"guide/incus/incus_precheck.md","lastUpdated":1772424525000}'),r={name:"guide/incus/incus_precheck.md"};function n(c,e,l,p,o,d){return t(),a("div",null,e[0]||(e[0]=[s('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/incus

要求

硬件要求:

  • 系统:Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • CPU:内核数最好大于或等于2,否则可能出现内核空转切片循环导致占用100%
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接Github的raw页面就行

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu24Debian12,别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换(优先级: btrfs > lvm > zfs > ceph > dir )

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加各种第三方镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像(含自修复镜像)

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
',17)]))}const b=i(r,[["render",n]]);export{u as __pageData,b as default}; diff --git a/assets/guide_incus_incus_precheck.md.B7EicS4v.lean.js b/assets/guide_incus_incus_precheck.md.B7EicS4v.lean.js new file mode 100644 index 0000000000..e77bd93e79 --- /dev/null +++ b/assets/guide_incus_incus_precheck.md.B7EicS4v.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_precheck.md","filePath":"guide/incus/incus_precheck.md","lastUpdated":1772424525000}'),r={name:"guide/incus/incus_precheck.md"};function n(c,e,l,p,o,d){return t(),a("div",null,e[0]||(e[0]=[s("",17)]))}const b=i(r,[["render",n]]);export{u as __pageData,b as default}; diff --git a/assets/guide_incus_incus_precheck.md.D8FB1RBW.lean.js b/assets/guide_incus_incus_precheck.md.D8FB1RBW.lean.js deleted file mode 100644 index d0f087e5db..0000000000 --- a/assets/guide_incus_incus_precheck.md.D8FB1RBW.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as i,o as a,ag as c}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_precheck.md","filePath":"guide/incus/incus_precheck.md","lastUpdated":1772422214000}'),s={name:"guide/incus/incus_precheck.md"};function r(l,e,n,o,p,h){return a(),i("div",null,e[0]||(e[0]=[c("",17)]))}const b=t(s,[["render",r]]);export{u as __pageData,b as default}; diff --git a/assets/guide_incus_incus_qa.md.CDlLCI-6.js b/assets/guide_incus_incus_qa.md.CDlLCI-6.js deleted file mode 100644 index 29e138b3a3..0000000000 --- a/assets/guide_incus_incus_qa.md.CDlLCI-6.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qa.md","filePath":"guide/incus/incus_qa.md","lastUpdated":1772422214000}'),h={name:"guide/incus/incus_qa.md"};function n(p,s,l,c,r,k){return e(),a("div",null,s[0]||(s[0]=[t('

解惑

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要Incus和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致Incus无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus在单核的宿主机上长期使用后CPU占用过高

这个CPU占用过高系Incus原生问题,暂时没有解决方式,且仅在单核宿主机上可复现,多核宿主机不必理会

需要安装一个定时任务定时检测和修复这个问题,每5分钟检测一遍占用看看是否需要重启Incus后端

  • 下载

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • 安装
bash
bash incus_fixed_restart.sh install

会复制到 /usr/local/bin/incus_fixed_restart.sh 并写入 cron 每分钟执行。

  • 卸载
bash
bash incus_fixed_restart.sh uninstall

会删除 cron 任务、脚本文件、日志文件和计数文件。

  • 正常运行(由 cron 调用)
bash
/usr/local/bin/incus_fixed_restart.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销款

',36)]))}const u=i(h,[["render",n]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qa.md.CDlLCI-6.lean.js b/assets/guide_incus_incus_qa.md.CDlLCI-6.lean.js deleted file mode 100644 index a1cbe5e428..0000000000 --- a/assets/guide_incus_incus_qa.md.CDlLCI-6.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qa.md","filePath":"guide/incus/incus_qa.md","lastUpdated":1772422214000}'),h={name:"guide/incus/incus_qa.md"};function n(p,s,l,c,r,k){return e(),a("div",null,s[0]||(s[0]=[t("",36)]))}const u=i(h,[["render",n]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qa.md.CQnLz1cg.js b/assets/guide_incus_incus_qa.md.CQnLz1cg.js new file mode 100644 index 0000000000..7489c2ea18 --- /dev/null +++ b/assets/guide_incus_incus_qa.md.CQnLz1cg.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qa.md","filePath":"guide/incus/incus_qa.md","lastUpdated":1772424525000}'),t={name:"guide/incus/incus_qa.md"};function p(l,s,h,r,d,c){return e(),a("div",null,s[0]||(s[0]=[n('

解惑

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要Incus和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致Incus无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus在单核的宿主机上长期使用后CPU占用过高

这个CPU占用过高系Incus原生问题,暂时没有解决方式,且仅在单核宿主机上可复现,多核宿主机不必理会

需要安装一个定时任务定时检测和修复这个问题,每5分钟检测一遍占用看看是否需要重启Incus后端

  • 下载

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • 安装
bash
bash incus_fixed_restart.sh install

会复制到 /usr/local/bin/incus_fixed_restart.sh 并写入 cron 每分钟执行。

  • 卸载
bash
bash incus_fixed_restart.sh uninstall

会删除 cron 任务、脚本文件、日志文件和计数文件。

  • 正常运行(由 cron 调用)
bash
/usr/local/bin/incus_fixed_restart.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销款

',36)]))}const u=i(t,[["render",p]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qa.md.CQnLz1cg.lean.js b/assets/guide_incus_incus_qa.md.CQnLz1cg.lean.js new file mode 100644 index 0000000000..9b3bb518c9 --- /dev/null +++ b/assets/guide_incus_incus_qa.md.CQnLz1cg.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qa.md","filePath":"guide/incus/incus_qa.md","lastUpdated":1772424525000}'),t={name:"guide/incus/incus_qa.md"};function p(l,s,h,r,d,c){return e(),a("div",null,s[0]||(s[0]=[n("",36)]))}const u=i(t,[["render",p]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qemu.md.BymVD1NU.js b/assets/guide_incus_incus_qemu.md.BymVD1NU.js deleted file mode 100644 index c8520cdccc..0000000000 --- a/assets/guide_incus_incus_qemu.md.BymVD1NU.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qemu.md","filePath":"guide/incus/incus_qemu.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_qemu.md"};function n(h,s,p,d,k,r){return t(),a("div",null,s[0]||(s[0]=[e(`

在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
incus console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
incus stop -f test
-incus delete -f test
-rm -rf test
-rm -rf test_v6
-ls
`,31)]))}const u=i(l,[["render",n]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qemu.md.BymVD1NU.lean.js b/assets/guide_incus_incus_qemu.md.BymVD1NU.lean.js deleted file mode 100644 index e0055ad5e9..0000000000 --- a/assets/guide_incus_incus_qemu.md.BymVD1NU.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qemu.md","filePath":"guide/incus/incus_qemu.md","lastUpdated":1772422214000}'),l={name:"guide/incus/incus_qemu.md"};function n(h,s,p,d,k,r){return t(),a("div",null,s[0]||(s[0]=[e("",31)]))}const u=i(l,[["render",n]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qemu.md.DEvirL6X.js b/assets/guide_incus_incus_qemu.md.DEvirL6X.js new file mode 100644 index 0000000000..f96099e4ba --- /dev/null +++ b/assets/guide_incus_incus_qemu.md.DEvirL6X.js @@ -0,0 +1,5 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qemu.md","filePath":"guide/incus/incus_qemu.md","lastUpdated":1772424525000}'),n={name:"guide/incus/incus_qemu.md"};function l(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[t(`

在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
incus console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
incus stop -f test
+incus delete -f test
+rm -rf test
+rm -rf test_v6
+ls
`,31)]))}const u=i(n,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_qemu.md.DEvirL6X.lean.js b/assets/guide_incus_incus_qemu.md.DEvirL6X.lean.js new file mode 100644 index 0000000000..ffe74e6faf --- /dev/null +++ b/assets/guide_incus_incus_qemu.md.DEvirL6X.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_qemu.md","filePath":"guide/incus/incus_qemu.md","lastUpdated":1772424525000}'),n={name:"guide/incus/incus_qemu.md"};function l(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[t("",31)]))}const u=i(n,[["render",l]]);export{o as __pageData,u as default}; diff --git a/assets/guide_incus_incus_thanks.md.hlzQRbAc.js b/assets/guide_incus_incus_thanks.md.D1W1P5MD.js similarity index 91% rename from assets/guide_incus_incus_thanks.md.hlzQRbAc.js rename to assets/guide_incus_incus_thanks.md.D1W1P5MD.js index f944ae87aa..75f58143fe 100644 --- a/assets/guide_incus_incus_thanks.md.hlzQRbAc.js +++ b/assets/guide_incus_incus_thanks.md.D1W1P5MD.js @@ -1 +1 @@ -import{_ as r,c as e,o as n,ag as s}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/incus/incus_thanks.md","filePath":"guide/incus/incus_thanks.md","lastUpdated":1772422214000}'),a={name:"guide/incus/incus_thanks.md"};function o(i,t,c,p,u,l){return n(),e("div",null,t[0]||(t[0]=[s('

致谢

https://github.com/lxc/lxd

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://github.com/zabbly/incus

',10)]))}const g=r(a,[["render",o]]);export{d as __pageData,g as default}; +import{_ as r,c as e,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/incus/incus_thanks.md","filePath":"guide/incus/incus_thanks.md","lastUpdated":1772424525000}'),a={name:"guide/incus/incus_thanks.md"};function o(i,t,c,p,u,l){return n(),e("div",null,t[0]||(t[0]=[s('

致谢

https://github.com/lxc/lxd

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://github.com/zabbly/incus

',10)]))}const g=r(a,[["render",o]]);export{d as __pageData,g as default}; diff --git a/assets/guide_incus_incus_thanks.md.hlzQRbAc.lean.js b/assets/guide_incus_incus_thanks.md.D1W1P5MD.lean.js similarity index 57% rename from assets/guide_incus_incus_thanks.md.hlzQRbAc.lean.js rename to assets/guide_incus_incus_thanks.md.D1W1P5MD.lean.js index 37e33faf49..5a04f43383 100644 --- a/assets/guide_incus_incus_thanks.md.hlzQRbAc.lean.js +++ b/assets/guide_incus_incus_thanks.md.D1W1P5MD.lean.js @@ -1 +1 @@ -import{_ as r,c as e,o as n,ag as s}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/incus/incus_thanks.md","filePath":"guide/incus/incus_thanks.md","lastUpdated":1772422214000}'),a={name:"guide/incus/incus_thanks.md"};function o(i,t,c,p,u,l){return n(),e("div",null,t[0]||(t[0]=[s("",10)]))}const g=r(a,[["render",o]]);export{d as __pageData,g as default}; +import{_ as r,c as e,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/incus/incus_thanks.md","filePath":"guide/incus/incus_thanks.md","lastUpdated":1772424525000}'),a={name:"guide/incus/incus_thanks.md"};function o(i,t,c,p,u,l){return n(),e("div",null,t[0]||(t[0]=[s("",10)]))}const g=r(a,[["render",o]]);export{d as __pageData,g as default}; diff --git a/assets/guide_incus_incus_windows.md.Ct9ZgWYg.js b/assets/guide_incus_incus_windows.md.Ct9ZgWYg.js deleted file mode 100644 index 5d6450cdb0..0000000000 --- a/assets/guide_incus_incus_windows.md.Ct9ZgWYg.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const p="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",e="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",r="/assets/win5.BSQ3T_9y.jpg",F="/assets/win7.xhBfJRvu.jpg",o="/assets/win6.B-575Zc1.jpg",b=JSON.parse('{"title":"在 Incus 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_windows.md","filePath":"guide/incus/incus_windows.md","lastUpdated":1772422214000}'),c={name:"guide/incus/incus_windows.md"};function g(C,s,y,u,B,m){return n(),a("div",null,s[0]||(s[0]=[t(`

在 Incus 中运行 Windows 虚拟机

检查 Incus 驱动

确保 incus info 输出中含有 qemu,否则无法创建 VM:

shell
incus info | grep -i driver:

若显示只有 lxc,则incus的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root 目录下按顺序执行以下命令:

shell
apt update
-apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
-snap install distrobuilder --classic
-# 重启加载一些配置
-reboot

下载镜像并进行修补,如果你使用的是别的镜像,自行替换下载链接(不需要下载自带virtio的镜像,原始的镜像就够了)

自行下载Windows镜像的地址:https://github.com/ILLKX/Windows

支持修补的Windows镜像版本:https://linuxcontainers.org/distrobuilder/docs/latest/tutorials/use/#repack-windows-iso

下面的指南将以windows2019作为示例进行

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
-distrobuilder repack-windows \\
-  --windows-arch=amd64 \\
-  win.iso \\
-  win.incus.iso

修补时长取决于程序何时添加完毕启动所需的驱动(未完毕时会一个个添加)。

有的耗时短有的耗时长,最长可能超过10~30分钟,建议在screentmux中挂起执行

修补完毕后可删除原始的镜像:

shell
rm -f win.iso

创建虚拟机并挂载安装ISO

这里我使用的配置是3核5G内存30G硬盘,如果使用的是windows10等更新版本的镜像,至少需要4核6G内存40G硬盘。

建议使用比我现在设置的资源更多的CPU和内存(主要是内存),避免系统卡到崩溃。

如果内存不够用,建议查看本指南的其他实用项目中的添加SWAP项目,自行添加更多虚拟内存。

shell
# 初始化空 VM
-incus init winvm --empty --vm
-
-# 调整根盘大小、CPU、内存
-incus config device override winvm root size=30GiB
-incus config set winvm limits.cpu=3
-incus config set winvm limits.memory=5GiB
-
-# 添加 TPM 设备(Secure Boot/BitLocker 支持)
-incus config device add winvm vtpm tpm path=/dev/tpm0
-
-# 挂载安装 ISO,设为第一启动项
-incus config device add winvm install disk \\
-  source=/root/win.incus.iso \\
-  boot.priority=10

启动虚拟机并通过浏览器远程访问桌面

安装浏览器访问所需组件

shell
apt update
-apt install -y spice-html5 websockify lsof

启动虚拟机

shell
incus start winvm

无问题后启动远程访问的组件

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
-nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/run/incus/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
-echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

浏览器打开输出提示的地址

首次启动需要按浏览器页面左上角的Ctrl+Alt+Delete按钮,重启后在默认的界面按照提示,按回车等待5~10分钟才会正式装载ISO进行实际的安装

最终会显示Zabbly的图标,这个图标在这里转圈圈需要至少2分钟,请耐心等待。

转圈圈完毕就会进入正常的Win虚拟机安装流程,类比PVE的操作即可。

这里硬盘不可选中,选择在左下角查看黄色的提示,然后按照提示将脱机的硬盘联机点确认按钮,就可以选中硬盘了。

安装完成后,虚拟机会自动重新启动几次更新网络,spice的网页端显示进入用户设置界面,同时后台可使用incus list查看到网络被自动附加。

设置完用户进入系统登录页面后,执行下述命令关闭/退出Windows,然后移除 ISO 设备,保证下次从硬盘启动,然后再次启动虚拟机

shell
incus stop winvm
-incus config device remove winvm install
-incus start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,incus将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后incus delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
incus config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

',68)]))}const v=i(c,[["render",g]]);export{b as __pageData,v as default}; diff --git a/assets/guide_incus_incus_windows.md.Ct9ZgWYg.lean.js b/assets/guide_incus_incus_windows.md.Ct9ZgWYg.lean.js deleted file mode 100644 index 11acdd3a9c..0000000000 --- a/assets/guide_incus_incus_windows.md.Ct9ZgWYg.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CSeR4K32.js";const p="/assets/win1.BYIcp55m.png",l="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",e="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",r="/assets/win5.BSQ3T_9y.jpg",F="/assets/win7.xhBfJRvu.jpg",o="/assets/win6.B-575Zc1.jpg",b=JSON.parse('{"title":"在 Incus 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_windows.md","filePath":"guide/incus/incus_windows.md","lastUpdated":1772422214000}'),c={name:"guide/incus/incus_windows.md"};function g(C,s,y,u,B,m){return n(),a("div",null,s[0]||(s[0]=[t("",68)]))}const v=i(c,[["render",g]]);export{b as __pageData,v as default}; diff --git a/assets/guide_incus_incus_windows.md.DDdBCbEm.js b/assets/guide_incus_incus_windows.md.DDdBCbEm.js new file mode 100644 index 0000000000..fd7d7ec931 --- /dev/null +++ b/assets/guide_incus_incus_windows.md.DDdBCbEm.js @@ -0,0 +1,28 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/win1.BYIcp55m.png",p="/assets/win2.BNn7RQzT.jpg",t="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",c="/assets/win7.xhBfJRvu.jpg",F="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"在 Incus 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_windows.md","filePath":"guide/incus/incus_windows.md","lastUpdated":1772424525000}'),o={name:"guide/incus/incus_windows.md"};function g(u,s,b,y,C,m){return n(),a("div",null,s[0]||(s[0]=[e(`

在 Incus 中运行 Windows 虚拟机

检查 Incus 驱动

确保 incus info 输出中含有 qemu,否则无法创建 VM:

shell
incus info | grep -i driver:

若显示只有 lxc,则incus的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root 目录下按顺序执行以下命令:

shell
apt update
+apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
+snap install distrobuilder --classic
+# 重启加载一些配置
+reboot

下载镜像并进行修补,如果你使用的是别的镜像,自行替换下载链接(不需要下载自带virtio的镜像,原始的镜像就够了)

自行下载Windows镜像的地址:https://github.com/ILLKX/Windows

支持修补的Windows镜像版本:https://linuxcontainers.org/distrobuilder/docs/latest/tutorials/use/#repack-windows-iso

下面的指南将以windows2019作为示例进行

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
+distrobuilder repack-windows \\
+  --windows-arch=amd64 \\
+  win.iso \\
+  win.incus.iso

修补时长取决于程序何时添加完毕启动所需的驱动(未完毕时会一个个添加)。

有的耗时短有的耗时长,最长可能超过10~30分钟,建议在screentmux中挂起执行

修补完毕后可删除原始的镜像:

shell
rm -f win.iso

创建虚拟机并挂载安装ISO

这里我使用的配置是3核5G内存30G硬盘,如果使用的是windows10等更新版本的镜像,至少需要4核6G内存40G硬盘。

建议使用比我现在设置的资源更多的CPU和内存(主要是内存),避免系统卡到崩溃。

如果内存不够用,建议查看本指南的其他实用项目中的添加SWAP项目,自行添加更多虚拟内存。

shell
# 初始化空 VM
+incus init winvm --empty --vm
+
+# 调整根盘大小、CPU、内存
+incus config device override winvm root size=30GiB
+incus config set winvm limits.cpu=3
+incus config set winvm limits.memory=5GiB
+
+# 添加 TPM 设备(Secure Boot/BitLocker 支持)
+incus config device add winvm vtpm tpm path=/dev/tpm0
+
+# 挂载安装 ISO,设为第一启动项
+incus config device add winvm install disk \\
+  source=/root/win.incus.iso \\
+  boot.priority=10

启动虚拟机并通过浏览器远程访问桌面

安装浏览器访问所需组件

shell
apt update
+apt install -y spice-html5 websockify lsof

启动虚拟机

shell
incus start winvm

无问题后启动远程访问的组件

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
+nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/run/incus/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
+echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

浏览器打开输出提示的地址

首次启动需要按浏览器页面左上角的Ctrl+Alt+Delete按钮,重启后在默认的界面按照提示,按回车等待5~10分钟才会正式装载ISO进行实际的安装

最终会显示Zabbly的图标,这个图标在这里转圈圈需要至少2分钟,请耐心等待。

转圈圈完毕就会进入正常的Win虚拟机安装流程,类比PVE的操作即可。

这里硬盘不可选中,选择在左下角查看黄色的提示,然后按照提示将脱机的硬盘联机点确认按钮,就可以选中硬盘了。

安装完成后,虚拟机会自动重新启动几次更新网络,spice的网页端显示进入用户设置界面,同时后台可使用incus list查看到网络被自动附加。

设置完用户进入系统登录页面后,执行下述命令关闭/退出Windows,然后移除 ISO 设备,保证下次从硬盘启动,然后再次启动虚拟机

shell
incus stop winvm
+incus config device remove winvm install
+incus start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,incus将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后incus delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
incus config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

',68)]))}const E=i(o,[["render",g]]);export{v as __pageData,E as default}; diff --git a/assets/guide_incus_incus_windows.md.DDdBCbEm.lean.js b/assets/guide_incus_incus_windows.md.DDdBCbEm.lean.js new file mode 100644 index 0000000000..02daec73da --- /dev/null +++ b/assets/guide_incus_incus_windows.md.DDdBCbEm.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/win1.BYIcp55m.png",p="/assets/win2.BNn7RQzT.jpg",t="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",r="/assets/win4.DwKt_Ood.jpg",d="/assets/win5.BSQ3T_9y.jpg",c="/assets/win7.xhBfJRvu.jpg",F="/assets/win6.B-575Zc1.jpg",v=JSON.parse('{"title":"在 Incus 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/incus/incus_windows.md","filePath":"guide/incus/incus_windows.md","lastUpdated":1772424525000}'),o={name:"guide/incus/incus_windows.md"};function g(u,s,b,y,C,m){return n(),a("div",null,s[0]||(s[0]=[e("",68)]))}const E=i(o,[["render",g]]);export{v as __pageData,E as default}; diff --git a/assets/guide_lxd_lxd_custom.md.Ci349BaV.js b/assets/guide_lxd_lxd_custom.md.Ci349BaV.js deleted file mode 100644 index ba18954d4e..0000000000 --- a/assets/guide_lxd_lxd_custom.md.Ci349BaV.js +++ /dev/null @@ -1,82 +0,0 @@ -import{_ as s,c as e,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const p="/assets/lxd1.CbGLa5s4.png",i="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",o="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",r="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",b="/assets/lxd11.D6E5sVW2.png",v="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",m="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",P="/assets/lxd17.CWPY1pea.png",x="/assets/lxd18.DqnpcYcL.png",_="/assets/lxd19.B9_MB265.png",C="/assets/lxd20.rK3P3TT8.png",w="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",T=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_custom.md","filePath":"guide/lxd/lxd_custom.md","lastUpdated":1772422214000}'),F={name:"guide/lxd/lxd_custom.md"};function V(E,a,B,W,A,D){return t(),e("div",null,a[0]||(a[0]=[n(`

自定义

给lxd启用官方的web面板

给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://lxdimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/lxd_images 可见详细说明。

shell
lxc remote remove spiritlhl
-lxc remote add spiritlhl https://lxdimages.spiritlhl.net --protocol simplestreams --public
-lxc image list spiritlhl:debian

给宿主机附加免费的IPV6地址段

有的机器本身没有IPV6的/64子网,这里给出一个方法免费附加IPV6的子网。

这里是使用6in4方法解决宿主机本身没有IPV6地址的问题。

TIP

本页面的操作务必在原始系统上操作,保证未使用本项目的其他脚本安装环境(除了PVE,PVE需要先安装好),否则可能导致环境冲突

以下是2023年目前还在运行的免费提供IPV6子网的平台

支持的平台对应需要的安装包协议通道/子网数量
tunnelbroker.netifupdown 或 ifupdown2v4tunnel 或 sit3✖/64 或 5✖/64
tunnelbroker.chifupdown 或 ifupdown2v4tunnel 或 sit3✖/64
ip4market.ruifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
netassist.uaifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipip自定义

免费的平台只解决IPV6有没有的问题,不提供优质的IPV6带宽。

如需优质的带宽,请自建隧道,当ifupdown和ifupdown2都可时,先尝试ifupdown是否可安装成功,否则就安装ifupdown2.

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

初始环境修改

执行

touch /etc/cloud/cloud-init.disabled

关闭cloud-init的自动化覆写先,然后查看本机使用什么管理网络,执行

systemctl is-active systemd-networkd

systemctl is-active networking

看看属于哪种情况,如果是前者active,后者inactive,你需要重装/DD一个不是这样配置的系统,或者切换本机使用ifupdown/ifupdown2管理网络

# 是否需要禁用原网络管理自行评判
-# systemctl stop systemd-networkd
-# systemctl disable systemd-networkd
-# systemctl stop systemd-networkd.socket
-# systemctl disable systemd-networkd.socket

如果需要安装的是ifupdown控制网络,这个工具一般的主流linux系统都有

apt-get install ifupdown -y

如果需要安装的是ifupdown2进行网络管理,而这个工具一般只在debian系上可安装使用

apt-get install ifupdown2 -y

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

systemctl start networking
-systemctl enable networking

然后重启服务器,检验机器的网络是否会因为修改出现重启失联的情况,且执行uptime观察启动已超过1分钟后,再进行后续步骤

如果是是前者inactive,后者active,则不需要切换网络管理程序,直接进行后续操作即可。

由于部分服务器存在默认的内网IPV6路由会与隧道冲突,此时可使用以下命令删除默认的IPV6路由

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

这里假设了你的客户端的服务器的默认网卡是eth0,你可以使用ip -6 route查看默认的路由并替换它,默认路由以default via开头,使用dev指定默认网卡,你只需要按照这个规则找到它即可

目前收集且支持的平台

tunnelbroker_net

结合一键开设带IPV6地址的容器的脚本,就能给每个容器附加来自he的IPV6地址了

缺点是地址比较黑/脏,cloudflare的cdn极有可能套不上,自行测试

  1. https://tunnelbroker.net/ 注册账户,并点击左边的 Create Regular Tunnel

1

  1. 红框处填写你的服务器的IPV4地址,选择物理距离近的连接点,比如机器在美国洛杉矶,就选美国西海岸的连接点,然后显示绿框提示,点Create Tunnel创建即可

2

3

4

  1. 等待出以下界面,点击Example Configurations然后选择对应的系统,比如LXD的宿主机那肯定就是Debian/Ubuntu了

5

6

  1. 框住的部分就是要修改的文件和需要复制的内容了

7

复制的时候不要带空行

  1. 转换格式后给你的网络配置文件附加IPV6的设置

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerNet,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改复制粘贴一下转换格式后的配置文件内容,然后执行此命令
-EOF

然后你可以使用cat /etc/network/interfaces查看配置文件是否正常写入了

  1. 如果上面都没问题,就需要启用网络接口即可
apt-get install net-tools iproute2 -y
-systemctl restart networking
  1. 然后你就可以测试IPV6网络是否已附加

执行ifconfig命令,这时应该有一个 he-ipv6 接口,类似下面这样:

8

或者执行:

curl ipv6.ip.sb

回传你绑定IPV6地址

  1. NAT VPS 的额外设置

IPv4 NAT VPS 除了前面提到的替换 IP 操作以外,可能还需要一些额外的设置,否则可能还是无法访问 IPv6 网络。

apt-get install ufw -y
-ufw allow 41

添加相关的路由规则

route -A inet6 add ::/0 dev he-ipv6
  1. 如果不需要该IPV6网络了,想要删除

删除 he-ipv6 网络接口配置(若没有删除重启后会自动启用),记得修改/etc/network/interfaces文件,删除之前红框添加的内容

然后重启服务器,就删除了

tunnelbroker_ch

类似上述的操作,先在 https://www.tunnelbroker.ch/ 注册一个账户先,注册后点击激活的邮件

然后就是填写你的服务器IPV4地址

创建后需要进入Config页面而不是详情页面

见到以下页面千万别使用,先刷新一下本页面,不要弹那个浅蓝色框后再停止刷新

记录以下页面的最后一个红框的内容,准备修改宿主机配置文件

页面的最后一个红框框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerCh,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

ip4market_ru

类似上述的操作,先在 https://tb.ip4market.ru 注册一个账户先,注册邮箱得是非常见邮箱,电话可随便写不验证的,IP填上你要附加的宿主机的IPV4地址

然后就是过Recaptcha的人机验证,点击注册

邮箱会收到激活邮件,里面附带有你的密码,记住它

然后在首页进行登录

然后就会进入这个页面

按住右键,然后复制红框框住的四行内容,也就是

Server IPv4:
-Client IPv4
-Server IPv6
-Client IPv6

这四行内容,按ctrl+c复制或者右键复制

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择Optionip4market,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

netassist_ua

这个平台你在切换网络管理时务必使用ifupdown2而不是ifupdown2安装包,该平台使用sit协议,而sit协议需要在ifupdown2控制的环境中使用

类似上述的操作,先在 https://tb.netassist.ua/ 注册一个账户先,注册后点击激活的邮件,激活页面会有密码显示,记得记录

然后就是填写你的服务器IPV4地址,这个后面可以自己修改,先随便填一个都没问题

然后就到了这个页面了

a

第一个红框是你宿主机的IPV4地址需要填写的位置,要修改就修改那里,然后点change保存

第二个下拉红框选择Linux,然后点击show

b

会出现上面的内容,全选框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionNetAssist,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

c

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

转移不同服务器之间的IPV6子网

相关仓库:https://github.com/oneclickvirt/6in4

该方法将提供一种方式,将A上的IPV6网段拆分一个子ipv6网段的出来,附加到B上使用

你需要在B所在的服务器上使用本套脚本给容器一键配置IPV6地址

功能

  • 自建sit/gre/ipip协议的IPv6隧道
  • 支持自定义要切分出来的IPV6子网大小,将自动计算出合适的CIDR格式的IPV6子网信息
  • 自动识别服务端的IPV6子网大小
  • 将自动设置隧道服务端并打印客户端需要执行的命令
  • 设置IPV6隧道的方法简单易懂,易于删除

环境准备

VPS(A)VPS(B)
一个IPV4地址(server_ipv4)一个IPV4地址(clinet_ipv4)
一个IPV6子网无IPV6地址
以下称之为服务端以下称之为客户端

使用方法

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

执行命令

./6in4.sh client_ipv4 <mode_type> <subnet_size>
选项可选的选项1可选的选项2可选的选项3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type>暂时只支持那三种协议,越靠前的越推荐,不填则默认为sit协议

<subnet_size>只要比原系统子网掩码大就行,且是8的倍数,不填则默认为80

记得client_ipv4替换为需要附加IPV6的机器的IPV4地址,执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可

为防止忘记复制命令,命令本身也将写入到当前路径下的6in4.log文件中,可使用cat 6in4.log查询客户端需要执行的命令

复制下来的命令,务必在 https://ipv6tunnel.spiritlhl.top/ 中选择选项6in4后进行转换

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
-# 这里修改一下
-EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
-systemctl restart networking

保证环境无问题再进行别的操作了

检测服务端

systemctl status ndpresponder
ip addr show

检测客户端

ip addr show
curl ipv6.ip.sb

删除隧道

服务端

ip link set server-ipv6 down
-ip tunnel del server-ipv6

客户端

ip link set user-ipv6 down
-ip tunnel del user-ipv6

以上删除的方式只是临时删除,永久删除务必修改删除/etc/network/interfaces文件中你之前增加的内容

后言

实际上 https://tunnelbroker.net/ 支持申请/48大小的IPV6子网,只需要在

图片

这里进行申请,然后转换格式的时候将原先/64的IPV6地址改成/48的IPV6地址,你就能获得一个更大的IPV6子网了

使用WARP给宿主机添加IP出口(IPv4/IPv6)

好处

  • 宿主机安装,能使所有开启的机器都能够享受 Warp 的优势,而无需为每台机器单独进行设置,从而节省资源和简化管理。
  • 宿主机使用内核态 WireGuard,相比于用户态的 WireGuard-Go,实现能够提供更高效的 WireGuard 运行。

手动安装

1.安装WireGuard依赖

  • Debian 和 Ubuntu 系统
# 更新依赖库
-apt update -y
-
-# 安装 WireGuard 运行依赖
-apt install -y --no-install-recommends net-tools openresolv dnsutils
-
-# 安装 WireGuard 协议兼容的工具集合
-apt install -y --no-install-recommends wireguard-tools
  • CentOS 系
# 更新依赖库
-yum update -y
-
-# 安装额外包组件
-yum install -y epel-release 
-
-# 安装 WireGuard 运行依赖
-yum install -y net-tools
-
-# 安装 WireGuard 协议兼容的工具集合
-yum install -y wireguard-tools

2.获取warp账户信息

访问 https://warp.cloudflare.now.cc/?run=register&format=yaml,记录下 private_key, v6 2个值

image.png

3.修改配置文件

  • 创建并编辑 /etc/wireguard/warp.conf 文件,包含<>(尖括号)的部分一起替换掉,这只是为了看起来明显。

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口

[Interface]
-PrivateKey = <替换 PrivateKey>
-Address = 172.16.0.2/32
-Address = <替换 Address v6 地址>/128
-DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = ::/0
-Endpoint = 162.159.193.10:2408
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口
[Interface]
-PrivateKey = <替换 PrivateKey>
-Address = 172.16.0.2/32
-Address = <替换 Address v6 地址>/128
-DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
-MTU = 1280
-
-[Peer]
-PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
-AllowedIPs = 0.0.0.0/0
-Endpoint = [2606:4700:d0::a29f:c101]:2408
  • 针对双栈没有必要,毕竟原生的网络出口都会比通过 Warp 中转要好

4.设置地址解析优先级

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口,设置优先使用原生网络的 IPv4 出口
# IPv4 优先
-grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口,设置优先使用原生网络的 IPv6 出口
# IPv6 优先,默认即为 IPv6 优先
-sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

5.连接 Warp,并设置 systemd 进程守护

# 运行 wireguard 连接 Warp。如果这步卡死导致失联,后台重启宿主机即可解决
-wg-quick up warp
-
-# 查看 IPv4
-curl -A a https://api-ipv4.ip.sb/geoip
-
-# 查看 IPv6
-curl -A a https://api-ipv6.ip.sb/geoip
-
-# 测试成功后断开 Warp 连接
-wg-quick down warp
-
-# 重新连接并设置进程守护,以便重启后自动生效
-systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
-wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',201)]))}const S=s(F,[["render",V]]);export{T as __pageData,S as default}; diff --git a/assets/guide_lxd_lxd_custom.md.Ci349BaV.lean.js b/assets/guide_lxd_lxd_custom.md.Ci349BaV.lean.js deleted file mode 100644 index 0b7e8dff37..0000000000 --- a/assets/guide_lxd_lxd_custom.md.Ci349BaV.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as e,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const p="/assets/lxd1.CbGLa5s4.png",i="/assets/lxd2.C4eWfnaM.png",l="/assets/lxd3.tQBNiKQo.png",o="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",r="/assets/lxd7.EJ0s1ls2.png",h="/assets/lxd8.DAOueoww.png",u="/assets/lxd9.Dgmw4lpJ.png",g="/assets/lxd10.BjQ0l1K7.png",b="/assets/lxd11.D6E5sVW2.png",v="/assets/lxd12.B9udKIzn.png",k="/assets/lxd13.Dwv7xBpz.png",m="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",f="/assets/lxd16.CgeIdYJ2.png",P="/assets/lxd17.CWPY1pea.png",x="/assets/lxd18.DqnpcYcL.png",_="/assets/lxd19.B9_MB265.png",C="/assets/lxd20.rK3P3TT8.png",w="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",T=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_custom.md","filePath":"guide/lxd/lxd_custom.md","lastUpdated":1772422214000}'),F={name:"guide/lxd/lxd_custom.md"};function V(E,a,B,W,A,D){return t(),e("div",null,a[0]||(a[0]=[n("",201)]))}const S=s(F,[["render",V]]);export{T as __pageData,S as default}; diff --git a/assets/guide_lxd_lxd_custom.md.D7SlIu6J.js b/assets/guide_lxd_lxd_custom.md.D7SlIu6J.js new file mode 100644 index 0000000000..b28f838c27 --- /dev/null +++ b/assets/guide_lxd_lxd_custom.md.D7SlIu6J.js @@ -0,0 +1,82 @@ +import{_ as a,c as n,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",t="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",o="/assets/lxd7.EJ0s1ls2.png",u="/assets/lxd8.DAOueoww.png",b="/assets/lxd9.Dgmw4lpJ.png",h="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",v="/assets/lxd13.Dwv7xBpz.png",k="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",w="/assets/lxd16.CgeIdYJ2.png",f="/assets/lxd17.CWPY1pea.png",P="/assets/lxd18.DqnpcYcL.png",x="/assets/lxd19.B9_MB265.png",_="/assets/lxd20.rK3P3TT8.png",C="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",O=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_custom.md","filePath":"guide/lxd/lxd_custom.md","lastUpdated":1772424525000}'),F={name:"guide/lxd/lxd_custom.md"};function V(E,s,z,B,W,A){return e(),n("div",null,s[0]||(s[0]=[p(`

自定义

给lxd启用官方的web面板

给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://lxdimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/lxd_images 可见详细说明。

shell
lxc remote remove spiritlhl
+lxc remote add spiritlhl https://lxdimages.spiritlhl.net --protocol simplestreams --public
+lxc image list spiritlhl:debian

给宿主机附加免费的IPV6地址段

有的机器本身没有IPV6的/64子网,这里给出一个方法免费附加IPV6的子网。

这里是使用6in4方法解决宿主机本身没有IPV6地址的问题。

TIP

本页面的操作务必在原始系统上操作,保证未使用本项目的其他脚本安装环境(除了PVE,PVE需要先安装好),否则可能导致环境冲突

以下是2023年目前还在运行的免费提供IPV6子网的平台

支持的平台对应需要的安装包协议通道/子网数量
tunnelbroker.netifupdown 或 ifupdown2v4tunnel 或 sit3✖/64 或 5✖/64
tunnelbroker.chifupdown 或 ifupdown2v4tunnel 或 sit3✖/64
ip4market.ruifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
netassist.uaifupdown 或 ifupdown2v4tunnel 或 sit1✖/64
https://github.com/oneclickvirt/6in4ifupdown2sit、gre、ipip自定义

免费的平台只解决IPV6有没有的问题,不提供优质的IPV6带宽。

如需优质的带宽,请自建隧道,当ifupdown和ifupdown2都可时,先尝试ifupdown是否可安装成功,否则就安装ifupdown2.

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

初始环境修改

执行

touch /etc/cloud/cloud-init.disabled

关闭cloud-init的自动化覆写先,然后查看本机使用什么管理网络,执行

systemctl is-active systemd-networkd

systemctl is-active networking

看看属于哪种情况,如果是前者active,后者inactive,你需要重装/DD一个不是这样配置的系统,或者切换本机使用ifupdown/ifupdown2管理网络

# 是否需要禁用原网络管理自行评判
+# systemctl stop systemd-networkd
+# systemctl disable systemd-networkd
+# systemctl stop systemd-networkd.socket
+# systemctl disable systemd-networkd.socket

如果需要安装的是ifupdown控制网络,这个工具一般的主流linux系统都有

apt-get install ifupdown -y

如果需要安装的是ifupdown2进行网络管理,而这个工具一般只在debian系上可安装使用

apt-get install ifupdown2 -y

安装完毕后,安装了哪个包后面就选择哪个包进行格式转换。

systemctl start networking
+systemctl enable networking

然后重启服务器,检验机器的网络是否会因为修改出现重启失联的情况,且执行uptime观察启动已超过1分钟后,再进行后续步骤

如果是是前者inactive,后者active,则不需要切换网络管理程序,直接进行后续操作即可。

由于部分服务器存在默认的内网IPV6路由会与隧道冲突,此时可使用以下命令删除默认的IPV6路由

default_route=$(ip -6 route show | awk '/default via/{print $3}') && [ -n "$default_route" ] && ip -6 route del default via $default_route dev eth0

这里假设了你的客户端的服务器的默认网卡是eth0,你可以使用ip -6 route查看默认的路由并替换它,默认路由以default via开头,使用dev指定默认网卡,你只需要按照这个规则找到它即可

目前收集且支持的平台

tunnelbroker_net

结合一键开设带IPV6地址的容器的脚本,就能给每个容器附加来自he的IPV6地址了

缺点是地址比较黑/脏,cloudflare的cdn极有可能套不上,自行测试

  1. https://tunnelbroker.net/ 注册账户,并点击左边的 Create Regular Tunnel

1

  1. 红框处填写你的服务器的IPV4地址,选择物理距离近的连接点,比如机器在美国洛杉矶,就选美国西海岸的连接点,然后显示绿框提示,点Create Tunnel创建即可

2

3

4

  1. 等待出以下界面,点击Example Configurations然后选择对应的系统,比如LXD的宿主机那肯定就是Debian/Ubuntu了

5

6

  1. 框住的部分就是要修改的文件和需要复制的内容了

7

复制的时候不要带空行

  1. 转换格式后给你的网络配置文件附加IPV6的设置

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerNet,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改复制粘贴一下转换格式后的配置文件内容,然后执行此命令
+EOF

然后你可以使用cat /etc/network/interfaces查看配置文件是否正常写入了

  1. 如果上面都没问题,就需要启用网络接口即可
apt-get install net-tools iproute2 -y
+systemctl restart networking
  1. 然后你就可以测试IPV6网络是否已附加

执行ifconfig命令,这时应该有一个 he-ipv6 接口,类似下面这样:

8

或者执行:

curl ipv6.ip.sb

回传你绑定IPV6地址

  1. NAT VPS 的额外设置

IPv4 NAT VPS 除了前面提到的替换 IP 操作以外,可能还需要一些额外的设置,否则可能还是无法访问 IPv6 网络。

apt-get install ufw -y
+ufw allow 41

添加相关的路由规则

route -A inet6 add ::/0 dev he-ipv6
  1. 如果不需要该IPV6网络了,想要删除

删除 he-ipv6 网络接口配置(若没有删除重启后会自动启用),记得修改/etc/network/interfaces文件,删除之前红框添加的内容

然后重启服务器,就删除了

tunnelbroker_ch

类似上述的操作,先在 https://www.tunnelbroker.ch/ 注册一个账户先,注册后点击激活的邮件

然后就是填写你的服务器IPV4地址

创建后需要进入Config页面而不是详情页面

见到以下页面千万别使用,先刷新一下本页面,不要弹那个浅蓝色框后再停止刷新

记录以下页面的最后一个红框的内容,准备修改宿主机配置文件

页面的最后一个红框框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionTunnelBrokerCh,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式,等待页面刷新显示转换格式后的配置文件内容

然后用vim或者vi命令修改/etc/network/interfaces文件增加内容,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

ip4market_ru

类似上述的操作,先在 https://tb.ip4market.ru 注册一个账户先,注册邮箱得是非常见邮箱,电话可随便写不验证的,IP填上你要附加的宿主机的IPV4地址

然后就是过Recaptcha的人机验证,点击注册

邮箱会收到激活邮件,里面附带有你的密码,记住它

然后在首页进行登录

然后就会进入这个页面

按住右键,然后复制红框框住的四行内容,也就是

Server IPv4:
+Client IPv4
+Server IPv6
+Client IPv6

这四行内容,按ctrl+c复制或者右键复制

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择Optionip4market,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

netassist_ua

这个平台你在切换网络管理时务必使用ifupdown2而不是ifupdown2安装包,该平台使用sit协议,而sit协议需要在ifupdown2控制的环境中使用

类似上述的操作,先在 https://tb.netassist.ua/ 注册一个账户先,注册后点击激活的邮件,激活页面会有密码显示,记得记录

然后就是填写你的服务器IPV4地址,这个后面可以自己修改,先随便填一个都没问题

然后就到了这个页面了

a

第一个红框是你宿主机的IPV4地址需要填写的位置,要修改就修改那里,然后点change保存

第二个下拉红框选择Linux,然后点击show

b

会出现上面的内容,全选框住的部分复制下来,不要带空行

然后打开 https://ipv6tunnel.spiritlhl.top/ 选择OptionNetAssist,另一个下拉选择框选择你之前安装成功的包名,然后在输入框内粘贴你复制的内容

然后点击Covert转换格式

c

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

转移不同服务器之间的IPV6子网

相关仓库:https://github.com/oneclickvirt/6in4

该方法将提供一种方式,将A上的IPV6网段拆分一个子ipv6网段的出来,附加到B上使用

你需要在B所在的服务器上使用本套脚本给容器一键配置IPV6地址

功能

  • 自建sit/gre/ipip协议的IPv6隧道
  • 支持自定义要切分出来的IPV6子网大小,将自动计算出合适的CIDR格式的IPV6子网信息
  • 自动识别服务端的IPV6子网大小
  • 将自动设置隧道服务端并打印客户端需要执行的命令
  • 设置IPV6隧道的方法简单易懂,易于删除

环境准备

VPS(A)VPS(B)
一个IPV4地址(server_ipv4)一个IPV4地址(clinet_ipv4)
一个IPV6子网无IPV6地址
以下称之为服务端以下称之为客户端

使用方法

下载脚本

curl -L https://raw.githubusercontent.com/oneclickvirt/6in4/main/6in4.sh -o 6in4.sh && chmod +x 6in4.sh

执行命令

./6in4.sh client_ipv4 <mode_type> <subnet_size>
选项可选的选项1可选的选项2可选的选项3
<mode_type>gresitipip
<subnet_size>6480112

<mode_type>暂时只支持那三种协议,越靠前的越推荐,不填则默认为sit协议

<subnet_size>只要比原系统子网掩码大就行,且是8的倍数,不填则默认为80

记得client_ipv4替换为需要附加IPV6的机器的IPV4地址,执行完毕后会回传你需要在客户端执行的命令,详见执行后的说明即可

为防止忘记复制命令,命令本身也将写入到当前路径下的6in4.log文件中,可使用cat 6in4.log查询客户端需要执行的命令

复制下来的命令,务必在 https://ipv6tunnel.spiritlhl.top/ 中选择选项6in4后进行转换

然后就会自动刷新页面出现需要自己用vim或者vi命令修改/etc/network/interfaces文件增加的内容了,或者修改以下命令新增

tee -a /etc/network/interfaces <<EOF
+# 这里修改一下
+EOF

然后你就需要重启一下系统,或者执行

apt-get install net-tools iproute2 -y
+systemctl restart networking

保证环境无问题再进行别的操作了

检测服务端

systemctl status ndpresponder
ip addr show

检测客户端

ip addr show
curl ipv6.ip.sb

删除隧道

服务端

ip link set server-ipv6 down
+ip tunnel del server-ipv6

客户端

ip link set user-ipv6 down
+ip tunnel del user-ipv6

以上删除的方式只是临时删除,永久删除务必修改删除/etc/network/interfaces文件中你之前增加的内容

后言

实际上 https://tunnelbroker.net/ 支持申请/48大小的IPV6子网,只需要在

图片

这里进行申请,然后转换格式的时候将原先/64的IPV6地址改成/48的IPV6地址,你就能获得一个更大的IPV6子网了

使用WARP给宿主机添加IP出口(IPv4/IPv6)

好处

  • 宿主机安装,能使所有开启的机器都能够享受 Warp 的优势,而无需为每台机器单独进行设置,从而节省资源和简化管理。
  • 宿主机使用内核态 WireGuard,相比于用户态的 WireGuard-Go,实现能够提供更高效的 WireGuard 运行。

手动安装

1.安装WireGuard依赖

  • Debian 和 Ubuntu 系统
# 更新依赖库
+apt update -y
+
+# 安装 WireGuard 运行依赖
+apt install -y --no-install-recommends net-tools openresolv dnsutils
+
+# 安装 WireGuard 协议兼容的工具集合
+apt install -y --no-install-recommends wireguard-tools
  • CentOS 系
# 更新依赖库
+yum update -y
+
+# 安装额外包组件
+yum install -y epel-release 
+
+# 安装 WireGuard 运行依赖
+yum install -y net-tools
+
+# 安装 WireGuard 协议兼容的工具集合
+yum install -y wireguard-tools

2.获取warp账户信息

访问 https://warp.cloudflare.now.cc/?run=register&format=yaml,记录下 private_key, v6 2个值

image.png

3.修改配置文件

  • 创建并编辑 /etc/wireguard/warp.conf 文件,包含<>(尖括号)的部分一起替换掉,这只是为了看起来明显。

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口

[Interface]
+PrivateKey = <替换 PrivateKey>
+Address = 172.16.0.2/32
+Address = <替换 Address v6 地址>/128
+DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = ::/0
+Endpoint = 162.159.193.10:2408
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口
[Interface]
+PrivateKey = <替换 PrivateKey>
+Address = 172.16.0.2/32
+Address = <替换 Address v6 地址>/128
+DNS = 2606:4700:4700::1111, 2606:4700:4700::1001, 1.1.1.1, 1.0.0.1
+MTU = 1280
+
+[Peer]
+PublicKey = bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=
+AllowedIPs = 0.0.0.0/0
+Endpoint = [2606:4700:d0::a29f:c101]:2408
  • 针对双栈没有必要,毕竟原生的网络出口都会比通过 Warp 中转要好

4.设置地址解析优先级

  • 针对 IPv4 only 的宿主机,Warp 只接管 IPv6 出口,设置优先使用原生网络的 IPv4 出口
# IPv4 优先
+grep -qE '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf || echo 'precedence ::ffff:0:0/96  100' >> /etc/gai.conf
  • 针对 IPv6 only 的宿主机,Warp 只接管 IPv4 出口,设置优先使用原生网络的 IPv6 出口
# IPv6 优先,默认即为 IPv6 优先
+sed -i '/^precedence \\:\\:ffff\\:0\\:0/d;/^label 2002\\:\\:\\/16/d' /etc/gai.conf

5.连接 Warp,并设置 systemd 进程守护

# 运行 wireguard 连接 Warp。如果这步卡死导致失联,后台重启宿主机即可解决
+wg-quick up warp
+
+# 查看 IPv4
+curl -A a https://api-ipv4.ip.sb/geoip
+
+# 查看 IPv6
+curl -A a https://api-ipv6.ip.sb/geoip
+
+# 测试成功后断开 Warp 连接
+wg-quick down warp
+
+# 重新连接并设置进程守护,以便重启后自动生效
+systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

',201)]))}const T=a(F,[["render",V]]);export{O as __pageData,T as default}; diff --git a/assets/guide_lxd_lxd_custom.md.D7SlIu6J.lean.js b/assets/guide_lxd_lxd_custom.md.D7SlIu6J.lean.js new file mode 100644 index 0000000000..3d705e8b55 --- /dev/null +++ b/assets/guide_lxd_lxd_custom.md.D7SlIu6J.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const i="/assets/lxd1.CbGLa5s4.png",l="/assets/lxd2.C4eWfnaM.png",t="/assets/lxd3.tQBNiKQo.png",r="/assets/lxd4.CSfRHLxz.png",d="/assets/lxd5.WUJi0qzd.png",c="/assets/lxd6.Cnds779U.png",o="/assets/lxd7.EJ0s1ls2.png",u="/assets/lxd8.DAOueoww.png",b="/assets/lxd9.Dgmw4lpJ.png",h="/assets/lxd10.BjQ0l1K7.png",m="/assets/lxd11.D6E5sVW2.png",g="/assets/lxd12.B9udKIzn.png",v="/assets/lxd13.Dwv7xBpz.png",k="/assets/lxd14.Whdz6cP-.png",y="/assets/lxd15.BjW7LbDr.png",w="/assets/lxd16.CgeIdYJ2.png",f="/assets/lxd17.CWPY1pea.png",P="/assets/lxd18.DqnpcYcL.png",x="/assets/lxd19.B9_MB265.png",_="/assets/lxd20.rK3P3TT8.png",C="/assets/lxd21.w-R0l00Y.png",I="/assets/lxd22.45M-VX6J.png",q="/assets/lxd23.CLaVW0qk.png",O=JSON.parse('{"title":"自定义","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_custom.md","filePath":"guide/lxd/lxd_custom.md","lastUpdated":1772424525000}'),F={name:"guide/lxd/lxd_custom.md"};function V(E,s,z,B,W,A){return e(),n("div",null,s[0]||(s[0]=[p("",201)]))}const T=a(F,[["render",V]]);export{O as __pageData,T as default}; diff --git a/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.js b/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.js new file mode 100644 index 0000000000..ceb115e881 --- /dev/null +++ b/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.js @@ -0,0 +1,16 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_extra_config.md","filePath":"guide/lxd/lxd_extra_config.md","lastUpdated":1772424525000}'),l={name:"guide/lxd/lxd_extra_config.md"};function t(p,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[e(`

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为LXD创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
+ip6tables-legacy -t nat -F PREROUTING
+ip6tables-save > /etc/iptables/rules.v6
+netfilter-persistent save
+netfilter-persistent reload
+service netfilter-persistent restart

卸载IPV6地址绑定的守护进程和对应的文件可用:

shell
systemctl stop add-ipv6.service
+systemctl disable add-ipv6.service
+rm /etc/systemd/system/add-ipv6.service
+systemctl daemon-reload
+rm /usr/local/bin/add-ipv6.sh

一键安装开lxd宿主机所需要的带vnstat环境的常用预配置环境

  • (非必须,该脚本仅仅是为了站点对接监控方便,不装的也没问题)

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

一键启用官方可视化操作的面板

  • (非必须,只是为了方便可视化操作,没有也没问题)
shell
sudo snap refresh lxd --channel=latest/stable
+snap set lxd ui.enable=true
+lxc config set core.https_address $(curl -sKL ipv4.ip.sb):8443
+systemctl reload snap.lxd.daemon
+snap restart --reload lxd

然后你可以在浏览器中输入

https://你的公网IPV4地址:8443

即可进入官方可视化操作面板,后续的操作配置按照UI提示操作即可

一键安装宿主机第三方可视化操作的面板

  • (非必须,该面板只是为了方便可视化操作,没有也没问题)
  • 原作者仓库:跳转
shell
lxc config set core.https_address [::]
+lxc config set core.trust_password your_password
+snap install lxdmosaic

安装完毕后打开宿主机IP地址,按照提示设置admin的密码,其他一路默认就能使用面板了

`,37)]))}const o=i(l,[["render",t]]);export{c as __pageData,o as default}; diff --git a/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.lean.js b/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.lean.js new file mode 100644 index 0000000000..ed93a5b168 --- /dev/null +++ b/assets/guide_lxd_lxd_extra_config.md.BUIC4UCD.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_extra_config.md","filePath":"guide/lxd/lxd_extra_config.md","lastUpdated":1772424525000}'),l={name:"guide/lxd/lxd_extra_config.md"};function t(p,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[e("",37)]))}const o=i(l,[["render",t]]);export{c as __pageData,o as default}; diff --git a/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.js b/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.js deleted file mode 100644 index e508c3b1c1..0000000000 --- a/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.js +++ /dev/null @@ -1,16 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_extra_config.md","filePath":"guide/lxd/lxd_extra_config.md","lastUpdated":1772422214000}'),h={name:"guide/lxd/lxd_extra_config.md"};function n(e,s,p,k,d,F){return t(),a("div",null,s[0]||(s[0]=[l(`

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为LXD创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
-ip6tables-legacy -t nat -F PREROUTING
-ip6tables-save > /etc/iptables/rules.v6
-netfilter-persistent save
-netfilter-persistent reload
-service netfilter-persistent restart

卸载IPV6地址绑定的守护进程和对应的文件可用:

shell
systemctl stop add-ipv6.service
-systemctl disable add-ipv6.service
-rm /etc/systemd/system/add-ipv6.service
-systemctl daemon-reload
-rm /usr/local/bin/add-ipv6.sh

一键安装开lxd宿主机所需要的带vnstat环境的常用预配置环境

  • (非必须,该脚本仅仅是为了站点对接监控方便,不装的也没问题)

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/backend.sh -o backend.sh && chmod +x backend.sh && bash backend.sh

一键启用官方可视化操作的面板

  • (非必须,只是为了方便可视化操作,没有也没问题)
shell
sudo snap refresh lxd --channel=latest/stable
-snap set lxd ui.enable=true
-lxc config set core.https_address $(curl -sKL ipv4.ip.sb):8443
-systemctl reload snap.lxd.daemon
-snap restart --reload lxd

然后你可以在浏览器中输入

https://你的公网IPV4地址:8443

即可进入官方可视化操作面板,后续的操作配置按照UI提示操作即可

一键安装宿主机第三方可视化操作的面板

  • (非必须,该面板只是为了方便可视化操作,没有也没问题)
  • 原作者仓库:跳转
shell
lxc config set core.https_address [::]
-lxc config set core.trust_password your_password
-snap install lxdmosaic

安装完毕后打开宿主机IP地址,按照提示设置admin的密码,其他一路默认就能使用面板了

`,37)]))}const g=i(h,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.lean.js b/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.lean.js deleted file mode 100644 index b72a2a6e50..0000000000 --- a/assets/guide_lxd_lxd_extra_config.md.U4TsTE-I.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"其他自定义配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_extra_config.md","filePath":"guide/lxd/lxd_extra_config.md","lastUpdated":1772422214000}'),h={name:"guide/lxd/lxd_extra_config.md"};function n(e,s,p,k,d,F){return t(),a("div",null,s[0]||(s[0]=[l("",37)]))}const g=i(h,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/guide_lxd_lxd_install.md.DDEoppyq.js b/assets/guide_lxd_lxd_install.md.DDEoppyq.js deleted file mode 100644 index 85042cc76e..0000000000 --- a/assets/guide_lxd_lxd_install.md.DDEoppyq.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as i,c as a,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const l="/assets/lxdd1.CVTAIewh.png",h="/assets/lxdd2.C_mYE7sL.png",n="/assets/lxdd3.DZ2Na5-t.png",e="/assets/lxdd4.CO1I1FPh.png",d="/assets/lxdd0.QoEngFSd.png",C=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_install.md","filePath":"guide/lxd/lxd_install.md","lastUpdated":1772422214000}'),k={name:"guide/lxd/lxd_install.md"};function r(c,s,o,F,g,u){return t(),a("div",null,s[0]||(s[0]=[p('

LXD

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD主体安装

WARNING

如果是全新的服务器,务必保证apt updateapt install curl都无问题再执行本脚本。

  • 环境要求:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxd的lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

shell
bash lxdinstall.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

WARNING

如果你需要在一台服务器上开启超过200个LXD容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

安装WEB控制面板

自定义 教程中有关于官方面板怎么启用的教程,但这里不选择使用官方的面板,因为官方面板为了安全性,牺牲了很多用户体验,这块使用

https://github.com/turtle0x1/LxdMosaic

的第三方面板

shell
sudo snap install lxdmosaic

直接进行一键安装,然后打开当前宿主机的https://<公网IP地址>/,强制访问,就能进入设置页面

lxd

lxd

lxd

这块如果你需要设置网站名字可以改改

lxd

聊胜于无只能说,没有RBAC权限控制进行分用户隔离

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的LXD安装流程。

关闭防火墙

bash
apt update
-apt install curl wget sudo dos2unix ufw jq -y
-ufw disable

开设虚拟内存SWAP

内存看你开多少服务器,这里如果要开8个,换算需要2G内存,实际内存如果是512MB内存,还需要开1.5G,保守点开2G虚拟内存即可

执行下面命令,输入1,再输入2048,代表开2G虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

安装LXD

执行下述命令进行安装和初始化

apt install snapd -y
-snap install lxd
-/snap/bin/lxd init

如果上面的命令中出现下面的错误

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

使用命令修补后再进行lxd的安装

snap install core

如果无异常,上面三行命令执行结果如下

图片

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

测试lxc有没有软连接上

lxc -h

如果报错则执行以下命令软连接lxc命令

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
-export PATH=$PATH:/snap/bin

连接后再测试lxc命令是否有报错找不到

`,67)]))}const b=i(k,[["render",r]]);export{C as __pageData,b as default}; diff --git a/assets/guide_lxd_lxd_install.md.DDEoppyq.lean.js b/assets/guide_lxd_lxd_install.md.DDEoppyq.lean.js deleted file mode 100644 index 0dd640256a..0000000000 --- a/assets/guide_lxd_lxd_install.md.DDEoppyq.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const l="/assets/lxdd1.CVTAIewh.png",h="/assets/lxdd2.C_mYE7sL.png",n="/assets/lxdd3.DZ2Na5-t.png",e="/assets/lxdd4.CO1I1FPh.png",d="/assets/lxdd0.QoEngFSd.png",C=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_install.md","filePath":"guide/lxd/lxd_install.md","lastUpdated":1772422214000}'),k={name:"guide/lxd/lxd_install.md"};function r(c,s,o,F,g,u){return t(),a("div",null,s[0]||(s[0]=[p("",67)]))}const b=i(k,[["render",r]]);export{C as __pageData,b as default}; diff --git a/assets/guide_lxd_lxd_install.md.lF46ja40.js b/assets/guide_lxd_lxd_install.md.lF46ja40.js new file mode 100644 index 0000000000..61b5334653 --- /dev/null +++ b/assets/guide_lxd_lxd_install.md.lF46ja40.js @@ -0,0 +1,6 @@ +import{_ as i,c as a,o as l,ag as t}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/lxdd1.CVTAIewh.png",n="/assets/lxdd2.C_mYE7sL.png",e="/assets/lxdd3.DZ2Na5-t.png",h="/assets/lxdd4.CO1I1FPh.png",d="/assets/lxdd0.QoEngFSd.png",m=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_install.md","filePath":"guide/lxd/lxd_install.md","lastUpdated":1772424525000}'),r={name:"guide/lxd/lxd_install.md"};function k(c,s,o,F,g,u){return l(),a("div",null,s[0]||(s[0]=[t('

LXD

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD主体安装

WARNING

如果是全新的服务器,务必保证apt updateapt install curl都无问题再执行本脚本。

  • 环境要求:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxd的lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

shell
bash lxdinstall.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

WARNING

如果你需要在一台服务器上开启超过200个LXD容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

安装WEB控制面板

自定义 教程中有关于官方面板怎么启用的教程,但这里不选择使用官方的面板,因为官方面板为了安全性,牺牲了很多用户体验,这块使用

https://github.com/turtle0x1/LxdMosaic

的第三方面板

shell
sudo snap install lxdmosaic

直接进行一键安装,然后打开当前宿主机的https://<公网IP地址>/,强制访问,就能进入设置页面

lxd

lxd

lxd

这块如果你需要设置网站名字可以改改

lxd

聊胜于无只能说,没有RBAC权限控制进行分用户隔离

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的LXD安装流程。

关闭防火墙

bash
apt update
+apt install curl wget sudo dos2unix ufw jq -y
+ufw disable

开设虚拟内存SWAP

内存看你开多少服务器,这里如果要开8个,换算需要2G内存,实际内存如果是512MB内存,还需要开1.5G,保守点开2G虚拟内存即可

执行下面命令,输入1,再输入2048,代表开2G虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

安装LXD

执行下述命令进行安装和初始化

apt install snapd -y
+snap install lxd
+/snap/bin/lxd init

如果上面的命令中出现下面的错误

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

使用命令修补后再进行lxd的安装

snap install core

如果无异常,上面三行命令执行结果如下

图片

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

测试lxc有没有软连接上

lxc -h

如果报错则执行以下命令软连接lxc命令

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
+export PATH=$PATH:/snap/bin

连接后再测试lxc命令是否有报错找不到

`,67)]))}const y=i(r,[["render",k]]);export{m as __pageData,y as default}; diff --git a/assets/guide_lxd_lxd_install.md.lF46ja40.lean.js b/assets/guide_lxd_lxd_install.md.lF46ja40.lean.js new file mode 100644 index 0000000000..e40568f915 --- /dev/null +++ b/assets/guide_lxd_lxd_install.md.lF46ja40.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as l,ag as t}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/lxdd1.CVTAIewh.png",n="/assets/lxdd2.C_mYE7sL.png",e="/assets/lxdd3.DZ2Na5-t.png",h="/assets/lxdd4.CO1I1FPh.png",d="/assets/lxdd0.QoEngFSd.png",m=JSON.parse('{"title":"LXD","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_install.md","filePath":"guide/lxd/lxd_install.md","lastUpdated":1772424525000}'),r={name:"guide/lxd/lxd_install.md"};function k(c,s,o,F,g,u){return l(),a("div",null,s[0]||(s[0]=[t("",67)]))}const y=i(r,[["render",k]]);export{m as __pageData,y as default}; diff --git a/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.js b/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.js new file mode 100644 index 0000000000..7308551d3c --- /dev/null +++ b/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.js @@ -0,0 +1,25 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"LXC虚拟化","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_lxc.md","filePath":"guide/lxd/lxd_lxc.md","lastUpdated":1772424525000}'),e={name:"guide/lxd/lxd_lxc.md"};function t(h,s,p,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l(`

LXC虚拟化

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载开机脚本是非必须的,如果你使用过一键安装LXD的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian12,注意传入参数为系统名字+版本号,如:

  • debian12,debian13
  • ubuntu22,ubuntu24
  • centos8,centos9 (实际都是Stream版本)
  • alpine3.16,alpine3.17,alpine3.18,alpine3.19
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

需要进入容器内部则执行

lxc exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
lxc stop test
+lxc delete test
+rm -rf test
+rm -rf test_v6
+ls

普通版本批量生成

开出的容器配置:

  • 1核256MB内存1GB硬盘限速300Mbit带宽
  • 带1个SSH端口,24个外网端口
  • 默认内存和硬盘大小

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

执行下面命令加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

下面命令为开容器名字前缀为tj10个容器

shell
./init.sh tj 10

有时候init.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

纯SSH端口版本批量生成

开出的容器配置:

  • 1核128MB内存1GB硬盘限速300Mbit带宽
  • 只有一个SSH端口
  • 无法挂载warp

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

下列命令最后一行为开容器名字前缀为tj10个容器

shell
./least.sh tj 10

有时候least.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

自定义批量生成版本

  • 可自定义内存和硬盘大小
  • 有执行过上面的手动批量生成过也没问题,配置是继承的不覆盖

如果需要多次批量生成容器,可使用

国际

curl -L https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

可多次运行批量生成容器,且继承前面已生成的部分在后面添加,可自定义内存和硬盘大小

查看已批量开设的信息

开完容器后,具体信息会生成在当前目录下的log文件中,格式如下

shell
1号容器名称 密码 ssh端口 外网端口起始 外网端口终止
+2号容器名称 密码 ssh端口 外网端口起始 外网端口终止

如果想要查看,只需在当前目录执行以下命令打印log文件即可

shell
cat log

WARNING

不要拿该脚本开出的容器当生产环境,LXC虚拟化不支持换内核,dd,开启bbr等操作

部分常用LXD命令

查看所有

bash
lxc list

查看个例

bash
lxc info 容器名字

启动个例

bash
lxc start 容器名字

停止个例

bash
lxc stop 容器名字

删除个例

bash
lxc delete -f 容器名字

进入内部

bash
lxc exec 容器名字 /bin/bash

TIP

在alpine中不用/bin/bash而是用/bin/sh,常规的系统都是/bin/bash

退出则输入exit回车即可

删除所有LXC容器

bash
lxc list -c n --format csv | xargs -I {} lxc delete -f {}

在容器内执行删除无用日志

bash
sudo apt-get autoremove
+sudo apt-get clean
+sudo find /var/log -type f -delete
+sudo find /var/tmp -type f -delete
+sudo find /tmp -type f -delete
+sudo find /var/cache/apt/archives -type f -delete

更新上述所有一键脚本的相关命令

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
+rm -rf /usr/local/bin/config.sh
+rm -rf /usr/local/bin/ssh_bash.sh
+rm -rf /usr/local/bin/check-dns.sh
+rm -rf /root/ssh_sh.sh
+rm -rf /root/config.sh
+rm -rf /root/ssh_bash.sh
+rm -rf /root/buildct.sh
+rm -rf /root/add_more.sh
+rm -rf /root/build_ipv6_network.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
+wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

`,92)]))}const o=i(e,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.lean.js b/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.lean.js new file mode 100644 index 0000000000..96eb87fbd9 --- /dev/null +++ b/assets/guide_lxd_lxd_lxc.md.3TiBQZB0.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const F=JSON.parse('{"title":"LXC虚拟化","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_lxc.md","filePath":"guide/lxd/lxd_lxc.md","lastUpdated":1772424525000}'),e={name:"guide/lxd/lxd_lxc.md"};function t(h,s,p,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l("",92)]))}const o=i(e,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.js b/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.js deleted file mode 100644 index 8e0c5be339..0000000000 --- a/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"LXC虚拟化","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_lxc.md","filePath":"guide/lxd/lxd_lxc.md","lastUpdated":1772422214000}'),l={name:"guide/lxd/lxd_lxc.md"};function n(p,s,e,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h(`

LXC虚拟化

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载开机脚本是非必须的,如果你使用过一键安装LXD的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian12,注意传入参数为系统名字+版本号,如:

  • debian12,debian13
  • ubuntu22,ubuntu24
  • centos8,centos9 (实际都是Stream版本)
  • alpine3.16,alpine3.17,alpine3.18,alpine3.19
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

需要进入容器内部则执行

lxc exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
lxc stop test
-lxc delete test
-rm -rf test
-rm -rf test_v6
-ls

普通版本批量生成

开出的容器配置:

  • 1核256MB内存1GB硬盘限速300Mbit带宽
  • 带1个SSH端口,24个外网端口
  • 默认内存和硬盘大小

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

执行下面命令加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/init.sh -o init.sh && chmod +x init.sh && dos2unix init.sh

下面命令为开容器名字前缀为tj10个容器

shell
./init.sh tj 10

有时候init.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

纯SSH端口版本批量生成

开出的容器配置:

  • 1核128MB内存1GB硬盘限速300Mbit带宽
  • 只有一个SSH端口
  • 无法挂载warp

TIP

lxc若命令无问题,执行初始化开容器,这一步最好放screen中后台挂起执行,开容器时长与你开几个和宿主机配置相关

加载开机脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/least.sh -o least.sh && chmod +x least.sh && dos2unix least.sh

下列命令最后一行为开容器名字前缀为tj10个容器

shell
./least.sh tj 10

有时候least.sh的运行路径有问题,此时建议前面加上sudo强制根目录执行

自定义批量生成版本

  • 可自定义内存和硬盘大小
  • 有执行过上面的手动批量生成过也没问题,配置是继承的不覆盖

如果需要多次批量生成容器,可使用

国际

curl -L https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/lxd/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh

可多次运行批量生成容器,且继承前面已生成的部分在后面添加,可自定义内存和硬盘大小

查看已批量开设的信息

开完容器后,具体信息会生成在当前目录下的log文件中,格式如下

shell
1号容器名称 密码 ssh端口 外网端口起始 外网端口终止
-2号容器名称 密码 ssh端口 外网端口起始 外网端口终止

如果想要查看,只需在当前目录执行以下命令打印log文件即可

shell
cat log

WARNING

不要拿该脚本开出的容器当生产环境,LXC虚拟化不支持换内核,dd,开启bbr等操作

部分常用LXD命令

查看所有

bash
lxc list

查看个例

bash
lxc info 容器名字

启动个例

bash
lxc start 容器名字

停止个例

bash
lxc stop 容器名字

删除个例

bash
lxc delete -f 容器名字

进入内部

bash
lxc exec 容器名字 /bin/bash

TIP

在alpine中不用/bin/bash而是用/bin/sh,常规的系统都是/bin/bash

退出则输入exit回车即可

删除所有LXC容器

bash
lxc list -c n --format csv | xargs -I {} lxc delete -f {}

在容器内执行删除无用日志

bash
sudo apt-get autoremove
-sudo apt-get clean
-sudo find /var/log -type f -delete
-sudo find /var/tmp -type f -delete
-sudo find /tmp -type f -delete
-sudo find /var/cache/apt/archives -type f -delete

更新上述所有一键脚本的相关命令

删除原始配置脚本

bash
rm -rf /usr/local/bin/ssh_sh.sh
-rm -rf /usr/local/bin/config.sh
-rm -rf /usr/local/bin/ssh_bash.sh
-rm -rf /usr/local/bin/check-dns.sh
-rm -rf /root/ssh_sh.sh
-rm -rf /root/config.sh
-rm -rf /root/ssh_bash.sh
-rm -rf /root/buildct.sh
-rm -rf /root/add_more.sh
-rm -rf /root/build_ipv6_network.sh

下载回新版本的相关配置脚本

bash
wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/check-dns.sh -O /usr/local/bin/check-dns.sh && chmod +x /usr/local/bin/check-dns.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/config.sh -O /usr/local/bin/config.sh && chmod +x /usr/local/bin/config.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_bash.sh -O /usr/local/bin/ssh_bash.sh && chmod +x /usr/local/bin/ssh_bash.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/ssh_sh.sh -O /usr/local/bin/ssh_sh.sh && chmod +x /usr/local/bin/ssh_sh.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -O /root/build_ipv6_network.sh && chmod +x /root/build_ipv6_network.sh
-wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

`,92)]))}const g=i(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.lean.js b/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.lean.js deleted file mode 100644 index 93050a3400..0000000000 --- a/assets/guide_lxd_lxd_lxc.md.CLJgXlcU.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"LXC虚拟化","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_lxc.md","filePath":"guide/lxd/lxd_lxc.md","lastUpdated":1772422214000}'),l={name:"guide/lxd/lxd_lxc.md"};function n(p,s,e,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h("",92)]))}const g=i(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/guide_lxd_lxd_precheck.md.d0sZIJx8.js b/assets/guide_lxd_lxd_precheck.md.CWp5sTOR.js similarity index 73% rename from assets/guide_lxd_lxd_precheck.md.d0sZIJx8.js rename to assets/guide_lxd_lxd_precheck.md.CWp5sTOR.js index 55eb150276..3a735b52a1 100644 --- a/assets/guide_lxd_lxd_precheck.md.d0sZIJx8.js +++ b/assets/guide_lxd_lxd_precheck.md.CWp5sTOR.js @@ -1 +1 @@ -import{_ as t,c as a,o as i,ag as l}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_precheck.md","filePath":"guide/lxd/lxd_precheck.md","lastUpdated":1772422214000}'),r={name:"guide/lxd/lxd_precheck.md"};function c(p,e,o,s,n,d){return i(),a("div",null,e[0]||(e[0]=[l('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/lxd

要求

硬件要求:

  • 系统:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接公共网络

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu,Ubuntu别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加清华镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
',17)]))}const b=t(r,[["render",c]]);export{u as __pageData,b as default}; +import{_ as a,c as t,o as i,ag as l}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_precheck.md","filePath":"guide/lxd/lxd_precheck.md","lastUpdated":1772424525000}'),r={name:"guide/lxd/lxd_precheck.md"};function s(n,e,c,p,o,d){return i(),t("div",null,e[0]||(e[0]=[l('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/lxd

要求

硬件要求:

  • 系统:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接公共网络

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu,Ubuntu别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加清华镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
',17)]))}const b=a(r,[["render",s]]);export{u as __pageData,b as default}; diff --git a/assets/guide_lxd_lxd_precheck.md.CWp5sTOR.lean.js b/assets/guide_lxd_lxd_precheck.md.CWp5sTOR.lean.js new file mode 100644 index 0000000000..21b9dc7628 --- /dev/null +++ b/assets/guide_lxd_lxd_precheck.md.CWp5sTOR.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as i,ag as l}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_precheck.md","filePath":"guide/lxd/lxd_precheck.md","lastUpdated":1772424525000}'),r={name:"guide/lxd/lxd_precheck.md"};function s(n,e,c,p,o,d){return i(),t("div",null,e[0]||(e[0]=[l("",17)]))}const b=a(r,[["render",s]]);export{u as __pageData,b as default}; diff --git a/assets/guide_lxd_lxd_precheck.md.d0sZIJx8.lean.js b/assets/guide_lxd_lxd_precheck.md.d0sZIJx8.lean.js deleted file mode 100644 index eeaed371d2..0000000000 --- a/assets/guide_lxd_lxd_precheck.md.d0sZIJx8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as i,ag as l}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_precheck.md","filePath":"guide/lxd/lxd_precheck.md","lastUpdated":1772422214000}'),r={name:"guide/lxd/lxd_precheck.md"};function c(p,e,o,s,n,d){return i(),a("div",null,e[0]||(e[0]=[l("",17)]))}const b=t(r,[["render",c]]);export{u as __pageData,b as default}; diff --git a/assets/guide_lxd_lxd_qa.md.457JFcFy.js b/assets/guide_lxd_lxd_qa.md.457JFcFy.js new file mode 100644 index 0000000000..f61cc96c3a --- /dev/null +++ b/assets/guide_lxd_lxd_qa.md.457JFcFy.js @@ -0,0 +1,2 @@ +import{_ as a,c as e,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qa.md","filePath":"guide/lxd/lxd_qa.md","lastUpdated":1772424525000}'),t={name:"guide/lxd/lxd_qa.md"};function p(l,s,r,h,d,c){return i(),e("div",null,s[0]||(s[0]=[n(`

解惑

LXD安装后lxc命令显示找不到

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
+export PATH=$PATH:/snap/bin

执行这个命令后尝试

lxc -h

看看lxc命令是否已修复

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要LXD和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致LXD无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销

`,25)]))}const u=a(t,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qa.md.457JFcFy.lean.js b/assets/guide_lxd_lxd_qa.md.457JFcFy.lean.js new file mode 100644 index 0000000000..e99d59a183 --- /dev/null +++ b/assets/guide_lxd_lxd_qa.md.457JFcFy.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as i,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qa.md","filePath":"guide/lxd/lxd_qa.md","lastUpdated":1772424525000}'),t={name:"guide/lxd/lxd_qa.md"};function p(l,s,r,h,d,c){return i(),e("div",null,s[0]||(s[0]=[n("",25)]))}const u=a(t,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qa.md.BTzSmiCi.js b/assets/guide_lxd_lxd_qa.md.BTzSmiCi.js deleted file mode 100644 index 5017ee704a..0000000000 --- a/assets/guide_lxd_lxd_qa.md.BTzSmiCi.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qa.md","filePath":"guide/lxd/lxd_qa.md","lastUpdated":1772422214000}'),p={name:"guide/lxd/lxd_qa.md"};function n(l,s,h,c,o,d){return e(),i("div",null,s[0]||(s[0]=[t(`

解惑

LXD安装后lxc命令显示找不到

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
-export PATH=$PATH:/snap/bin

执行这个命令后尝试

lxc -h

看看lxc命令是否已修复

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要LXD和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致LXD无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销

`,25)]))}const u=a(p,[["render",n]]);export{k as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qa.md.BTzSmiCi.lean.js b/assets/guide_lxd_lxd_qa.md.BTzSmiCi.lean.js deleted file mode 100644 index a5ce98ed22..0000000000 --- a/assets/guide_lxd_lxd_qa.md.BTzSmiCi.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qa.md","filePath":"guide/lxd/lxd_qa.md","lastUpdated":1772422214000}'),p={name:"guide/lxd/lxd_qa.md"};function n(l,s,h,c,o,d){return e(),i("div",null,s[0]||(s[0]=[t("",25)]))}const u=a(p,[["render",n]]);export{k as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.js b/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.js new file mode 100644 index 0000000000..c15a29d6f7 --- /dev/null +++ b/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.js @@ -0,0 +1,5 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qemu.md","filePath":"guide/lxd/lxd_qemu.md","lastUpdated":1772424525000}'),l={name:"guide/lxd/lxd_qemu.md"};function n(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[t(`

在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
lxc console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
lxc stop -f test
+lxc delete -f test
+rm -rf test
+rm -rf test_v6
+ls
`,31)]))}const u=i(l,[["render",n]]);export{c as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.lean.js b/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.lean.js new file mode 100644 index 0000000000..908fbc5bca --- /dev/null +++ b/assets/guide_lxd_lxd_qemu.md.BNQDW1qK.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qemu.md","filePath":"guide/lxd/lxd_qemu.md","lastUpdated":1772424525000}'),l={name:"guide/lxd/lxd_qemu.md"};function n(h,s,p,d,r,k){return e(),a("div",null,s[0]||(s[0]=[t("",31)]))}const u=i(l,[["render",n]]);export{c as __pageData,u as default}; diff --git a/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.js b/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.js deleted file mode 100644 index 9e39c7502b..0000000000 --- a/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qemu.md","filePath":"guide/lxd/lxd_qemu.md","lastUpdated":1772422214000}'),e={name:"guide/lxd/lxd_qemu.md"};function h(n,s,p,d,k,r){return t(),a("div",null,s[0]||(s[0]=[l(`

在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
lxc console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
lxc stop -f test
-lxc delete -f test
-rm -rf test
-rm -rf test_v6
-ls
`,31)]))}const F=i(e,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.lean.js b/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.lean.js deleted file mode 100644 index 26590d46ce..0000000000 --- a/assets/guide_lxd_lxd_qemu.md.RzoK4CxT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_qemu.md","filePath":"guide/lxd/lxd_qemu.md","lastUpdated":1772422214000}'),e={name:"guide/lxd/lxd_qemu.md"};function h(n,s,p,d,k,r){return t(),a("div",null,s[0]||(s[0]=[l("",31)]))}const F=i(e,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/guide_lxd_lxd_thanks.md.DH4WyT9B.js b/assets/guide_lxd_lxd_thanks.md.BuXAtsXG.js similarity index 92% rename from assets/guide_lxd_lxd_thanks.md.DH4WyT9B.js rename to assets/guide_lxd_lxd_thanks.md.BuXAtsXG.js index 3c8e713662..38184bd70c 100644 --- a/assets/guide_lxd_lxd_thanks.md.DH4WyT9B.js +++ b/assets/guide_lxd_lxd_thanks.md.BuXAtsXG.js @@ -1 +1 @@ -import{_ as r,c as e,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/lxd/lxd_thanks.md","filePath":"guide/lxd/lxd_thanks.md","lastUpdated":1772422214000}'),s={name:"guide/lxd/lxd_thanks.md"};function o(i,t,l,p,c,d){return a(),e("div",null,t[0]||(t[0]=[n('

致谢

https://github.com/lxc/lxd

https://lxdware.com/

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://images.opsmaru.dev/

感谢 @Ella-Alinda @fscarmen 提供的指导

',12)]))}const f=r(s,[["render",o]]);export{u as __pageData,f as default}; +import{_ as r,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/lxd/lxd_thanks.md","filePath":"guide/lxd/lxd_thanks.md","lastUpdated":1772424525000}'),s={name:"guide/lxd/lxd_thanks.md"};function o(i,t,l,p,c,d){return a(),e("div",null,t[0]||(t[0]=[n('

致谢

https://github.com/lxc/lxd

https://lxdware.com/

https://discuss.linuxcontainers.org/

https://discuss.linuxcontainers.org/t/how-to-run-docker-inside-lxc-container/13017/4

https://discuss.linuxcontainers.org/t/error-seccomp-notify-not-supported-on-container-start/15038/3

https://discuss.linuxcontainers.org/t/how-do-i-assign-a-public-ipv6-address-to-a-lxc-container/6028

https://github.com/turtle0x1/LxdMosaic

https://openzfs.github.io/openzfs-docs/Getting Started/Debian/index.html

https://github.com/SuperManito/LinuxMirrors

https://images.opsmaru.dev/

感谢 @Ella-Alinda @fscarmen 提供的指导

',12)]))}const f=r(s,[["render",o]]);export{u as __pageData,f as default}; diff --git a/assets/guide_lxd_lxd_thanks.md.DH4WyT9B.lean.js b/assets/guide_lxd_lxd_thanks.md.BuXAtsXG.lean.js similarity index 55% rename from assets/guide_lxd_lxd_thanks.md.DH4WyT9B.lean.js rename to assets/guide_lxd_lxd_thanks.md.BuXAtsXG.lean.js index 4f7f51d1cb..5d5dbaddf1 100644 --- a/assets/guide_lxd_lxd_thanks.md.DH4WyT9B.lean.js +++ b/assets/guide_lxd_lxd_thanks.md.BuXAtsXG.lean.js @@ -1 +1 @@ -import{_ as r,c as e,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/lxd/lxd_thanks.md","filePath":"guide/lxd/lxd_thanks.md","lastUpdated":1772422214000}'),s={name:"guide/lxd/lxd_thanks.md"};function o(i,t,l,p,c,d){return a(),e("div",null,t[0]||(t[0]=[n("",12)]))}const f=r(s,[["render",o]]);export{u as __pageData,f as default}; +import{_ as r,c as e,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/lxd/lxd_thanks.md","filePath":"guide/lxd/lxd_thanks.md","lastUpdated":1772424525000}'),s={name:"guide/lxd/lxd_thanks.md"};function o(i,t,l,p,c,d){return a(),e("div",null,t[0]||(t[0]=[n("",12)]))}const f=r(s,[["render",o]]);export{u as __pageData,f as default}; diff --git a/assets/guide_lxd_lxd_windows.md.BU1xap_h.js b/assets/guide_lxd_lxd_windows.md.BU1xap_h.js new file mode 100644 index 0000000000..6034927e64 --- /dev/null +++ b/assets/guide_lxd_lxd_windows.md.BU1xap_h.js @@ -0,0 +1,18 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const e="/assets/win1.CJKAoRm5.png",p="/assets/win2.BNn7RQzT.jpg",t="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",r="/assets/win5.C8qmMo1u.jpg",F="/assets/win7.CI43Ul0V.jpg",o="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"在 LXD 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_windows.md","filePath":"guide/lxd/lxd_windows.md","lastUpdated":1772424525000}'),c={name:"guide/lxd/lxd_windows.md"};function g(C,s,y,m,b,u){return n(),a("div",null,s[0]||(s[0]=[l(`

在 LXD 中运行 Windows 虚拟机

检查 lxd 驱动

确保lxc info输出中含有qemu,否则无法创建VM:

shell
lxc info | grep -i driver:

若显示只有lxc,则lxd的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root目录下按顺序执行以下命令:

shell
apt update
+apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
+snap install lxd-imagebuilder --classic --edge
+# 重启加载一些配置
+reboot

下载镜像并进行修补,如果你使用的是别的镜像,自行替换下载链接(不需要下载自带virtio的镜像,原始的镜像就够了)

自行下载Windows镜像的地址:https://github.com/ILLKX/Windows

下面的指南将以windows2019作为示例进行

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
+lxd-imagebuilder repack-windows \\
+  --windows-arch=amd64 \\
+  win.iso \\
+  win.lxd.iso

修补时长取决于程序何时添加完毕启动所需的驱动(未完毕时会一个个添加)。

有的耗时短有的耗时长,最长可能超过10~30分钟,建议在screen或tmux中挂起执行

修补完毕后可删除原始的镜像:

shell
rm -f win.iso

创建虚拟机并挂载安装ISO

这里我使用的配置是3核5G内存30G硬盘,如果使用的是windows10等更新版本的镜像,至少需要4核6G内存40G硬盘。

建议使用比我现在设置的资源更多的CPU和内存(主要是内存),避免系统卡到崩溃。

如果内存不够用,建议查看本指南的其他实用项目中的添加SWAP项目,自行添加更多虚拟内存。

shell
lxc init winvm --vm --empty
+lxc config device override winvm root size=30GiB
+lxc config set winvm limits.cpu=3 limits.memory=5GiB
+lxc config device add winvm vtpm tpm path=/dev/tpm0
+lxc config device add winvm install disk source=/root/win.lxd.iso boot.priority=10

启动虚拟机并通过浏览器远程访问桌面

安装浏览器访问所需组件

shell
apt update
+apt install -y spice-html5 websockify lsof

启动虚拟机

shell
lxc start winvm

无问题后启动远程访问的组件

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
+nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/var/snap/lxd/common/lxd/logs/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
+echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

浏览器打开输出提示的地址

首次启动需要按浏览器页面左上角的Ctrl+Alt+Delete按钮,重启后在默认的界面按照提示,按回车等待5~10分钟才会正式装载ISO进行实际的安装

最终会显示三个立方体的图标,这个图标在这里转圈圈需要至少2分钟,请耐心等待。

转圈圈完毕就会进入正常的Win虚拟机安装流程,类比PVE的操作即可。

这里硬盘不可选中,选择在左下角查看黄色的提示,然后按照提示将脱机的硬盘联机点确认按钮,就可以选中硬盘了。

安装完成后,虚拟机会自动重新启动几次更新网络,spice的网页端显示进入用户设置界面,同时后台可使用lxc list查看到网络被自动附加。

设置完用户进入系统登录页面后,执行下述命令关闭/退出Windows,然后移除 ISO 设备,保证下次从硬盘启动,然后再次启动虚拟机

shell
lxc stop winvm
+lxc config device remove winvm install
+lxc start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,lxd将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后lxc delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
lxc config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

',67)]))}const E=i(c,[["render",g]]);export{v as __pageData,E as default}; diff --git a/assets/guide_lxd_lxd_windows.md.BU1xap_h.lean.js b/assets/guide_lxd_lxd_windows.md.BU1xap_h.lean.js new file mode 100644 index 0000000000..a60ffa891c --- /dev/null +++ b/assets/guide_lxd_lxd_windows.md.BU1xap_h.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const e="/assets/win1.CJKAoRm5.png",p="/assets/win2.BNn7RQzT.jpg",t="/assets/win3.BgsODJcQ.jpg",h="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",r="/assets/win5.C8qmMo1u.jpg",F="/assets/win7.CI43Ul0V.jpg",o="/assets/win6.Cx0KdzQb.jpg",v=JSON.parse('{"title":"在 LXD 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_windows.md","filePath":"guide/lxd/lxd_windows.md","lastUpdated":1772424525000}'),c={name:"guide/lxd/lxd_windows.md"};function g(C,s,y,m,b,u){return n(),a("div",null,s[0]||(s[0]=[l("",67)]))}const E=i(c,[["render",g]]);export{v as __pageData,E as default}; diff --git a/assets/guide_lxd_lxd_windows.md.CB_XKM1R.js b/assets/guide_lxd_lxd_windows.md.CB_XKM1R.js deleted file mode 100644 index 6b1630b63f..0000000000 --- a/assets/guide_lxd_lxd_windows.md.CB_XKM1R.js +++ /dev/null @@ -1,18 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.CJKAoRm5.png",p="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",e="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",F="/assets/win5.C8qmMo1u.jpg",r="/assets/win7.CI43Ul0V.jpg",o="/assets/win6.Cx0KdzQb.jpg",b=JSON.parse('{"title":"在 LXD 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_windows.md","filePath":"guide/lxd/lxd_windows.md","lastUpdated":1772422214000}'),c={name:"guide/lxd/lxd_windows.md"};function g(C,s,y,B,m,u){return t(),a("div",null,s[0]||(s[0]=[l(`

在 LXD 中运行 Windows 虚拟机

检查 lxd 驱动

确保lxc info输出中含有qemu,否则无法创建VM:

shell
lxc info | grep -i driver:

若显示只有lxc,则lxd的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root目录下按顺序执行以下命令:

shell
apt update
-apt install -y snapd libguestfs-tools wimtools rsync libhivex-bin libwin-hivex-perl genisoimage || apt install -y mkisofs
-snap install lxd-imagebuilder --classic --edge
-# 重启加载一些配置
-reboot

下载镜像并进行修补,如果你使用的是别的镜像,自行替换下载链接(不需要下载自带virtio的镜像,原始的镜像就够了)

自行下载Windows镜像的地址:https://github.com/ILLKX/Windows

下面的指南将以windows2019作为示例进行

shell
wget https://download.testip.xyz/Windows/zh-cn_windows_server_2019_x64_dvd_19d65722.iso -O win.iso
-lxd-imagebuilder repack-windows \\
-  --windows-arch=amd64 \\
-  win.iso \\
-  win.lxd.iso

修补时长取决于程序何时添加完毕启动所需的驱动(未完毕时会一个个添加)。

有的耗时短有的耗时长,最长可能超过10~30分钟,建议在screen或tmux中挂起执行

修补完毕后可删除原始的镜像:

shell
rm -f win.iso

创建虚拟机并挂载安装ISO

这里我使用的配置是3核5G内存30G硬盘,如果使用的是windows10等更新版本的镜像,至少需要4核6G内存40G硬盘。

建议使用比我现在设置的资源更多的CPU和内存(主要是内存),避免系统卡到崩溃。

如果内存不够用,建议查看本指南的其他实用项目中的添加SWAP项目,自行添加更多虚拟内存。

shell
lxc init winvm --vm --empty
-lxc config device override winvm root size=30GiB
-lxc config set winvm limits.cpu=3 limits.memory=5GiB
-lxc config device add winvm vtpm tpm path=/dev/tpm0
-lxc config device add winvm install disk source=/root/win.lxd.iso boot.priority=10

启动虚拟机并通过浏览器远程访问桌面

安装浏览器访问所需组件

shell
apt update
-apt install -y spice-html5 websockify lsof

启动虚拟机

shell
lxc start winvm

无问题后启动远程访问的组件

shell
SERVER_IP=$(hostname -I | awk '{print $1}')
-nohup websockify --web /usr/share/spice-html5 6080 --unix-target=/var/snap/lxd/common/lxd/logs/winvm/qemu.spice > /var/log/websockify-winvm.log 2>&1 &
-echo "SPICE HTML5 console on http://\${SERVER_IP}:6080/spice_auto.html"

浏览器打开输出提示的地址

首次启动需要按浏览器页面左上角的Ctrl+Alt+Delete按钮,重启后在默认的界面按照提示,按回车等待5~10分钟才会正式装载ISO进行实际的安装

最终会显示三个立方体的图标,这个图标在这里转圈圈需要至少2分钟,请耐心等待。

转圈圈完毕就会进入正常的Win虚拟机安装流程,类比PVE的操作即可。

这里硬盘不可选中,选择在左下角查看黄色的提示,然后按照提示将脱机的硬盘联机点确认按钮,就可以选中硬盘了。

安装完成后,虚拟机会自动重新启动几次更新网络,spice的网页端显示进入用户设置界面,同时后台可使用lxc list查看到网络被自动附加。

设置完用户进入系统登录页面后,执行下述命令关闭/退出Windows,然后移除 ISO 设备,保证下次从硬盘启动,然后再次启动虚拟机

shell
lxc stop winvm
-lxc config device remove winvm install
-lxc start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,lxd将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后lxc delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
lxc config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

',67)]))}const v=i(c,[["render",g]]);export{b as __pageData,v as default}; diff --git a/assets/guide_lxd_lxd_windows.md.CB_XKM1R.lean.js b/assets/guide_lxd_lxd_windows.md.CB_XKM1R.lean.js deleted file mode 100644 index 842e34fa85..0000000000 --- a/assets/guide_lxd_lxd_windows.md.CB_XKM1R.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const n="/assets/win1.CJKAoRm5.png",p="/assets/win2.BNn7RQzT.jpg",h="/assets/win3.BgsODJcQ.jpg",e="/assets/wintj.tP8uDOfH.jpg",k="/assets/wincf.B_Jc2M1G.jpg",d="/assets/win4.DwKt_Ood.jpg",F="/assets/win5.C8qmMo1u.jpg",r="/assets/win7.CI43Ul0V.jpg",o="/assets/win6.Cx0KdzQb.jpg",b=JSON.parse('{"title":"在 LXD 中运行 Windows 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/lxd/lxd_windows.md","filePath":"guide/lxd/lxd_windows.md","lastUpdated":1772422214000}'),c={name:"guide/lxd/lxd_windows.md"};function g(C,s,y,B,m,u){return t(),a("div",null,s[0]||(s[0]=[l("",67)]))}const v=i(c,[["render",g]]);export{b as __pageData,v as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.js b/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.js deleted file mode 100644 index 555609b44f..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.js +++ /dev/null @@ -1,72 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const n="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",y=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_install.md","filePath":"guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772422214000}'),k={name:"guide/oneclickvirt/oneclickvirt_install.md"};function d(r,s,c,o,F,g){return t(),a("div",null,s[0]||(s[0]=[e('

OneClickVirt

区分面板端和受控端,受控端需要提前安装好对应虚拟化的环境,可使用一键虚拟化中别的虚拟化的主体安装进行环境安装,主控端实际就是一个面板,没有虚拟化环境需求。

受控端

对应本说明别的虚拟环境的主体安装脚本可以进行环境安装,这里不过多赘述,四大主流的虚拟化技术的主体安装本教程都有对应的安装命令进行安装,自行查阅。

如有条件务必使用脚本进行对应的环境安装,否则可能出现预设不一致等奇奇怪怪的问题,没有技术力不要手动安装环境,一切通过脚本。

受控端只需要安装好虚拟化环境即可,不必额外安装agent进行控制,只要确保SSH能登录即可(SSH登录地址可公网可内网,连通性无问题即可)。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

面板端

硬件上需要至少1G空闲内存和2G空闲硬盘,通过下面任一方式安装完成即可。

安装方式适用场景优点缺点
前后端分离部署高性能,占用最小性能最佳、灵活配置配置复杂,需配置反向代理
一体化部署本地有无公网IPV4地址皆可部署简单、无需反向代理性能较差
Docker部署(预构建镜像)快速部署,占用较大一键安装、数据持久化需要Docker环境,下载镜像较大
DockerCompose部署适合源码更新维护高度自定义需要Docker环境,编译耗时长
Dockerfile自编译适合源码更新维护高度自定义需要Docker环境,编译耗时长

通过预编译二进制文件安装

这里区分两种方式:

  • 前后端分离部署(后端前端分开编译出对应文件进行部署),性能更好
  • 一体化部署(前后端合二为一只需要部署一个文件),性能较差

前后端分离部署

Linux
下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
环境安装

有交互地安装环境

./install.sh env

无交互地安装环境

noninteractive=true ./install.sh env
本体安装
./install.sh install

安装目录: /opt/oneclickvirt

安装成功后,需要手动启动服务:

shell
systemctl start oneclickvirt

其他使用方法:

停止服务:

shell
systemctl stop oneclickvirt

开机自启:

shell
systemctl enable oneclickvirt

查看状态:

shell
systemctl status oneclickvirt

查看日志:

shell
journalctl -u oneclickvirt -f

重启服务:

shell
systemctl restart oneclickvirt
升级前后端
./install.sh upgrade

除了配置文件,后端和前端文件都会升级

升级过程中会提示是否需要自定义前端文件路径,若选择不自定义,则默认解压到/opt/oneclickvirt/web/

这个设置主要是为了适配1panel不可自定义前端文件路径的问题,1panel的文件路径类似/opt/1panel/www/sites/beta/index/web,其中beta是你设置的网站的名字

部署前端

前面安装脚本会将静态文件解压到(未自定义时)

shell
cd /opt/oneclickvirt/web/

这个路径下

使用nginxcaddy以这个路径建立静态网站即可,是否需要域名绑定自行选择

静态文件部署完毕后,需要反代后端地址给前端使用,这里具体以OpenResty为例:

需要反代路径/api到后端的http://127.0.0.1:8888地址上,如果你使用的的是1panel,那么就只需要填写这些即可,默认的后端域名使用默认的$host不需要修改。

如果你使用的是nginxcaddy,请参考下方的代理源码自行修改进行代理

shell
location /api {
-    proxy_pass http://127.0.0.1:8888; 
-    proxy_set_header Host $host; 
-    proxy_set_header X-Real-IP $remote_addr; 
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
-    proxy_set_header REMOTE-HOST $remote_addr; 
-    proxy_set_header X-Forwarded-Proto $scheme; 
-    proxy_set_header X-Forwarded-Port $server_port; 
-    
-    # WebSocket support
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "upgrade";
-    
-    proxy_http_version 1.1; 
-    
-    # SSL settings
-    proxy_ssl_server_name off; 
-    proxy_ssl_name $proxy_host;
-    
-    # Timeout settings
-    proxy_connect_timeout 60s;
-    proxy_send_timeout 600s;
-    proxy_read_timeout 600s;
-    
-    # Cache and buffering
-    proxy_buffering off;
-    add_header X-Cache $upstream_cache_status;
-    add_header Cache-Control no-cache;
-}
Windows

查看

https://github.com/oneclickvirt/oneclickvirt/releases/latest

下载最新的对应架构的压缩文件,解压后挂起执行。

执行的二进制文件的同级目录下,下载

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml

文件,这是后续需要使用的配置文件。

下载web-dist.zip文件后,解压并使用对应的程序建立静态网站,类似Linux那样设置好反向代理即可。

一体化部署

这里不再区分前后端的概念,从

https://github.com/oneclickvirt/oneclickvirt/releases/latest

中找到带allinone标签的压缩包进行下载,注意区分amd64arm64架构,以及对应的系统。

Linux中使用tar -zxvf命令解压tar.gz压缩包,Windows中使用对应解压工具解压zip压缩包,将其中的二进制文件复制粘贴到你需要部署项目的位置。

最好移动到一个专门的文件夹中,因为运行过程中将产生结构化的日志文件。

(以下说明将以amd64架构的linux系统的文件进行示例)

Linux中赋予文件可执行权限,如

shell
chmod 777 server-allinone-linux-amd64

然后下载

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

文件到同一个文件夹中。

Linux中,使用screentmuxnohup命令挂起执行二进制文件即可,如

shell
./server-allinone-linux-amd64

然后打开对应的IP地址的8888端口即可看到前端进行使用了,如

http://你的IP地址:8888

如果你是Windows系统,那么需要使用管理员权限启动exe文件,同时确保启动前exe文件同一个文件夹中存在config.yaml配置文件,否则启动将出现白屏或不通的情况。至于怎么挂起执行,自行探索吧,直接挂着cmd界面运行也行。

一体化部署的模式适合本机没有公网IP的情况,你的IP地址可以是localhost或者127.0.0.1,也可以是对应的公网IPV4地址,具体部署环境下自测。

通过Docker安装

TIP

由于启动的时候连带数据库一起启动,所以容器刚启动的时候不要立即操作,需要至少等待12秒。

可使用的镜像tag可在

https://hub.docker.com/r/spiritlhl/oneclickvirt

https://github.com/oneclickvirt/oneclickvirt/pkgs/container/oneclickvirt

中查询

预构建镜像

镜像标签说明

镜像标签说明适用场景
spiritlhl/oneclickvirt:latest一体化版本(内置数据库)最新版快速部署
spiritlhl/oneclickvirt:20260227一体化版本特定日期版本需要固定版本
spiritlhl/oneclickvirt:no-db独立数据库版本最新版不内置数据库
spiritlhl/oneclickvirt:no-db-20260227独立数据库版本特定日期不内置数据库

所有镜像均支持 linux/amd64linux/arm64 架构。

全新部署

使用已构建好的amd64arm64镜像,会自动根据当前系统架构下载对应版本:

不配置域名:

bash
docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  spiritlhl/oneclickvirt:latest

配置域名访问:

如果你需要配置域名,需要设置 FRONTEND_URL 环境变量:

bash
docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -e FRONTEND_URL="https://your-domain.com" \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  spiritlhl/oneclickvirt:latest

以上的方式仅限于新安装

旧环境下仅升级

先备份配置文件到当前路径下:

shell
docker cp oneclickvirt:/app/config.yaml .

不需要删除挂载盘仅删除容器本身:

shell
docker rm -f oneclickvirt

然后删除原始的镜像:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

重新拉取容器镜像:

shell
docker pull spiritlhl/oneclickvirt:latest

然后再按全新环境下开设的步骤来,注意等待12秒后打开前端,会发现已自动越过初始化界面,因为数据已持久化导入。

然后覆写原有的配置文件:

shell
docker cp config.yaml oneclickvirt:/app/config.yaml
旧环境下新部署

这将完全删除原有数据再部署,不仅需要删除容器还得删除对应的挂载点:

shell
docker rm -f oneclickvirt
-docker volume rm oneclickvirt-data oneclickvirt-storage

然后删除原始的镜像:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

重新拉取容器镜像:

shell
docker pull spiritlhl/oneclickvirt:latest

然后再按全新环境下开设的步骤来,这样会提示重新初始化,所有原始数据已删除。

DockerCompose自编译

使用 Docker Compose 可以一键部署完整的开发环境,采用分容器部署架构,包括独立的前端容器、后端容器和数据库容器:

bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker-compose up -d --build || docker compose up -d --build

默认配置说明:

  • 前端服务:http://localhost:8888
  • 后端 API:通过前端代理访问
  • MySQL 数据库:端口 3306,数据库名 oneclickvirt,无密码
  • 数据持久化:
    • 数据库数据:./data/mysql
    • 应用存储:./data/app/

初始化配置:

首次访问时会进入初始化界面,数据库配置请填写:

  • 数据库地址:mysql(容器名称,不是 127.0.0.1)
  • 数据库端口:3306
  • 数据库名称:oneclickvirt
  • 数据库用户:root
  • 数据库密码:留空(无密码)

自定义端口(可选):

如果需要修改前端访问端口,编辑 docker-compose.yaml 文件中的 ports 配置:

yaml
services:
-  web:
-    ports:
-      - "你的端口:80"  # 例如 "80:80" 或 "8080:80"

停止服务:

bash
docker-compose down

查看日志:

bash
docker-compose logs -f

清理数据:

bash
docker-compose down
-rm -rf ./data

Dockerfile自编译

这种方式适合自行修改源码与自定义构建:

一体化版本(内置数据库)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker build -t oneclickvirt .
-docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -v oneclickvirt-data:/var/lib/mysql \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  oneclickvirt
独立数据库版本(不内置数据库)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
-cd oneclickvirt
-docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
-docker run -d \\
-  --name oneclickvirt \\
-  -p 80:80 \\
-  -e FRONTEND_URL="https://your-domain.com" \\
-  -e DB_HOST="your-mysql-host" \\
-  -e DB_PORT="3306" \\
-  -e DB_NAME="oneclickvirt" \\
-  -e DB_USER="root" \\
-  -e DB_PASSWORD="your-password" \\
-  -v oneclickvirt-storage:/app/storage \\
-  --restart unless-stopped \\
-  oneclickvirt:no-db

数据库初始化

安装启动了mysql后,创建一个空的数据库oneclickvirt,使用类型utf8mb4,最好仅本地127.0.0.1可访问,对应用户名和密码保存好。(如果你安装使用的是docker一体化部署的容器,自带数据库无需自己创建空数据库,默认已在容器中启动了对应的数据库可用了)

打开前端对应的页面后,将自动跳转到初始化界面。

填写数据库信息和相关用户信息,测试数据库链接无问题,则可点击初始化系统。

完成初始化后会自动跳转到首页,可以自行探索并使用了。

如果使用的是默认的用户信息进行初始化,那么默认的账户为:

管理员账户名密码分别为:

admin
Admin123!@#

初始化过程中,默认加载了所有的镜像种子数据到数据库中,但是默认仅启用了debianalpine相关版本的镜像,这是为了避免过多镜像启用导致用户选择困难。

如果你需要额外类型的镜像,需要在管理员权限下,在系统镜像管理界面按照类型、架构、版本搜索并进行启用。

初始化后请立即修改默认的管理员的用户名密码,并禁用或删除默认启用的测试用户testuser,这一部分可在管理员的用户管理页面进行操作。

',158)]))}const u=i(k,[["render",d]]);export{y as __pageData,u as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.lean.js b/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.lean.js deleted file mode 100644 index 90d319b170..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_install.md.COWAtmAH.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const n="/assets/proxy.Dm-mUL3T.png",l="/assets/init.CCPKl32d.png",p="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",y=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_install.md","filePath":"guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772422214000}'),k={name:"guide/oneclickvirt/oneclickvirt_install.md"};function d(r,s,c,o,F,g){return t(),a("div",null,s[0]||(s[0]=[e("",158)]))}const u=i(k,[["render",d]]);export{y as __pageData,u as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.js b/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.js new file mode 100644 index 0000000000..f407160b0b --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.js @@ -0,0 +1,72 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/proxy.Dm-mUL3T.png",p="/assets/init.CCPKl32d.png",t="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",u=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_install.md","filePath":"guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772424525000}'),r={name:"guide/oneclickvirt/oneclickvirt_install.md"};function d(k,s,c,o,F,g){return n(),a("div",null,s[0]||(s[0]=[e('

OneClickVirt

区分面板端和受控端,受控端需要提前安装好对应虚拟化的环境,可使用一键虚拟化中别的虚拟化的主体安装进行环境安装,主控端实际就是一个面板,没有虚拟化环境需求。

受控端

对应本说明别的虚拟环境的主体安装脚本可以进行环境安装,这里不过多赘述,四大主流的虚拟化技术的主体安装本教程都有对应的安装命令进行安装,自行查阅。

如有条件务必使用脚本进行对应的环境安装,否则可能出现预设不一致等奇奇怪怪的问题,没有技术力不要手动安装环境,一切通过脚本。

受控端只需要安装好虚拟化环境即可,不必额外安装agent进行控制,只要确保SSH能登录即可(SSH登录地址可公网可内网,连通性无问题即可)。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

面板端

硬件上需要至少1G空闲内存和2G空闲硬盘,通过下面任一方式安装完成即可。

安装方式适用场景优点缺点
前后端分离部署高性能,占用最小性能最佳、灵活配置配置复杂,需配置反向代理
一体化部署本地有无公网IPV4地址皆可部署简单、无需反向代理性能较差
Docker部署(预构建镜像)快速部署,占用较大一键安装、数据持久化需要Docker环境,下载镜像较大
DockerCompose部署适合源码更新维护高度自定义需要Docker环境,编译耗时长
Dockerfile自编译适合源码更新维护高度自定义需要Docker环境,编译耗时长

通过预编译二进制文件安装

这里区分两种方式:

  • 前后端分离部署(后端前端分开编译出对应文件进行部署),性能更好
  • 一体化部署(前后端合二为一只需要部署一个文件),性能较差

前后端分离部署

Linux
下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
环境安装

有交互地安装环境

./install.sh env

无交互地安装环境

noninteractive=true ./install.sh env
本体安装
./install.sh install

安装目录: /opt/oneclickvirt

安装成功后,需要手动启动服务:

shell
systemctl start oneclickvirt

其他使用方法:

停止服务:

shell
systemctl stop oneclickvirt

开机自启:

shell
systemctl enable oneclickvirt

查看状态:

shell
systemctl status oneclickvirt

查看日志:

shell
journalctl -u oneclickvirt -f

重启服务:

shell
systemctl restart oneclickvirt
升级前后端
./install.sh upgrade

除了配置文件,后端和前端文件都会升级

升级过程中会提示是否需要自定义前端文件路径,若选择不自定义,则默认解压到/opt/oneclickvirt/web/

这个设置主要是为了适配1panel不可自定义前端文件路径的问题,1panel的文件路径类似/opt/1panel/www/sites/beta/index/web,其中beta是你设置的网站的名字

部署前端

前面安装脚本会将静态文件解压到(未自定义时)

shell
cd /opt/oneclickvirt/web/

这个路径下

使用nginxcaddy以这个路径建立静态网站即可,是否需要域名绑定自行选择

静态文件部署完毕后,需要反代后端地址给前端使用,这里具体以OpenResty为例:

需要反代路径/api到后端的http://127.0.0.1:8888地址上,如果你使用的的是1panel,那么就只需要填写这些即可,默认的后端域名使用默认的$host不需要修改。

如果你使用的是nginxcaddy,请参考下方的代理源码自行修改进行代理

shell
location /api {
+    proxy_pass http://127.0.0.1:8888; 
+    proxy_set_header Host $host; 
+    proxy_set_header X-Real-IP $remote_addr; 
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
+    proxy_set_header REMOTE-HOST $remote_addr; 
+    proxy_set_header X-Forwarded-Proto $scheme; 
+    proxy_set_header X-Forwarded-Port $server_port; 
+    
+    # WebSocket support
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "upgrade";
+    
+    proxy_http_version 1.1; 
+    
+    # SSL settings
+    proxy_ssl_server_name off; 
+    proxy_ssl_name $proxy_host;
+    
+    # Timeout settings
+    proxy_connect_timeout 60s;
+    proxy_send_timeout 600s;
+    proxy_read_timeout 600s;
+    
+    # Cache and buffering
+    proxy_buffering off;
+    add_header X-Cache $upstream_cache_status;
+    add_header Cache-Control no-cache;
+}
Windows

查看

https://github.com/oneclickvirt/oneclickvirt/releases/latest

下载最新的对应架构的压缩文件,解压后挂起执行。

执行的二进制文件的同级目录下,下载

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/server/config.yaml

文件,这是后续需要使用的配置文件。

下载web-dist.zip文件后,解压并使用对应的程序建立静态网站,类似Linux那样设置好反向代理即可。

一体化部署

这里不再区分前后端的概念,从

https://github.com/oneclickvirt/oneclickvirt/releases/latest

中找到带allinone标签的压缩包进行下载,注意区分amd64arm64架构,以及对应的系统。

Linux中使用tar -zxvf命令解压tar.gz压缩包,Windows中使用对应解压工具解压zip压缩包,将其中的二进制文件复制粘贴到你需要部署项目的位置。

最好移动到一个专门的文件夹中,因为运行过程中将产生结构化的日志文件。

(以下说明将以amd64架构的linux系统的文件进行示例)

Linux中赋予文件可执行权限,如

shell
chmod 777 server-allinone-linux-amd64

然后下载

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

文件到同一个文件夹中。

Linux中,使用screentmuxnohup命令挂起执行二进制文件即可,如

shell
./server-allinone-linux-amd64

然后打开对应的IP地址的8888端口即可看到前端进行使用了,如

http://你的IP地址:8888

如果你是Windows系统,那么需要使用管理员权限启动exe文件,同时确保启动前exe文件同一个文件夹中存在config.yaml配置文件,否则启动将出现白屏或不通的情况。至于怎么挂起执行,自行探索吧,直接挂着cmd界面运行也行。

一体化部署的模式适合本机没有公网IP的情况,你的IP地址可以是localhost或者127.0.0.1,也可以是对应的公网IPV4地址,具体部署环境下自测。

通过Docker安装

TIP

由于启动的时候连带数据库一起启动,所以容器刚启动的时候不要立即操作,需要至少等待12秒。

可使用的镜像tag可在

https://hub.docker.com/r/spiritlhl/oneclickvirt

https://github.com/oneclickvirt/oneclickvirt/pkgs/container/oneclickvirt

中查询

预构建镜像

镜像标签说明

镜像标签说明适用场景
spiritlhl/oneclickvirt:latest一体化版本(内置数据库)最新版快速部署
spiritlhl/oneclickvirt:20260227一体化版本特定日期版本需要固定版本
spiritlhl/oneclickvirt:no-db独立数据库版本最新版不内置数据库
spiritlhl/oneclickvirt:no-db-20260227独立数据库版本特定日期不内置数据库

所有镜像均支持 linux/amd64linux/arm64 架构。

全新部署

使用已构建好的amd64arm64镜像,会自动根据当前系统架构下载对应版本:

不配置域名:

bash
docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  spiritlhl/oneclickvirt:latest

配置域名访问:

如果你需要配置域名,需要设置 FRONTEND_URL 环境变量:

bash
docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -e FRONTEND_URL="https://your-domain.com" \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  spiritlhl/oneclickvirt:latest

以上的方式仅限于新安装

旧环境下仅升级

先备份配置文件到当前路径下:

shell
docker cp oneclickvirt:/app/config.yaml .

不需要删除挂载盘仅删除容器本身:

shell
docker rm -f oneclickvirt

然后删除原始的镜像:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

重新拉取容器镜像:

shell
docker pull spiritlhl/oneclickvirt:latest

然后再按全新环境下开设的步骤来,注意等待12秒后打开前端,会发现已自动越过初始化界面,因为数据已持久化导入。

然后覆写原有的配置文件:

shell
docker cp config.yaml oneclickvirt:/app/config.yaml
旧环境下新部署

这将完全删除原有数据再部署,不仅需要删除容器还得删除对应的挂载点:

shell
docker rm -f oneclickvirt
+docker volume rm oneclickvirt-data oneclickvirt-storage

然后删除原始的镜像:

shell
docker image rm -f spiritlhl/oneclickvirt:latest

重新拉取容器镜像:

shell
docker pull spiritlhl/oneclickvirt:latest

然后再按全新环境下开设的步骤来,这样会提示重新初始化,所有原始数据已删除。

DockerCompose自编译

使用 Docker Compose 可以一键部署完整的开发环境,采用分容器部署架构,包括独立的前端容器、后端容器和数据库容器:

bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker-compose up -d --build || docker compose up -d --build

默认配置说明:

  • 前端服务:http://localhost:8888
  • 后端 API:通过前端代理访问
  • MySQL 数据库:端口 3306,数据库名 oneclickvirt,无密码
  • 数据持久化:
    • 数据库数据:./data/mysql
    • 应用存储:./data/app/

初始化配置:

首次访问时会进入初始化界面,数据库配置请填写:

  • 数据库地址:mysql(容器名称,不是 127.0.0.1)
  • 数据库端口:3306
  • 数据库名称:oneclickvirt
  • 数据库用户:root
  • 数据库密码:留空(无密码)

自定义端口(可选):

如果需要修改前端访问端口,编辑 docker-compose.yaml 文件中的 ports 配置:

yaml
services:
+  web:
+    ports:
+      - "你的端口:80"  # 例如 "80:80" 或 "8080:80"

停止服务:

bash
docker-compose down

查看日志:

bash
docker-compose logs -f

清理数据:

bash
docker-compose down
+rm -rf ./data

Dockerfile自编译

这种方式适合自行修改源码与自定义构建:

一体化版本(内置数据库)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker build -t oneclickvirt .
+docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -v oneclickvirt-data:/var/lib/mysql \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  oneclickvirt
独立数据库版本(不内置数据库)
bash
git clone https://github.com/oneclickvirt/oneclickvirt.git
+cd oneclickvirt
+docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
+docker run -d \\
+  --name oneclickvirt \\
+  -p 80:80 \\
+  -e FRONTEND_URL="https://your-domain.com" \\
+  -e DB_HOST="your-mysql-host" \\
+  -e DB_PORT="3306" \\
+  -e DB_NAME="oneclickvirt" \\
+  -e DB_USER="root" \\
+  -e DB_PASSWORD="your-password" \\
+  -v oneclickvirt-storage:/app/storage \\
+  --restart unless-stopped \\
+  oneclickvirt:no-db

数据库初始化

安装启动了mysql后,创建一个空的数据库oneclickvirt,使用类型utf8mb4,最好仅本地127.0.0.1可访问,对应用户名和密码保存好。(如果你安装使用的是docker一体化部署的容器,自带数据库无需自己创建空数据库,默认已在容器中启动了对应的数据库可用了)

打开前端对应的页面后,将自动跳转到初始化界面。

填写数据库信息和相关用户信息,测试数据库链接无问题,则可点击初始化系统。

完成初始化后会自动跳转到首页,可以自行探索并使用了。

如果使用的是默认的用户信息进行初始化,那么默认的账户为:

管理员账户名密码分别为:

admin
Admin123!@#

初始化过程中,默认加载了所有的镜像种子数据到数据库中,但是默认仅启用了debianalpine相关版本的镜像,这是为了避免过多镜像启用导致用户选择困难。

如果你需要额外类型的镜像,需要在管理员权限下,在系统镜像管理界面按照类型、架构、版本搜索并进行启用。

初始化后请立即修改默认的管理员的用户名密码,并禁用或删除默认启用的测试用户testuser,这一部分可在管理员的用户管理页面进行操作。

',158)]))}const m=i(r,[["render",d]]);export{u as __pageData,m as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.lean.js b/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.lean.js new file mode 100644 index 0000000000..a4a297edb6 --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_install.md.DvvKispM.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/proxy.Dm-mUL3T.png",p="/assets/init.CCPKl32d.png",t="/assets/init_success.DAbHwjWK.png",h="/assets/home.BlmfOIEU.png",u=JSON.parse('{"title":"OneClickVirt","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_install.md","filePath":"guide/oneclickvirt/oneclickvirt_install.md","lastUpdated":1772424525000}'),r={name:"guide/oneclickvirt/oneclickvirt_install.md"};function d(k,s,c,o,F,g){return n(),a("div",null,s[0]||(s[0]=[e("",158)]))}const m=i(r,[["render",d]]);export{u as __pageData,m as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.lean.js b/assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.lean.js deleted file mode 100644 index fdeeba5dcc..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as p,ag as c}from"./chunks/framework.CSeR4K32.js";const v=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772422214000}'),l={name:"guide/oneclickvirt/oneclickvirt_precheck.md"};function t(n,e,s,o,r,d){return p(),i("div",null,e[0]||(e[0]=[c("",15)]))}const h=a(l,[["render",t]]);export{v as __pageData,h as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.js b/assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.js similarity index 67% rename from assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.js rename to assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.js index 8c0beb3e0e..9ee88cff97 100644 --- a/assets/guide_oneclickvirt_oneclickvirt_precheck.md.BKt58UQ_.js +++ b/assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.js @@ -1,5 +1,5 @@ -import{_ as a,c as i,o as p,ag as c}from"./chunks/framework.CSeR4K32.js";const v=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772422214000}'),l={name:"guide/oneclickvirt/oneclickvirt_precheck.md"};function t(n,e,s,o,r,d){return p(),i("div",null,e[0]||(e[0]=[c(`

前言

这是一个用于对接主流虚拟化技术的控制面板,补足虚拟化技术本身不支持的用户管理、流量监控、NAT端口映射以及自定义系统镜像等内容。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/oneclickvirt

WARNING

这是一个处于早期开发的项目,可能有各种BUG和不稳定之处,若使用则自行斟酌风险,更新会比较频繁,如若使用不了不要强行使用。

环境需求

支持的架构:amd64或arm64

支持的系统:Linux、Windows、或者自行编译的任何架构的系统

只要有公网就行,部署的机器不必有独立的公网IP地址,这只是一个虚拟化的控制面板,有端口显示前端就行,甚至开发的一个重要原因是我需要无公网IPV4地址管理一堆虚拟化环境。

本控制面板无特殊的环境依赖需求,需要一键部署的可使用包含数据库的一体化Docker镜像或者分容器的docker-compose部署。

前端静态文件通过nginxcaddyOpenResty之一部署,非源码部署且非Docker部署的需要进行API路径反代到后端端口。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

平台特点

  • 语言国际化,前端支持中英双语切换显示,默认使用中文显示,可切换默认的系统语言

  • 对接Provider: 支持 ProxmoxVE、Incus、Docker、LXD 四大主流虚拟化平台,更多平台敬请期待

  • 灵活实例类型: 支持自动创建虚拟机(VM)和容器(Container),通过抽象化设计提供统一的虚拟化资源管理体验

  • 自带镜像种子数据:无需自行查找对应平台的镜像,所有平台均自带自编译的镜像加载,支持统一管理或自行添加镜像下载地址

  • 自动NAT端口映射: 支持IPv4/IPv6的自动端口映射,映射的IP支持非公网IP,支持多种网络类型:

NAT IPv4
+import{_ as a,c as i,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const P=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772424525000}'),p={name:"guide/oneclickvirt/oneclickvirt_precheck.md"};function l(c,e,r,t,o,d){return n(),i("div",null,e[0]||(e[0]=[s(`

前言

这是一个用于对接主流虚拟化技术的控制面板,补足虚拟化技术本身不支持的用户管理、流量监控、NAT端口映射以及自定义系统镜像等内容。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/oneclickvirt

WARNING

这是一个处于早期开发的项目,可能有各种BUG和不稳定之处,若使用则自行斟酌风险,更新会比较频繁,如若使用不了不要强行使用。

环境需求

支持的架构:amd64或arm64

支持的系统:Linux、Windows、或者自行编译的任何架构的系统

只要有公网就行,部署的机器不必有独立的公网IP地址,这只是一个虚拟化的控制面板,有端口显示前端就行,甚至开发的一个重要原因是我需要无公网IPV4地址管理一堆虚拟化环境。

本控制面板无特殊的环境依赖需求,需要一键部署的可使用包含数据库的一体化Docker镜像或者分容器的docker-compose部署。

前端静态文件通过nginxcaddyOpenResty之一部署,非源码部署且非Docker部署的需要进行API路径反代到后端端口。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

平台特点

  • 语言国际化,前端支持中英双语切换显示,默认使用中文显示,可切换默认的系统语言

  • 对接Provider: 支持 ProxmoxVE、Incus、Docker、LXD 四大主流虚拟化平台,更多平台敬请期待

  • 灵活实例类型: 支持自动创建虚拟机(VM)和容器(Container),通过抽象化设计提供统一的虚拟化资源管理体验

  • 自带镜像种子数据:无需自行查找对应平台的镜像,所有平台均自带自编译的镜像加载,支持统一管理或自行添加镜像下载地址

  • 自动NAT端口映射: 支持IPv4/IPv6的自动端口映射,映射的IP支持非公网IP,支持多种网络类型:

NAT IPv4
 NAT IPv4 + 独立IPv6
 独立IPv4
 独立IPv4 + IPv6
-纯IPv6
  • 端口映射方式: 灵活根据不同Provider自动选择最佳映射方案(原生、设备代理、iptables等)

  • 流量统计:集成IP级和网络接口级进行精确的网络流量统计, 敏感操作时强制同步流量数据,确保数据准确性

  • 每月初统一重置用户流量使用统计,支持用户级、实例级、Provider级的流量统计和限制

  • 邀请码系统:支持非公开注册邀请机制,根据用户等级设置不同的资源配额限制

  • 资源限制:支持设置实例数量/CPU/内存/磁盘/带宽配额管理,流量使用限制

  • 所有代码开源,但不会进行任何商用开发

`,15)]))}const h=a(l,[["render",t]]);export{v as __pageData,h as default}; +纯IPv6
  • 端口映射方式: 灵活根据不同Provider自动选择最佳映射方案(原生、设备代理、iptables等)

  • 流量统计:集成IP级和网络接口级进行精确的网络流量统计, 敏感操作时强制同步流量数据,确保数据准确性

  • 每月初统一重置用户流量使用统计,支持用户级、实例级、Provider级的流量统计和限制

  • 邀请码系统:支持非公开注册邀请机制,根据用户等级设置不同的资源配额限制

  • 资源限制:支持设置实例数量/CPU/内存/磁盘/带宽配额管理,流量使用限制

  • 所有代码开源,但不会进行任何商用开发

`,15)]))}const v=a(p,[["render",l]]);export{P as __pageData,v as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.lean.js b/assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.lean.js new file mode 100644 index 0000000000..bdc993ec3b --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_precheck.md.RfnnTBIh.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as n,ag as s}from"./chunks/framework.QPV3Ar9-.js";const P=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_precheck.md","filePath":"guide/oneclickvirt/oneclickvirt_precheck.md","lastUpdated":1772424525000}'),p={name:"guide/oneclickvirt/oneclickvirt_precheck.md"};function l(c,e,r,t,o,d){return n(),i("div",null,e[0]||(e[0]=[s("",15)]))}const v=a(p,[["render",l]]);export{P as __pageData,v as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.js b/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.js new file mode 100644 index 0000000000..a29738304e --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.js @@ -0,0 +1,13 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/iofailed.BIGD2fYy.png",F=JSON.parse('{"title":"如有问题请反馈对应仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_qa.md","filePath":"guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772424525000}'),p={name:"guide/oneclickvirt/oneclickvirt_qa.md"};function t(h,s,k,r,d,c){return n(),a("div",null,s[0]||(s[0]=[e(`

如有问题请反馈对应仓库

忘记了管理员密码怎么办

需要通过数据库操作强行更改密码

  1. 生成密码哈希
bash
# 使用 Python 生成(将 NewPassword123! 替换为您的新密码)
+python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

输出示例:$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. 进入数据库

Docker 部署(一体化版本):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

独立数据库部署:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. 更新密码
sql
-- 查看管理员账户
+SELECT id, username, user_type FROM users WHERE user_type = 'admin';
+
+-- 更新密码(替换为第1步生成的哈希值)
+UPDATE users 
+SET password = '$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
+WHERE username = 'admin';
+
+-- 退出
+EXIT;
  1. 登录测试

使用新密码登录系统验证。

注意事项

  • 哈希值必须以 $2a$$2b$$2y$ 开头
  • 默认管理员用户名为 admin,可通过查询确认
  • 建议使用强密码(≥8位,含大小写字母、数字、特殊字符)
  • 修改前建议备份数据库:
    bash
    docker exec oneclickvirt mysqldump -u root oneclickvirt > backup.sql

Docker如何删除持久化的数据库和存储卷

删除对应的容器后

执行

shell
docker volume rm oneclickvirt-data oneclickvirt-storage oneclickvirt-config

进行删除

开设实例过多导致节点异常

一个显著的现象是执行操作极其缓慢,甚至几分钟都执行不完毕一个命令

一般常见于节点的IO比较差,此时又开了很多SWAP超配内存

比如lxd环境下,执行lxc list会报错

shell
internal error, please report: running “lxd.lxc” failed: cannot create transient scope: DBus error “org.freedesktop.DBus.Error.TimedOut”: [Failed to activate service ‘org.freedesktop.systemd1’: timed out (service_start_timeout=25000ms)]

原因就是设置的实例数量太多了,商家又高度限制IO

此时只有一种方法,重启节点服务器,强制重启

重启后立即登录SSH,使用对应的脚本删除swap的使用,然后删除一些实例释放资源

由于重启后容器虚拟机需要一段时间一个个自动重启,打这个时间差可能删不了多少,但每次重启都能删一些

最终还是需要在限制实例数量的时候,慎重考虑节点的性能,较弱或者限制较多的节点,建议不要开设过多实例

自编译出现依赖缺失或者兼容性问题

常见于 源码部署、Dockerfile、DockerCompose 方式部署

常见于 ARM 架构下前端编译出错

直接使用 预编译的Docker容器镜像 或 直接使用二进制文件部署(最稳妥)

incus 和 lxd 进行 NAT 映射一些命令查不到映射规则

这是正常现象。

Incus / LXD 的端口映射默认使用 内核态 NAT(DNAT + FORWARD) 实现,并 不会在宿主机上创建端口监听进程。 因此,使用传统的端口占用查询工具通常无法看到任何结果

例如,以下命令都 查不到宿主机端口占用

shell
ss -lntup
+lsof -i
+netstat -lntp

只有通过:

shell
incus config device show 实例1

或:

shell
lxd config device show 实例1

才能看到已配置的端口映射规则,因为流量不过宿主机直接对外转发。

正确的端口映射查找方式是查看 nftables 规则

shell
nft list ruleset

或仅查看 NAT 表:

shell
nft list table ip nat

在使用 iptables 的系统中可使用:

shell
iptables -t nat -L

如果有流量进出,查看真实连接状态可使用:

shell
conntrack -L | grep <>
`,55)]))}const g=i(p,[["render",t]]);export{F as __pageData,g as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.lean.js b/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.lean.js new file mode 100644 index 0000000000..ce79371d5c --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_qa.md.0XSO40vD.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/iofailed.BIGD2fYy.png",F=JSON.parse('{"title":"如有问题请反馈对应仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_qa.md","filePath":"guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772424525000}'),p={name:"guide/oneclickvirt/oneclickvirt_qa.md"};function t(h,s,k,r,d,c){return n(),a("div",null,s[0]||(s[0]=[e("",55)]))}const g=i(p,[["render",t]]);export{F as __pageData,g as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.js b/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.js deleted file mode 100644 index d2d61fac41..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.js +++ /dev/null @@ -1,13 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const e="/assets/iofailed.BIGD2fYy.png",c=JSON.parse('{"title":"如有问题请反馈对应仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_qa.md","filePath":"guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772422214000}'),n={name:"guide/oneclickvirt/oneclickvirt_qa.md"};function h(p,s,k,d,r,o){return t(),a("div",null,s[0]||(s[0]=[l(`

如有问题请反馈对应仓库

忘记了管理员密码怎么办

需要通过数据库操作强行更改密码

  1. 生成密码哈希
bash
# 使用 Python 生成(将 NewPassword123! 替换为您的新密码)
-python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

输出示例:$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. 进入数据库

Docker 部署(一体化版本):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

独立数据库部署:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. 更新密码
sql
-- 查看管理员账户
-SELECT id, username, user_type FROM users WHERE user_type = 'admin';
-
--- 更新密码(替换为第1步生成的哈希值)
-UPDATE users 
-SET password = '$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
-WHERE username = 'admin';
-
--- 退出
-EXIT;
  1. 登录测试

使用新密码登录系统验证。

注意事项

  • 哈希值必须以 $2a$$2b$$2y$ 开头
  • 默认管理员用户名为 admin,可通过查询确认
  • 建议使用强密码(≥8位,含大小写字母、数字、特殊字符)
  • 修改前建议备份数据库:
    bash
    docker exec oneclickvirt mysqldump -u root oneclickvirt > backup.sql

Docker如何删除持久化的数据库和存储卷

删除对应的容器后

执行

shell
docker volume rm oneclickvirt-data oneclickvirt-storage oneclickvirt-config

进行删除

开设实例过多导致节点异常

一个显著的现象是执行操作极其缓慢,甚至几分钟都执行不完毕一个命令

一般常见于节点的IO比较差,此时又开了很多SWAP超配内存

比如lxd环境下,执行lxc list会报错

shell
internal error, please report: running “lxd.lxc” failed: cannot create transient scope: DBus error “org.freedesktop.DBus.Error.TimedOut”: [Failed to activate service ‘org.freedesktop.systemd1’: timed out (service_start_timeout=25000ms)]

原因就是设置的实例数量太多了,商家又高度限制IO

此时只有一种方法,重启节点服务器,强制重启

重启后立即登录SSH,使用对应的脚本删除swap的使用,然后删除一些实例释放资源

由于重启后容器虚拟机需要一段时间一个个自动重启,打这个时间差可能删不了多少,但每次重启都能删一些

最终还是需要在限制实例数量的时候,慎重考虑节点的性能,较弱或者限制较多的节点,建议不要开设过多实例

自编译出现依赖缺失或者兼容性问题

常见于 源码部署、Dockerfile、DockerCompose 方式部署

常见于 ARM 架构下前端编译出错

直接使用 预编译的Docker容器镜像 或 直接使用二进制文件部署(最稳妥)

incus 和 lxd 进行 NAT 映射一些命令查不到映射规则

这是正常现象。

Incus / LXD 的端口映射默认使用 内核态 NAT(DNAT + FORWARD) 实现,并 不会在宿主机上创建端口监听进程。 因此,使用传统的端口占用查询工具通常无法看到任何结果

例如,以下命令都 查不到宿主机端口占用

shell
ss -lntup
-lsof -i
-netstat -lntp

只有通过:

shell
incus config device show 实例1

或:

shell
lxd config device show 实例1

才能看到已配置的端口映射规则,因为流量不过宿主机直接对外转发。

正确的端口映射查找方式是查看 nftables 规则

shell
nft list ruleset

或仅查看 NAT 表:

shell
nft list table ip nat

在使用 iptables 的系统中可使用:

shell
iptables -t nat -L

如果有流量进出,查看真实连接状态可使用:

shell
conntrack -L | grep <>
`,55)]))}const g=i(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.lean.js b/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.lean.js deleted file mode 100644 index a6ede197cc..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_qa.md.Cs-XDd8O.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const e="/assets/iofailed.BIGD2fYy.png",c=JSON.parse('{"title":"如有问题请反馈对应仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_qa.md","filePath":"guide/oneclickvirt/oneclickvirt_qa.md","lastUpdated":1772422214000}'),n={name:"guide/oneclickvirt/oneclickvirt_qa.md"};function h(p,s,k,d,r,o){return t(),a("div",null,s[0]||(s[0]=[l("",55)]))}const g=i(n,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.js b/assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.js similarity index 88% rename from assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.js rename to assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.js index 769935dd68..38efcbcf1c 100644 --- a/assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.js +++ b/assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.js @@ -1 +1 @@ -import{_ as t,c as r,o,ag as a}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772422214000}'),s={name:"guide/oneclickvirt/oneclickvirt_thanks.md"};function c(n,e,i,l,p,m){return o(),r("div",null,e[0]||(e[0]=[a('

致谢

感谢以下平台提供测试可用的服务器

https://console.zmto.com/

https://fossvps.org/

https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/

',5)]))}const f=t(s,[["render",c]]);export{d as __pageData,f as default}; +import{_ as t,c as r,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772424525000}'),s={name:"guide/oneclickvirt/oneclickvirt_thanks.md"};function c(n,e,i,l,p,m){return o(),r("div",null,e[0]||(e[0]=[a('

致谢

感谢以下平台提供测试可用的服务器

https://console.zmto.com/

https://fossvps.org/

https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/

',5)]))}const f=t(s,[["render",c]]);export{d as __pageData,f as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.lean.js b/assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.lean.js similarity index 74% rename from assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.lean.js rename to assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.lean.js index 0ac1f2c90a..eeeb67f3ab 100644 --- a/assets/guide_oneclickvirt_oneclickvirt_thanks.md.BvqDP_nw.lean.js +++ b/assets/guide_oneclickvirt_oneclickvirt_thanks.md.C42YDVKE.lean.js @@ -1 +1 @@ -import{_ as t,c as r,o,ag as a}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772422214000}'),s={name:"guide/oneclickvirt/oneclickvirt_thanks.md"};function c(n,e,i,l,p,m){return o(),r("div",null,e[0]||(e[0]=[a("",5)]))}const f=t(s,[["render",c]]);export{d as __pageData,f as default}; +import{_ as t,c as r,o,ag as a}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_thanks.md","filePath":"guide/oneclickvirt/oneclickvirt_thanks.md","lastUpdated":1772424525000}'),s={name:"guide/oneclickvirt/oneclickvirt_thanks.md"};function c(n,e,i,l,p,m){return o(),r("div",null,e[0]||(e[0]=[a("",5)]))}const f=t(s,[["render",c]]);export{d as __pageData,f as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.js b/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.js new file mode 100644 index 0000000000..b54953dd98 --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.js @@ -0,0 +1,97 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const e="/assets/resetuserpassword.CqOxip2E.png",p="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",t="/assets/edituser.5rScwK1u.png",h="/assets/switch.yK08dswR.png",r="/assets/base.DRc_UdCb.png",k="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",o="/assets/setvirt.DKwPSHcD.png",E="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",y="/assets/ipt1.BWlPVFUI.png",m="/assets/ipt2.BZjM3d2a.png",b="/assets/bw1.Cf2N9DNJ.png",u="/assets/bw2.DJ4v_edl.png",F="/assets/bw3.D087jBmd.png",C="/assets/cz.CpDm16A7.png",x="/assets/pcz.Bf32qIMb.png",B="/assets/level.ClT-FQGb.png",q="/assets/setmore1.C4F--yVn.png",D="/assets/setmore2.DbU1hlgY.png",A="/assets/autoapi1.DUEk35Fd.png",f="/assets/autoapi2.YWfGcqPd.png",_="/assets/autoapi3.PO1KiLU6.png",v="/assets/hardwareconfig.qww9PB2d.png",P="/assets/autoapi4.BMm_5qST.png",z="/assets/autoapi45.D3Ei-57N.png",M="/assets/images.CshFq7yK.png",w="/assets/userlevel.Dff1Ev4j.png",I="/assets/usercontrol.VCrXBaGX.png",G=JSON.parse('{"title":"使用说明","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_usage.md","filePath":"guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772424525000}'),S={name:"guide/oneclickvirt/oneclickvirt_usage.md"};function T(V,s,N,L,U,H){return n(),a("div",null,s[0]||(s[0]=[l('

使用说明

这里将详细说明本面板的使用方式,如有问题请加群求助管理员:https://t.me/oneclickvirt

用户管理

登录进入管理员界面后,打开用户管理页面后,必须点击重置密码,以确保admin账户的密码为强密码,确保不会被恶意爆破。如果初始化的时候,你使用了自行定义的密码,那么不重置密码也可以。

重置密码会自动生成强密码,仅展示一次,务必复制保存好,避免遗忘。

如果需要更改用户的类型,就需要点击对应用户进行编辑,编辑的弹窗支持更改用户类型。

管理员可以点击右上角头像,下拉栏目中有切换管理员和普通用户视图的按钮,如果需要测试任何功能,可以直接使用管理员用户测试。(普通用户没有这个视图切换按钮)

纳管节点

首先,需要确保要纳管的节点已经安装了四大虚拟化技术的其中之一。

部署了本面板的机器上ping对应的节点的IP,最好延迟在300ms以内且丢包率不要太高,否则可能出现无法连接导致控制中遗漏命令执行的情况。

以下是设置节点的设置步骤,必填和必需的步骤必须要走,非必填非必需的步骤走不走看你需求。

基本信息(必填)

服务器名称最好仅英文+数字,不要用特殊字符,最好控制在6个字符以内,后续开设容器或虚拟机的时候,会自动带上这个服务器名称前缀。

服务器类型选择你实际安装了的虚拟化技术名称,docker默认只能开设容器,其他虚拟化技术可开设虚拟机。

SSH地址填写节点的公网IPV4地址或内网SSH链接地址,这个地址将被用作SSH连接和API连接。

NAT端口映射优先使用端口IP进行映射,如果不提供具体的端口IP,将使用SSH地址的IP进行映射,都不需要是公网IPV4地址。

端口框填写SSH连接节点的端口。

描述可备注当前节点的一些信息,仅管理员可见。

状态默认为启用状态,允许后面的健康检测后,被普通用户申请领取开设实例。

架构是节点本身的架构,目前支持纳管amd64架构和arm64架构的节点,自己对应选取。

(暂时不支持纳管的节点本身已经有实例,暂未开发同步纳管实例的功能)

连接配置(必填)

用户名推荐使用root用户,因为后面自动配置api的时候需要对应下载一些依赖,非root用户看你访问问题。

密码就是SSH登录用的密码,当然如果你不使用密码,使用密钥登录也是可以的。

SSH超时配置是设计测试连通性和优化容错率的,也可以用来检测连通性。

前面信息填写完毕后,点击测试,会出现对应的提示值,点击应用即可,当然不进行应用也行,容错率更高一些行。

这里的延迟部署ping的延迟,是实际在对应的节点上执行命令的延迟,所以一般会在2s左右或以上,这是正常的延迟。

这么设计是为了适配一些与面板机器连通性极差的节点,这些参数的数值增加意味着更高的容错率。

执行超时时间一般不需要进行修改,除非你的节点本身性能特别弱,执行命令耗时很久。

位置信息(可选)

直接输入具体国家进行点击勾选,大部分国家都已经有预设了,有对应的旗帜图标。

设置位置后,普通用户的申请领取界面将可以看到对应的旗帜和地区,还有自动匹配的所在大洲。

可选填对应的城市,不填写也行,不影响使用。

实例类型和数量限制(必填)

对于docker类型的节点,只能开设容器,其他虚拟化类型都支持开设容器和虚拟机(前提是节点本身支持,不支持的强行开设任务会自动失败)。

如果不需要开设虚拟机,务必取消虚拟机的勾选。

数量限制如果保持默认的参数0,意味着不进行节点层面的这个类型的实例数量限制。

对于容器类型,建议按照以下公式设置数量

节点空闲存储盘大小 / 将分发的实例的最小硬盘大小 = 实例最大数量

对于虚拟机类型,则

节点空闲内存大小(含虚拟内存) / 将分发的实例的最小内存大小 = 实例数量

这样计算的原因在于,容器一般不限制总的CPU数量和内存大小,但限制硬盘大小,虚拟机一般内存才是开设数量的瓶颈。

如果你需要超开,那么以上计算规则得到的数值可适当增大,并配置下面的配置。

资源超配置(可选)

超配置资源含义是是否要进行对应资源的严格限制,取消限制意味着不进行检查强行开设,可能导致开设任务失败。

默认容器类型不限制CPU和内存预分配的总量,但限制预分配的硬盘总量,以达到最优化的资源共享和最大化的实例数量,一般不需要进行修改。

默认虚拟机类型限制所有资源,预分配的资源总量最大值不超过实际资源大小。

对于ProxmoxVE,还有一个开设的硬盘所在存储池名字可以设置,如果是多盘的pve,需要设置开设在哪个存储池上。

其他类型的虚拟化环境在安装过程中有询问具体存储池开设位置了,所以就不需要设置了。

总的来说,如果需要限制哪种资源不被超开,那么就点击限制,限制后将无法超开对应资源,不限制则可超开对应资源。

这里限制的是该节点上此类实例的总资源占用,用于计算可用资源和限制实例创建。

不推荐进行修改,除非你知道这块的设置在干什么。

IP映射配置(可选)

一般不需要进行修改,这里可以设置每个实例的端口映射数量、区间、网络配置方式、端口映射方式。

默认开设带NAT映射公网IPV4端口的实例,映射的IP的优先级是:端口IP > SSH连接时的IP(如果端口IP未设置时使用)

如果节点本身有一段IPV6子网大于等于/80大小的,那么选择网络配置更改,可开设带公网独立IPV6地址的实例。

极端一点,也可以开设仅独立IPV6地址的实例,自行选择吧。

不推荐对映射方式进行修改,除非你知道这块的设置在干什么,默认的配置已经是最好的配置了。

带宽流量配置(必填)

字面意思,设置节点开设出的实例的最大带宽和以自然月计算的可用流量总量,默认不自动启用流量监控和流量统计。

启动流量监控会有对应的内存负担,因为需要缓存流量统计数据,哪怕本项目极致优化后,还是会随着带宽的增大而增大,内存不够用的不要开启流量统计。

启用了流量统计的话,要注意统计模式,默认的统计模式是最普适的,如果你本地的性能足够好(主要是内存够多),可选择更高的采集频率和采集数量,如果性能非常差,建议选择最后一档。当然也支持自定义参数,但不推荐新手修改,预设的模式足矣。

如果启用了流量统计,那么需要注意等级分配的带宽不要过大,监控将动态按照分配的带宽进行配置文件生成进行监控,带宽越大监控占用的内存越大。

级别实例带宽plugin_pipe_sizesql_cache_entries基础占用突发占用
≤50 Mbps2 MB325~8 MB8~12 MB
中低51~100 Mbps10 MB6410~15 MB15~30 MB
101~200 Mbps25 MB12815~20 MB30~50 MB
中高201~500 Mbps50 MB25620~30 MB50~80 MB
501~1000 Mbps128 MB51230~50 MB80~150 MB
超高1001~2000 Mbps256 MB76850~80 MB150~300 MB
极高>2000 Mbps512 MB102480~120 MB300~600 MB

流量统计的误差10G大概会偏差0.1G左右,已自动处理NAT映射以及带IPV6独立IP的情况,无需手动管理了。

但如果是之前有启用了流量统计,后续需要关闭并卸载监控了,那么需要在下面这个地方先对应删除了监控再关闭流量统计,这样才能确保完全卸载,否则还是会在后台统计。

只有启用了流量控制之后,这块才会出现流量监控管理的按钮,进入之后可见三个按钮,主要用于手动同步监控的情况,一般来说不是实例开设了一些之后再启用流量监控的情况无需手动管理,有需求的直接点击检测流量监控即可,会批量检测当前实例下的所有实例的监控情况。

等级限制(必填)

这块预设了5个等级,用户申请领取的时候,将经过这个限制筛选配置。

在实际实例开设过程中,节点层面的等级限制 将与 全局的用户等级的资源限制 互相比对,取其中的最小值作为用户在当前节点可用的资源限制。

这样设置是为了特殊化当前节点对应等级的用户可开设的实例的配置限制,避免有时候全局限制不适用当前节点,全局限制在系统配置中可设置,一般用于用户整个账户层面的使用资源限制。

高级设置(可选)

过期时间:

防止用户继续操作已经过期的节点,过期节点将自动冻结,此时对应的实例将不允许任何操作,但不会自动删除,如果冻结了节点请及时清理删除节点。

任务并发控制:

默认单线程串联执行,同一时刻,只会存在一个增删改的任务(对应实例的开设删除重置操作)。

可以更改为多线程并发执行,同一时刻可以存在多个增删改任务,只有并发执行时,并发数量的设置才有意义。

串联执行适合节点本身性能弱或平台用户数量少的情况,并发操作适合节点本身性能强或用户数量多的情况,请自行选择模式。

个人推荐使用默认设置,并发执行可能存在未完全测试出来的边界条件,可能有BUG。

任务轮询设置:

控制是否启用任务执行,以及任务执行轮询检查状态的间隔,一般保持默认即可。

操作执行规则:

节点操作模式支持 仅API,仅SSH,自动切换 ,默认使用自动切换模式,一般来说没必要修改,除非有特殊需求。

如果需要启用API操作模式,需要在设置保存节点成功后,在外面点击自动配置API按钮,将执行后台任务自动对接虚拟化平台的API,无需人工配置。等待一段时间大概15~20秒后,应该已经配置成功,点击按钮可见配置历史任务及对应的日志。配置成功后,再点击健康检测,确保API状态为绿色在线状态,就配置启用API成功了。

硬件配置(可选)

仅lxd和incus下支持设置默认的实例参数配置,一般使用默认的就行了,除非你需要手动限制某些特殊的硬件资源,否则一般不需要修改。

如果你需要设置CPU占用的最大百分比等内容,这里的设置可以满足你的需求。

健康检测(必选)

点击操作按钮

保存节点后,点击健康检测完成后,普通用户才能看到对应的服务器,才能进行申请开设,若未进行健康检测,用户无法申请开设领取。

健康检测后会显示对应的类型的连接状态是否在线,会自动检测整机的实际资源总量,这个资源总量就是前面设置的不超配开设的资源总量限制。

API是否可用不影响具体使用,自动配置API是非必需的

系统镜像

默认种子数据会录入所有虚拟化环境可用的镜像,默认仅启用alpine和debian镜像,避免用户可用镜像过多。

如果需要任何系统任何虚拟化环境任何架构对应的镜像,请自行搜索后进行启用,否则用户选择不了对应的镜像。

暂时不支持自定义镜像地址,目前前端录入的功能是不可用的,不要手动录入镜像。

系统配置

一般的选项这里不多赘述了,有必要特殊说明的就两个配置。

用户等级配置(必填)

这里限制的是普通用户等级对应的总的账户可用的资源总量。

在对应节点开设实例的时候,这个全局配置将和节点本身的等级配置共同筛选同时符合条件的配置提供给用户选择。

实例权限配置(必填)

这里可用控制用户敏感操作所需的最低等级,可以控制 实例创建、实例删除、实例重置系统 所需的最低用户等级。

配置文件

默认的系统配置已经足够轻度使用了,如果需要高级自定义则需要修改配置文件,或初始化后在管理员界面进行修改。

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

这里是完整的初始化的配置文件,下面将讲解具体的配置项目:

auth 认证配置

yaml
auth:
+    email-password: ""
+    email-smtp-host: ""
+    email-smtp-port: "3306"
+    email-username: root
+    enable-email: false
+    enable-oauth2: false
+    enable-public-registration: false
+    enable-qq: false
+    enable-telegram: false
+    qq-app-id: ""
+    qq-app-key: ""
+    telegram-bot-token: ""
+    frontend-url: ""

认证模块的配置项,用于控制用户登录注册的方式和第三方登录集成。

  • email-password: 邮件服务的认证密码,用于SMTP发送邮件时的身份验证
  • email-smtp-host: SMTP服务器地址,如 smtp.gmail.com
  • email-smtp-port: SMTP服务器端口,常用端口为 25465(SSL)、587(TLS)
  • email-username: SMTP服务器登录用户名,通常是完整的邮箱地址
  • enable-email: 是否启用邮箱登录功能
  • enable-oauth2: 是否启用OAuth2第三方登录功能
  • enable-public-registration: 是否允许公开注册,关闭后仅管理员可创建账号
  • enable-qq: 是否启用QQ登录
  • enable-telegram: 是否启用Telegram登录
  • qq-app-id: QQ互联平台申请的App ID
  • qq-app-key: QQ互联平台申请的App Key
  • telegram-bot-token: Telegram Bot的API Token
  • frontend-url: 前端访问地址,需要包含协议头(http://https://),结尾斜杠可选。OAuth2回调地址依赖此配置

captcha 验证码配置

yaml
captcha:
+    enabled: true
+    expire-time: 300
+    height: 40
+    length: 4
+    width: 120

图形验证码的生成和验证配置,用于前端登录注册页面的安全验证。

  • enabled: 是否启用验证码功能
  • expire-time: 验证码过期时间,单位为秒
  • height: 验证码图片高度,单位为像素
  • length: 验证码字符长度
  • width: 验证码图片宽度,单位为像素

cdn 内容分发网络配置

yaml
cdn:
+    base-endpoint: https://cdn.spiritlhl.net/
+    endpoints:
+        - https://cdn0.spiritlhl.top/
+        - http://cdn3.spiritlhl.net/
+        - http://cdn1.spiritlhl.net/
+        - http://cdn2.spiritlhl.net/

系统镜像下载时使用的CDN加速节点配置。

  • base-endpoint: 主CDN节点地址,优先使用
  • endpoints: 备用CDN节点列表,按顺序进行重试。系统会自动选择可用节点进行镜像下载

一般情况下不需要修改此配置,预载的系统镜像都托管在本组织仓库中,默认CDN节点已能提供良好的下载加速。

mysql 数据库配置

yaml
mysql:
+    auto-create: true
+    config: charset=utf8mb4&parseTime=True&loc=Local
+    db-name: oneclickvirt
+    engine: InnoDB
+    log-mode: error
+    log-zap: false
+    max-idle-conns: 10
+    max-lifetime: 3600
+    max-open-conns: 100
+    password: ""
+    path: ""
+    port: ""
+    prefix: ""
+    singular: false
+    username: root

MySQL数据库连接和行为配置。初始化判断逻辑:当pathport都为空时,系统认为需要进行初始化,此时必须确保目标数据库为空数据库。

  • auto-create: 是否自动创建数据库(如果不存在)
  • config: 数据库连接参数,包括字符集、时间解析等
  • db-name: 数据库名称
  • engine: 数据库存储引擎,推荐使用InnoDB
  • log-mode: 数据库日志模式,可选值为silenterrorwarninfo
  • log-zap: 是否使用zap日志库记录数据库日志
  • max-idle-conns: 最大空闲连接数
  • max-lifetime: 连接最大生命周期,单位为秒
  • max-open-conns: 最大打开连接数
  • password: 数据库密码
  • path: 数据库服务器地址
  • port: 数据库服务器端口
  • prefix: 数据表名前缀
  • singular: 是否使用单数表名(默认为复数)
  • username: 数据库用户名

quota 配额限制配置

yaml
quota:
+    default-level: 1
+    level-limits:
+        "1":
+            max-instances: 1
+            max-resources:
+                bandwidth: 100
+                cpu: 1
+                disk: 1025
+                memory: 350
+            max-traffic: 102400
+        "2":
+            max-instances: 3
+            max-resources:
+                bandwidth: 200
+                cpu: 2
+                disk: 20480
+                memory: 1024
+            max-traffic: 204800
+        "3":
+            max-instances: 5
+            max-resources:
+                bandwidth: 500
+                cpu: 4
+                disk: 40960
+                memory: 2048
+            max-traffic: 307200
+        "4":
+            max-instances: 10
+            max-resources:
+                bandwidth: 1000
+                cpu: 8
+                disk: 81920
+                memory: 4096
+            max-traffic: 409600
+        "5":
+            max-instances: 20
+            max-resources:
+                bandwidth: 2000
+                cpu: 16
+                disk: 163840
+                memory: 8192
+            max-traffic: 512000

用户等级和资源配额的控制配置。内存、硬盘、流量的默认单位均为MB。

全局配置

  • default-level: 新注册用户的默认等级

instance-type-permissions 实例类型权限

控制不同等级用户可以执行的操作类型。

  • min-level-for-container: 创建容器实例所需的最低用户等级
  • min-level-for-delete: 在普通用户端执行删除操作所需的最低等级
  • min-level-for-vm: 创建虚拟机实例所需的最低用户等级

level-limits 等级配额限制

定义每个用户等级对应的资源配额上限,键为等级数字。

每个等级包含以下配置:

  • max-instances: 该等级用户可创建的最大实例数量
  • max-resources: 单个实例的最大资源限制
    • bandwidth: 最大带宽,单位为Mbps
    • cpu: 最大CPU核心数
    • disk: 最大硬盘空间,单位为MB
    • memory: 最大内存,单位为MB
  • max-traffic: 该等级用户的最大总流量,单位为MB

zap 日志配置

yaml
zap:
+    compress-logs: true
+    director: storage/logs
+    encode-level: LowercaseLevelEncoder
+    format: console
+    level: info
+    log-in-console: false
+    max-array-elements: 5
+    max-backups: 15
+    max-file-size: 5
+    max-log-length: 2000
+    max-string-length: 1000
+    prefix: '[oneclickvirt]'
+    retention-day: 3
+    show-line: false
+    stacktrace-key: stacktrace

系统日志记录的详细配置,基于zap日志库。

  • compress-logs: 是否压缩归档的日志文件
  • director: 日志文件存储目录
  • encode-level: 日志级别编码方式,可选LowercaseLevelEncoder(小写)、CapitalLevelEncoder(大写)
  • format: 日志输出格式,可选console(控制台格式)、json(JSON格式)
  • level: 日志级别,可选debuginfowarnerror。开发调试时建议使用debug,生产环境使用infowarn
  • log-in-console: 是否同时输出日志到控制台
  • max-array-elements: 数组类型字段最大记录元素数
  • max-backups: 保留的历史日志文件最大数量
  • max-file-size: 单个日志文件最大大小,单位为MB
  • max-log-length: 单条日志最大长度,超出部分会被截断
  • max-string-length: 字符串字段最大记录长度
  • prefix: 日志前缀标识
  • retention-day: 日志文件保留天数,过期自动删除
  • show-line: 是否显示日志调用的文件名和行号
  • stacktrace-key: 堆栈跟踪信息的键名

注意:调试问题时应将level设置为debug以获取详细日志信息。

`,171)]))}const j=i(S,[["render",T]]);export{G as __pageData,j as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.lean.js b/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.lean.js new file mode 100644 index 0000000000..b6c3d084b3 --- /dev/null +++ b/assets/guide_oneclickvirt_oneclickvirt_usage.md.8MvNCVKk.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const e="/assets/resetuserpassword.CqOxip2E.png",p="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",t="/assets/edituser.5rScwK1u.png",h="/assets/switch.yK08dswR.png",r="/assets/base.DRc_UdCb.png",k="/assets/connect.kms2GR51.png",d="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",o="/assets/setvirt.DKwPSHcD.png",E="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",y="/assets/ipt1.BWlPVFUI.png",m="/assets/ipt2.BZjM3d2a.png",b="/assets/bw1.Cf2N9DNJ.png",u="/assets/bw2.DJ4v_edl.png",F="/assets/bw3.D087jBmd.png",C="/assets/cz.CpDm16A7.png",x="/assets/pcz.Bf32qIMb.png",B="/assets/level.ClT-FQGb.png",q="/assets/setmore1.C4F--yVn.png",D="/assets/setmore2.DbU1hlgY.png",A="/assets/autoapi1.DUEk35Fd.png",f="/assets/autoapi2.YWfGcqPd.png",_="/assets/autoapi3.PO1KiLU6.png",v="/assets/hardwareconfig.qww9PB2d.png",P="/assets/autoapi4.BMm_5qST.png",z="/assets/autoapi45.D3Ei-57N.png",M="/assets/images.CshFq7yK.png",w="/assets/userlevel.Dff1Ev4j.png",I="/assets/usercontrol.VCrXBaGX.png",G=JSON.parse('{"title":"使用说明","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_usage.md","filePath":"guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772424525000}'),S={name:"guide/oneclickvirt/oneclickvirt_usage.md"};function T(V,s,N,L,U,H){return n(),a("div",null,s[0]||(s[0]=[l("",171)]))}const j=i(S,[["render",T]]);export{G as __pageData,j as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.js b/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.js deleted file mode 100644 index d368fe3610..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.js +++ /dev/null @@ -1,97 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const l="/assets/resetuserpassword.CqOxip2E.png",e="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",p="/assets/edituser.5rScwK1u.png",h="/assets/switch.yK08dswR.png",k="/assets/base.DRc_UdCb.png",d="/assets/connect.kms2GR51.png",r="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",o="/assets/setvirt.DKwPSHcD.png",E="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",y="/assets/ipt1.BWlPVFUI.png",m="/assets/ipt2.BZjM3d2a.png",F="/assets/bw1.Cf2N9DNJ.png",u="/assets/bw2.DJ4v_edl.png",C="/assets/bw3.D087jBmd.png",b="/assets/cz.CpDm16A7.png",x="/assets/pcz.Bf32qIMb.png",B="/assets/level.ClT-FQGb.png",q="/assets/setmore1.C4F--yVn.png",D="/assets/setmore2.DbU1hlgY.png",A="/assets/autoapi1.DUEk35Fd.png",f="/assets/autoapi2.YWfGcqPd.png",_="/assets/autoapi3.PO1KiLU6.png",v="/assets/hardwareconfig.qww9PB2d.png",P="/assets/autoapi4.BMm_5qST.png",M="/assets/autoapi45.D3Ei-57N.png",I="/assets/images.CshFq7yK.png",S="/assets/userlevel.Dff1Ev4j.png",w="/assets/usercontrol.VCrXBaGX.png",G=JSON.parse('{"title":"使用说明","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_usage.md","filePath":"guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772422214000}'),T={name:"guide/oneclickvirt/oneclickvirt_usage.md"};function V(z,s,N,L,U,H){return t(),a("div",null,s[0]||(s[0]=[n('

使用说明

这里将详细说明本面板的使用方式,如有问题请加群求助管理员:https://t.me/oneclickvirt

用户管理

登录进入管理员界面后,打开用户管理页面后,必须点击重置密码,以确保admin账户的密码为强密码,确保不会被恶意爆破。如果初始化的时候,你使用了自行定义的密码,那么不重置密码也可以。

重置密码会自动生成强密码,仅展示一次,务必复制保存好,避免遗忘。

如果需要更改用户的类型,就需要点击对应用户进行编辑,编辑的弹窗支持更改用户类型。

管理员可以点击右上角头像,下拉栏目中有切换管理员和普通用户视图的按钮,如果需要测试任何功能,可以直接使用管理员用户测试。(普通用户没有这个视图切换按钮)

纳管节点

首先,需要确保要纳管的节点已经安装了四大虚拟化技术的其中之一。

部署了本面板的机器上ping对应的节点的IP,最好延迟在300ms以内且丢包率不要太高,否则可能出现无法连接导致控制中遗漏命令执行的情况。

以下是设置节点的设置步骤,必填和必需的步骤必须要走,非必填非必需的步骤走不走看你需求。

基本信息(必填)

服务器名称最好仅英文+数字,不要用特殊字符,最好控制在6个字符以内,后续开设容器或虚拟机的时候,会自动带上这个服务器名称前缀。

服务器类型选择你实际安装了的虚拟化技术名称,docker默认只能开设容器,其他虚拟化技术可开设虚拟机。

SSH地址填写节点的公网IPV4地址或内网SSH链接地址,这个地址将被用作SSH连接和API连接。

NAT端口映射优先使用端口IP进行映射,如果不提供具体的端口IP,将使用SSH地址的IP进行映射,都不需要是公网IPV4地址。

端口框填写SSH连接节点的端口。

描述可备注当前节点的一些信息,仅管理员可见。

状态默认为启用状态,允许后面的健康检测后,被普通用户申请领取开设实例。

架构是节点本身的架构,目前支持纳管amd64架构和arm64架构的节点,自己对应选取。

(暂时不支持纳管的节点本身已经有实例,暂未开发同步纳管实例的功能)

连接配置(必填)

用户名推荐使用root用户,因为后面自动配置api的时候需要对应下载一些依赖,非root用户看你访问问题。

密码就是SSH登录用的密码,当然如果你不使用密码,使用密钥登录也是可以的。

SSH超时配置是设计测试连通性和优化容错率的,也可以用来检测连通性。

前面信息填写完毕后,点击测试,会出现对应的提示值,点击应用即可,当然不进行应用也行,容错率更高一些行。

这里的延迟部署ping的延迟,是实际在对应的节点上执行命令的延迟,所以一般会在2s左右或以上,这是正常的延迟。

这么设计是为了适配一些与面板机器连通性极差的节点,这些参数的数值增加意味着更高的容错率。

执行超时时间一般不需要进行修改,除非你的节点本身性能特别弱,执行命令耗时很久。

位置信息(可选)

直接输入具体国家进行点击勾选,大部分国家都已经有预设了,有对应的旗帜图标。

设置位置后,普通用户的申请领取界面将可以看到对应的旗帜和地区,还有自动匹配的所在大洲。

可选填对应的城市,不填写也行,不影响使用。

实例类型和数量限制(必填)

对于docker类型的节点,只能开设容器,其他虚拟化类型都支持开设容器和虚拟机(前提是节点本身支持,不支持的强行开设任务会自动失败)。

如果不需要开设虚拟机,务必取消虚拟机的勾选。

数量限制如果保持默认的参数0,意味着不进行节点层面的这个类型的实例数量限制。

对于容器类型,建议按照以下公式设置数量

节点空闲存储盘大小 / 将分发的实例的最小硬盘大小 = 实例最大数量

对于虚拟机类型,则

节点空闲内存大小(含虚拟内存) / 将分发的实例的最小内存大小 = 实例数量

这样计算的原因在于,容器一般不限制总的CPU数量和内存大小,但限制硬盘大小,虚拟机一般内存才是开设数量的瓶颈。

如果你需要超开,那么以上计算规则得到的数值可适当增大,并配置下面的配置。

资源超配置(可选)

超配置资源含义是是否要进行对应资源的严格限制,取消限制意味着不进行检查强行开设,可能导致开设任务失败。

默认容器类型不限制CPU和内存预分配的总量,但限制预分配的硬盘总量,以达到最优化的资源共享和最大化的实例数量,一般不需要进行修改。

默认虚拟机类型限制所有资源,预分配的资源总量最大值不超过实际资源大小。

对于ProxmoxVE,还有一个开设的硬盘所在存储池名字可以设置,如果是多盘的pve,需要设置开设在哪个存储池上。

其他类型的虚拟化环境在安装过程中有询问具体存储池开设位置了,所以就不需要设置了。

总的来说,如果需要限制哪种资源不被超开,那么就点击限制,限制后将无法超开对应资源,不限制则可超开对应资源。

这里限制的是该节点上此类实例的总资源占用,用于计算可用资源和限制实例创建。

不推荐进行修改,除非你知道这块的设置在干什么。

IP映射配置(可选)

一般不需要进行修改,这里可以设置每个实例的端口映射数量、区间、网络配置方式、端口映射方式。

默认开设带NAT映射公网IPV4端口的实例,映射的IP的优先级是:端口IP > SSH连接时的IP(如果端口IP未设置时使用)

如果节点本身有一段IPV6子网大于等于/80大小的,那么选择网络配置更改,可开设带公网独立IPV6地址的实例。

极端一点,也可以开设仅独立IPV6地址的实例,自行选择吧。

不推荐对映射方式进行修改,除非你知道这块的设置在干什么,默认的配置已经是最好的配置了。

带宽流量配置(必填)

字面意思,设置节点开设出的实例的最大带宽和以自然月计算的可用流量总量,默认不自动启用流量监控和流量统计。

启动流量监控会有对应的内存负担,因为需要缓存流量统计数据,哪怕本项目极致优化后,还是会随着带宽的增大而增大,内存不够用的不要开启流量统计。

启用了流量统计的话,要注意统计模式,默认的统计模式是最普适的,如果你本地的性能足够好(主要是内存够多),可选择更高的采集频率和采集数量,如果性能非常差,建议选择最后一档。当然也支持自定义参数,但不推荐新手修改,预设的模式足矣。

如果启用了流量统计,那么需要注意等级分配的带宽不要过大,监控将动态按照分配的带宽进行配置文件生成进行监控,带宽越大监控占用的内存越大。

级别实例带宽plugin_pipe_sizesql_cache_entries基础占用突发占用
≤50 Mbps2 MB325~8 MB8~12 MB
中低51~100 Mbps10 MB6410~15 MB15~30 MB
101~200 Mbps25 MB12815~20 MB30~50 MB
中高201~500 Mbps50 MB25620~30 MB50~80 MB
501~1000 Mbps128 MB51230~50 MB80~150 MB
超高1001~2000 Mbps256 MB76850~80 MB150~300 MB
极高>2000 Mbps512 MB102480~120 MB300~600 MB

流量统计的误差10G大概会偏差0.1G左右,已自动处理NAT映射以及带IPV6独立IP的情况,无需手动管理了。

但如果是之前有启用了流量统计,后续需要关闭并卸载监控了,那么需要在下面这个地方先对应删除了监控再关闭流量统计,这样才能确保完全卸载,否则还是会在后台统计。

只有启用了流量控制之后,这块才会出现流量监控管理的按钮,进入之后可见三个按钮,主要用于手动同步监控的情况,一般来说不是实例开设了一些之后再启用流量监控的情况无需手动管理,有需求的直接点击检测流量监控即可,会批量检测当前实例下的所有实例的监控情况。

等级限制(必填)

这块预设了5个等级,用户申请领取的时候,将经过这个限制筛选配置。

在实际实例开设过程中,节点层面的等级限制 将与 全局的用户等级的资源限制 互相比对,取其中的最小值作为用户在当前节点可用的资源限制。

这样设置是为了特殊化当前节点对应等级的用户可开设的实例的配置限制,避免有时候全局限制不适用当前节点,全局限制在系统配置中可设置,一般用于用户整个账户层面的使用资源限制。

高级设置(可选)

过期时间:

防止用户继续操作已经过期的节点,过期节点将自动冻结,此时对应的实例将不允许任何操作,但不会自动删除,如果冻结了节点请及时清理删除节点。

任务并发控制:

默认单线程串联执行,同一时刻,只会存在一个增删改的任务(对应实例的开设删除重置操作)。

可以更改为多线程并发执行,同一时刻可以存在多个增删改任务,只有并发执行时,并发数量的设置才有意义。

串联执行适合节点本身性能弱或平台用户数量少的情况,并发操作适合节点本身性能强或用户数量多的情况,请自行选择模式。

个人推荐使用默认设置,并发执行可能存在未完全测试出来的边界条件,可能有BUG。

任务轮询设置:

控制是否启用任务执行,以及任务执行轮询检查状态的间隔,一般保持默认即可。

操作执行规则:

节点操作模式支持 仅API,仅SSH,自动切换 ,默认使用自动切换模式,一般来说没必要修改,除非有特殊需求。

如果需要启用API操作模式,需要在设置保存节点成功后,在外面点击自动配置API按钮,将执行后台任务自动对接虚拟化平台的API,无需人工配置。等待一段时间大概15~20秒后,应该已经配置成功,点击按钮可见配置历史任务及对应的日志。配置成功后,再点击健康检测,确保API状态为绿色在线状态,就配置启用API成功了。

硬件配置(可选)

仅lxd和incus下支持设置默认的实例参数配置,一般使用默认的就行了,除非你需要手动限制某些特殊的硬件资源,否则一般不需要修改。

如果你需要设置CPU占用的最大百分比等内容,这里的设置可以满足你的需求。

健康检测(必选)

点击操作按钮

保存节点后,点击健康检测完成后,普通用户才能看到对应的服务器,才能进行申请开设,若未进行健康检测,用户无法申请开设领取。

健康检测后会显示对应的类型的连接状态是否在线,会自动检测整机的实际资源总量,这个资源总量就是前面设置的不超配开设的资源总量限制。

API是否可用不影响具体使用,自动配置API是非必需的

系统镜像

默认种子数据会录入所有虚拟化环境可用的镜像,默认仅启用alpine和debian镜像,避免用户可用镜像过多。

如果需要任何系统任何虚拟化环境任何架构对应的镜像,请自行搜索后进行启用,否则用户选择不了对应的镜像。

暂时不支持自定义镜像地址,目前前端录入的功能是不可用的,不要手动录入镜像。

系统配置

一般的选项这里不多赘述了,有必要特殊说明的就两个配置。

用户等级配置(必填)

这里限制的是普通用户等级对应的总的账户可用的资源总量。

在对应节点开设实例的时候,这个全局配置将和节点本身的等级配置共同筛选同时符合条件的配置提供给用户选择。

实例权限配置(必填)

这里可用控制用户敏感操作所需的最低等级,可以控制 实例创建、实例删除、实例重置系统 所需的最低用户等级。

配置文件

默认的系统配置已经足够轻度使用了,如果需要高级自定义则需要修改配置文件,或初始化后在管理员界面进行修改。

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

这里是完整的初始化的配置文件,下面将讲解具体的配置项目:

auth 认证配置

yaml
auth:
-    email-password: ""
-    email-smtp-host: ""
-    email-smtp-port: "3306"
-    email-username: root
-    enable-email: false
-    enable-oauth2: false
-    enable-public-registration: false
-    enable-qq: false
-    enable-telegram: false
-    qq-app-id: ""
-    qq-app-key: ""
-    telegram-bot-token: ""
-    frontend-url: ""

认证模块的配置项,用于控制用户登录注册的方式和第三方登录集成。

  • email-password: 邮件服务的认证密码,用于SMTP发送邮件时的身份验证
  • email-smtp-host: SMTP服务器地址,如 smtp.gmail.com
  • email-smtp-port: SMTP服务器端口,常用端口为 25465(SSL)、587(TLS)
  • email-username: SMTP服务器登录用户名,通常是完整的邮箱地址
  • enable-email: 是否启用邮箱登录功能
  • enable-oauth2: 是否启用OAuth2第三方登录功能
  • enable-public-registration: 是否允许公开注册,关闭后仅管理员可创建账号
  • enable-qq: 是否启用QQ登录
  • enable-telegram: 是否启用Telegram登录
  • qq-app-id: QQ互联平台申请的App ID
  • qq-app-key: QQ互联平台申请的App Key
  • telegram-bot-token: Telegram Bot的API Token
  • frontend-url: 前端访问地址,需要包含协议头(http://https://),结尾斜杠可选。OAuth2回调地址依赖此配置

captcha 验证码配置

yaml
captcha:
-    enabled: true
-    expire-time: 300
-    height: 40
-    length: 4
-    width: 120

图形验证码的生成和验证配置,用于前端登录注册页面的安全验证。

  • enabled: 是否启用验证码功能
  • expire-time: 验证码过期时间,单位为秒
  • height: 验证码图片高度,单位为像素
  • length: 验证码字符长度
  • width: 验证码图片宽度,单位为像素

cdn 内容分发网络配置

yaml
cdn:
-    base-endpoint: https://cdn.spiritlhl.net/
-    endpoints:
-        - https://cdn0.spiritlhl.top/
-        - http://cdn3.spiritlhl.net/
-        - http://cdn1.spiritlhl.net/
-        - http://cdn2.spiritlhl.net/

系统镜像下载时使用的CDN加速节点配置。

  • base-endpoint: 主CDN节点地址,优先使用
  • endpoints: 备用CDN节点列表,按顺序进行重试。系统会自动选择可用节点进行镜像下载

一般情况下不需要修改此配置,预载的系统镜像都托管在本组织仓库中,默认CDN节点已能提供良好的下载加速。

mysql 数据库配置

yaml
mysql:
-    auto-create: true
-    config: charset=utf8mb4&parseTime=True&loc=Local
-    db-name: oneclickvirt
-    engine: InnoDB
-    log-mode: error
-    log-zap: false
-    max-idle-conns: 10
-    max-lifetime: 3600
-    max-open-conns: 100
-    password: ""
-    path: ""
-    port: ""
-    prefix: ""
-    singular: false
-    username: root

MySQL数据库连接和行为配置。初始化判断逻辑:当pathport都为空时,系统认为需要进行初始化,此时必须确保目标数据库为空数据库。

  • auto-create: 是否自动创建数据库(如果不存在)
  • config: 数据库连接参数,包括字符集、时间解析等
  • db-name: 数据库名称
  • engine: 数据库存储引擎,推荐使用InnoDB
  • log-mode: 数据库日志模式,可选值为silenterrorwarninfo
  • log-zap: 是否使用zap日志库记录数据库日志
  • max-idle-conns: 最大空闲连接数
  • max-lifetime: 连接最大生命周期,单位为秒
  • max-open-conns: 最大打开连接数
  • password: 数据库密码
  • path: 数据库服务器地址
  • port: 数据库服务器端口
  • prefix: 数据表名前缀
  • singular: 是否使用单数表名(默认为复数)
  • username: 数据库用户名

quota 配额限制配置

yaml
quota:
-    default-level: 1
-    level-limits:
-        "1":
-            max-instances: 1
-            max-resources:
-                bandwidth: 100
-                cpu: 1
-                disk: 1025
-                memory: 350
-            max-traffic: 102400
-        "2":
-            max-instances: 3
-            max-resources:
-                bandwidth: 200
-                cpu: 2
-                disk: 20480
-                memory: 1024
-            max-traffic: 204800
-        "3":
-            max-instances: 5
-            max-resources:
-                bandwidth: 500
-                cpu: 4
-                disk: 40960
-                memory: 2048
-            max-traffic: 307200
-        "4":
-            max-instances: 10
-            max-resources:
-                bandwidth: 1000
-                cpu: 8
-                disk: 81920
-                memory: 4096
-            max-traffic: 409600
-        "5":
-            max-instances: 20
-            max-resources:
-                bandwidth: 2000
-                cpu: 16
-                disk: 163840
-                memory: 8192
-            max-traffic: 512000

用户等级和资源配额的控制配置。内存、硬盘、流量的默认单位均为MB。

全局配置

  • default-level: 新注册用户的默认等级

instance-type-permissions 实例类型权限

控制不同等级用户可以执行的操作类型。

  • min-level-for-container: 创建容器实例所需的最低用户等级
  • min-level-for-delete: 在普通用户端执行删除操作所需的最低等级
  • min-level-for-vm: 创建虚拟机实例所需的最低用户等级

level-limits 等级配额限制

定义每个用户等级对应的资源配额上限,键为等级数字。

每个等级包含以下配置:

  • max-instances: 该等级用户可创建的最大实例数量
  • max-resources: 单个实例的最大资源限制
    • bandwidth: 最大带宽,单位为Mbps
    • cpu: 最大CPU核心数
    • disk: 最大硬盘空间,单位为MB
    • memory: 最大内存,单位为MB
  • max-traffic: 该等级用户的最大总流量,单位为MB

zap 日志配置

yaml
zap:
-    compress-logs: true
-    director: storage/logs
-    encode-level: LowercaseLevelEncoder
-    format: console
-    level: info
-    log-in-console: false
-    max-array-elements: 5
-    max-backups: 15
-    max-file-size: 5
-    max-log-length: 2000
-    max-string-length: 1000
-    prefix: '[oneclickvirt]'
-    retention-day: 3
-    show-line: false
-    stacktrace-key: stacktrace

系统日志记录的详细配置,基于zap日志库。

  • compress-logs: 是否压缩归档的日志文件
  • director: 日志文件存储目录
  • encode-level: 日志级别编码方式,可选LowercaseLevelEncoder(小写)、CapitalLevelEncoder(大写)
  • format: 日志输出格式,可选console(控制台格式)、json(JSON格式)
  • level: 日志级别,可选debuginfowarnerror。开发调试时建议使用debug,生产环境使用infowarn
  • log-in-console: 是否同时输出日志到控制台
  • max-array-elements: 数组类型字段最大记录元素数
  • max-backups: 保留的历史日志文件最大数量
  • max-file-size: 单个日志文件最大大小,单位为MB
  • max-log-length: 单条日志最大长度,超出部分会被截断
  • max-string-length: 字符串字段最大记录长度
  • prefix: 日志前缀标识
  • retention-day: 日志文件保留天数,过期自动删除
  • show-line: 是否显示日志调用的文件名和行号
  • stacktrace-key: 堆栈跟踪信息的键名

注意:调试问题时应将level设置为debug以获取详细日志信息。

`,171)]))}const j=i(T,[["render",V]]);export{G as __pageData,j as default}; diff --git a/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.lean.js b/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.lean.js deleted file mode 100644 index 90da2d902c..0000000000 --- a/assets/guide_oneclickvirt_oneclickvirt_usage.md.DfHVt8es.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const l="/assets/resetuserpassword.CqOxip2E.png",e="/assets/resetuserpasswordsuccess.CjuVQ7LX.png",p="/assets/edituser.5rScwK1u.png",h="/assets/switch.yK08dswR.png",k="/assets/base.DRc_UdCb.png",d="/assets/connect.kms2GR51.png",r="/assets/sshtest.Rm3Bh8MC.png",c="/assets/location.Cr-hgeDL.png",o="/assets/setvirt.DKwPSHcD.png",E="/assets/setct.D56FUfb8.png",g="/assets/setvm.BFPcFZ8j.png",y="/assets/ipt1.BWlPVFUI.png",m="/assets/ipt2.BZjM3d2a.png",F="/assets/bw1.Cf2N9DNJ.png",u="/assets/bw2.DJ4v_edl.png",C="/assets/bw3.D087jBmd.png",b="/assets/cz.CpDm16A7.png",x="/assets/pcz.Bf32qIMb.png",B="/assets/level.ClT-FQGb.png",q="/assets/setmore1.C4F--yVn.png",D="/assets/setmore2.DbU1hlgY.png",A="/assets/autoapi1.DUEk35Fd.png",f="/assets/autoapi2.YWfGcqPd.png",_="/assets/autoapi3.PO1KiLU6.png",v="/assets/hardwareconfig.qww9PB2d.png",P="/assets/autoapi4.BMm_5qST.png",M="/assets/autoapi45.D3Ei-57N.png",I="/assets/images.CshFq7yK.png",S="/assets/userlevel.Dff1Ev4j.png",w="/assets/usercontrol.VCrXBaGX.png",G=JSON.parse('{"title":"使用说明","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/oneclickvirt/oneclickvirt_usage.md","filePath":"guide/oneclickvirt/oneclickvirt_usage.md","lastUpdated":1772422214000}'),T={name:"guide/oneclickvirt/oneclickvirt_usage.md"};function V(z,s,N,L,U,H){return t(),a("div",null,s[0]||(s[0]=[n("",171)]))}const j=i(T,[["render",V]]);export{G as __pageData,j as default}; diff --git a/assets/guide_podman_podman_build.md.Ca6jlQVY.js b/assets/guide_podman_podman_build.md.Ca6jlQVY.js new file mode 100644 index 0000000000..0ebfa760ed --- /dev/null +++ b/assets/guide_podman_podman_build.md.Ca6jlQVY.js @@ -0,0 +1,13 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_build.md","filePath":"guide/podman/podman_build.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_build.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e(`

前言

两种开设方式

单独开设

  • 只生成一个 Podman 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 podman-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
+chmod +x onepodman.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
+chmod +x onepodman.sh

示例

运行支持的变量如下

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
podman ps -a

进入容器

shell
podman exec -it ct1 bash

进入 Alpine 容器

shell
podman exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
podman rm -f ct1

查看容器日志

shell
podman logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+chmod +x create_podman.sh
+./create_podman.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+chmod +x create_podman.sh
+./create_podman.sh

查询批量开设的信息

shell
cat ctlog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息

删除所有容器和镜像

shell
podman ps -aq | xargs -r podman rm -f
+podman images -aq | xargs -r podman rmi -f
+podman volume prune -f
+podman system prune -af
+rm -rf ctlog

宿主机重启后重启所有容器

Podman 支持 systemd 集成,可通过以下命令生成自启动服务:

shell
# 为指定容器生成 systemd service
+podman generate systemd --name ct1 > /etc/systemd/system/container-ct1.service
+systemctl enable container-ct1

或者手动启动所有已停止的容器:

shell
podman ps -aq -f status=exited | xargs -r podman start
`,49)]))}const o=i(t,[["render",l]]);export{c as __pageData,o as default}; diff --git a/assets/guide_podman_podman_build.md.Ca6jlQVY.lean.js b/assets/guide_podman_podman_build.md.Ca6jlQVY.lean.js new file mode 100644 index 0000000000..187ea22659 --- /dev/null +++ b/assets/guide_podman_podman_build.md.Ca6jlQVY.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_build.md","filePath":"guide/podman/podman_build.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_build.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e("",49)]))}const o=i(t,[["render",l]]);export{c as __pageData,o as default}; diff --git a/assets/guide_podman_podman_build.md.Cw7teaxy.js b/assets/guide_podman_podman_build.md.Cw7teaxy.js deleted file mode 100644 index abe55aed65..0000000000 --- a/assets/guide_podman_podman_build.md.Cw7teaxy.js +++ /dev/null @@ -1,13 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_build.md","filePath":"guide/podman/podman_build.md","lastUpdated":1772422214000}'),l={name:"guide/podman/podman_build.md"};function n(e,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h(`

前言

两种开设方式

单独开设

  • 只生成一个 Podman 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 podman-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

示例

运行支持的变量如下

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
podman ps -a

进入容器

shell
podman exec -it ct1 bash

进入 Alpine 容器

shell
podman exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
podman rm -f ct1

查看容器日志

shell
podman logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
-chmod +x create_podman.sh
-./create_podman.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
-chmod +x create_podman.sh
-./create_podman.sh

查询批量开设的信息

shell
cat ctlog

输出格式

容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小

一行一个容器对应的信息

删除所有容器和镜像

shell
podman ps -aq | xargs -r podman rm -f
-podman images -aq | xargs -r podman rmi -f
-podman volume prune -f
-podman system prune -af
-rm -rf ctlog

宿主机重启后重启所有容器

Podman 支持 systemd 集成,可通过以下命令生成自启动服务:

shell
# 为指定容器生成 systemd service
-podman generate systemd --name ct1 > /etc/systemd/system/container-ct1.service
-systemctl enable container-ct1

或者手动启动所有已停止的容器:

shell
podman ps -aq -f status=exited | xargs -r podman start
`,49)]))}const g=i(l,[["render",n]]);export{o as __pageData,g as default}; diff --git a/assets/guide_podman_podman_build.md.Cw7teaxy.lean.js b/assets/guide_podman_podman_build.md.Cw7teaxy.lean.js deleted file mode 100644 index c29c403d3a..0000000000 --- a/assets/guide_podman_podman_build.md.Cw7teaxy.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_build.md","filePath":"guide/podman/podman_build.md","lastUpdated":1772422214000}'),l={name:"guide/podman/podman_build.md"};function n(e,s,p,k,d,r){return t(),a("div",null,s[0]||(s[0]=[h("",49)]))}const g=i(l,[["render",n]]);export{o as __pageData,g as default}; diff --git a/assets/guide_podman_podman_install.md.BmGKzJEO.js b/assets/guide_podman_podman_install.md.BmGKzJEO.js new file mode 100644 index 0000000000..dca8a99605 --- /dev/null +++ b/assets/guide_podman_podman_install.md.BmGKzJEO.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_install.md","filePath":"guide/podman/podman_install.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_install.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e('

前言

安装 Podman 环境,包含 podman + 网络配置 + DNS 保活服务全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 通过各发行版官方软件包安装 Podman(daemonless 架构,无需 Docker daemon)
  • 自动配置 Podman 网络(podman-net:172.21.0.0/16)
  • 检测公网 IPv6 地址,若存在则自动创建 podman-ipv6 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns-podman.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

安装完成后建议执行 podman ps -a 验证 Podman 环境是否正常运行

卸载 Podman 环境

一键卸载 Podman 全套环境,包括所有容器、镜像、网络、辅助文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、Podman 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

',24)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/assets/guide_podman_podman_install.md.BmGKzJEO.lean.js b/assets/guide_podman_podman_install.md.BmGKzJEO.lean.js new file mode 100644 index 0000000000..bb379dd8fc --- /dev/null +++ b/assets/guide_podman_podman_install.md.BmGKzJEO.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_install.md","filePath":"guide/podman/podman_install.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_install.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e("",24)]))}const m=i(t,[["render",l]]);export{c as __pageData,m as default}; diff --git a/assets/guide_podman_podman_install.md.p7akONFc.js b/assets/guide_podman_podman_install.md.p7akONFc.js deleted file mode 100644 index aa305198ea..0000000000 --- a/assets/guide_podman_podman_install.md.p7akONFc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_install.md","filePath":"guide/podman/podman_install.md","lastUpdated":1772422214000}'),p={name:"guide/podman/podman_install.md"};function n(e,s,h,d,k,o){return t(),a("div",null,s[0]||(s[0]=[l('

前言

安装 Podman 环境,包含 podman + 网络配置 + DNS 保活服务全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 通过各发行版官方软件包安装 Podman(daemonless 架构,无需 Docker daemon)
  • 自动配置 Podman 网络(podman-net:172.21.0.0/16)
  • 检测公网 IPv6 地址,若存在则自动创建 podman-ipv6 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns-podman.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

安装完成后建议执行 podman ps -a 验证 Podman 环境是否正常运行

卸载 Podman 环境

一键卸载 Podman 全套环境,包括所有容器、镜像、网络、辅助文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、Podman 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

',24)]))}const F=i(p,[["render",n]]);export{r as __pageData,F as default}; diff --git a/assets/guide_podman_podman_install.md.p7akONFc.lean.js b/assets/guide_podman_podman_install.md.p7akONFc.lean.js deleted file mode 100644 index 9860823a87..0000000000 --- a/assets/guide_podman_podman_install.md.p7akONFc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_install.md","filePath":"guide/podman/podman_install.md","lastUpdated":1772422214000}'),p={name:"guide/podman/podman_install.md"};function n(e,s,h,d,k,o){return t(),a("div",null,s[0]||(s[0]=[l("",24)]))}const F=i(p,[["render",n]]);export{r as __pageData,F as default}; diff --git a/assets/guide_podman_podman_precheck.md.Cdi5RKA1.lean.js b/assets/guide_podman_podman_precheck.md.Cdi5RKA1.lean.js deleted file mode 100644 index f8f62cf6c3..0000000000 --- a/assets/guide_podman_podman_precheck.md.Cdi5RKA1.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as d,ag as s}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_precheck.md","filePath":"guide/podman/podman_precheck.md","lastUpdated":1772422214000}'),e={name:"guide/podman/podman_precheck.md"};function n(l,t,r,h,p,o){return d(),i("div",null,t[0]||(t[0]=[s("",19)]))}const u=a(e,[["render",n]]);export{c as __pageData,u as default}; diff --git a/assets/guide_podman_podman_precheck.md.Cdi5RKA1.js b/assets/guide_podman_podman_precheck.md.Cyl5FMaw.js similarity index 58% rename from assets/guide_podman_podman_precheck.md.Cdi5RKA1.js rename to assets/guide_podman_podman_precheck.md.Cyl5FMaw.js index 93295efdbd..d5c7eaf0a5 100644 --- a/assets/guide_podman_podman_precheck.md.Cdi5RKA1.js +++ b/assets/guide_podman_podman_precheck.md.Cyl5FMaw.js @@ -1 +1 @@ -import{_ as a,c as i,o as d,ag as s}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_precheck.md","filePath":"guide/podman/podman_precheck.md","lastUpdated":1772422214000}'),e={name:"guide/podman/podman_precheck.md"};function n(l,t,r,h,p,o){return d(),i("div",null,t[0]||(t[0]=[s('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

Podman 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/podman

项目特点

基于 Podman(daemonless 架构)运行时,通过批量或单独开设 NAT 服务器

  • 使用各发行版官方软件包安装 Podman(无守护进程,daemonless 架构)
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到 ghcr.io 镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 支持 lxcfs 挂载(若宿主机安装了 lxcfs),提供容器内真实 /proc 视图
  • 原生支持 rootless(本方案使用 root 运行以简化网络配置)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 containerd 和 docker 对比

特性podman(本项目)containerddocker
守护进程无(daemonless)轻量级 containerd重量级 Docker daemon
运行时crun/runcruncrunc
管理命令podmannerdctldocker
rootless 支持原生支持需配置需配置
镜像格式OCIOCIOCI
网络后端netavark/CNICNIDocker bridge
容器支持Linux 容器(LXC)Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式系统包管理器nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',19)]))}const u=a(e,[["render",n]]);export{c as __pageData,u as default}; +import{_ as a,c as i,o as d,ag as s}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_precheck.md","filePath":"guide/podman/podman_precheck.md","lastUpdated":1772424525000}'),e={name:"guide/podman/podman_precheck.md"};function n(r,t,l,h,p,o){return d(),i("div",null,t[0]||(t[0]=[s('

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

Podman 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/podman

项目特点

基于 Podman(daemonless 架构)运行时,通过批量或单独开设 NAT 服务器

  • 使用各发行版官方软件包安装 Podman(无守护进程,daemonless 架构)
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到 ghcr.io 镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 支持 lxcfs 挂载(若宿主机安装了 lxcfs),提供容器内真实 /proc 视图
  • 原生支持 rootless(本方案使用 root 运行以简化网络配置)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 containerd 和 docker 对比

特性podman(本项目)containerddocker
守护进程无(daemonless)轻量级 containerd重量级 Docker daemon
运行时crun/runcruncrunc
管理命令podmannerdctldocker
rootless 支持原生支持需配置需配置
镜像格式OCIOCIOCI
网络后端netavark/CNICNIDocker bridge
容器支持Linux 容器(LXC)Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式系统包管理器nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
',19)]))}const u=a(e,[["render",n]]);export{c as __pageData,u as default}; diff --git a/assets/guide_podman_podman_precheck.md.Cyl5FMaw.lean.js b/assets/guide_podman_podman_precheck.md.Cyl5FMaw.lean.js new file mode 100644 index 0000000000..eec13d77c4 --- /dev/null +++ b/assets/guide_podman_podman_precheck.md.Cyl5FMaw.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as d,ag as s}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_precheck.md","filePath":"guide/podman/podman_precheck.md","lastUpdated":1772424525000}'),e={name:"guide/podman/podman_precheck.md"};function n(r,t,l,h,p,o){return d(),i("div",null,t[0]||(t[0]=[s("",19)]))}const u=a(e,[["render",n]]);export{c as __pageData,u as default}; diff --git a/assets/guide_podman_podman_qa.md.CpNEmPSh.js b/assets/guide_podman_podman_qa.md.CpNEmPSh.js new file mode 100644 index 0000000000..eef7989101 --- /dev/null +++ b/assets/guide_podman_podman_qa.md.CpNEmPSh.js @@ -0,0 +1,8 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_qa.md","filePath":"guide/podman/podman_qa.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_qa.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e(`

常见问题答疑

podman: command not found

Podman 环境未正确安装,请重新执行安装脚本:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

容器无法访问外网(IPv4)

检查 iptables NAT 规则是否存在:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

如果没有,手动添加:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
+iptables -A FORWARD -s 172.21.0.0/16 -j ACCEPT
+iptables -A FORWARD -d 172.21.0.0/16 -j ACCEPT

容器 IPv6 未生效

  1. 确认宿主机有公网 IPv6 地址
  2. 检查 podman-ipv6 网络是否存在:
shell
podman network ls | grep ipv6
  1. 检查 ndpresponder 容器是否运行:
shell
podman ps | grep ndpresponder

Podman 与 Docker 命令对比

功能Docker 命令Podman 命令
查看容器docker ps -apodman ps -a
进入容器docker exec -itpodman exec -it
删除容器docker rm -fpodman rm -f
查看镜像docker imagespodman images
删除镜像docker rmipodman rmi
查看日志docker logspodman logs

镜像拉取失败

优先通过 GitHub Releases 下载离线 tar 包,无法访问时回退到 ghcr.io:

shell
ghcr.io/oneclickvirt/podman:<os>-amd64
+ghcr.io/oneclickvirt/podman:<os>-arm64
+ghcr.io/oneclickvirt/podman:<os>   # multi-arch manifest

手动拉取镜像示例:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

如何完全重置 Podman 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman 与 containerd 如何选择

  • 如需 daemonless 无守护进程架构,或希望使用系统包管理安装,选 Podman
  • 如需更轻量的守护进程 + nerdctl 命令行体验,选 containerd
  • 如需同时运行 KVM 虚拟机(Windows/macOS/Android),选 dockerPVE/Incus/LXD 方案

DNS 问题

Podman 安装时会配置 check-dns-podman.service 服务,检查是否运行:

shell
systemctl status check-dns-podman

手动修复 DNS:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
+echo "nameserver 1.1.1.1" >> /etc/resolv.conf
`,37)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_podman_podman_qa.md.CpNEmPSh.lean.js b/assets/guide_podman_podman_qa.md.CpNEmPSh.lean.js new file mode 100644 index 0000000000..f98c7045bb --- /dev/null +++ b/assets/guide_podman_podman_qa.md.CpNEmPSh.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_qa.md","filePath":"guide/podman/podman_qa.md","lastUpdated":1772424525000}'),t={name:"guide/podman/podman_qa.md"};function l(p,s,h,d,r,k){return n(),a("div",null,s[0]||(s[0]=[e("",37)]))}const F=i(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_podman_podman_qa.md.DOOZDURs.js b/assets/guide_podman_podman_qa.md.DOOZDURs.js deleted file mode 100644 index 03b37156fd..0000000000 --- a/assets/guide_podman_podman_qa.md.DOOZDURs.js +++ /dev/null @@ -1,8 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_qa.md","filePath":"guide/podman/podman_qa.md","lastUpdated":1772422214000}'),e={name:"guide/podman/podman_qa.md"};function l(h,s,p,d,k,o){return t(),a("div",null,s[0]||(s[0]=[n(`

常见问题答疑

podman: command not found

Podman 环境未正确安装,请重新执行安装脚本:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

容器无法访问外网(IPv4)

检查 iptables NAT 规则是否存在:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

如果没有,手动添加:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
-iptables -A FORWARD -s 172.21.0.0/16 -j ACCEPT
-iptables -A FORWARD -d 172.21.0.0/16 -j ACCEPT

容器 IPv6 未生效

  1. 确认宿主机有公网 IPv6 地址
  2. 检查 podman-ipv6 网络是否存在:
shell
podman network ls | grep ipv6
  1. 检查 ndpresponder 容器是否运行:
shell
podman ps | grep ndpresponder

Podman 与 Docker 命令对比

功能Docker 命令Podman 命令
查看容器docker ps -apodman ps -a
进入容器docker exec -itpodman exec -it
删除容器docker rm -fpodman rm -f
查看镜像docker imagespodman images
删除镜像docker rmipodman rmi
查看日志docker logspodman logs

镜像拉取失败

优先通过 GitHub Releases 下载离线 tar 包,无法访问时回退到 ghcr.io:

shell
ghcr.io/oneclickvirt/podman:<os>-amd64
-ghcr.io/oneclickvirt/podman:<os>-arm64
-ghcr.io/oneclickvirt/podman:<os>   # multi-arch manifest

手动拉取镜像示例:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

如何完全重置 Podman 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
-bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
-bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman 与 containerd 如何选择

  • 如需 daemonless 无守护进程架构,或希望使用系统包管理安装,选 Podman
  • 如需更轻量的守护进程 + nerdctl 命令行体验,选 containerd
  • 如需同时运行 KVM 虚拟机(Windows/macOS/Android),选 dockerPVE/Incus/LXD 方案

DNS 问题

Podman 安装时会配置 check-dns-podman.service 服务,检查是否运行:

shell
systemctl status check-dns-podman

手动修复 DNS:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
-echo "nameserver 1.1.1.1" >> /etc/resolv.conf
`,37)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_podman_podman_qa.md.DOOZDURs.lean.js b/assets/guide_podman_podman_qa.md.DOOZDURs.lean.js deleted file mode 100644 index 496d57747a..0000000000 --- a/assets/guide_podman_podman_qa.md.DOOZDURs.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"常见问题答疑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/podman/podman_qa.md","filePath":"guide/podman/podman_qa.md","lastUpdated":1772422214000}'),e={name:"guide/podman/podman_qa.md"};function l(h,s,p,d,k,o){return t(),a("div",null,s[0]||(s[0]=[n("",37)]))}const F=i(e,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/guide_podman_podman_thanks.md.C3rMnx4s.js b/assets/guide_podman_podman_thanks.md.BIq_rBaL.js similarity index 89% rename from assets/guide_podman_podman_thanks.md.C3rMnx4s.js rename to assets/guide_podman_podman_thanks.md.BIq_rBaL.js index f7c1b1e60d..2bb48f879c 100644 --- a/assets/guide_podman_podman_thanks.md.C3rMnx4s.js +++ b/assets/guide_podman_podman_thanks.md.BIq_rBaL.js @@ -1 +1 @@ -import{_ as e,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/podman/podman_thanks.md","filePath":"guide/podman/podman_thanks.md","lastUpdated":1772422214000}'),o={name:"guide/podman/podman_thanks.md"};function s(p,t,i,h,c,l){return a(),r("div",null,t[0]||(t[0]=[n('

致谢

https://github.com/containers/podman

https://github.com/containers/buildah

https://github.com/containers/netavark

https://github.com/containers/crun

https://github.com/opencontainers/runc

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/

',10)]))}const b=e(o,[["render",s]]);export{d as __pageData,b as default}; +import{_ as e,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/podman/podman_thanks.md","filePath":"guide/podman/podman_thanks.md","lastUpdated":1772424525000}'),o={name:"guide/podman/podman_thanks.md"};function s(p,t,i,h,c,l){return a(),r("div",null,t[0]||(t[0]=[n('

致谢

https://github.com/containers/podman

https://github.com/containers/buildah

https://github.com/containers/netavark

https://github.com/containers/crun

https://github.com/opencontainers/runc

https://github.com/yoursunny/ndpresponder

https://github.com/lxc/lxcfs

https://github.com/SuperManito/LinuxMirrors

https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/

',10)]))}const b=e(o,[["render",s]]);export{d as __pageData,b as default}; diff --git a/assets/guide_podman_podman_thanks.md.C3rMnx4s.lean.js b/assets/guide_podman_podman_thanks.md.BIq_rBaL.lean.js similarity index 57% rename from assets/guide_podman_podman_thanks.md.C3rMnx4s.lean.js rename to assets/guide_podman_podman_thanks.md.BIq_rBaL.lean.js index 11a951a64e..f19a4b45e2 100644 --- a/assets/guide_podman_podman_thanks.md.C3rMnx4s.lean.js +++ b/assets/guide_podman_podman_thanks.md.BIq_rBaL.lean.js @@ -1 +1 @@ -import{_ as e,c as r,o as a,ag as n}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/podman/podman_thanks.md","filePath":"guide/podman/podman_thanks.md","lastUpdated":1772422214000}'),o={name:"guide/podman/podman_thanks.md"};function s(p,t,i,h,c,l){return a(),r("div",null,t[0]||(t[0]=[n("",10)]))}const b=e(o,[["render",s]]);export{d as __pageData,b as default}; +import{_ as e,c as r,o as a,ag as n}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/podman/podman_thanks.md","filePath":"guide/podman/podman_thanks.md","lastUpdated":1772424525000}'),o={name:"guide/podman/podman_thanks.md"};function s(p,t,i,h,c,l){return a(),r("div",null,t[0]||(t[0]=[n("",10)]))}const b=e(o,[["render",s]]);export{d as __pageData,b as default}; diff --git a/assets/guide_pve_images_readme.md.Bn6mge_l.js b/assets/guide_pve_images_readme.md.Bn6mge_l.js deleted file mode 100644 index c767a634c8..0000000000 --- a/assets/guide_pve_images_readme.md.Bn6mge_l.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as r,j as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/images/readme.md","filePath":"guide/pve/images/readme.md","lastUpdated":1772422214000}'),d={name:"guide/pve/images/readme.md"};function o(n,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",o]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_pve_images_readme.md.Bn6mge_l.lean.js b/assets/guide_pve_images_readme.md.Bn6mge_l.lean.js deleted file mode 100644 index c767a634c8..0000000000 --- a/assets/guide_pve_images_readme.md.Bn6mge_l.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as r,j as s}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/images/readme.md","filePath":"guide/pve/images/readme.md","lastUpdated":1772422214000}'),d={name:"guide/pve/images/readme.md"};function o(n,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",o]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_pve_images_readme.md.DzT8DeZh.js b/assets/guide_pve_images_readme.md.DzT8DeZh.js new file mode 100644 index 0000000000..3ccdc907b8 --- /dev/null +++ b/assets/guide_pve_images_readme.md.DzT8DeZh.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as r,j as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/images/readme.md","filePath":"guide/pve/images/readme.md","lastUpdated":1772424525000}'),d={name:"guide/pve/images/readme.md"};function o(n,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",o]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_pve_images_readme.md.DzT8DeZh.lean.js b/assets/guide_pve_images_readme.md.DzT8DeZh.lean.js new file mode 100644 index 0000000000..3ccdc907b8 --- /dev/null +++ b/assets/guide_pve_images_readme.md.DzT8DeZh.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as r,j as s}from"./chunks/framework.QPV3Ar9-.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/images/readme.md","filePath":"guide/pve/images/readme.md","lastUpdated":1772424525000}'),d={name:"guide/pve/images/readme.md"};function o(n,e,i,m,p,c){return r(),t("div",null,e[0]||(e[0]=[s("p",null,"暂存图片",-1)]))}const _=a(d,[["render",o]]);export{u as __pageData,_ as default}; diff --git a/assets/guide_pve_pve_android.md.BYa7TTTG.js b/assets/guide_pve_pve_android.md.BYa7TTTG.js new file mode 100644 index 0000000000..ea821e78c7 --- /dev/null +++ b/assets/guide_pve_pve_android.md.BYa7TTTG.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as p,ag as e}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/a1.DvgNELwZ.png",c="/assets/a2.BQniQEw_.png",i="/assets/a3.DHUpjnAe.png",d="/assets/a4.BtVJtyBL.png",r="/assets/a5.CamDlEuL.png",n="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",g="/assets/a8.CkyIulFy.png",m="/assets/a9.Dg58RrTs.png",_="/assets/a10.CPK2ZJEJ.png",h="/assets/a11.Bq6vmveu.png",b="/assets/a12.bStrZLWw.png",y="/assets/a13.DRz8WTJR.png",z="/assets/a14.D56M6gMb.png",u="/assets/a15.CtjmUhal.png",f="/assets/a16.BL0_sgNg.png",x="/assets/a17.B9keXK9k.png",k="/assets/a18.Bu92JFv5.png",B="/assets/a19.DZjr60Xs.png",C="/assets/a20.CesdkIR_.png",I="/assets/a21.BO8sy8n4.png",O="/assets/a22.COjD9r-B.png",P="/assets/a23.BxEEAckp.png",F="/assets/a24.BrCKYLHX.png",q="/assets/a25.CUB6zoiS.png",v="/assets/a26.zvaFRs59.png",D="/assets/ar.Dy_5EjFU.png",A="/assets/a27.QkS9Cjl7.png",w="/assets/a31.BiCzGFMR.png",G="/assets/a32.54sdf1AZ.png",K="/assets/a33.QYBAXO71.png",V="/assets/a34.BBqAz_kr.png",U="/assets/a35.B8NF_iJX.png",E="/assets/a36.CPvsggxV.png",S="/assets/a37.DJRI7pv9.png",j="/assets/a38.BhfuTk-3.png",N="/assets/a39.BNtfZ4xd.png",R="/assets/a40.DTfyEQe2.png",T="/assets/a41.Cb6MjiUm.png",L="/assets/a42.Du63tHI8.png",M="/assets/a43.Cxy9Fqxr.png",H="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Q="/assets/b2.BnvPQMj3.png",X="/assets/b3.DPn2dzFl.png",Z="/assets/b4.JBQupWN9.png",Y="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ss="/assets/b7.5Fkbt05C.png",as="/assets/b8.BXlK1Dnb.png",os="/assets/b9.CaK5eLKm.png",ps="/assets/b10.DGHfd73s.png",es="/assets/b11.DKZjwgY8.png",ts="/assets/b12.BISDj2Ri.png",cs="/assets/b13.WGr5jMeK.png",is="/assets/b14.BqBpvoFk.png",ds="/assets/b15.Cd3Rj7ju.png",rs="/assets/b16.BR7AHi1X.png",ns="/assets/b17.Cn1C4e1e.png",ls="/assets/b18.ElAa2UCQ.png",gs="/assets/b19.BwC-oHOW.png",ms="/assets/b20.Dj-0rOwy.png",_s="/assets/b21.CYRPkSXE.png",hs="/assets/b22.BH7kRZ3Z.png",bs="/assets/b23.JVX-KOL7.png",ys="/assets/b24.a2fv8lkf.png",zs="/assets/b25.BJrNgkiA.png",us="/assets/b26.5bTO5HK5.png",fs="/assets/b27.BSRz6moE.png",xs="/assets/b28.WNjJaEPB.png",ks="/assets/b29.Bs69Ykqp.png",Bs="/assets/b30.B96bh_Ou.png",Cs="/assets/b31.BBIAIScF.png",Is="/assets/b32.8G5Xy9mr.png",Os="/assets/b33.RYxcR7vu.png",Ps="/assets/b34.Dw6MyLex.png",Fs="/assets/b35.DUCPsVIG.png",qs="/assets/b36.7aKaNaLh.png",vs="/assets/b37.B5CHAJzN.png",Ds="/assets/br.CyzpZwsx.png",As="/assets/b38.Pnnij22W.png",ws="/assets/b39.ajiHDdbx.png",Gs="/assets/b40.B6FTkFUT.png",Ks="/assets/b41.DcCdod5l.png",Vs="/assets/b42.CT1JvTLX.png",Us="/assets/b43.HthhPs5o.png",Es="/assets/b44.C9NeP-UC.png",Ss="/assets/b45.BWxBBH-l.png",js="/assets/b46.B6Ds58im.png",Qs=JSON.parse('{"title":"Android 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_android.md","filePath":"guide/pve/pve_android.md","lastUpdated":1772424525000}'),Ns={name:"guide/pve/pve_android.md"};function Rs(Ts,s,Ls,Ms,Hs,Js){return p(),o("div",null,s[0]||(s[0]=[e('

Android 虚拟机

安卓系统镜像下载

Android系统版本9及以前的镜像下载地址:

国际

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

国内

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Android系统版本10及以后的新镜像下载地址:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

虚拟机开设

以安卓版本9及以前的镜像开设Android虚拟机

本指南以

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

作为示例进行演示

1

模板设置

开设VMID为100的虚拟机选择对应的存储盘

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

Graphic card选择Vmware compatible,其他选项选择默认如图所示

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面

9

系统安装

进入引导后,选择Installation开头的选项

10

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了

11

选择不使用GPT格式

12

显示空白盘后,选择New

13

选择分区类型Primary

14

然后会提示划分多大的空间,默认回车就行,使用全部的空间

15

然后是选择Flags,移动到Bootable后,按回车,直到Flags下方显示Boot

16

然后移动到Write,回车,进行写入

17

这时候会让你确认是否继续,输入yes后回车继续

18

一段进度条跑过后,回到了最初的菜单,选择Quit退出菜单,一切准备就绪了

19

然后这时候回到了UI界面,使用前面初始化好的盘,选择OK按钮回车

20

文件系统按方向键选择ext4类型,选择OK按钮回车

21

确认进行格式化,选择Yes按钮回车

22

确认GRUB引导安装,选择OK按钮回车

23

确认文件系统可读写,选择OK按钮回车

24

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车

25

然后一段时间后进入安卓LOGO界面

26

镜像移除

然后会进入一段黑屏,大概3~5分钟后仍然黑屏的话,宿主机执行qm stop 100,然后开始移除镜像文件

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

ar

然后宿主机再执行qm start 100,然后应该就会进入安卓系统的初始化界面了

系统初始化

初始化界面选择语言,然后点击确定按钮

27

此时回尝试连接WIFI,由于本项目安装的PVE是完全的静态网络配置,直接跳过,稍后再进行设置

31

点击下一步按钮确认设置时间

32

点击取消屏幕保护,确认仍然跳过

33

然后一段时间黑屏后,会出现主屏幕应用的选择,如果等待3~5分钟这个界面仍然没有出现,那么像之前那样重启虚拟机,再进入VNC应该就会显示了

选择Quickstep

34

网络设置

进入桌面,此时需要开始设置网络,左上角点击设置图标

35

出现下拉框,点击按住下拉

36

点击齿轮按钮

37

进入网络和互联网设置

38

左键双击WIFI

39

修改目前识别到的VirtWIFI,右键点击出现选择框后,点击修改网络

40

出现高级选项,点击打开隐藏的选项

41

如图进行对应的网络设置

IP地址 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码 24

默认网关 172.16.1.1

DNS 8.8.8.8144.144.144.144

然后点击保存按钮

42

此时出来后可能仍然未应用设置,点击关闭WIFI后,再启用WIFI,应该就会显示已连接

43

然后退出到主界面,点击谷歌浏览器,尝试打开一个网页

44

可以看到打开本指南的网址无问题,证明网络已联通

45

以安卓版本10及以后的新镜像开设Android虚拟机

本指南以

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

作为示例进行演示

1

模板设置

宿主机需要先执行以下命令安装图形环境依赖

shell
apt install libgl1 libegl1 -y

然后开始创建虚拟机,点击右上角的Create VM按钮,填写VMIDNameResource Pool

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

如果宿主机本身携带有GPU,那么Graphic card选择VirGL GPU

如果宿主机本身不携带GPU,那么Graphic card选择VirtIOVmware compatible

Machine选择q35BIOS选择OVMF (UEFI)启动,EFI Storage选择local

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面。

系统安装

进入引导后,选择Installation结尾的选项

9

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了。

10

选择不使用GPT格式,依然使用cfdisk格式。

11

显示格式选择框,选择gpt

12

显示空白盘后,选择New

13

因为要划分EFI分区,这个盘需要修改大小,不能使用默认大小,数字改成1就行,分配1G硬盘,然后按回车。

14

然后回到了菜单栏,按方向键选择Type,然后回车,给分区选择格式类型

15

按方向键选择第一个选项EFI System,然后回车

16

此时回到菜单栏,页面上半部分就能看到具体的分区大小和格式

17

然后按下方向键,选择下一行空白的分区

18

菜单栏选择New,然后回车

19

这块需要填写分区大小,此时对照右上角选中的空白分区大小一致即可,然后回车。

20

回到菜单栏,选择Write,回车,写入分区。

21

会提示你输入yes进行确认,输入后回车。

22

然后一段进度条跑过,应该会回到菜单栏,选择Quit退出菜单,一切准备就绪了

23

然后这时候回到了UI界面,使用前面初始化好的1GB大小的盘,选择OK按钮回车。

24

文件系统按方向键选择fat32类型,选择OK按钮回车

25

确认不修改名字,选择OK按钮回车

26

确认进行格式化,选择Yes按钮回车

27

然后回到最初的UI栏,选择第二块不是1GB大小的分区,选择OK按钮回车

28

文件系统按方向键选择ext4类型,选择OK按钮回车

29

确认不修改名字,选择OK按钮回车

30

确认进行格式化,选择Yes按钮回车

31

默认不使用额外空间更新,选择No按钮回车

32

确认GRUB2 EFI BootLoader,选择OK按钮回车

33

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车。

34

系统初始化

然后一段时间后进入LOGO界面。

35

再过一段时间,应该就会进入初始的安卓界面了,能看到弹窗和时间,按住左键上划

36

会出现主屏幕应用的选择,选择Quickstep

如果等待3~5分钟这个界面仍然没有出现,那么就重启虚拟机,再进入VNC应该就会显示了

37

镜像移除

出现了安卓的界面后,宿主机执行qm stop 100,然后开始移除镜像文件。

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

br

然后宿主机再执行qm start 100,然后应该就会进入系统的初始界面了。

网络设置

进入桌面,此时需要开始设置网络,图示位置按住左键,上划

38

弹出一堆应用,在里面找到那个叫做Bliss Ethernet Manager的应用,点击并打开

39

IP Assignment点击打开,选择Static类型,点击OK按钮确认

40

IP Address点击打开,填入172.16.1.xxx/24(xxx我写的100,因为这里我的虚拟机VMID是100方便区分),点击OK按钮确认

41

Gateway Address点击打开,填入172.16.1.1,点击OK按钮确认

42

DNS Address点击打开,填入8.8.8.8,点击OK按钮确认

43

然后在应用界面中,点击Interface UpRefresh,然后键盘按exit键退出程序

44

主界面中打开浏览器,验证网络是否畅通

45

可以看到打开本指南无问题,网络畅通

46

',228)]))}const Xs=a(Ns,[["render",Rs]]);export{Qs as __pageData,Xs as default}; diff --git a/assets/guide_pve_pve_android.md.BYa7TTTG.lean.js b/assets/guide_pve_pve_android.md.BYa7TTTG.lean.js new file mode 100644 index 0000000000..02a7b89a41 --- /dev/null +++ b/assets/guide_pve_pve_android.md.BYa7TTTG.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as p,ag as e}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/a1.DvgNELwZ.png",c="/assets/a2.BQniQEw_.png",i="/assets/a3.DHUpjnAe.png",d="/assets/a4.BtVJtyBL.png",r="/assets/a5.CamDlEuL.png",n="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",g="/assets/a8.CkyIulFy.png",m="/assets/a9.Dg58RrTs.png",_="/assets/a10.CPK2ZJEJ.png",h="/assets/a11.Bq6vmveu.png",b="/assets/a12.bStrZLWw.png",y="/assets/a13.DRz8WTJR.png",z="/assets/a14.D56M6gMb.png",u="/assets/a15.CtjmUhal.png",f="/assets/a16.BL0_sgNg.png",x="/assets/a17.B9keXK9k.png",k="/assets/a18.Bu92JFv5.png",B="/assets/a19.DZjr60Xs.png",C="/assets/a20.CesdkIR_.png",I="/assets/a21.BO8sy8n4.png",O="/assets/a22.COjD9r-B.png",P="/assets/a23.BxEEAckp.png",F="/assets/a24.BrCKYLHX.png",q="/assets/a25.CUB6zoiS.png",v="/assets/a26.zvaFRs59.png",D="/assets/ar.Dy_5EjFU.png",A="/assets/a27.QkS9Cjl7.png",w="/assets/a31.BiCzGFMR.png",G="/assets/a32.54sdf1AZ.png",K="/assets/a33.QYBAXO71.png",V="/assets/a34.BBqAz_kr.png",U="/assets/a35.B8NF_iJX.png",E="/assets/a36.CPvsggxV.png",S="/assets/a37.DJRI7pv9.png",j="/assets/a38.BhfuTk-3.png",N="/assets/a39.BNtfZ4xd.png",R="/assets/a40.DTfyEQe2.png",T="/assets/a41.Cb6MjiUm.png",L="/assets/a42.Du63tHI8.png",M="/assets/a43.Cxy9Fqxr.png",H="/assets/a44.Dhcgau_f.png",J="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Q="/assets/b2.BnvPQMj3.png",X="/assets/b3.DPn2dzFl.png",Z="/assets/b4.JBQupWN9.png",Y="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ss="/assets/b7.5Fkbt05C.png",as="/assets/b8.BXlK1Dnb.png",os="/assets/b9.CaK5eLKm.png",ps="/assets/b10.DGHfd73s.png",es="/assets/b11.DKZjwgY8.png",ts="/assets/b12.BISDj2Ri.png",cs="/assets/b13.WGr5jMeK.png",is="/assets/b14.BqBpvoFk.png",ds="/assets/b15.Cd3Rj7ju.png",rs="/assets/b16.BR7AHi1X.png",ns="/assets/b17.Cn1C4e1e.png",ls="/assets/b18.ElAa2UCQ.png",gs="/assets/b19.BwC-oHOW.png",ms="/assets/b20.Dj-0rOwy.png",_s="/assets/b21.CYRPkSXE.png",hs="/assets/b22.BH7kRZ3Z.png",bs="/assets/b23.JVX-KOL7.png",ys="/assets/b24.a2fv8lkf.png",zs="/assets/b25.BJrNgkiA.png",us="/assets/b26.5bTO5HK5.png",fs="/assets/b27.BSRz6moE.png",xs="/assets/b28.WNjJaEPB.png",ks="/assets/b29.Bs69Ykqp.png",Bs="/assets/b30.B96bh_Ou.png",Cs="/assets/b31.BBIAIScF.png",Is="/assets/b32.8G5Xy9mr.png",Os="/assets/b33.RYxcR7vu.png",Ps="/assets/b34.Dw6MyLex.png",Fs="/assets/b35.DUCPsVIG.png",qs="/assets/b36.7aKaNaLh.png",vs="/assets/b37.B5CHAJzN.png",Ds="/assets/br.CyzpZwsx.png",As="/assets/b38.Pnnij22W.png",ws="/assets/b39.ajiHDdbx.png",Gs="/assets/b40.B6FTkFUT.png",Ks="/assets/b41.DcCdod5l.png",Vs="/assets/b42.CT1JvTLX.png",Us="/assets/b43.HthhPs5o.png",Es="/assets/b44.C9NeP-UC.png",Ss="/assets/b45.BWxBBH-l.png",js="/assets/b46.B6Ds58im.png",Qs=JSON.parse('{"title":"Android 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_android.md","filePath":"guide/pve/pve_android.md","lastUpdated":1772424525000}'),Ns={name:"guide/pve/pve_android.md"};function Rs(Ts,s,Ls,Ms,Hs,Js){return p(),o("div",null,s[0]||(s[0]=[e("",228)]))}const Xs=a(Ns,[["render",Rs]]);export{Qs as __pageData,Xs as default}; diff --git a/assets/guide_pve_pve_android.md.CM7MUU9_.js b/assets/guide_pve_pve_android.md.CM7MUU9_.js deleted file mode 100644 index 24acdd3a05..0000000000 --- a/assets/guide_pve_pve_android.md.CM7MUU9_.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as p,c as e,o,ag as t}from"./chunks/framework.CSeR4K32.js";const a="/assets/a1.DvgNELwZ.png",c="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",i="/assets/a4.BtVJtyBL.png",d="/assets/a5.CamDlEuL.png",n="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",m="/assets/a8.CkyIulFy.png",g="/assets/a9.Dg58RrTs.png",_="/assets/a10.CPK2ZJEJ.png",h="/assets/a11.Bq6vmveu.png",b="/assets/a12.bStrZLWw.png",u="/assets/a13.DRz8WTJR.png",f="/assets/a14.D56M6gMb.png",x="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",B="/assets/a17.B9keXK9k.png",C="/assets/a18.Bu92JFv5.png",I="/assets/a19.DZjr60Xs.png",O="/assets/a20.CesdkIR_.png",P="/assets/a21.BO8sy8n4.png",F="/assets/a22.COjD9r-B.png",q="/assets/a23.BxEEAckp.png",v="/assets/a24.BrCKYLHX.png",D="/assets/a25.CUB6zoiS.png",A="/assets/a26.zvaFRs59.png",w="/assets/ar.Dy_5EjFU.png",G="/assets/a27.QkS9Cjl7.png",K="/assets/a31.BiCzGFMR.png",V="/assets/a32.54sdf1AZ.png",y="/assets/a33.QYBAXO71.png",U="/assets/a34.BBqAz_kr.png",E="/assets/a35.B8NF_iJX.png",S="/assets/a36.CPvsggxV.png",j="/assets/a37.DJRI7pv9.png",N="/assets/a38.BhfuTk-3.png",R="/assets/a39.BNtfZ4xd.png",T="/assets/a40.DTfyEQe2.png",L="/assets/a41.Cb6MjiUm.png",M="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",J="/assets/a44.Dhcgau_f.png",z="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Q="/assets/b2.BnvPQMj3.png",X="/assets/b3.DPn2dzFl.png",Z="/assets/b4.JBQupWN9.png",Y="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ss="/assets/b7.5Fkbt05C.png",ps="/assets/b8.BXlK1Dnb.png",es="/assets/b9.CaK5eLKm.png",os="/assets/b10.DGHfd73s.png",ts="/assets/b11.DKZjwgY8.png",as="/assets/b12.BISDj2Ri.png",cs="/assets/b13.WGr5jMeK.png",rs="/assets/b14.BqBpvoFk.png",is="/assets/b15.Cd3Rj7ju.png",ds="/assets/b16.BR7AHi1X.png",ns="/assets/b17.Cn1C4e1e.png",ls="/assets/b18.ElAa2UCQ.png",ms="/assets/b19.BwC-oHOW.png",gs="/assets/b20.Dj-0rOwy.png",_s="/assets/b21.CYRPkSXE.png",hs="/assets/b22.BH7kRZ3Z.png",bs="/assets/b23.JVX-KOL7.png",us="/assets/b24.a2fv8lkf.png",fs="/assets/b25.BJrNgkiA.png",xs="/assets/b26.5bTO5HK5.png",ks="/assets/b27.BSRz6moE.png",Bs="/assets/b28.WNjJaEPB.png",Cs="/assets/b29.Bs69Ykqp.png",Is="/assets/b30.B96bh_Ou.png",Os="/assets/b31.BBIAIScF.png",Ps="/assets/b32.8G5Xy9mr.png",Fs="/assets/b33.RYxcR7vu.png",qs="/assets/b34.Dw6MyLex.png",vs="/assets/b35.DUCPsVIG.png",Ds="/assets/b36.7aKaNaLh.png",As="/assets/b37.B5CHAJzN.png",ws="/assets/br.CyzpZwsx.png",Gs="/assets/b38.Pnnij22W.png",Ks="/assets/b39.ajiHDdbx.png",Vs="/assets/b40.B6FTkFUT.png",ys="/assets/b41.DcCdod5l.png",Us="/assets/b42.CT1JvTLX.png",Es="/assets/b43.HthhPs5o.png",Ss="/assets/b44.C9NeP-UC.png",js="/assets/b45.BWxBBH-l.png",Ns="/assets/b46.B6Ds58im.png",Qs=JSON.parse('{"title":"Android 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_android.md","filePath":"guide/pve/pve_android.md","lastUpdated":1772422214000}'),Rs={name:"guide/pve/pve_android.md"};function Ts(Ls,s,Ms,Hs,Js,zs){return o(),e("div",null,s[0]||(s[0]=[t('

Android 虚拟机

安卓系统镜像下载

Android系统版本9及以前的镜像下载地址:

国际

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

国内

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Android系统版本10及以后的新镜像下载地址:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

虚拟机开设

以安卓版本9及以前的镜像开设Android虚拟机

本指南以

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

作为示例进行演示

1

模板设置

开设VMID为100的虚拟机选择对应的存储盘

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

Graphic card选择Vmware compatible,其他选项选择默认如图所示

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面

9

系统安装

进入引导后,选择Installation开头的选项

10

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了

11

选择不使用GPT格式

12

显示空白盘后,选择New

13

选择分区类型Primary

14

然后会提示划分多大的空间,默认回车就行,使用全部的空间

15

然后是选择Flags,移动到Bootable后,按回车,直到Flags下方显示Boot

16

然后移动到Write,回车,进行写入

17

这时候会让你确认是否继续,输入yes后回车继续

18

一段进度条跑过后,回到了最初的菜单,选择Quit退出菜单,一切准备就绪了

19

然后这时候回到了UI界面,使用前面初始化好的盘,选择OK按钮回车

20

文件系统按方向键选择ext4类型,选择OK按钮回车

21

确认进行格式化,选择Yes按钮回车

22

确认GRUB引导安装,选择OK按钮回车

23

确认文件系统可读写,选择OK按钮回车

24

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车

25

然后一段时间后进入安卓LOGO界面

26

镜像移除

然后会进入一段黑屏,大概3~5分钟后仍然黑屏的话,宿主机执行qm stop 100,然后开始移除镜像文件

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

ar

然后宿主机再执行qm start 100,然后应该就会进入安卓系统的初始化界面了

系统初始化

初始化界面选择语言,然后点击确定按钮

27

此时回尝试连接WIFI,由于本项目安装的PVE是完全的静态网络配置,直接跳过,稍后再进行设置

31

点击下一步按钮确认设置时间

32

点击取消屏幕保护,确认仍然跳过

33

然后一段时间黑屏后,会出现主屏幕应用的选择,如果等待3~5分钟这个界面仍然没有出现,那么像之前那样重启虚拟机,再进入VNC应该就会显示了

选择Quickstep

34

网络设置

进入桌面,此时需要开始设置网络,左上角点击设置图标

35

出现下拉框,点击按住下拉

36

点击齿轮按钮

37

进入网络和互联网设置

38

左键双击WIFI

39

修改目前识别到的VirtWIFI,右键点击出现选择框后,点击修改网络

40

出现高级选项,点击打开隐藏的选项

41

如图进行对应的网络设置

IP地址 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码 24

默认网关 172.16.1.1

DNS 8.8.8.8144.144.144.144

然后点击保存按钮

42

此时出来后可能仍然未应用设置,点击关闭WIFI后,再启用WIFI,应该就会显示已连接

43

然后退出到主界面,点击谷歌浏览器,尝试打开一个网页

44

可以看到打开本指南的网址无问题,证明网络已联通

45

以安卓版本10及以后的新镜像开设Android虚拟机

本指南以

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

作为示例进行演示

1

模板设置

宿主机需要先执行以下命令安装图形环境依赖

shell
apt install libgl1 libegl1 -y

然后开始创建虚拟机,点击右上角的Create VM按钮,填写VMIDNameResource Pool

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

如果宿主机本身携带有GPU,那么Graphic card选择VirGL GPU

如果宿主机本身不携带GPU,那么Graphic card选择VirtIOVmware compatible

Machine选择q35BIOS选择OVMF (UEFI)启动,EFI Storage选择local

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面。

系统安装

进入引导后,选择Installation结尾的选项

9

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了。

10

选择不使用GPT格式,依然使用cfdisk格式。

11

显示格式选择框,选择gpt

12

显示空白盘后,选择New

13

因为要划分EFI分区,这个盘需要修改大小,不能使用默认大小,数字改成1就行,分配1G硬盘,然后按回车。

14

然后回到了菜单栏,按方向键选择Type,然后回车,给分区选择格式类型

15

按方向键选择第一个选项EFI System,然后回车

16

此时回到菜单栏,页面上半部分就能看到具体的分区大小和格式

17

然后按下方向键,选择下一行空白的分区

18

菜单栏选择New,然后回车

19

这块需要填写分区大小,此时对照右上角选中的空白分区大小一致即可,然后回车。

20

回到菜单栏,选择Write,回车,写入分区。

21

会提示你输入yes进行确认,输入后回车。

22

然后一段进度条跑过,应该会回到菜单栏,选择Quit退出菜单,一切准备就绪了

23

然后这时候回到了UI界面,使用前面初始化好的1GB大小的盘,选择OK按钮回车。

24

文件系统按方向键选择fat32类型,选择OK按钮回车

25

确认不修改名字,选择OK按钮回车

26

确认进行格式化,选择Yes按钮回车

27

然后回到最初的UI栏,选择第二块不是1GB大小的分区,选择OK按钮回车

28

文件系统按方向键选择ext4类型,选择OK按钮回车

29

确认不修改名字,选择OK按钮回车

30

确认进行格式化,选择Yes按钮回车

31

默认不使用额外空间更新,选择No按钮回车

32

确认GRUB2 EFI BootLoader,选择OK按钮回车

33

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车。

34

系统初始化

然后一段时间后进入LOGO界面。

35

再过一段时间,应该就会进入初始的安卓界面了,能看到弹窗和时间,按住左键上划

36

会出现主屏幕应用的选择,选择Quickstep

如果等待3~5分钟这个界面仍然没有出现,那么就重启虚拟机,再进入VNC应该就会显示了

37

镜像移除

出现了安卓的界面后,宿主机执行qm stop 100,然后开始移除镜像文件。

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

br

然后宿主机再执行qm start 100,然后应该就会进入系统的初始界面了。

网络设置

进入桌面,此时需要开始设置网络,图示位置按住左键,上划

38

弹出一堆应用,在里面找到那个叫做Bliss Ethernet Manager的应用,点击并打开

39

IP Assignment点击打开,选择Static类型,点击OK按钮确认

40

IP Address点击打开,填入172.16.1.xxx/24(xxx我写的100,因为这里我的虚拟机VMID是100方便区分),点击OK按钮确认

41

Gateway Address点击打开,填入172.16.1.1,点击OK按钮确认

42

DNS Address点击打开,填入8.8.8.8,点击OK按钮确认

43

然后在应用界面中,点击Interface UpRefresh,然后键盘按exit键退出程序

44

主界面中打开浏览器,验证网络是否畅通

45

可以看到打开本指南无问题,网络畅通

46

',228)]))}const Xs=p(Rs,[["render",Ts]]);export{Qs as __pageData,Xs as default}; diff --git a/assets/guide_pve_pve_android.md.CM7MUU9_.lean.js b/assets/guide_pve_pve_android.md.CM7MUU9_.lean.js deleted file mode 100644 index af0411bb38..0000000000 --- a/assets/guide_pve_pve_android.md.CM7MUU9_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as p,c as e,o,ag as t}from"./chunks/framework.CSeR4K32.js";const a="/assets/a1.DvgNELwZ.png",c="/assets/a2.BQniQEw_.png",r="/assets/a3.DHUpjnAe.png",i="/assets/a4.BtVJtyBL.png",d="/assets/a5.CamDlEuL.png",n="/assets/a6.auUigeOH.png",l="/assets/a7.3_Is3HF1.png",m="/assets/a8.CkyIulFy.png",g="/assets/a9.Dg58RrTs.png",_="/assets/a10.CPK2ZJEJ.png",h="/assets/a11.Bq6vmveu.png",b="/assets/a12.bStrZLWw.png",u="/assets/a13.DRz8WTJR.png",f="/assets/a14.D56M6gMb.png",x="/assets/a15.CtjmUhal.png",k="/assets/a16.BL0_sgNg.png",B="/assets/a17.B9keXK9k.png",C="/assets/a18.Bu92JFv5.png",I="/assets/a19.DZjr60Xs.png",O="/assets/a20.CesdkIR_.png",P="/assets/a21.BO8sy8n4.png",F="/assets/a22.COjD9r-B.png",q="/assets/a23.BxEEAckp.png",v="/assets/a24.BrCKYLHX.png",D="/assets/a25.CUB6zoiS.png",A="/assets/a26.zvaFRs59.png",w="/assets/ar.Dy_5EjFU.png",G="/assets/a27.QkS9Cjl7.png",K="/assets/a31.BiCzGFMR.png",V="/assets/a32.54sdf1AZ.png",y="/assets/a33.QYBAXO71.png",U="/assets/a34.BBqAz_kr.png",E="/assets/a35.B8NF_iJX.png",S="/assets/a36.CPvsggxV.png",j="/assets/a37.DJRI7pv9.png",N="/assets/a38.BhfuTk-3.png",R="/assets/a39.BNtfZ4xd.png",T="/assets/a40.DTfyEQe2.png",L="/assets/a41.Cb6MjiUm.png",M="/assets/a42.Du63tHI8.png",H="/assets/a43.Cxy9Fqxr.png",J="/assets/a44.Dhcgau_f.png",z="/assets/a45.DQgcLv5f.png",W="/assets/b1.CSqggjTM.png",Q="/assets/b2.BnvPQMj3.png",X="/assets/b3.DPn2dzFl.png",Z="/assets/b4.JBQupWN9.png",Y="/assets/b5.DeuT9J-4.png",$="/assets/b6.cZYHMwJ8.png",ss="/assets/b7.5Fkbt05C.png",ps="/assets/b8.BXlK1Dnb.png",es="/assets/b9.CaK5eLKm.png",os="/assets/b10.DGHfd73s.png",ts="/assets/b11.DKZjwgY8.png",as="/assets/b12.BISDj2Ri.png",cs="/assets/b13.WGr5jMeK.png",rs="/assets/b14.BqBpvoFk.png",is="/assets/b15.Cd3Rj7ju.png",ds="/assets/b16.BR7AHi1X.png",ns="/assets/b17.Cn1C4e1e.png",ls="/assets/b18.ElAa2UCQ.png",ms="/assets/b19.BwC-oHOW.png",gs="/assets/b20.Dj-0rOwy.png",_s="/assets/b21.CYRPkSXE.png",hs="/assets/b22.BH7kRZ3Z.png",bs="/assets/b23.JVX-KOL7.png",us="/assets/b24.a2fv8lkf.png",fs="/assets/b25.BJrNgkiA.png",xs="/assets/b26.5bTO5HK5.png",ks="/assets/b27.BSRz6moE.png",Bs="/assets/b28.WNjJaEPB.png",Cs="/assets/b29.Bs69Ykqp.png",Is="/assets/b30.B96bh_Ou.png",Os="/assets/b31.BBIAIScF.png",Ps="/assets/b32.8G5Xy9mr.png",Fs="/assets/b33.RYxcR7vu.png",qs="/assets/b34.Dw6MyLex.png",vs="/assets/b35.DUCPsVIG.png",Ds="/assets/b36.7aKaNaLh.png",As="/assets/b37.B5CHAJzN.png",ws="/assets/br.CyzpZwsx.png",Gs="/assets/b38.Pnnij22W.png",Ks="/assets/b39.ajiHDdbx.png",Vs="/assets/b40.B6FTkFUT.png",ys="/assets/b41.DcCdod5l.png",Us="/assets/b42.CT1JvTLX.png",Es="/assets/b43.HthhPs5o.png",Ss="/assets/b44.C9NeP-UC.png",js="/assets/b45.BWxBBH-l.png",Ns="/assets/b46.B6Ds58im.png",Qs=JSON.parse('{"title":"Android 虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_android.md","filePath":"guide/pve/pve_android.md","lastUpdated":1772422214000}'),Rs={name:"guide/pve/pve_android.md"};function Ts(Ls,s,Ms,Hs,Js,zs){return o(),e("div",null,s[0]||(s[0]=[t("",228)]))}const Xs=p(Rs,[["render",Ts]]);export{Qs as __pageData,Xs as default}; diff --git a/assets/guide_pve_pve_custom.md.BXaUK71V.js b/assets/guide_pve_pve_custom.md.BXaUK71V.js deleted file mode 100644 index b9c7f6c7d0..0000000000 --- a/assets/guide_pve_pve_custom.md.BXaUK71V.js +++ /dev/null @@ -1,34 +0,0 @@ -import{_ as a,c as i,o as e,ag as p}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"自定义分区","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_custom.md","filePath":"guide/pve/pve_custom.md","lastUpdated":1772422214000}'),n={name:"guide/pve/pve_custom.md"};function t(l,s,h,d,o,c){return e(),i("div",null,s[0]||(s[0]=[p(`

自定义分区

在非Debian系统上安装 Proxmox VE 7

本机硬件配置的最低要求同先前正常安装的要求一致

需要先安装docker

curl -sSL https://get.docker.com/ | sh
-curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
-chmod +x /usr/local/bin/docker-compose
-docker-compose --version

然后使用uname -m查询架构,使用对应架构的命令

开设出的PVE面板信息为:

登录用户名和密码都是root,登录后务必使用web的SSH更改密码以免被爆破

用宿主机SSH时务必登录对应https://IPV4地址:8006在web面板上使用SSH,不要使用宿主机的22端口操控PVE

因为web面板上的SSH是在Docker内的,所以不支持后续的一键配置,请自行配置网关等进行使用

X86架构

bash
docker run -idt --network host \\
---privileged \\
---name pve \\
---add-host pve:10.13.14.101 \\
---hostname pve \\
-spiritlhl/pve:7_x86_64

ARM架构

bash
docker run -idt --network host \\
---privileged \\
---name pve \\
---add-host pve:10.13.14.101 \\
---hostname pve \\
-spiritlhl/pve:7_aarch64

开设出的面板实际是开设在容器内的,但网络已使用host模式,PVE的端口约等于就使用的宿主机的端口

但这里登录的用户名和密码就变成了rootroot,如需修改请docker exec -it pve /bin/bash进入后修改root的密码,然后按ctrl键和A+D退出。

有许多错误需要修复,欢迎PR解决问题,实测在Ubuntu系统的宿主机上安装Proxmox VE的面板成功,解决了通过网络安装Proxmox VE只能使用Debian系统做宿主机的问题

在低配置系统中优化Proxmox-VE的内存占用

以下优化可以减少至少400M内存左右的占用,部分机器能减少6GB以上,实际减少多少内存占用自行测试

减少max_workers数量

执行下述命令查询

cd /usr/share/perl5/PVE/Service
-grep 'max_workers => 3' *

可见

pvedaemon.pm:    max_workers => 3,
-pveproxy.pm:    max_workers => 3,
-spiceproxy.pm:    max_workers => 3, # todo: do we need more?

默认的max_workers是3,可以修改对应的文件,最低max_workers可为1,可使用如下命令进行修改

sed -i "s/max_workers => 3/max_workers => 1/g" /usr/share/perl5/PVE/Service/*

停用HA服务

集群(多节点)可以使用HA服务,如果是单节点,或者没有HA使用的需求,可以执行下述命令禁用

systemctl stop pve-ha-lrm.service 
-systemctl stop pve-ha-crm.service 
-systemctl disable pve-ha-lrm.service 
-systemctl disable pve-ha-crm.service

停用防火墙服务

可执行下述命令停用服务

systemctl stop pve-firewall.service 
-systemctl disable pve-firewall.service

停用调度服务

如果不需要计划任务,如备份、同步之类的任务,可执行下述命令停用服务

systemctl stop pvescheduler.service
-systemctl disable pvescheduler.service

停用Spiceproxy服务

如果不需要使用Spice进行虚拟机/容器链接(arm下暂不支持Spice),可执行下述命令停用服务

systemctl stop spiceproxy.service 
-systemctl disable spiceproxy.service

使用定时任务删除内存缓存

清理不同类型的缓存以及对文件系统进行TRIM操作

shell
TEMP_CRON=$(mktemp)
-sudo crontab -l > $TEMP_CRON
-echo "*/5 * * * * echo 1 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 60; echo 2 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 120; echo 3 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
-echo "*/5 * * * * sleep 180; fstrim -av" >> $TEMP_CRON
-sudo crontab $TEMP_CRON
-rm $TEMP_CRON

上面的命令需要宿主机本身有sudocrontab命令才可使用。

自行映射公网端口到开设出的NAT的KVM虚拟机上

下面所有操作在PVE宿主机上进行操作

使用nanovim命令修改文件增加端口映射:

shell
/etc/iptables/rules.v4

例如我有一台内网IP为172.16.1.152的KVM虚拟机(虚拟机不管是什么系统的,web端都能查看到内网IP地址),虚拟机内已经开设MYSQL监听了3306,我需要使用tcp协议映射出来到宿主机IP上的33306端口上进行使用,那么需要在上面的那个文件中的COMMIT行以上增加如下行

shell
-A PREROUTING -i vmbr0 -p tcp -m tcp -dport 33306 -j DNAT --to-destination 172.16.1.152:3306

如果是udp协议,上面的代码中的tcp修改为udp即可

保存文件退出文件编辑后执行

service netfilter-persistent restart

重载端口映射

此时在宿主机上执行

lsof -i:33306

可见端口映射规则是否生效

开设Linux虚拟机的时候自定义CPU的TYPE

在宿主机上使用类似

shell
echo "kvm64" > /usr/local/bin/cpu_type

这样的方式指定默认的CPU的TYPE,可将kvm64替换为你需要的类型

使用自定义的IPV6列表

开设虚拟机或容器的时候需要使用自定义的IPV6列表,不想要自动计算并分配IPV6

可在 /usr/local/bin/pve_appended_content.txt 中一行一个写入你待分配的IPV6地址,如

shell
2a01:4f8:1c1c:94de::2
-2a01:4f8:1c1c:94de::3
-2a01:4f8:1c1c:94de::4
-2a01:4f8:1c1c:94de::5
-2a01:4f8:1c1c:94de::6

这种方式可用于宿主机未完整分配/80以上大小的子网的时候,仅带几个IPV6的时候,又需要开设独立的IPV6地址的实例

`,64)]))}const g=a(n,[["render",t]]);export{r as __pageData,g as default}; diff --git a/assets/guide_pve_pve_custom.md.BXaUK71V.lean.js b/assets/guide_pve_pve_custom.md.BXaUK71V.lean.js deleted file mode 100644 index cf0550bdc7..0000000000 --- a/assets/guide_pve_pve_custom.md.BXaUK71V.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as e,ag as p}from"./chunks/framework.CSeR4K32.js";const r=JSON.parse('{"title":"自定义分区","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_custom.md","filePath":"guide/pve/pve_custom.md","lastUpdated":1772422214000}'),n={name:"guide/pve/pve_custom.md"};function t(l,s,h,d,o,c){return e(),i("div",null,s[0]||(s[0]=[p("",64)]))}const g=a(n,[["render",t]]);export{r as __pageData,g as default}; diff --git a/assets/guide_pve_pve_custom.md.DIveMndF.js b/assets/guide_pve_pve_custom.md.DIveMndF.js new file mode 100644 index 0000000000..cda838b8ca --- /dev/null +++ b/assets/guide_pve_pve_custom.md.DIveMndF.js @@ -0,0 +1,34 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"自定义分区","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_custom.md","filePath":"guide/pve/pve_custom.md","lastUpdated":1772424525000}'),p={name:"guide/pve/pve_custom.md"};function l(t,s,r,h,d,c){return e(),i("div",null,s[0]||(s[0]=[n(`

自定义分区

在非Debian系统上安装 Proxmox VE 7

本机硬件配置的最低要求同先前正常安装的要求一致

需要先安装docker

curl -sSL https://get.docker.com/ | sh
+curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
+chmod +x /usr/local/bin/docker-compose
+docker-compose --version

然后使用uname -m查询架构,使用对应架构的命令

开设出的PVE面板信息为:

登录用户名和密码都是root,登录后务必使用web的SSH更改密码以免被爆破

用宿主机SSH时务必登录对应https://IPV4地址:8006在web面板上使用SSH,不要使用宿主机的22端口操控PVE

因为web面板上的SSH是在Docker内的,所以不支持后续的一键配置,请自行配置网关等进行使用

X86架构

bash
docker run -idt --network host \\
+--privileged \\
+--name pve \\
+--add-host pve:10.13.14.101 \\
+--hostname pve \\
+spiritlhl/pve:7_x86_64

ARM架构

bash
docker run -idt --network host \\
+--privileged \\
+--name pve \\
+--add-host pve:10.13.14.101 \\
+--hostname pve \\
+spiritlhl/pve:7_aarch64

开设出的面板实际是开设在容器内的,但网络已使用host模式,PVE的端口约等于就使用的宿主机的端口

但这里登录的用户名和密码就变成了rootroot,如需修改请docker exec -it pve /bin/bash进入后修改root的密码,然后按ctrl键和A+D退出。

有许多错误需要修复,欢迎PR解决问题,实测在Ubuntu系统的宿主机上安装Proxmox VE的面板成功,解决了通过网络安装Proxmox VE只能使用Debian系统做宿主机的问题

在低配置系统中优化Proxmox-VE的内存占用

以下优化可以减少至少400M内存左右的占用,部分机器能减少6GB以上,实际减少多少内存占用自行测试

减少max_workers数量

执行下述命令查询

cd /usr/share/perl5/PVE/Service
+grep 'max_workers => 3' *

可见

pvedaemon.pm:    max_workers => 3,
+pveproxy.pm:    max_workers => 3,
+spiceproxy.pm:    max_workers => 3, # todo: do we need more?

默认的max_workers是3,可以修改对应的文件,最低max_workers可为1,可使用如下命令进行修改

sed -i "s/max_workers => 3/max_workers => 1/g" /usr/share/perl5/PVE/Service/*

停用HA服务

集群(多节点)可以使用HA服务,如果是单节点,或者没有HA使用的需求,可以执行下述命令禁用

systemctl stop pve-ha-lrm.service 
+systemctl stop pve-ha-crm.service 
+systemctl disable pve-ha-lrm.service 
+systemctl disable pve-ha-crm.service

停用防火墙服务

可执行下述命令停用服务

systemctl stop pve-firewall.service 
+systemctl disable pve-firewall.service

停用调度服务

如果不需要计划任务,如备份、同步之类的任务,可执行下述命令停用服务

systemctl stop pvescheduler.service
+systemctl disable pvescheduler.service

停用Spiceproxy服务

如果不需要使用Spice进行虚拟机/容器链接(arm下暂不支持Spice),可执行下述命令停用服务

systemctl stop spiceproxy.service 
+systemctl disable spiceproxy.service

使用定时任务删除内存缓存

清理不同类型的缓存以及对文件系统进行TRIM操作

shell
TEMP_CRON=$(mktemp)
+sudo crontab -l > $TEMP_CRON
+echo "*/5 * * * * echo 1 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 60; echo 2 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 120; echo 3 > /proc/sys/vm/drop_caches" >> $TEMP_CRON
+echo "*/5 * * * * sleep 180; fstrim -av" >> $TEMP_CRON
+sudo crontab $TEMP_CRON
+rm $TEMP_CRON

上面的命令需要宿主机本身有sudocrontab命令才可使用。

自行映射公网端口到开设出的NAT的KVM虚拟机上

下面所有操作在PVE宿主机上进行操作

使用nanovim命令修改文件增加端口映射:

shell
/etc/iptables/rules.v4

例如我有一台内网IP为172.16.1.152的KVM虚拟机(虚拟机不管是什么系统的,web端都能查看到内网IP地址),虚拟机内已经开设MYSQL监听了3306,我需要使用tcp协议映射出来到宿主机IP上的33306端口上进行使用,那么需要在上面的那个文件中的COMMIT行以上增加如下行

shell
-A PREROUTING -i vmbr0 -p tcp -m tcp -dport 33306 -j DNAT --to-destination 172.16.1.152:3306

如果是udp协议,上面的代码中的tcp修改为udp即可

保存文件退出文件编辑后执行

service netfilter-persistent restart

重载端口映射

此时在宿主机上执行

lsof -i:33306

可见端口映射规则是否生效

开设Linux虚拟机的时候自定义CPU的TYPE

在宿主机上使用类似

shell
echo "kvm64" > /usr/local/bin/cpu_type

这样的方式指定默认的CPU的TYPE,可将kvm64替换为你需要的类型

使用自定义的IPV6列表

开设虚拟机或容器的时候需要使用自定义的IPV6列表,不想要自动计算并分配IPV6

可在 /usr/local/bin/pve_appended_content.txt 中一行一个写入你待分配的IPV6地址,如

shell
2a01:4f8:1c1c:94de::2
+2a01:4f8:1c1c:94de::3
+2a01:4f8:1c1c:94de::4
+2a01:4f8:1c1c:94de::5
+2a01:4f8:1c1c:94de::6

这种方式可用于宿主机未完整分配/80以上大小的子网的时候,仅带几个IPV6的时候,又需要开设独立的IPV6地址的实例

`,64)]))}const b=a(p,[["render",l]]);export{k as __pageData,b as default}; diff --git a/assets/guide_pve_pve_custom.md.DIveMndF.lean.js b/assets/guide_pve_pve_custom.md.DIveMndF.lean.js new file mode 100644 index 0000000000..cd0b8de00f --- /dev/null +++ b/assets/guide_pve_pve_custom.md.DIveMndF.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"自定义分区","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_custom.md","filePath":"guide/pve/pve_custom.md","lastUpdated":1772424525000}'),p={name:"guide/pve/pve_custom.md"};function l(t,s,r,h,d,c){return e(),i("div",null,s[0]||(s[0]=[n("",64)]))}const b=a(p,[["render",l]]);export{k as __pageData,b as default}; diff --git a/assets/guide_pve_pve_install.md.DMVLl-nh.js b/assets/guide_pve_pve_install.md.DMVLl-nh.js new file mode 100644 index 0000000000..9a4520776c --- /dev/null +++ b/assets/guide_pve_pve_install.md.DMVLl-nh.js @@ -0,0 +1,2 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"PVE主体安装","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_install.md","filePath":"guide/pve/pve_install.md","lastUpdated":1772424525000}'),l={name:"guide/pve/pve_install.md"};function p(n,s,h,r,d,c){return a(),e("div",null,s[0]||(s[0]=[t(`

PVE主体安装

安装过程中遇到选项不会选的可无脑按回车,本项目所有脚本内置国内外IP自动判断,使用的是不同的安装源与配置文件,有使用CDN加速镜像下载

TIP

低配置的宿主机,建议所有内容安装完毕后,查看自定义分区的内容,进行内存调优,减少内存占用。

在非物理机器上进行安装

本方法安装的Proxmox可后续使用本项目的所有脚本。

一键安装PVE

TIP

建议debian12+,实测部分独立服务器的debian11系统会出现一重启网络就失联的情况,debian12没有这种问题

  • 安装的是当下apt源最新的PVE
  • 比如debian10则是pve6.4,debian11则是pve7.x,debian12则是pve8.x,debian13则是pve9.x
  • /etc/hosts文件修改(修正商家hostname设置错误以及新增PVE所需的内容)
  • /etc/cloud/cloud.cfg文件修改(避免覆写已修改的hostname等配置)
  • /etc/network/interfaces文件修改(修复auto、dhcp类型为static、增加vmbr0网关)
  • 检测是否为中国IP,如果为中国IP使用清华镜像源,否则使用官方源,同时处理apt的源和对应的nameserver,避免断网
  • 创建vmbr0(独立IP网关),宿主机允许addr和gateway为内网IP或外网IP,已自动识别
  • vmbr0创建支持开设纯IPV4、纯IPV6、双栈虚拟机,自动识别IPV4地址和IPV6地址,自动识别对应的IP区间
  • 安装PVE开虚拟机需要的必备工具包
  • x86_64的替换apt源中的企业订阅为社区源,arm的使用第三方修复的补丁构建的源
  • 打印查询Linux系统内核和PVE内核是否已安装
  • 设置DNS检测8.8.8.8的开机自启添加DNS的systemd服务
  • 新增PVE的APT源链接后,下载PVE并打印输出登陆信息

所有修改过的文件均已设置为只读模式,避免重启后文件被覆写,如需修改请使用chattr -i 文件路径取消只读锁定,修改完毕请执行chattr +i 文件路径进行只读锁定

执行过程中会提示重启系统一次,重启后务必等待起码20秒确保系统未再次自动重启,因为原始环境可能缺失ifupdownifupdown2环境,有加载安装的守护进程进行安装,安装后会再次自动重启系统,等待20秒未自重启确保这个安装已运行完毕.

如果你需要将新安装的PVE纳管进入已有的集群,那么这块安装的时候,名字就不能回车默认使用pve,需要换一个名字避免和集群内的pve本身的hostname冲突.

若宿主机本身存在SLAAC分配的IPV6地址,将可选择是否使用最大的IPV6子网范围,默认回车不使用最大的IPV6子网范围仅使用本机IPV6,若后续需要给虚拟机/容器附加独立的IPV6地址,该选项务必选择y.

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

shell
bash install_pve.sh

TIP

安装成功后打开网页可能提示不安全,点击高级或更多选项,坚持访问即可

登录的信息是你SSH的账户和密码

预配置环境

  • 创建资源池mypool(local)
  • 移除订阅弹窗
  • 尝试开启硬件直通
  • 对AppArmor模块检测和自动安装
  • 重启系统前推荐挂上nezha探针方便在后台不通过SSH使用命令行,避免SSH可能因为商家奇葩的预设可能导致重启后root密码丢失
  • 执行reboot前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕,当然大部分的机器没这么烂,如果很久都起不来ssh无法连接,那么尝试通过控制面板重启一下服务器

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

自动配置宿主机的网关

WARNING

使用前请保证重启过服务器且此时PVE能正常登录进WEB端再执行,重启机器后不要立即执行此命令,待WEB端启动并可登录成功后至少等1分钟再执行本命令 如果WEB端起不来,执行systemctl status pveproxy查看是否启动,如果卡住未启动,执行systemctl start pveproxy启动WEB端。

TIP

这一步是最容易造成SSH断开的,原因是未等待PVE内核启动就修改网络会造成设置冲突,所以至少等几分钟待内核启动也就是WEB端启动成功后再执行。

TIP

在执行本命令前如果宿主机需要附加IPV6隧道(给没有IPV6地址的宿主机添加IPV6子网),请查看IPV6免费子网附加部分的内容附加到对应的配置文件中,但请忽略<初始环境修改>的操作,直接进行附加,附加后验证有IPV6地址了再执行下面的一键配置网关的命令。

  • 如果vmbr0未创建,则自动创建,逻辑同主体安装一致
  • 创建vmbr1(NAT网关),支持开设NAT的IPV6网络的NAT的IPV4的服务器
  • 创建vmbr2(独立IPV6网关),使用ndppd解决宿主机对IPV6地址进行MAC校验的问题,支持开设带独立IPV6网络的服务器
  • 想查看完整设置可以执行cat /etc/network/interfaces查看,如需修改网关需要修改该文件,web端已经无法修改
  • 加载iptables并设置回源且允许NAT端口转发

简单的说,vmbr0负责v4的独立IP,vmbr1负责复杂v4/v6的NAT,vmbr2负责v6的独立IP

开独立IPV4的虚拟机时使用的vmbr0,gateway同宿主机,IPV4/CIDR使用同一网段的地址和相同的子网掩码,使用宿主机未绑定的IPV4地址做IPV4/CIDR,当然如果后续使用本套脚本无需关注这点细枝末节的东西

开NAT的IPV4的虚拟机时使用vmbr1,gateway使用172.16.1.1,IPV4/CIDR使用172.16.1.x/24,这里的x不能是1,当然如果后续使用本套脚本无需关注这点细枝末节的东西

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

这一步是可能需要你执行成功几分钟后重启系统,详见脚本最后执行完毕的提示,但重启可以保证部分隐藏设置加载成功,有条件务必重启一次服务器

到这一步主体安装完毕。

在物理机器上进行安装

本方法安装的Proxmox不可后续使用本项目的所有脚本。

本方法未大规模测试和适配,仅本人在本地机器上安装了PVE8.4,路由器本身使用的不是自动获取IP地址而是固定IP地址连接的方式,如有问题对应仓库开issues.

U盘刻录官方ISO

官方ISO下载地址:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

需要提前下载到本地

同时还需要一个读写速率比较好的U盘,用于制作启动盘,由于启动盘需要使用rufus进行启动盘制作,所以需要U盘格式化,需要确保U盘制作前为空U盘

rufus下载地址(下载到你的本地,不是U盘中):

https://rufus.ie/zh/

https://github.com/pbatard/rufus

刻录需要使用DD方式进行刻录,刻录完毕后U盘原数据会被完全擦除。

PVE主体安装

查找宿主机本身如何进入BIOS,进入BIOS后修改两处地方

  1. 安全启动需要关闭

  2. Boot的顺序需要将USB的顺序移动到第一位

然后保存设置,然后插入U盘,重新启动系统,选择使用图形界面进行安装

FQDN需要填写一个网址,可以填写类似 pve.spiritlhl.net 这样的网址,最好是你拥有的域名的一个子域名,不是实际的域名的话写成类似 pve.localsite.com 也行,后续不一定用得到

安装完毕后会自动关机重启,重启黑屏后可以拔掉USB,避免又从U盘重启安装了,当然如果忘了又重启到安装页面了,关闭机器后拔掉U盘再启动也行

无线网络配置

下载所需的压缩文件和shell脚本

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

下载完成后,解压压缩包,将wireless的文件夹拖入一个新的U盘的根目录,同时wireless.sh文件也得放到根目录。

U盘插到物理机器后,需要挂载U盘,这里的sdx1是第一条命令查询到的U盘的实际路径,需要自行修改

shell
fdisk -l
+mount /dev/sdx1 /mnt

U盘内的wireless.zip需要确保已解压,打开可见其中的deb文件

此时直接执行一键配置

shell
bash /mnt/wireless.sh

配置完毕会自动重启系统,重启后会有公共网络

配置脚本执行过程中会提示输入WIFI的名字和密码,由于纯CI环境无中文输入法,WIFI的名字必须仅英文数字组成,密码也是

其他相关默认配置

下载脚本,类似上面一步那样导入文件

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/default.sh

使用前务必确保curl ip.sb无问题

shell
bash default.sh

执行会非常耗时,但装完后会自带xfce的桌面环境,且换源阿里云,且去除无效订阅,且设置合并local和loacl-lvm,且设置清华镜像容器源

注意事项

物理机安装无限模块后不可使用NAT直接连接虚拟机接入网络,所以本项目后续的教程不支持该方法接入的网桥,本项目后续脚本不支持本方法安装的Proxmox.

目前可行的无线模块在PVE上使用的成功案例,都要求WIFI路由器接入网络的方式是自动获取IP地址(DHCP)(后续使用openwrt或ikuai或直接nat后虚拟机内网络可用),或可在路由器上修改静态路由表,如果WIFI路由器使用固定IP地址连接网络,暂时未找到成功案例。

`,80)]))}const u=i(l,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_pve_pve_install.md.DMVLl-nh.lean.js b/assets/guide_pve_pve_install.md.DMVLl-nh.lean.js new file mode 100644 index 0000000000..41d9d9f69e --- /dev/null +++ b/assets/guide_pve_pve_install.md.DMVLl-nh.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.QPV3Ar9-.js";const k=JSON.parse('{"title":"PVE主体安装","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_install.md","filePath":"guide/pve/pve_install.md","lastUpdated":1772424525000}'),l={name:"guide/pve/pve_install.md"};function p(n,s,h,r,d,c){return a(),e("div",null,s[0]||(s[0]=[t("",80)]))}const u=i(l,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_pve_pve_install.md.aNT2nlcA.js b/assets/guide_pve_pve_install.md.aNT2nlcA.js deleted file mode 100644 index f9cb8a556a..0000000000 --- a/assets/guide_pve_pve_install.md.aNT2nlcA.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"PVE主体安装","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_install.md","filePath":"guide/pve/pve_install.md","lastUpdated":1772422214000}'),l={name:"guide/pve/pve_install.md"};function p(h,s,n,r,o,c){return a(),e("div",null,s[0]||(s[0]=[t(`

PVE主体安装

安装过程中遇到选项不会选的可无脑按回车,本项目所有脚本内置国内外IP自动判断,使用的是不同的安装源与配置文件,有使用CDN加速镜像下载

TIP

低配置的宿主机,建议所有内容安装完毕后,查看自定义分区的内容,进行内存调优,减少内存占用。

在非物理机器上进行安装

本方法安装的Proxmox可后续使用本项目的所有脚本。

一键安装PVE

TIP

建议debian12+,实测部分独立服务器的debian11系统会出现一重启网络就失联的情况,debian12没有这种问题

  • 安装的是当下apt源最新的PVE
  • 比如debian10则是pve6.4,debian11则是pve7.x,debian12则是pve8.x,debian13则是pve9.x
  • /etc/hosts文件修改(修正商家hostname设置错误以及新增PVE所需的内容)
  • /etc/cloud/cloud.cfg文件修改(避免覆写已修改的hostname等配置)
  • /etc/network/interfaces文件修改(修复auto、dhcp类型为static、增加vmbr0网关)
  • 检测是否为中国IP,如果为中国IP使用清华镜像源,否则使用官方源,同时处理apt的源和对应的nameserver,避免断网
  • 创建vmbr0(独立IP网关),宿主机允许addr和gateway为内网IP或外网IP,已自动识别
  • vmbr0创建支持开设纯IPV4、纯IPV6、双栈虚拟机,自动识别IPV4地址和IPV6地址,自动识别对应的IP区间
  • 安装PVE开虚拟机需要的必备工具包
  • x86_64的替换apt源中的企业订阅为社区源,arm的使用第三方修复的补丁构建的源
  • 打印查询Linux系统内核和PVE内核是否已安装
  • 设置DNS检测8.8.8.8的开机自启添加DNS的systemd服务
  • 新增PVE的APT源链接后,下载PVE并打印输出登陆信息

所有修改过的文件均已设置为只读模式,避免重启后文件被覆写,如需修改请使用chattr -i 文件路径取消只读锁定,修改完毕请执行chattr +i 文件路径进行只读锁定

执行过程中会提示重启系统一次,重启后务必等待起码20秒确保系统未再次自动重启,因为原始环境可能缺失ifupdownifupdown2环境,有加载安装的守护进程进行安装,安装后会再次自动重启系统,等待20秒未自重启确保这个安装已运行完毕.

如果你需要将新安装的PVE纳管进入已有的集群,那么这块安装的时候,名字就不能回车默认使用pve,需要换一个名字避免和集群内的pve本身的hostname冲突.

若宿主机本身存在SLAAC分配的IPV6地址,将可选择是否使用最大的IPV6子网范围,默认回车不使用最大的IPV6子网范围仅使用本机IPV6,若后续需要给虚拟机/容器附加独立的IPV6地址,该选项务必选择y.

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

shell
bash install_pve.sh

TIP

安装成功后打开网页可能提示不安全,点击高级或更多选项,坚持访问即可

登录的信息是你SSH的账户和密码

预配置环境

  • 创建资源池mypool(local)
  • 移除订阅弹窗
  • 尝试开启硬件直通
  • 对AppArmor模块检测和自动安装
  • 重启系统前推荐挂上nezha探针方便在后台不通过SSH使用命令行,避免SSH可能因为商家奇葩的预设可能导致重启后root密码丢失
  • 执行reboot前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕,当然大部分的机器没这么烂,如果很久都起不来ssh无法连接,那么尝试通过控制面板重启一下服务器

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

自动配置宿主机的网关

WARNING

使用前请保证重启过服务器且此时PVE能正常登录进WEB端再执行,重启机器后不要立即执行此命令,待WEB端启动并可登录成功后至少等1分钟再执行本命令 如果WEB端起不来,执行systemctl status pveproxy查看是否启动,如果卡住未启动,执行systemctl start pveproxy启动WEB端。

TIP

这一步是最容易造成SSH断开的,原因是未等待PVE内核启动就修改网络会造成设置冲突,所以至少等几分钟待内核启动也就是WEB端启动成功后再执行。

TIP

在执行本命令前如果宿主机需要附加IPV6隧道(给没有IPV6地址的宿主机添加IPV6子网),请查看IPV6免费子网附加部分的内容附加到对应的配置文件中,但请忽略<初始环境修改>的操作,直接进行附加,附加后验证有IPV6地址了再执行下面的一键配置网关的命令。

  • 如果vmbr0未创建,则自动创建,逻辑同主体安装一致
  • 创建vmbr1(NAT网关),支持开设NAT的IPV6网络的NAT的IPV4的服务器
  • 创建vmbr2(独立IPV6网关),使用ndppd解决宿主机对IPV6地址进行MAC校验的问题,支持开设带独立IPV6网络的服务器
  • 想查看完整设置可以执行cat /etc/network/interfaces查看,如需修改网关需要修改该文件,web端已经无法修改
  • 加载iptables并设置回源且允许NAT端口转发

简单的说,vmbr0负责v4的独立IP,vmbr1负责复杂v4/v6的NAT,vmbr2负责v6的独立IP

开独立IPV4的虚拟机时使用的vmbr0,gateway同宿主机,IPV4/CIDR使用同一网段的地址和相同的子网掩码,使用宿主机未绑定的IPV4地址做IPV4/CIDR,当然如果后续使用本套脚本无需关注这点细枝末节的东西

开NAT的IPV4的虚拟机时使用vmbr1,gateway使用172.16.1.1,IPV4/CIDR使用172.16.1.x/24,这里的x不能是1,当然如果后续使用本套脚本无需关注这点细枝末节的东西

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

这一步是可能需要你执行成功几分钟后重启系统,详见脚本最后执行完毕的提示,但重启可以保证部分隐藏设置加载成功,有条件务必重启一次服务器

到这一步主体安装完毕。

在物理机器上进行安装

本方法安装的Proxmox不可后续使用本项目的所有脚本。

本方法未大规模测试和适配,仅本人在本地机器上安装了PVE8.4,路由器本身使用的不是自动获取IP地址而是固定IP地址连接的方式,如有问题对应仓库开issues.

U盘刻录官方ISO

官方ISO下载地址:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

需要提前下载到本地

同时还需要一个读写速率比较好的U盘,用于制作启动盘,由于启动盘需要使用rufus进行启动盘制作,所以需要U盘格式化,需要确保U盘制作前为空U盘

rufus下载地址(下载到你的本地,不是U盘中):

https://rufus.ie/zh/

https://github.com/pbatard/rufus

刻录需要使用DD方式进行刻录,刻录完毕后U盘原数据会被完全擦除。

PVE主体安装

查找宿主机本身如何进入BIOS,进入BIOS后修改两处地方

  1. 安全启动需要关闭

  2. Boot的顺序需要将USB的顺序移动到第一位

然后保存设置,然后插入U盘,重新启动系统,选择使用图形界面进行安装

FQDN需要填写一个网址,可以填写类似 pve.spiritlhl.net 这样的网址,最好是你拥有的域名的一个子域名,不是实际的域名的话写成类似 pve.localsite.com 也行,后续不一定用得到

安装完毕后会自动关机重启,重启黑屏后可以拔掉USB,避免又从U盘重启安装了,当然如果忘了又重启到安装页面了,关闭机器后拔掉U盘再启动也行

无线网络配置

下载所需的压缩文件和shell脚本

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

下载完成后,解压压缩包,将wireless的文件夹拖入一个新的U盘的根目录,同时wireless.sh文件也得放到根目录。

U盘插到物理机器后,需要挂载U盘,这里的sdx1是第一条命令查询到的U盘的实际路径,需要自行修改

shell
fdisk -l
-mount /dev/sdx1 /mnt

U盘内的wireless.zip需要确保已解压,打开可见其中的deb文件

此时直接执行一键配置

shell
bash /mnt/wireless.sh

配置完毕会自动重启系统,重启后会有公共网络

配置脚本执行过程中会提示输入WIFI的名字和密码,由于纯CI环境无中文输入法,WIFI的名字必须仅英文数字组成,密码也是

其他相关默认配置

下载脚本,类似上面一步那样导入文件

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/default.sh

使用前务必确保curl ip.sb无问题

shell
bash default.sh

执行会非常耗时,但装完后会自带xfce的桌面环境,且换源阿里云,且去除无效订阅,且设置合并local和loacl-lvm,且设置清华镜像容器源

注意事项

物理机安装无限模块后不可使用NAT直接连接虚拟机接入网络,所以本项目后续的教程不支持该方法接入的网桥,本项目后续脚本不支持本方法安装的Proxmox.

目前可行的无线模块在PVE上使用的成功案例,都要求WIFI路由器接入网络的方式是自动获取IP地址(DHCP)(后续使用openwrt或ikuai或直接nat后虚拟机内网络可用),或可在路由器上修改静态路由表,如果WIFI路由器使用固定IP地址连接网络,暂时未找到成功案例。

`,80)]))}const u=i(l,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_pve_pve_install.md.aNT2nlcA.lean.js b/assets/guide_pve_pve_install.md.aNT2nlcA.lean.js deleted file mode 100644 index c5f0697894..0000000000 --- a/assets/guide_pve_pve_install.md.aNT2nlcA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"PVE主体安装","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_install.md","filePath":"guide/pve/pve_install.md","lastUpdated":1772422214000}'),l={name:"guide/pve/pve_install.md"};function p(h,s,n,r,o,c){return a(),e("div",null,s[0]||(s[0]=[t("",80)]))}const u=i(l,[["render",p]]);export{k as __pageData,u as default}; diff --git a/assets/guide_pve_pve_kvm.md.B2IGxG-S.js b/assets/guide_pve_pve_kvm.md.B2IGxG-S.js new file mode 100644 index 0000000000..82122678fd --- /dev/null +++ b/assets/guide_pve_pve_kvm.md.B2IGxG-S.js @@ -0,0 +1,12 @@ +import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Linux虚拟机(KVM/TCG)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_kvm.md","filePath":"guide/pve/pve_kvm.md","lastUpdated":1772424525000}'),e={name:"guide/pve/pve_kvm.md"};function n(p,s,h,d,r,k){return t(),a("div",null,s[0]||(s[0]=[l(`

Linux虚拟机(KVM/TCG)

SSH登录说明

开设出的虚拟机,默认生成的用户名可以不是root,此时你需要执行sudo -i切换为root用户

默认设置的用户名不是root时,未经过设置的默认的root密码是passwordoneclickvirt

登录SSH切换为root权限后,一定要修改root密码,可以使用以下命令修改

国际

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

国内

bash
bash <(curl -sSL https://cdn.spiritlhl.net/https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

开设带IPV6地址的虚拟机的注意事项

由于长期闲置IPV6不使用可能导致NDP广播缓存失效重置,一般闲置50分钟左右就会出现IPV6不可用的情况,俗称“IPV6断流”,此时需要设置一个定时任务

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

在开设出的虚拟机中执行上述命令,可保证IPV6网络一直被使用,不会失效断流

开设虚拟机可使用的镜像

  • 已预安装开启cloudinit
  • 开启SSH登陆
  • 预设置SSH监听V4和V6的22端口
  • 开启允许密码验证登陆
  • 开启允许root登陆
  • 部分预安装Qemu-guest-agent
  • 系统支持:
    • x86_64架构的详见 pve_kvm_imageskvm_images 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种
    • arm架构的详见 ubuntudebian 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种

单独开设NAT的虚拟化的虚拟机

  • 自动开设NAT服务器,默认使用Debian10镜像,因为该镜像占用最小
  • 可在命令中自定义需要使用的镜像,这里有给出配置好的镜像,镜像自带空间设置是2~10G硬盘,日常使用至少10G以上即可,除非某些镜像开不起来再增加硬盘大小
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 自定义内存大小推荐512MB内存
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloud-init配置好网络以及登陆信息,大概需要5分钟
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是/64的子网

使用方法

TIP

注意这里的用户名不能是纯数字,会造成cloudinit出问题,最好是纯英文或英文开头

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

各参数含义

shell
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6地址(留空默认N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

开设完毕可执行cat vm111查看信息,或到WEB端对应VM的NOTES中查看

以下为开设的示例VM的信息:

属性
VMID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小10G
SSH端口40001
80端口40002
443端口40003
内外网映射端口一致的区间50000到50025
系统debian11
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

删除指定虚拟机

  • 停止VM
  • 删除VM
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应VMID的虚拟机,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个VMID即可,可一次性删除多个

批量开设NAT的虚拟化的虚拟机

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成VM
  • 自动开设NAT服务器,选项留空默认使用debian11镜像,可自定义使用镜像名字,支持的系统名字详见上文支持的镜像列表
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloudinit配置好网络以及登陆信息,大概需要5分钟,每个虚拟机创建之间有间隔等待60秒避免突发性能不足
  • 默认批量开设的虚拟机网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

开设完毕可执行cat vmlog查看信息,或到WEB端对应VM的NOTES中查看

删除所有虚拟机

  • 删除所有VM
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
+iptables -t nat -F
+iptables -t filter -F
+service networking restart
+systemctl restart networking.service
+systemctl restart ndpresponder.service
+iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
+iptables-save > /etc/iptables/rules.v4
+rm -rf vmlog
+rm -rf vm*

TIP

PVE修改VM配置前都得停机先,再修改配置,修改完再启动,免得出现配置重载错误

开设独立IPV4地址的虚拟机

三个脚本,各取所需,各有优缺点。

前两个脚本不需要额外的IPV4地址事先绑定到vmbr0接口上,开设的虚拟机将直接绑定额外的IPV4地址。

最后一个脚本需要额外的IPV4地址事先绑定到vmbr0接口上,开设的虚拟机将做NAT全端口映射内网IPV4地址,不直接绑定额外的IPV4地址。

自动选择宿主机同一子网内的额外IPV4地址开设虚拟机

WARNING

使用前需要保证当前宿主机的IP段带了至少2个IP,且有空余的IP未配置,该空余的IP未绑定宿主机。

TIP

此时附加的IPV4地址是宿主机目前的IPV4地址顺位后面的地址, 比如目前宿主机地址是1.1.1.32然后1.1.1.33已经有虚拟机了,那么本脚本附加IP地址为1.1.1.34

  • 自动检测可用的IP区间,通过ping检测空余可使用的IP,选取其中之一绑定到虚拟机上
  • 如果宿主机自带IPV6子网将可选择是否附加上IPV6地址
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
  • 自动附加的IPV4地址与宿主机的IPV4地址是在同一个子网内的(IP地址前缀相同)
  • 在虚拟机内外进出流量都走绑定的额外IPV4的地址

使用方法

下载脚本

国际

shell
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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extra_ip.sh -o buildvm_extra_ip.sh && chmod +x buildvm_extra_ip.sh

各参数含义

shell
# ./buildvm_extra_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 独立IPV6(默认为N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_extra_ip.sh 152 root oneclick123 1 1024 10 debian12 local N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘
IPV6附加默认不附加

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

手动指定额外IPV4地址开设虚拟机

  • 需要手动在命令中指定IPV4地址,且带上子网长度
  • 如果宿主机自带IPV6子网将可选择是否附加上IPV6地址
  • 如果商家有给IPV4地址和子网长度,请仔细比对,按照下面示例的命令写参数
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网
  • 手动附加的IPV4地址与宿主机的IPV4地址是在不同子网内的(IP地址前缀不同),将使用宿主机IP地址做网关
  • 手动附加的IPV4地址与宿主机的IPV4地址是在同一个子网内的(IP地址前缀相同),将使用宿主机的网关做网关
  • 可选择是否指定虚拟机的MAC地址
  • 在虚拟机内外进出流量都走绑定的额外IPV4的地址

TIP

不同子网内的IP地址,如果附加时不指定MAC地址,那么路由器无法识别源 MAC 地址,流量将被标记为“滥用”,并“可能”导致服务器被阻止。 (如果使用Hetzner的独立服务器务建议提供附加IPV4地址对应的MAC地址防止被报告滥用)

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

各参数含义

shell
# ./buildvm_manual_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 IPV4地址 独立IPV6(默认为N) MAC地址(不提供时将不指定虚拟机的MAC地址)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_manual_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d/24 N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘 (系统盘)
IPV4地址a.b.c.d
子网/24 子网
IPV6
MAC地址

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

宿主机手动附加额外IPV4地址后再指定IPV4地址开设虚拟机

  • 需要自己在/etc/network/interfaces中给vmbr0添加额外的IPV4地址(注意chattr -i解锁文件修改后再chattr +i加锁回去)
  • 其他功能类似开设NAT的虚拟机,只不过这里映射不再是部分端口映射,也不再是映射到宿主机的IPV4地址上,而是全端口一一映射到额外的IPV4地址上
  • 在虚拟机外进入虚拟机的流量走绑定的额外IPV4的地址,在虚拟机内发出的流量走原有的宿主机的IPV4地址

TIP

务必保证开设前你能使用额外的IPV4地址通过SSH登录宿主机,但curl ip.sb却仍显示原来的宿主机IPV4地址

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

各参数含义

shell
# ./buildvm_fullnat_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 IPV4地址 独立IPV6(默认为N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_fullnat_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘 (系统盘)
IPV4地址a.b.c.d
IPV6

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

进出流量都走绑定的IPV4地址

执行

line="-A POSTROUTING -s 172.16.1.0\\/24 -o vmbr0 -j MASQUERADE"
+sed -i "\\|$line|d" /etc/iptables/rules.v4
+service netfilter-persistent restart

即可,但这会导致宿主机丧失开设非独立IPV4地址的NAT的虚拟机/容器的能力,慎重执行

执行后你只能开设独立IPV4地址的虚拟机了。

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际虚拟机仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应虚拟机编号的V6地址绑定到虚拟机上
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

各参数含义

shell
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

创建示例

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

上述命令意义为开设一个纯IPV6地址的虚拟机

参数
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

`,136)]))}const F=i(e,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_kvm.md.B2IGxG-S.lean.js b/assets/guide_pve_pve_kvm.md.B2IGxG-S.lean.js new file mode 100644 index 0000000000..ce1f346359 --- /dev/null +++ b/assets/guide_pve_pve_kvm.md.B2IGxG-S.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"Linux虚拟机(KVM/TCG)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_kvm.md","filePath":"guide/pve/pve_kvm.md","lastUpdated":1772424525000}'),e={name:"guide/pve/pve_kvm.md"};function n(p,s,h,d,r,k){return t(),a("div",null,s[0]||(s[0]=[l("",136)]))}const F=i(e,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_kvm.md.C0lcBrsp.js b/assets/guide_pve_pve_kvm.md.C0lcBrsp.js deleted file mode 100644 index 8220b241ec..0000000000 --- a/assets/guide_pve_pve_kvm.md.C0lcBrsp.js +++ /dev/null @@ -1,12 +0,0 @@ -import{_ as i,c as t,o as a,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Linux虚拟机(KVM/TCG)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_kvm.md","filePath":"guide/pve/pve_kvm.md","lastUpdated":1772422214000}'),h={name:"guide/pve/pve_kvm.md"};function e(p,s,n,d,k,r){return a(),t("div",null,s[0]||(s[0]=[l(`

Linux虚拟机(KVM/TCG)

SSH登录说明

开设出的虚拟机,默认生成的用户名可以不是root,此时你需要执行sudo -i切换为root用户

默认设置的用户名不是root时,未经过设置的默认的root密码是passwordoneclickvirt

登录SSH切换为root权限后,一定要修改root密码,可以使用以下命令修改

国际

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

国内

bash
bash <(curl -sSL https://cdn.spiritlhl.net/https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

开设带IPV6地址的虚拟机的注意事项

由于长期闲置IPV6不使用可能导致NDP广播缓存失效重置,一般闲置50分钟左右就会出现IPV6不可用的情况,俗称“IPV6断流”,此时需要设置一个定时任务

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

在开设出的虚拟机中执行上述命令,可保证IPV6网络一直被使用,不会失效断流

开设虚拟机可使用的镜像

  • 已预安装开启cloudinit
  • 开启SSH登陆
  • 预设置SSH监听V4和V6的22端口
  • 开启允许密码验证登陆
  • 开启允许root登陆
  • 部分预安装Qemu-guest-agent
  • 系统支持:
    • x86_64架构的详见 pve_kvm_imageskvm_images 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种
    • arm架构的详见 ubuntudebian 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种

单独开设NAT的虚拟化的虚拟机

  • 自动开设NAT服务器,默认使用Debian10镜像,因为该镜像占用最小
  • 可在命令中自定义需要使用的镜像,这里有给出配置好的镜像,镜像自带空间设置是2~10G硬盘,日常使用至少10G以上即可,除非某些镜像开不起来再增加硬盘大小
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 自定义内存大小推荐512MB内存
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloud-init配置好网络以及登陆信息,大概需要5分钟
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是/64的子网

使用方法

TIP

注意这里的用户名不能是纯数字,会造成cloudinit出问题,最好是纯英文或英文开头

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

各参数含义

shell
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6地址(留空默认N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

开设完毕可执行cat vm111查看信息,或到WEB端对应VM的NOTES中查看

以下为开设的示例VM的信息:

属性
VMID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小10G
SSH端口40001
80端口40002
443端口40003
内外网映射端口一致的区间50000到50025
系统debian11
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

删除指定虚拟机

  • 停止VM
  • 删除VM
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应VMID的虚拟机,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个VMID即可,可一次性删除多个

批量开设NAT的虚拟化的虚拟机

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成VM
  • 自动开设NAT服务器,选项留空默认使用debian11镜像,可自定义使用镜像名字,支持的系统名字详见上文支持的镜像列表
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloudinit配置好网络以及登陆信息,大概需要5分钟,每个虚拟机创建之间有间隔等待60秒避免突发性能不足
  • 默认批量开设的虚拟机网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

开设完毕可执行cat vmlog查看信息,或到WEB端对应VM的NOTES中查看

删除所有虚拟机

  • 删除所有VM
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
-iptables -t nat -F
-iptables -t filter -F
-service networking restart
-systemctl restart networking.service
-systemctl restart ndpresponder.service
-iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
-iptables-save > /etc/iptables/rules.v4
-rm -rf vmlog
-rm -rf vm*

TIP

PVE修改VM配置前都得停机先,再修改配置,修改完再启动,免得出现配置重载错误

开设独立IPV4地址的虚拟机

三个脚本,各取所需,各有优缺点。

前两个脚本不需要额外的IPV4地址事先绑定到vmbr0接口上,开设的虚拟机将直接绑定额外的IPV4地址。

最后一个脚本需要额外的IPV4地址事先绑定到vmbr0接口上,开设的虚拟机将做NAT全端口映射内网IPV4地址,不直接绑定额外的IPV4地址。

自动选择宿主机同一子网内的额外IPV4地址开设虚拟机

WARNING

使用前需要保证当前宿主机的IP段带了至少2个IP,且有空余的IP未配置,该空余的IP未绑定宿主机。

TIP

此时附加的IPV4地址是宿主机目前的IPV4地址顺位后面的地址, 比如目前宿主机地址是1.1.1.32然后1.1.1.33已经有虚拟机了,那么本脚本附加IP地址为1.1.1.34

  • 自动检测可用的IP区间,通过ping检测空余可使用的IP,选取其中之一绑定到虚拟机上
  • 如果宿主机自带IPV6子网将可选择是否附加上IPV6地址
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
  • 自动附加的IPV4地址与宿主机的IPV4地址是在同一个子网内的(IP地址前缀相同)
  • 在虚拟机内外进出流量都走绑定的额外IPV4的地址

使用方法

下载脚本

国际

shell
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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_extra_ip.sh -o buildvm_extra_ip.sh && chmod +x buildvm_extra_ip.sh

各参数含义

shell
# ./buildvm_extra_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 独立IPV6(默认为N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_extra_ip.sh 152 root oneclick123 1 1024 10 debian12 local N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘
IPV6附加默认不附加

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

手动指定额外IPV4地址开设虚拟机

  • 需要手动在命令中指定IPV4地址,且带上子网长度
  • 如果宿主机自带IPV6子网将可选择是否附加上IPV6地址
  • 如果商家有给IPV4地址和子网长度,请仔细比对,按照下面示例的命令写参数
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网
  • 手动附加的IPV4地址与宿主机的IPV4地址是在不同子网内的(IP地址前缀不同),将使用宿主机IP地址做网关
  • 手动附加的IPV4地址与宿主机的IPV4地址是在同一个子网内的(IP地址前缀相同),将使用宿主机的网关做网关
  • 可选择是否指定虚拟机的MAC地址
  • 在虚拟机内外进出流量都走绑定的额外IPV4的地址

TIP

不同子网内的IP地址,如果附加时不指定MAC地址,那么路由器无法识别源 MAC 地址,流量将被标记为“滥用”,并“可能”导致服务器被阻止。 (如果使用Hetzner的独立服务器务建议提供附加IPV4地址对应的MAC地址防止被报告滥用)

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_manual_ip.sh -o buildvm_manual_ip.sh && chmod +x buildvm_manual_ip.sh

各参数含义

shell
# ./buildvm_manual_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 IPV4地址 独立IPV6(默认为N) MAC地址(不提供时将不指定虚拟机的MAC地址)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_manual_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d/24 N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘 (系统盘)
IPV4地址a.b.c.d
子网/24 子网
IPV6
MAC地址

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

宿主机手动附加额外IPV4地址后再指定IPV4地址开设虚拟机

  • 需要自己在/etc/network/interfaces中给vmbr0添加额外的IPV4地址(注意chattr -i解锁文件修改后再chattr +i加锁回去)
  • 其他功能类似开设NAT的虚拟机,只不过这里映射不再是部分端口映射,也不再是映射到宿主机的IPV4地址上,而是全端口一一映射到额外的IPV4地址上
  • 在虚拟机外进入虚拟机的流量走绑定的额外IPV4的地址,在虚拟机内发出的流量走原有的宿主机的IPV4地址

TIP

务必保证开设前你能使用额外的IPV4地址通过SSH登录宿主机,但curl ip.sb却仍显示原来的宿主机IPV4地址

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_fullnat_ip.sh -o buildvm_fullnat_ip.sh && chmod +x buildvm_fullnat_ip.sh

各参数含义

shell
# ./buildvm_fullnat_ip.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘 IPV4地址 独立IPV6(默认为N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm_fullnat_ip.sh 152 root oneclick123 1 1024 10 debian12 local a.b.c.d N

上述命令意义为开设一个带独立IPV4地址的虚拟机

属性
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local盘 (系统盘)
IPV4地址a.b.c.d
IPV6

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

进出流量都走绑定的IPV4地址

执行

line="-A POSTROUTING -s 172.16.1.0\\/24 -o vmbr0 -j MASQUERADE"
-sed -i "\\|$line|d" /etc/iptables/rules.v4
-service netfilter-persistent restart

即可,但这会导致宿主机丧失开设非独立IPV4地址的NAT的虚拟机/容器的能力,慎重执行

执行后你只能开设独立IPV4地址的虚拟机了。

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际虚拟机仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应虚拟机编号的V6地址绑定到虚拟机上
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

各参数含义

shell
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

创建示例

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

上述命令意义为开设一个纯IPV6地址的虚拟机

参数
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

`,136)]))}const F=i(h,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_pve_pve_kvm.md.C0lcBrsp.lean.js b/assets/guide_pve_pve_kvm.md.C0lcBrsp.lean.js deleted file mode 100644 index 0a0426d327..0000000000 --- a/assets/guide_pve_pve_kvm.md.C0lcBrsp.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as t,o as a,ag as l}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"Linux虚拟机(KVM/TCG)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_kvm.md","filePath":"guide/pve/pve_kvm.md","lastUpdated":1772422214000}'),h={name:"guide/pve/pve_kvm.md"};function e(p,s,n,d,k,r){return a(),t("div",null,s[0]||(s[0]=[l("",136)]))}const F=i(h,[["render",e]]);export{c as __pageData,F as default}; diff --git a/assets/guide_pve_pve_lxc.md.-aGVp3t6.js b/assets/guide_pve_pve_lxc.md.-aGVp3t6.js deleted file mode 100644 index 3dde472371..0000000000 --- a/assets/guide_pve_pve_lxc.md.-aGVp3t6.js +++ /dev/null @@ -1,12 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"LXC容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_lxc.md","filePath":"guide/pve/pve_lxc.md","lastUpdated":1772422214000}'),h={name:"guide/pve/pve_lxc.md"};function e(p,s,n,k,d,r){return t(),a("div",null,s[0]||(s[0]=[l(`

LXC容器

WARNING

如果你需要在一台服务器上开启超过200个LXC容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

开设LXC容器可使用的镜像

x86_64:

自动修补镜像:https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

每日自动拉取进行编译和修补

手动修补镜像: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

其中的部分镜像有缺陷,不保证所有PVE可用,名字为 ubuntu16.04debian6centos7opensuse42.2opensuse42.3 非必要不要使用。

执行pveam available --section system查看官方可用的系统名字和版本号

优先级:自修补镜像(Proxmox-VE 5及其以下版本不支持) > 官方默认镜像(都支持)

已通过脚本自动识别版本使用对应镜像

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

可在上面的文件中查看支持的系统,其中列出的debian和ubuntu系统不要使用里面的别名,使用数字代号即可。

TIP

系统参数一律是小写的系统名字拼接版本号,如:debian11,ubuntu22等。 (自修补镜像支持一些偏门系统,如 centos6、centos7、debian8、debian9 等)

所有系统的CT默认用户名是root

TIP

当然有时候会存在特殊情况,version可能是current/base,此时系统参数仅使用英文系统名字即可,如 archlinux、gentoo、kali。

单独开设LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 自动开设NAT服务器,默认使用Debian11镜像,也可自定义系统
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部配置好网络以及登陆信息,大概需要3分钟
  • 默认开设的网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

各参数含义

shell
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6(默认为N)

测试示例

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

开设完毕可执行cat ct111查看信息,或在web端的NOTES查看

以下为开设的示例CT的信息:

属性
CTID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小5G
SSH端口20001
80端口20002
443端口20003
内外网映射端口一致的区间30000到30025
系统debian11
宿主机的存储盘local
IPV6

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

自定义删除指定容器

  • 停止CT
  • 删除CT
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应CTID的容器,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个CTID即可,可一次性删除多个

批量开设NAT的LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成CT容器,但需要注意的是宿主机内存记得开点swap免得机器炸了开SWAP点我跳转
  • 每个容器创建之间有间隔等待60秒避免突发性能不足
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

开设完毕可执行cat ctlog查看信息,或在web端的NOTES查看

删除所有CT

  • 删除所有CT
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
-rm -rf ct*
-iptables -t nat -F
-iptables -t filter -F
-ip6tables -t nat -F
-ip6tables -t filter -F
-rm -rf /usr/local/bin/ipv6_nat_rules.sh
-service networking restart
-systemctl restart networking.service
-systemctl restart ndpresponder.service
-iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
-iptables-save > /etc/iptables/rules.v4

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际容器仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应容器编号的V6地址绑定到容器上
  • 系统的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

各参数含义

shell
# ./buildct_onlyv6.sh CTID 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

创建示例

shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

上述命令意义为开设一个纯IPV6地址的容器

属性
容器类型CT
CTID152
用户名root
密码oneclick123
CPU核心数1
内存1024MB
硬盘10G
系统debian13
存储盘local盘 (系统盘)

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

`,76)]))}const F=i(h,[["render",e]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_lxc.md.-aGVp3t6.lean.js b/assets/guide_pve_pve_lxc.md.-aGVp3t6.lean.js deleted file mode 100644 index 66732a56be..0000000000 --- a/assets/guide_pve_pve_lxc.md.-aGVp3t6.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"LXC容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_lxc.md","filePath":"guide/pve/pve_lxc.md","lastUpdated":1772422214000}'),h={name:"guide/pve/pve_lxc.md"};function e(p,s,n,k,d,r){return t(),a("div",null,s[0]||(s[0]=[l("",76)]))}const F=i(h,[["render",e]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_lxc.md.BSeih7FS.js b/assets/guide_pve_pve_lxc.md.BSeih7FS.js new file mode 100644 index 0000000000..60c9c5b85b --- /dev/null +++ b/assets/guide_pve_pve_lxc.md.BSeih7FS.js @@ -0,0 +1,12 @@ +import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"LXC容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_lxc.md","filePath":"guide/pve/pve_lxc.md","lastUpdated":1772424525000}'),e={name:"guide/pve/pve_lxc.md"};function n(p,s,h,r,d,k){return t(),a("div",null,s[0]||(s[0]=[l(`

LXC容器

WARNING

如果你需要在一台服务器上开启超过200个LXC容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

开设LXC容器可使用的镜像

x86_64:

自动修补镜像:https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

每日自动拉取进行编译和修补

手动修补镜像: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

其中的部分镜像有缺陷,不保证所有PVE可用,名字为 ubuntu16.04debian6centos7opensuse42.2opensuse42.3 非必要不要使用。

执行pveam available --section system查看官方可用的系统名字和版本号

优先级:自修补镜像(Proxmox-VE 5及其以下版本不支持) > 官方默认镜像(都支持)

已通过脚本自动识别版本使用对应镜像

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

可在上面的文件中查看支持的系统,其中列出的debian和ubuntu系统不要使用里面的别名,使用数字代号即可。

TIP

系统参数一律是小写的系统名字拼接版本号,如:debian11,ubuntu22等。 (自修补镜像支持一些偏门系统,如 centos6、centos7、debian8、debian9 等)

所有系统的CT默认用户名是root

TIP

当然有时候会存在特殊情况,version可能是current/base,此时系统参数仅使用英文系统名字即可,如 archlinux、gentoo、kali。

单独开设LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 自动开设NAT服务器,默认使用Debian11镜像,也可自定义系统
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部配置好网络以及登陆信息,大概需要3分钟
  • 默认开设的网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

各参数含义

shell
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6(默认为N)

测试示例

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

开设完毕可执行cat ct111查看信息,或在web端的NOTES查看

以下为开设的示例CT的信息:

属性
CTID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小5G
SSH端口20001
80端口20002
443端口20003
内外网映射端口一致的区间30000到30025
系统debian11
宿主机的存储盘local
IPV6

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

自定义删除指定容器

  • 停止CT
  • 删除CT
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应CTID的容器,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个CTID即可,可一次性删除多个

批量开设NAT的LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成CT容器,但需要注意的是宿主机内存记得开点swap免得机器炸了开SWAP点我跳转
  • 每个容器创建之间有间隔等待60秒避免突发性能不足
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

开设完毕可执行cat ctlog查看信息,或在web端的NOTES查看

删除所有CT

  • 删除所有CT
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
+rm -rf ct*
+iptables -t nat -F
+iptables -t filter -F
+ip6tables -t nat -F
+ip6tables -t filter -F
+rm -rf /usr/local/bin/ipv6_nat_rules.sh
+service networking restart
+systemctl restart networking.service
+systemctl restart ndpresponder.service
+iptables-save | awk '{if($1=="COMMIT"){delete x}}$1=="-A"?!x[$0]++:1' | iptables-restore
+iptables-save > /etc/iptables/rules.v4

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际容器仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应容器编号的V6地址绑定到容器上
  • 系统的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

各参数含义

shell
# ./buildct_onlyv6.sh CTID 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

创建示例

shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

上述命令意义为开设一个纯IPV6地址的容器

属性
容器类型CT
CTID152
用户名root
密码oneclick123
CPU核心数1
内存1024MB
硬盘10G
系统debian13
存储盘local盘 (系统盘)

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

`,76)]))}const F=i(e,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_lxc.md.BSeih7FS.lean.js b/assets/guide_pve_pve_lxc.md.BSeih7FS.lean.js new file mode 100644 index 0000000000..628d5a5b41 --- /dev/null +++ b/assets/guide_pve_pve_lxc.md.BSeih7FS.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"LXC容器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_lxc.md","filePath":"guide/pve/pve_lxc.md","lastUpdated":1772424525000}'),e={name:"guide/pve/pve_lxc.md"};function n(p,s,h,r,d,k){return t(),a("div",null,s[0]||(s[0]=[l("",76)]))}const F=i(e,[["render",n]]);export{o as __pageData,F as default}; diff --git a/assets/guide_pve_pve_macos.md.BKxiSjd3.js b/assets/guide_pve_pve_macos.md.BKxiSjd3.js new file mode 100644 index 0000000000..3bfeed1d16 --- /dev/null +++ b/assets/guide_pve_pve_macos.md.BKxiSjd3.js @@ -0,0 +1,9 @@ +import{_ as a}from"./chunks/wk7.Bl1-W8YX.js";import{_ as i,c as e,o as t,ag as p}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/mac0.CofQ9vw_.png",n="/assets/mac00.DelKhhmr.png",c="/assets/mac1.D7yJtJrl.png",h="/assets/mac2.du7V_m90.png",o="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",r="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",k="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",u="/assets/mac9.DIA9P3VH.png",b="/assets/mac10.CZg7Yifb.png",F="/assets/mac11.P11nsmhn.png",y="/assets/mac12.DHTBO7ih.png",C="/assets/mac13.DDrsH3zK.png",v="/assets/mac14.dLHoMtJy.png",_="/assets/mac15.vkr7IxY1.png",B="/assets/mac16.CeB_3pKz.png",E="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",P="/assets/mac19.C_d085-7.png",f="/assets/mac20.DsWyqQaw.png",z="/assets/mac21.XZ5wILhH.png",N=JSON.parse('{"title":"开设MacOS虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_macos.md","filePath":"guide/pve/pve_macos.md","lastUpdated":1772424525000}'),S={name:"guide/pve/pve_macos.md"};function I(M,s,q,w,D,V){return t(),e("div",null,s[0]||(s[0]=[p(`

开设MacOS虚拟机

前置需求

系统和硬件配置要求 --> 检测环境

只有检测环境检测出宿主机支持KVM嵌套虚拟化时,才可以开设MACOS虚拟机,否则会被硬件识别无法开设。

前置环境设置

  • 自动识别 CPU 类型(AMD 或 Intel),并根据类型设置嵌套虚拟化参数。
  • 修改 GRUB 启动参数,启用 IOMMU 和禁用默认 framebuffer。
  • 添加 VFIO 模块支持,便于直通硬件设备。
  • 黑名单声卡和显卡驱动模块,避免与 macOS 冲突。
  • 配置 KVM 相关内核参数,忽略 MSR 错误,提高兼容性。
  • 修补 Proxmox 前端状态检测逻辑,绕过状态限制。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

执行成功后会显示15秒后重启本机,这是正常的流程,不重启无法使得内核参数生效。

系统镜像下载

  • 所有镜像已预装组件,体积较大(最小约4.9GB),下载与解压任务将后台挂起执行。
  • 镜像为完整系统含所有组件,无需联网即可引导使用。
  • 若系统盘空闲空间不足镜像大小的2倍,将拒绝下载。
  • 镜像为7z压缩格式,下载后需解压才能使用。
  • 可随时查看当前下载与解压任务状态,完成后方可创建虚拟机。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

shell
bash install_macos_images.sh

后台下载任务挂起执行后,可关闭SSH窗口,等待半小时到3个小时(具体等待时间取决于你的服务器带宽大小和连通性),下载iso的7z压缩包。

下载任务执行完毕后,查询显示当前下载任务为空时,就可以选择解压任务执行了,解压挂起执行等待的时间取决于你的服务器CPU性能。

当解压任务执行完毕,查询显示当前解压任务为空时,一切准备工作就算准备好了。

相同类型的任务可以并发,也可以随时取消某个任务,取消时需要输入PID的值。

通过 https://github.com/oneclickvirt/macos 制作的目前支持的镜像压缩包:

# 按系统发布时间从旧到新
+high-sierra.iso.7z (大小: 5.23GB)
+mojave.iso.7z (大小: 6.03GB)
+catalina.iso.7z (大小: 8.33GB)
+big‑sur.iso.7z (大小: 12.21GB)
+monterey.iso.7z (大小: 12.36GB)
+ventura.iso.7z (大小: 12.31GB)
+sonoma.iso.7z (大小: 14.41GB)
+sequoia.iso.7z (大小: 15.02GB)

MACOS虚拟机模板设置

  • 系统high-sierramojavecatalina需要至少2核4G内存40G硬盘进行开设
  • big‑sur及更新版本的MACOS系统需要至少6核6G内存50G硬盘进行开设
  • 系统版本越新(下载的序号越靠后)所需的硬件就越多
  • 所有镜像均为启动盘镜像,未设置任何个人数据,所以关于硬盘分配,登录信息设置,网络设置都需要后续按照说明手动设置
  • 需要手动在web端启动虚拟机,启动前可以查看所有模板是否符合预期再启动

下载模板脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

参数含义

shell
# ./buildvm_macos.sh VMID CPU核数 内存 硬盘 SSH端口 VNC端口 系统 存储盘 独立IPV6(留空默认N)

TIP

这块的硬盘大小只是你开设的虚拟机的硬盘大小,实际开设过程中,程序还会挂载引导盘和系统镜像,所以实际开设一个虚拟机的硬盘需求是 虚拟机硬盘大小+镜像本体大小+引导盘大小(500MB) 请时刻注意你的硬盘空间是否足够开设虚拟机

示例命令

以最旧的版本(high-sierra)为例,实验支持的配置如下(非常卡顿)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

模板开设完毕可执行cat vm100查看信息,或到WEB端对应VM的NOTES中查看

TIP

如果你不是通过本项目在Debian上安装的PVE,而是直接使用的官方ISO安装的PVE,且没有合并local和local-lvm分区,或者local分区未启用支持虚拟机磁盘类型,那么上面的一键命令中的local请改成local-lvm,需要使用支持虚拟机磁盘的分区进行虚拟机创建

以下为开设的示例VM的信息:

属性
VMID100
CPU核数2
内存大小4096MB
磁盘大小45G
SSH端口44022
VNC端口45901
系统high-sierra
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

MACOS系统引导和安装

前面的流程走完后,面板端可以看到一个灰色的虚拟机待启动

mac0

点击启动后,进入VNC面板,左侧选择框有一个全屏按钮,实际操作时建议全屏操作,避免分辨率问题

mac00

经过大概3分钟的引导盘加载后,屏幕中央靠左侧会显示有一个启动盘可用,直接点击或回车

然后又是大概3~5分钟的启动盘加载后,会出现四个选择框,选择Disk Utility点击进入

mac1

进入后可以看到有三个盘和一个镜像,找到那个盘大小大于40G且名字叫QEMU HARDDISK Media的盘,点击Erase

mac2

此时会出现一个弹窗,需要给name重命名为macos方便后续识别使用,然后点击Erase继续初始化

mac3

初始化完毕后,点击Done

mac4

此时需要退出Disk Utility界面,右上角点击Disk Utility选择Quit Disk Utility退出当前选择框

mac5

然后回到了之前那四个选择框那里,选择Install macOS XXXX(由于我在以Big Sur为示例安装,所以XXXX为Big Sur系统),点击continue

mac6

后续就是继续点击continue,然后点击Agree,然后又是点击Agree

mac7

mac8

mac9

直到又出现那三个盘,但在这块可以那个盘大小大于40G且名字叫macos的盘,选择它,然后点击continue

mac10

一段时间的文件复制硬盘加载(大概跑个12分钟)后,正式进入系统安装环节,这块看你宿主机在哪个地区选哪个

mac11

选择完地区后一路点击continue

mac12

mac13

直到出现数据迁移选项Migration Assistant,选择左下角的Not Now不导入用户数据

mac14

然后就会提示你创建用户,填写用户名和账户名,还有登录所需的密码,设置完毕后点击continue

mac15

然后后面就会一路畅通点击continue,直到系统安装完毕了

网络配置

由于是离线环境进行的系统安装,所以这块需要手动配置静态网络连接宿主机的网桥

右上角点击WIFI按钮,关闭WIFI后,点击Network Preferences ...

mac16

进入设置界面后,点击Advanced按钮,进入高级设置界面

mac17

TCP/IP这一栏填写静态网络配置

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

如果你需要配置IPV6网络,类比上面的IPV4设置,需要填写的会是虚拟机绑定的公网IPV6地址(PVE面板中的Note框有写),子网掩码填128,默认网关填写cat /usr/local/bin/pve_check_ipv6在宿主机执行后显示的地址。

mac18

DNS这一栏填写静态网络的DNS配置

一般加入8.8.8.81.1.1.1足够了,中国境内使用114.114.114.114即可。

mac19

填写完毕且apply后,设置的左上角会显示网络已连通

mac20

此时打开默认的浏览器,随便打开一个网址,都是可访问公网资源的,证明网络已配置成功

mac21

卸载iso镜像

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

Macos系统就是卸载opencore.isoxxxx(安装使用的系统镜像).iso,类似上面示例图片的Windows系统卸载win镜像和virtio镜像一样。

',101)]))}const O=i(S,[["render",I]]);export{N as __pageData,O as default}; diff --git a/assets/guide_pve_pve_macos.md.BKxiSjd3.lean.js b/assets/guide_pve_pve_macos.md.BKxiSjd3.lean.js new file mode 100644 index 0000000000..291f5ff013 --- /dev/null +++ b/assets/guide_pve_pve_macos.md.BKxiSjd3.lean.js @@ -0,0 +1 @@ +import{_ as a}from"./chunks/wk7.Bl1-W8YX.js";import{_ as i,c as e,o as t,ag as p}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/mac0.CofQ9vw_.png",n="/assets/mac00.DelKhhmr.png",c="/assets/mac1.D7yJtJrl.png",h="/assets/mac2.du7V_m90.png",o="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",r="/assets/mac5.QrcmrZyS.png",m="/assets/mac6.CEnQahaC.png",k="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",u="/assets/mac9.DIA9P3VH.png",b="/assets/mac10.CZg7Yifb.png",F="/assets/mac11.P11nsmhn.png",y="/assets/mac12.DHTBO7ih.png",C="/assets/mac13.DDrsH3zK.png",v="/assets/mac14.dLHoMtJy.png",_="/assets/mac15.vkr7IxY1.png",B="/assets/mac16.CeB_3pKz.png",E="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",P="/assets/mac19.C_d085-7.png",f="/assets/mac20.DsWyqQaw.png",z="/assets/mac21.XZ5wILhH.png",N=JSON.parse('{"title":"开设MacOS虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_macos.md","filePath":"guide/pve/pve_macos.md","lastUpdated":1772424525000}'),S={name:"guide/pve/pve_macos.md"};function I(M,s,q,w,D,V){return t(),e("div",null,s[0]||(s[0]=[p("",101)]))}const O=i(S,[["render",I]]);export{N as __pageData,O as default}; diff --git a/assets/guide_pve_pve_macos.md.Biskf-FQ.js b/assets/guide_pve_pve_macos.md.Biskf-FQ.js deleted file mode 100644 index 8fd56823ed..0000000000 --- a/assets/guide_pve_pve_macos.md.Biskf-FQ.js +++ /dev/null @@ -1,9 +0,0 @@ -import{_ as a}from"./chunks/wk7.Bl1-W8YX.js";import{_ as i,c as t,o as e,ag as p}from"./chunks/framework.CSeR4K32.js";const l="/assets/mac0.CofQ9vw_.png",n="/assets/mac00.DelKhhmr.png",h="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",o="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",r="/assets/mac5.QrcmrZyS.png",k="/assets/mac6.CEnQahaC.png",m="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",F="/assets/mac9.DIA9P3VH.png",u="/assets/mac10.CZg7Yifb.png",C="/assets/mac11.P11nsmhn.png",_="/assets/mac12.DHTBO7ih.png",b="/assets/mac13.DDrsH3zK.png",y="/assets/mac14.dLHoMtJy.png",v="/assets/mac15.vkr7IxY1.png",B="/assets/mac16.CeB_3pKz.png",E="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",P="/assets/mac19.C_d085-7.png",f="/assets/mac20.DsWyqQaw.png",S="/assets/mac21.XZ5wILhH.png",O=JSON.parse('{"title":"开设MacOS虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_macos.md","filePath":"guide/pve/pve_macos.md","lastUpdated":1772422214000}'),I={name:"guide/pve/pve_macos.md"};function M(q,s,D,V,A,w){return e(),t("div",null,s[0]||(s[0]=[p(`

开设MacOS虚拟机

前置需求

系统和硬件配置要求 --> 检测环境

只有检测环境检测出宿主机支持KVM嵌套虚拟化时,才可以开设MACOS虚拟机,否则会被硬件识别无法开设。

前置环境设置

  • 自动识别 CPU 类型(AMD 或 Intel),并根据类型设置嵌套虚拟化参数。
  • 修改 GRUB 启动参数,启用 IOMMU 和禁用默认 framebuffer。
  • 添加 VFIO 模块支持,便于直通硬件设备。
  • 黑名单声卡和显卡驱动模块,避免与 macOS 冲突。
  • 配置 KVM 相关内核参数,忽略 MSR 错误,提高兼容性。
  • 修补 Proxmox 前端状态检测逻辑,绕过状态限制。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

执行成功后会显示15秒后重启本机,这是正常的流程,不重启无法使得内核参数生效。

系统镜像下载

  • 所有镜像已预装组件,体积较大(最小约4.9GB),下载与解压任务将后台挂起执行。
  • 镜像为完整系统含所有组件,无需联网即可引导使用。
  • 若系统盘空闲空间不足镜像大小的2倍,将拒绝下载。
  • 镜像为7z压缩格式,下载后需解压才能使用。
  • 可随时查看当前下载与解压任务状态,完成后方可创建虚拟机。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

shell
bash install_macos_images.sh

后台下载任务挂起执行后,可关闭SSH窗口,等待半小时到3个小时(具体等待时间取决于你的服务器带宽大小和连通性),下载iso的7z压缩包。

下载任务执行完毕后,查询显示当前下载任务为空时,就可以选择解压任务执行了,解压挂起执行等待的时间取决于你的服务器CPU性能。

当解压任务执行完毕,查询显示当前解压任务为空时,一切准备工作就算准备好了。

相同类型的任务可以并发,也可以随时取消某个任务,取消时需要输入PID的值。

通过 https://github.com/oneclickvirt/macos 制作的目前支持的镜像压缩包:

# 按系统发布时间从旧到新
-high-sierra.iso.7z (大小: 5.23GB)
-mojave.iso.7z (大小: 6.03GB)
-catalina.iso.7z (大小: 8.33GB)
-big‑sur.iso.7z (大小: 12.21GB)
-monterey.iso.7z (大小: 12.36GB)
-ventura.iso.7z (大小: 12.31GB)
-sonoma.iso.7z (大小: 14.41GB)
-sequoia.iso.7z (大小: 15.02GB)

MACOS虚拟机模板设置

  • 系统high-sierramojavecatalina需要至少2核4G内存40G硬盘进行开设
  • big‑sur及更新版本的MACOS系统需要至少6核6G内存50G硬盘进行开设
  • 系统版本越新(下载的序号越靠后)所需的硬件就越多
  • 所有镜像均为启动盘镜像,未设置任何个人数据,所以关于硬盘分配,登录信息设置,网络设置都需要后续按照说明手动设置
  • 需要手动在web端启动虚拟机,启动前可以查看所有模板是否符合预期再启动

下载模板脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

参数含义

shell
# ./buildvm_macos.sh VMID CPU核数 内存 硬盘 SSH端口 VNC端口 系统 存储盘 独立IPV6(留空默认N)

TIP

这块的硬盘大小只是你开设的虚拟机的硬盘大小,实际开设过程中,程序还会挂载引导盘和系统镜像,所以实际开设一个虚拟机的硬盘需求是 虚拟机硬盘大小+镜像本体大小+引导盘大小(500MB) 请时刻注意你的硬盘空间是否足够开设虚拟机

示例命令

以最旧的版本(high-sierra)为例,实验支持的配置如下(非常卡顿)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

模板开设完毕可执行cat vm100查看信息,或到WEB端对应VM的NOTES中查看

TIP

如果你不是通过本项目在Debian上安装的PVE,而是直接使用的官方ISO安装的PVE,且没有合并local和local-lvm分区,或者local分区未启用支持虚拟机磁盘类型,那么上面的一键命令中的local请改成local-lvm,需要使用支持虚拟机磁盘的分区进行虚拟机创建

以下为开设的示例VM的信息:

属性
VMID100
CPU核数2
内存大小4096MB
磁盘大小45G
SSH端口44022
VNC端口45901
系统high-sierra
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

MACOS系统引导和安装

前面的流程走完后,面板端可以看到一个灰色的虚拟机待启动

mac0

点击启动后,进入VNC面板,左侧选择框有一个全屏按钮,实际操作时建议全屏操作,避免分辨率问题

mac00

经过大概3分钟的引导盘加载后,屏幕中央靠左侧会显示有一个启动盘可用,直接点击或回车

然后又是大概3~5分钟的启动盘加载后,会出现四个选择框,选择Disk Utility点击进入

mac1

进入后可以看到有三个盘和一个镜像,找到那个盘大小大于40G且名字叫QEMU HARDDISK Media的盘,点击Erase

mac2

此时会出现一个弹窗,需要给name重命名为macos方便后续识别使用,然后点击Erase继续初始化

mac3

初始化完毕后,点击Done

mac4

此时需要退出Disk Utility界面,右上角点击Disk Utility选择Quit Disk Utility退出当前选择框

mac5

然后回到了之前那四个选择框那里,选择Install macOS XXXX(由于我在以Big Sur为示例安装,所以XXXX为Big Sur系统),点击continue

mac6

后续就是继续点击continue,然后点击Agree,然后又是点击Agree

mac7

mac8

mac9

直到又出现那三个盘,但在这块可以那个盘大小大于40G且名字叫macos的盘,选择它,然后点击continue

mac10

一段时间的文件复制硬盘加载(大概跑个12分钟)后,正式进入系统安装环节,这块看你宿主机在哪个地区选哪个

mac11

选择完地区后一路点击continue

mac12

mac13

直到出现数据迁移选项Migration Assistant,选择左下角的Not Now不导入用户数据

mac14

然后就会提示你创建用户,填写用户名和账户名,还有登录所需的密码,设置完毕后点击continue

mac15

然后后面就会一路畅通点击continue,直到系统安装完毕了

网络配置

由于是离线环境进行的系统安装,所以这块需要手动配置静态网络连接宿主机的网桥

右上角点击WIFI按钮,关闭WIFI后,点击Network Preferences ...

mac16

进入设置界面后,点击Advanced按钮,进入高级设置界面

mac17

TCP/IP这一栏填写静态网络配置

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

如果你需要配置IPV6网络,类比上面的IPV4设置,需要填写的会是虚拟机绑定的公网IPV6地址(PVE面板中的Note框有写),子网掩码填128,默认网关填写cat /usr/local/bin/pve_check_ipv6在宿主机执行后显示的地址。

mac18

DNS这一栏填写静态网络的DNS配置

一般加入8.8.8.81.1.1.1足够了,中国境内使用114.114.114.114即可。

mac19

填写完毕且apply后,设置的左上角会显示网络已连通

mac20

此时打开默认的浏览器,随便打开一个网址,都是可访问公网资源的,证明网络已配置成功

mac21

卸载iso镜像

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

Macos系统就是卸载opencore.isoxxxx(安装使用的系统镜像).iso,类似上面示例图片的Windows系统卸载win镜像和virtio镜像一样。

',101)]))}const T=i(I,[["render",M]]);export{O as __pageData,T as default}; diff --git a/assets/guide_pve_pve_macos.md.Biskf-FQ.lean.js b/assets/guide_pve_pve_macos.md.Biskf-FQ.lean.js deleted file mode 100644 index dc8adfcd81..0000000000 --- a/assets/guide_pve_pve_macos.md.Biskf-FQ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a}from"./chunks/wk7.Bl1-W8YX.js";import{_ as i,c as t,o as e,ag as p}from"./chunks/framework.CSeR4K32.js";const l="/assets/mac0.CofQ9vw_.png",n="/assets/mac00.DelKhhmr.png",h="/assets/mac1.D7yJtJrl.png",c="/assets/mac2.du7V_m90.png",o="/assets/mac3.BCWQuf_Q.png",d="/assets/mac4.B0L5oLF9.png",r="/assets/mac5.QrcmrZyS.png",k="/assets/mac6.CEnQahaC.png",m="/assets/mac7.Cq44sm3y.png",g="/assets/mac8.CfhgXZ8s.png",F="/assets/mac9.DIA9P3VH.png",u="/assets/mac10.CZg7Yifb.png",C="/assets/mac11.P11nsmhn.png",_="/assets/mac12.DHTBO7ih.png",b="/assets/mac13.DDrsH3zK.png",y="/assets/mac14.dLHoMtJy.png",v="/assets/mac15.vkr7IxY1.png",B="/assets/mac16.CeB_3pKz.png",E="/assets/mac17.qkqeaTbW.png",x="/assets/mac18.ChbyoMxq.png",P="/assets/mac19.C_d085-7.png",f="/assets/mac20.DsWyqQaw.png",S="/assets/mac21.XZ5wILhH.png",O=JSON.parse('{"title":"开设MacOS虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_macos.md","filePath":"guide/pve/pve_macos.md","lastUpdated":1772422214000}'),I={name:"guide/pve/pve_macos.md"};function M(q,s,D,V,A,w){return e(),t("div",null,s[0]||(s[0]=[p("",101)]))}const T=i(I,[["render",M]]);export{O as __pageData,T as default}; diff --git a/assets/guide_pve_pve_precheck.md.BzrRoC6D.js b/assets/guide_pve_pve_precheck.md.BzrRoC6D.js new file mode 100644 index 0000000000..44932eb253 --- /dev/null +++ b/assets/guide_pve_pve_precheck.md.BzrRoC6D.js @@ -0,0 +1,3 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/pve_kvm_1.BEDy-Dxt.png",l="/assets/pve_kvm_2.C98l0GO8.png",n="/assets/pve_kvm_3.DzuyyWMo.png",F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_precheck.md","filePath":"guide/pve/pve_precheck.md","lastUpdated":1772424525000}'),h={name:"guide/pve/pve_precheck.md"};function r(d,s,k,c,o,g){return t(),a("div",null,s[0]||(s[0]=[e(`

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果有未适配的商家或机器欢迎联系@spiritlhl_bot,有空会尝试支持一下

WARNING

会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/pve

各种要求

建议debian在使用前尽量使用最新的稳定版本的系统

警告:一键安装PVE仅支持具有独立公网IPv4地址的服务器

本项目依赖固定的 IPV4 地址进行网络分配,不支持以下情况:

  • 动态 IPV4 的环境(如机器重启后 IP 会变更的服务器)
  • 无独立的公网 IPV4 的环境(如通过家庭路由器 NAT 上网,需 DHCP 获取地址的情况)

如您的服务器不具备可分配的公网固定 IPv4 地址,请勿使用本项目。

本项目的一键安装脚本只适配Debian系统,非Debian无法通过APT源安装,官方只给了Debian的镜像,其他系统只能使用ISO安装,或使用自定义分区和常见问题分区中的其他方式解决问题。

  • 系统要求:Debian 8+

TIP

建议debian12+而不是debian11,debian11在部分独立服务器上有网络重启的BUG。

  • 硬件要求:2核2G内存x86_64arm架构服务器硬盘至少20G
  • 可开KVM的硬件要求:VM-X或AMD-V支持 (部分VPS和全部独服支持)
  • 如果硬件或系统需求不满足,可使用incus批量开LXC容器跳转

如果使用IPV6隧道进行宿主机的IPV6子网附加,务必在PVE安装成功但网关未自动设置时在对应文件添加内容,不要在一开始(未安装PVE)就进行IPV6隧道的添加。

警告:如果宿主机是独立服务器无IPMI自己无法重装系统的,不要使用本脚本,请直接委托技术人员手动ISO安装PVE,不要使用本项目,否则可能造成失联(部分独立服务器的网络设置不支持热插拔)

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

检测环境

  • 本项目相关脚本执行前务必执行本脚本检测环境,如果不符合安装PVE的要求则无法使用后续的脚本
  • 检测本机IPV6的网络配置情况(有无IPV6都可安装,只是查询一下罢了)
  • 检测硬件配置是否满足最低要求
  • 检测硬件环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 检测系统环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 不可嵌套虚拟化KVM的服务器不推荐安装PVE,不如使用incus性能更好

国际

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

国内

bash
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

如果你需要更新IPV6信息再查询,那么执行以下命令后再查询

bash
rm -rf /usr/local/bin/pve_ipv6*
+rm -rf /usr/local/bin/pve_check_ipv6*
+rm -rf /usr/local/bin/pve_last_ipv6*

执行本项目的检测环境的命令,展示如下

图片

查询如上的只需使用下面的一键脚本自动创建虚拟机即可,无需手动再修改WEB端设置

图片

查询如上的在使用后续脚本创建了虚拟机后,可能需要手动修改WEB端设置,需要关闭对应每个虚拟机的硬件嵌套虚拟化,如下图

图片

先停止虚拟机再修改,修改完后再开机才能使用NOVNC,不关闭可能导致这个虚拟机有BUG无法使用

如果强行安装PVE开KVM,启动不了的也可以关闭这个选项试试能不能启动虚拟机,导致这些问题的原因就是上面说的,宿主机不支持嵌套虚拟化KVM进行加速

TIP

开设虚拟机前请使用screen挂起执行,避免开设时间过长,SSH不稳定导致中间执行中断



',46)]))}const u=i(h,[["render",r]]);export{F as __pageData,u as default}; diff --git a/assets/guide_pve_pve_precheck.md.BzrRoC6D.lean.js b/assets/guide_pve_pve_precheck.md.BzrRoC6D.lean.js new file mode 100644 index 0000000000..7dd86bd046 --- /dev/null +++ b/assets/guide_pve_pve_precheck.md.BzrRoC6D.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const p="/assets/pve_kvm_1.BEDy-Dxt.png",l="/assets/pve_kvm_2.C98l0GO8.png",n="/assets/pve_kvm_3.DzuyyWMo.png",F=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_precheck.md","filePath":"guide/pve/pve_precheck.md","lastUpdated":1772424525000}'),h={name:"guide/pve/pve_precheck.md"};function r(d,s,k,c,o,g){return t(),a("div",null,s[0]||(s[0]=[e("",46)]))}const u=i(h,[["render",r]]);export{F as __pageData,u as default}; diff --git a/assets/guide_pve_pve_precheck.md.DrQssrQR.js b/assets/guide_pve_pve_precheck.md.DrQssrQR.js deleted file mode 100644 index da15b3e6df..0000000000 --- a/assets/guide_pve_pve_precheck.md.DrQssrQR.js +++ /dev/null @@ -1,3 +0,0 @@ -import{_ as i,c as a,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const e="/assets/pve_kvm_1.BEDy-Dxt.png",l="/assets/pve_kvm_2.C98l0GO8.png",h="/assets/pve_kvm_3.DzuyyWMo.png",b=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_precheck.md","filePath":"guide/pve/pve_precheck.md","lastUpdated":1772422214000}'),n={name:"guide/pve/pve_precheck.md"};function r(k,s,d,c,o,g){return t(),a("div",null,s[0]||(s[0]=[p(`

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果有未适配的商家或机器欢迎联系@spiritlhl_bot,有空会尝试支持一下

WARNING

会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/pve

各种要求

建议debian在使用前尽量使用最新的稳定版本的系统

警告:一键安装PVE仅支持具有独立公网IPv4地址的服务器

本项目依赖固定的 IPV4 地址进行网络分配,不支持以下情况:

  • 动态 IPV4 的环境(如机器重启后 IP 会变更的服务器)
  • 无独立的公网 IPV4 的环境(如通过家庭路由器 NAT 上网,需 DHCP 获取地址的情况)

如您的服务器不具备可分配的公网固定 IPv4 地址,请勿使用本项目。

本项目的一键安装脚本只适配Debian系统,非Debian无法通过APT源安装,官方只给了Debian的镜像,其他系统只能使用ISO安装,或使用自定义分区和常见问题分区中的其他方式解决问题。

  • 系统要求:Debian 8+

TIP

建议debian12+而不是debian11,debian11在部分独立服务器上有网络重启的BUG。

  • 硬件要求:2核2G内存x86_64arm架构服务器硬盘至少20G
  • 可开KVM的硬件要求:VM-X或AMD-V支持 (部分VPS和全部独服支持)
  • 如果硬件或系统需求不满足,可使用incus批量开LXC容器跳转

如果使用IPV6隧道进行宿主机的IPV6子网附加,务必在PVE安装成功但网关未自动设置时在对应文件添加内容,不要在一开始(未安装PVE)就进行IPV6隧道的添加。

警告:如果宿主机是独立服务器无IPMI自己无法重装系统的,不要使用本脚本,请直接委托技术人员手动ISO安装PVE,不要使用本项目,否则可能造成失联(部分独立服务器的网络设置不支持热插拔)

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

检测环境

  • 本项目相关脚本执行前务必执行本脚本检测环境,如果不符合安装PVE的要求则无法使用后续的脚本
  • 检测本机IPV6的网络配置情况(有无IPV6都可安装,只是查询一下罢了)
  • 检测硬件配置是否满足最低要求
  • 检测硬件环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 检测系统环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 不可嵌套虚拟化KVM的服务器不推荐安装PVE,不如使用incus性能更好

国际

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

国内

bash
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

如果你需要更新IPV6信息再查询,那么执行以下命令后再查询

bash
rm -rf /usr/local/bin/pve_ipv6*
-rm -rf /usr/local/bin/pve_check_ipv6*
-rm -rf /usr/local/bin/pve_last_ipv6*

执行本项目的检测环境的命令,展示如下

图片

查询如上的只需使用下面的一键脚本自动创建虚拟机即可,无需手动再修改WEB端设置

图片

查询如上的在使用后续脚本创建了虚拟机后,可能需要手动修改WEB端设置,需要关闭对应每个虚拟机的硬件嵌套虚拟化,如下图

图片

先停止虚拟机再修改,修改完后再开机才能使用NOVNC,不关闭可能导致这个虚拟机有BUG无法使用

如果强行安装PVE开KVM,启动不了的也可以关闭这个选项试试能不能启动虚拟机,导致这些问题的原因就是上面说的,宿主机不支持嵌套虚拟化KVM进行加速

TIP

开设虚拟机前请使用screen挂起执行,避免开设时间过长,SSH不稳定导致中间执行中断



',46)]))}const u=i(n,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_pve_pve_precheck.md.DrQssrQR.lean.js b/assets/guide_pve_pve_precheck.md.DrQssrQR.lean.js deleted file mode 100644 index e5894217c1..0000000000 --- a/assets/guide_pve_pve_precheck.md.DrQssrQR.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as p}from"./chunks/framework.CSeR4K32.js";const e="/assets/pve_kvm_1.BEDy-Dxt.png",l="/assets/pve_kvm_2.C98l0GO8.png",h="/assets/pve_kvm_3.DzuyyWMo.png",b=JSON.parse('{"title":"前言","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_precheck.md","filePath":"guide/pve/pve_precheck.md","lastUpdated":1772422214000}'),n={name:"guide/pve/pve_precheck.md"};function r(k,s,d,c,o,g){return t(),a("div",null,s[0]||(s[0]=[p("",46)]))}const u=i(n,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_pve_pve_qa.md.CE0i3bgE.js b/assets/guide_pve_pve_qa.md.CE0i3bgE.js deleted file mode 100644 index a51221d254..0000000000 --- a/assets/guide_pve_pve_qa.md.CE0i3bgE.js +++ /dev/null @@ -1,14 +0,0 @@ -import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/onlinepkg.-C5qKOrj.png",p="/assets/dns0.DDagSewr.png",F=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_qa.md","filePath":"guide/pve/pve_qa.md","lastUpdated":1772422214000}'),l={name:"guide/pve/pve_qa.md"};function h(r,s,o,k,d,c){return e(),i("div",null,s[0]||(s[0]=[t(`

解惑

执行脚本不到30秒机器就掉线了

原装系统执行

systemctl restart networking

看看是不是直接掉线,如果是那就是机器原生有问题,热插拔或者dhcp导致的网络无法自重启,此时建议更换宿主机的系统或DD一个新系统尝试

一般来说这种情况都是出现在独服的Debian11系统上,切换为Debian12系统就没问题了

安装PVE失败且报错显示某些安装包不存在

执行下述命令查询apt的源

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

如果看到

deb file://
-deb cdrom:[

这种开头的行,那么证明宿主机使用的是本地源而不是网络源,需要替换/etc/apt/sources.list的源,如

图片

一样替换为网络源才可使用PVE一键安装脚本进行安装。

替换网络源

国内服务器可使用

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

国外服务器可使用

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

进行apt源的替换

安装PVE成功但重启后失联

如果什么机器安装PVE成功后WEB可用,但重启失联,请安装成功PVE后,重启前执行以下命令再重启

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
-if ! grep -q "^post-up /sbin/ethtool" /etc/network/interfaces; then
-    chattr -i /etc/network/interfaces
-    echo "post-up /sbin/ethtool -K $auto_interface tx off rx off" >> /etc/network/interfaces
-    chattr +i /etc/network/interfaces
-fi

然后将重启失联的机器报给 @spiritlhl_bot 待更新脚本自动修复

安装PVE成功但重启后无法解析网址

常见于低版本的Debian系统(云服务器)安装PVE重启后无论访问什么网址都报错

curl: (6) Could not resolve host:

此时查看文件

cat /etc/resolv.conf

可发现无nameserver开头的语句

需要在web端这个页面设置DNS

screenshot-1708136079861

设置完成后再次查看文件会发现有如下内容

search .
-nameserver 8.8.8.8
-nameserver 8.8.4.4

此时再去请求网址就能解析成功了

安装PVE失败或非Debian系统

如果有什么机器安装不了,着急的可以尝试使用以下仓库的脚本先重装为debian12先

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

此时dd后的系统用户名为root,密码为oneclickvirt139

如果不成功,请查看 https://github.com/leitbogioro/Tools 中的issues和说明,一个常见的问题是机器是raid0不是raid10,需要加参数指定raid的值

如果有空或者还是不行,请联系 @spiritlhl_bot 尝试

非Debian系统也可使用自定义分区的内容自行尝试

开设centos7发现报错CGroupV1不支持怎么办

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

不小心删除了NAT的映射规则怎么办

先查看

cat /etc/iptables/rules.v4

检测是否有问题,且备份数据到本地避免被覆盖

然后再使用下面的命令映射回来

shell
iptables -t nat -F
-iptables -t filter -F
-service networking restart
-systemctl restart networking.service
-cat /etc/iptables/rules.v4 | iptables-restore

检测是不是商家虚标IPV6子网大小导致无法开设独立IPV6地址的虚拟机/容器

使用以下命令在纯净的未安装ProxmoxVE的机器上测试实际的子网掩码大小

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

如果检测结果为128证明商家虚标子网大小,仅一个IPV6地址无法额外分配给虚拟机/容器。

还有一种情况,就是商家只给了权限附加,实际上没有给完整的IPV6子网到机器上,典型的如 virtfusion 这种阿三面板,需要后台一个个加IPV6的IP进去,这种情况下也无法开设。

virtfusion的客服对于这种情况的说明:

您获得的所有IPv6地址块均为1个/64,但您需要自行将它们一个个添加并路由到VPS。
-添加1个IPv6地址后,您需要ping网关(在控制面板的网络设置下),然后ping该IPv6地址,之后对添加的每个IPv6地址重复此操作。

宿主机的IPV6网段更换需要对应更新配置

需要更新三个地方:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ 中的带ipv6的文件

更新完毕后,重启宿主机再进行开设,应该就可以使用新的网段了

在现有的 PVE 中纳管新的 PVE(创建 / 加入集群)

为了将两个独立的 Proxmox VE 实例组成一个集群,需满足以下前提条件:

集群前提条件

  1. 主机名唯一
    两个节点的 hostname 不可相同,避免命名冲突。建议使用诸如 pve1pve2 等命名方式。

  2. VMID 唯一
    两台 PVE 上不能存在相同 VMID 的虚拟机或容器。若存在冲突,请调整 VMID 以避免合并时发生冲突。

  3. 网络互通、延迟低
    两台主机之间必须能互相 ping 通,建议网络延迟低(局域网或高速公网),以保障集群通信质量。

创建集群(在任意节点执行)

  1. 登录主节点(如 pve1)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Create Cluster
  3. 输入集群名称(Cluster Name)。
  4. 选择要用于集群通信的网卡(如仅有公网 IP,可选择此网卡)。
  5. 点击 Create 创建集群。
  6. 创建成功后,点击 Join Information,复制该页面显示的信息备用。

PS: 在哪个节点上创建集群都可以,集群中不分主从节点。

加入集群(在第二个节点执行)

  1. 登录待加入节点(如 pve2)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Join Cluster
  3. pve1Join Information 粘贴到输入框中。
  4. 填入 pve1 上具的 root 用户密码到 Peer Password
  5. 点击 Join 开始加入过程。
  6. 等待页面提示成功后,刷新页面或重新登录,即可看到两个节点已组成集群。

集群优势

  • 集群节点间可共享资源、迁移虚拟机。
  • 互传 ISO 镜像或模板更加便捷。

目前已验证的VPS商家

可开设KVM虚拟化的NAT的商家

spartanhost 中的独立服务器的Debian12(Debian11有问题)

interserver 中的VPS或独立服务器

frantech 中的拉斯维加斯第二档

eugamehost 中的美国凤凰城黑五促销款

amhost 中的测试款

digitalocean 中的 Perminu Intel 和 Regular 4核款

skrime 中的 AMD Ryzen KVM Server 最低配款

webdock 中的 AMD KVM Server

4vps 中的 俄罗斯和希腊 测试款

adtaq 中的最低配存储KVM服务器

nocix 中的独立服务器

online.net 中的低配独立服务器的Debian12(Debian11有问题)

OVH 中的 Public Cloud 服务器 需要使用以下命令dd为纯净系统后安装

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

此时dd后的系统用户名为root,密码为oneclickvirt139

如果不成功,请查看 https://github.com/leitbogioro/Tools 中的issues和说明。一个常见的问题是OVH独立服务器进行dd,需要源系统默认重装为raid1的debian12,然后用参数指定dd为raid0,才能成功,使用如下命令

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

只可开设LXC虚拟化的NAT的商家

腾讯云 中的无忧款和特惠款(学生机)

spectraip 中的KVM服务器

Linode 中美国专用CPU的最低配

hosthatch 中的特价高配服务器

hetzner 的cloud服务器

rackdog 的浮动IP的服务器

vultr 的Cloud普通服务器

azure 的普通机器

scaleway 中的ARM架构的服务器

aws 中的ec2实例

Google cloud platform - GCP 的 AMD 服务器

`,115)]))}const u=a(l,[["render",h]]);export{F as __pageData,u as default}; diff --git a/assets/guide_pve_pve_qa.md.CE0i3bgE.lean.js b/assets/guide_pve_pve_qa.md.CE0i3bgE.lean.js deleted file mode 100644 index 82d4cea540..0000000000 --- a/assets/guide_pve_pve_qa.md.CE0i3bgE.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.CSeR4K32.js";const n="/assets/onlinepkg.-C5qKOrj.png",p="/assets/dns0.DDagSewr.png",F=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_qa.md","filePath":"guide/pve/pve_qa.md","lastUpdated":1772422214000}'),l={name:"guide/pve/pve_qa.md"};function h(r,s,o,k,d,c){return e(),i("div",null,s[0]||(s[0]=[t("",115)]))}const u=a(l,[["render",h]]);export{F as __pageData,u as default}; diff --git a/assets/guide_pve_pve_qa.md.Cb_sHsYT.js b/assets/guide_pve_pve_qa.md.Cb_sHsYT.js new file mode 100644 index 0000000000..065a7b03a9 --- /dev/null +++ b/assets/guide_pve_pve_qa.md.Cb_sHsYT.js @@ -0,0 +1,14 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/onlinepkg.-C5qKOrj.png",p="/assets/dns0.DDagSewr.png",b=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_qa.md","filePath":"guide/pve/pve_qa.md","lastUpdated":1772424525000}'),l={name:"guide/pve/pve_qa.md"};function r(h,s,o,d,c,k){return e(),i("div",null,s[0]||(s[0]=[n(`

解惑

执行脚本不到30秒机器就掉线了

原装系统执行

systemctl restart networking

看看是不是直接掉线,如果是那就是机器原生有问题,热插拔或者dhcp导致的网络无法自重启,此时建议更换宿主机的系统或DD一个新系统尝试

一般来说这种情况都是出现在独服的Debian11系统上,切换为Debian12系统就没问题了

安装PVE失败且报错显示某些安装包不存在

执行下述命令查询apt的源

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

如果看到

deb file://
+deb cdrom:[

这种开头的行,那么证明宿主机使用的是本地源而不是网络源,需要替换/etc/apt/sources.list的源,如

图片

一样替换为网络源才可使用PVE一键安装脚本进行安装。

替换网络源

国内服务器可使用

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

国外服务器可使用

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

进行apt源的替换

安装PVE成功但重启后失联

如果什么机器安装PVE成功后WEB可用,但重启失联,请安装成功PVE后,重启前执行以下命令再重启

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
+if ! grep -q "^post-up /sbin/ethtool" /etc/network/interfaces; then
+    chattr -i /etc/network/interfaces
+    echo "post-up /sbin/ethtool -K $auto_interface tx off rx off" >> /etc/network/interfaces
+    chattr +i /etc/network/interfaces
+fi

然后将重启失联的机器报给 @spiritlhl_bot 待更新脚本自动修复

安装PVE成功但重启后无法解析网址

常见于低版本的Debian系统(云服务器)安装PVE重启后无论访问什么网址都报错

curl: (6) Could not resolve host:

此时查看文件

cat /etc/resolv.conf

可发现无nameserver开头的语句

需要在web端这个页面设置DNS

screenshot-1708136079861

设置完成后再次查看文件会发现有如下内容

search .
+nameserver 8.8.8.8
+nameserver 8.8.4.4

此时再去请求网址就能解析成功了

安装PVE失败或非Debian系统

如果有什么机器安装不了,着急的可以尝试使用以下仓库的脚本先重装为debian12先

bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

此时dd后的系统用户名为root,密码为oneclickvirt139

如果不成功,请查看 https://github.com/leitbogioro/Tools 中的issues和说明,一个常见的问题是机器是raid0不是raid10,需要加参数指定raid的值

如果有空或者还是不行,请联系 @spiritlhl_bot 尝试

非Debian系统也可使用自定义分区的内容自行尝试

开设centos7发现报错CGroupV1不支持怎么办

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

不小心删除了NAT的映射规则怎么办

先查看

cat /etc/iptables/rules.v4

检测是否有问题,且备份数据到本地避免被覆盖

然后再使用下面的命令映射回来

shell
iptables -t nat -F
+iptables -t filter -F
+service networking restart
+systemctl restart networking.service
+cat /etc/iptables/rules.v4 | iptables-restore

检测是不是商家虚标IPV6子网大小导致无法开设独立IPV6地址的虚拟机/容器

使用以下命令在纯净的未安装ProxmoxVE的机器上测试实际的子网掩码大小

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

如果检测结果为128证明商家虚标子网大小,仅一个IPV6地址无法额外分配给虚拟机/容器。

还有一种情况,就是商家只给了权限附加,实际上没有给完整的IPV6子网到机器上,典型的如 virtfusion 这种阿三面板,需要后台一个个加IPV6的IP进去,这种情况下也无法开设。

virtfusion的客服对于这种情况的说明:

您获得的所有IPv6地址块均为1个/64,但您需要自行将它们一个个添加并路由到VPS。
+添加1个IPv6地址后,您需要ping网关(在控制面板的网络设置下),然后ping该IPv6地址,之后对添加的每个IPv6地址重复此操作。

宿主机的IPV6网段更换需要对应更新配置

需要更新三个地方:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ 中的带ipv6的文件

更新完毕后,重启宿主机再进行开设,应该就可以使用新的网段了

在现有的 PVE 中纳管新的 PVE(创建 / 加入集群)

为了将两个独立的 Proxmox VE 实例组成一个集群,需满足以下前提条件:

集群前提条件

  1. 主机名唯一
    两个节点的 hostname 不可相同,避免命名冲突。建议使用诸如 pve1pve2 等命名方式。

  2. VMID 唯一
    两台 PVE 上不能存在相同 VMID 的虚拟机或容器。若存在冲突,请调整 VMID 以避免合并时发生冲突。

  3. 网络互通、延迟低
    两台主机之间必须能互相 ping 通,建议网络延迟低(局域网或高速公网),以保障集群通信质量。

创建集群(在任意节点执行)

  1. 登录主节点(如 pve1)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Create Cluster
  3. 输入集群名称(Cluster Name)。
  4. 选择要用于集群通信的网卡(如仅有公网 IP,可选择此网卡)。
  5. 点击 Create 创建集群。
  6. 创建成功后,点击 Join Information,复制该页面显示的信息备用。

PS: 在哪个节点上创建集群都可以,集群中不分主从节点。

加入集群(在第二个节点执行)

  1. 登录待加入节点(如 pve2)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Join Cluster
  3. pve1Join Information 粘贴到输入框中。
  4. 填入 pve1 上具的 root 用户密码到 Peer Password
  5. 点击 Join 开始加入过程。
  6. 等待页面提示成功后,刷新页面或重新登录,即可看到两个节点已组成集群。

集群优势

  • 集群节点间可共享资源、迁移虚拟机。
  • 互传 ISO 镜像或模板更加便捷。

目前已验证的VPS商家

可开设KVM虚拟化的NAT的商家

spartanhost 中的独立服务器的Debian12(Debian11有问题)

interserver 中的VPS或独立服务器

frantech 中的拉斯维加斯第二档

eugamehost 中的美国凤凰城黑五促销款

amhost 中的测试款

digitalocean 中的 Perminu Intel 和 Regular 4核款

skrime 中的 AMD Ryzen KVM Server 最低配款

webdock 中的 AMD KVM Server

4vps 中的 俄罗斯和希腊 测试款

adtaq 中的最低配存储KVM服务器

nocix 中的独立服务器

online.net 中的低配独立服务器的Debian12(Debian11有问题)

OVH 中的 Public Cloud 服务器 需要使用以下命令dd为纯净系统后安装

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

此时dd后的系统用户名为root,密码为oneclickvirt139

如果不成功,请查看 https://github.com/leitbogioro/Tools 中的issues和说明。一个常见的问题是OVH独立服务器进行dd,需要源系统默认重装为raid1的debian12,然后用参数指定dd为raid0,才能成功,使用如下命令

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

只可开设LXC虚拟化的NAT的商家

腾讯云 中的无忧款和特惠款(学生机)

spectraip 中的KVM服务器

Linode 中美国专用CPU的最低配

hosthatch 中的特价高配服务器

hetzner 的cloud服务器

rackdog 的浮动IP的服务器

vultr 的Cloud普通服务器

azure 的普通机器

scaleway 中的ARM架构的服务器

aws 中的ec2实例

Google cloud platform - GCP 的 AMD 服务器

`,115)]))}const u=a(l,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_pve_pve_qa.md.Cb_sHsYT.lean.js b/assets/guide_pve_pve_qa.md.Cb_sHsYT.lean.js new file mode 100644 index 0000000000..1c731e40c0 --- /dev/null +++ b/assets/guide_pve_pve_qa.md.Cb_sHsYT.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o as e,ag as n}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/onlinepkg.-C5qKOrj.png",p="/assets/dns0.DDagSewr.png",b=JSON.parse('{"title":"解惑","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_qa.md","filePath":"guide/pve/pve_qa.md","lastUpdated":1772424525000}'),l={name:"guide/pve/pve_qa.md"};function r(h,s,o,d,c,k){return e(),i("div",null,s[0]||(s[0]=[n("",115)]))}const u=a(l,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_pve_pve_thanks.md.CYx9bTZM.js b/assets/guide_pve_pve_thanks.md.OEVM-z7H.js similarity index 92% rename from assets/guide_pve_pve_thanks.md.CYx9bTZM.js rename to assets/guide_pve_pve_thanks.md.OEVM-z7H.js index bb04d6273d..846ba6477d 100644 --- a/assets/guide_pve_pve_thanks.md.CYx9bTZM.js +++ b/assets/guide_pve_pve_thanks.md.OEVM-z7H.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/pve_thanks.md","filePath":"guide/pve/pve_thanks.md","lastUpdated":1772422214000}'),p={name:"guide/pve/pve_thanks.md"};function n(i,r,h,s,l,m){return a(),t("div",null,r[0]||(r[0]=[o('

致谢

https://forum.proxmox.com/

https://blog.ilolicon.com/archives/615

https://github.com/Ella-Alinda/somescripts/blob/main/nat.sh

https://pve.proxmox.com/pve-docs/qm.1.html

https://down.idc.wiki/Image/realServer-Template/

https://mirrors.tuna.tsinghua.edu.cn/proxmox/

https://github.com/roacn/pve/blob/main/pve.sh

https://github.com/spiritLHLS/lxc

https://github.com/leitbogioro/Tools

https://github.com/jiangcuo/Proxmox-Port

https://gitlab.com/minkebox/pimox

https://github.com/jiangcuo/run_proxmox_in_docker

https://github.com/yoursunny/ndpresponder

https://github.com/SuperManito/LinuxMirrors

感谢 @Ella-Alinda 提供的PVE指导

',16)]))}const b=e(p,[["render",n]]);export{g as __pageData,b as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/pve_thanks.md","filePath":"guide/pve/pve_thanks.md","lastUpdated":1772424525000}'),p={name:"guide/pve/pve_thanks.md"};function n(i,r,h,s,l,m){return a(),t("div",null,r[0]||(r[0]=[o('

致谢

https://forum.proxmox.com/

https://blog.ilolicon.com/archives/615

https://github.com/Ella-Alinda/somescripts/blob/main/nat.sh

https://pve.proxmox.com/pve-docs/qm.1.html

https://down.idc.wiki/Image/realServer-Template/

https://mirrors.tuna.tsinghua.edu.cn/proxmox/

https://github.com/roacn/pve/blob/main/pve.sh

https://github.com/spiritLHLS/lxc

https://github.com/leitbogioro/Tools

https://github.com/jiangcuo/Proxmox-Port

https://gitlab.com/minkebox/pimox

https://github.com/jiangcuo/run_proxmox_in_docker

https://github.com/yoursunny/ndpresponder

https://github.com/SuperManito/LinuxMirrors

感谢 @Ella-Alinda 提供的PVE指导

',16)]))}const b=e(p,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/guide_pve_pve_thanks.md.CYx9bTZM.lean.js b/assets/guide_pve_pve_thanks.md.OEVM-z7H.lean.js similarity index 55% rename from assets/guide_pve_pve_thanks.md.CYx9bTZM.lean.js rename to assets/guide_pve_pve_thanks.md.OEVM-z7H.lean.js index 03facfd341..d923c9c3a2 100644 --- a/assets/guide_pve_pve_thanks.md.CYx9bTZM.lean.js +++ b/assets/guide_pve_pve_thanks.md.OEVM-z7H.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.CSeR4K32.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/pve_thanks.md","filePath":"guide/pve/pve_thanks.md","lastUpdated":1772422214000}'),p={name:"guide/pve/pve_thanks.md"};function n(i,r,h,s,l,m){return a(),t("div",null,r[0]||(r[0]=[o("",16)]))}const b=e(p,[["render",n]]);export{g as __pageData,b as default}; +import{_ as e,c as t,o as a,ag as o}from"./chunks/framework.QPV3Ar9-.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/pve/pve_thanks.md","filePath":"guide/pve/pve_thanks.md","lastUpdated":1772424525000}'),p={name:"guide/pve/pve_thanks.md"};function n(i,r,h,s,l,m){return a(),t("div",null,r[0]||(r[0]=[o("",16)]))}const b=e(p,[["render",n]]);export{g as __pageData,b as default}; diff --git a/assets/guide_pve_pve_windows.md.CgcOlWEK.js b/assets/guide_pve_pve_windows.md.CgcOlWEK.js new file mode 100644 index 0000000000..0d1e4714c7 --- /dev/null +++ b/assets/guide_pve_pve_windows.md.CgcOlWEK.js @@ -0,0 +1,2 @@ +import{_ as e}from"./chunks/wk7.Bl1-W8YX.js";import{_ as s,c,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const d="/assets/kvm.CI48mv3H.png",t="/assets/dlwiniso.BxXucu9m.png",p="/assets/dlwiniso1.CQyxWlSu.png",r="/assets/general.BkOp2iK4.png",n="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",g="/assets/disks.BJniy5pO.png",m="/assets/cpu.DedcVQ_T.png",_="/assets/memory.CH7Gxf76.png",h="/assets/network.DPXM5W42.png",w="/assets/finish.Cf6DgPp1.png",u="/assets/start.vjgB4hml.png",v="/assets/gic1.XkdPXihx.png",k="/assets/gic2.s5VB7-xp.png",b="/assets/gic3.2zLznATL.png",y="/assets/gic4.CX3t8C19.png",x="/assets/gic5.pjwHWuhn.png",C="/assets/gic6.BnmyenL0.png",z="/assets/gic7.ZYHWzF5W.png",P="/assets/gic8.BwCbmRgC.png",f="/assets/gic9.62-9wTBo.png",q="/assets/net1.CUyp8ayS.png",V="/assets/net2.BP2m5XnQ.png",I="/assets/net3.BJFg7Me5.png",S="/assets/net4.CANZtcPE.png",D="/assets/virtio.CUVhk14O.png",E="/assets/lower2.SPGPKJ4N.png",B="/assets/lower1.DFw6c1iw.png",O="/assets/nodisk.CH47I8Tu.png",N="/assets/nodisk1.gZ09o2py.png",M="/assets/nodisk2.Do6XEKMW.png",W="/assets/nodisk3.1vBQc75S.png",K="/assets/nodisk4.CJjHGgtp.png",L="/assets/wk4.K5XvE6uQ.png",T="/assets/wk5.BEJ5BAWW.png",U="/assets/wk6.D9MKwk3w.png",X="/assets/wk1.BGnwsbrE.png",H="/assets/wk2.BasdNK2d.png",G="/assets/wk3.CWstwLHH.png",oo=JSON.parse('{"title":"通过PVE开设Windows虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_windows.md","filePath":"guide/pve/pve_windows.md","lastUpdated":1772424525000}'),A={name:"guide/pve/pve_windows.md"};function R(Q,o,F,J,$,j){return i(),c("div",null,o[0]||(o[0]=[a('

通过PVE开设Windows虚拟机

开设时选择KVM虚拟化还是QEMU的TCG仿真

宿主机本身如果支持嵌套虚拟化,那么就可用hostkvm64qemu64类型的CPU

从性能上来说,host > kvm64 > qemu64

qemu类型虚拟化性能损耗很多

如果本身不支持嵌套虚拟化,那么只能用qemu64类型的CPU,且需要在启动虚拟机前修改Options[选项]中的KVM hardware virtualization[KVM硬件虚拟化]

设置为no取消Enabled[启用]的勾选

kvm

如果你实在不清楚本机是否支持嵌套虚拟化,那么查看 系统与硬件配置要求 --> 检测环境 检测确保可用(含尝试性启用功能)

它的主体逻辑在

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

推荐直接使用本教程中的PVE的 系统和硬件配置要求 --> 环境检测 进行一键检测,或者如下检测逻辑:

egrep -c '(vmx|svm)' /proc/cpuinfo 检测是否为1

cat /sys/module/kvm_intel/parameters/nested是否存在且为1

lsmod | grep -q kvm检测是否已加载

这些都支持的时候,选host类型才100%无问题,其他情况下使用可能存在未知报错自行尝试。

使用带virtio的iso镜像文件开设

1.下载镜像

安装需要提前下载镜像文件local(pve) --> ISO images --> Download from URL

下载链接URL:可使用

https://github.com/ILLKX/Windows-VirtIO

中的文件链接,文件名字File Name:win.iso

download

点击下载Download,下载完成后当前的页面可见win.iso的文件大小,可见格式为iso。

downloaded

2.设置模板

页面顶部右上角点击Create VM

General窗口中,Resource Pool:勾选mypoolName填写win,然后点击Next

general

OS窗口中,ISO image勾选win.isoGuest OS勾选TypeMicrosoft Windows类型,Version选择当前ISOwin的版本,示例下载是2022,就选11/2022类型,然后点击Next

OS

System窗口中,Graphic card勾选VirtIO-GPU类型,Machine勾选q35类型,SCSI Controller勾选VirtIO SCSI类型,BIOS勾选Default (SeaBIOS)类型,然后点击Next

system

Disk窗口中,Cache勾选Write Back类型,Disk size (GiB)填写你要分配的硬盘大小,一般不小于20Storage选择存储在哪个盘,示例只有系统盘local所以就选loacl,然后点击Next

disk

CPU窗口中,Cores填写所需核数,CPU类型按照前面描述的方法选择,然后点击Next

cpu

Memory窗口中,Memory (MiB)填写所需内存大小,然后点击Next

memory

Network窗口中,Bridge勾选vmbr1类型,Model勾选VirtIO (paravirtualized)类型,Firewall取消勾选,然后点击Next

Network

Confirm窗口中,点击Finish

finish

3.图形化配置安装

左侧点击设置好的模板,右上角点击Start启动虚拟机,然后点击Console进入VNC界面,等待操作系统启动。

console

然后在VNC中点击下一页,然后点击现在安装,然后点击我没有产品密钥,然后勾选接受许可,点击下一页,然后勾选自定义安装

win0

win1

win2

win3

win4

然后如果镜像本身带virtio,那么应该可见可选系统存储的硬盘及其大小,选中后点击下一页

win5

win6

然后等待系统安装,应该会自动重启几次,大概耗时10分钟以上。

win7

安装完成后首次登录会要求设置密码,正常设置即可

win8

设置完成后,NOVNC页面左侧有一个弹出框,点击第一个按钮,然后根据登录提示,点击Ctrl+Alt+最后一个按钮,进入登录页面。

4.初始化网络

由于通过本项目设置的PVE是静态网络,所以登陆后需要手动修改绑定的IP地址,不通过DHCP

在桌面右下角右击点出打开 网络和Internet设置,点击后,在弹出的设置页面中点击更改适配器设置

win9

然后在网络链接中勾选以太网,点击更改此连接的设置

win10

在弹出框中点击Internet协议版本4(TCP/IPV4)选中后点击属性

win11

在新弹出的弹出框中,选择并点击使用下面的IP地址(s),然后分别填入

IP地址(I):172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码(U):255.255.255.0

默认网关(D):172.16.1.1

然后选择点击使用下面的DNS服务器地址(E),分别填入

8.8.8.8
+144.144.144.144

然后右下角点击确定,注意不要勾选退出时验证

win12

然后其他弹出框都选确定就行了,然后本虚拟机就有网络了。

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用不带virtio的iso镜像开设

1.下载镜像

无virtio的win镜像下载可使用

https://github.com/ILLKX/Windows

这块的镜像

virtio的iso镜像可使用

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

下载

virtio也可以只下载msi包,本地用软件打包成iso压缩格式再本地上传到ProxmoxVE中也可以

这样的话包小一些,前者官方的是包含所有WIN镜像支持的包总计500MB左右,后者自己打包5MB左右

2.virtio导入

注意这里的导入在ProxmoxVE的8.x及之后的版本中,OS这一栏默认可选择virtio启动加载,如图所示

virtio

而在更低版本的ProxmoxVE中,比如7.x和6.x的版本,OS这一栏默认无法选择virtio启动加载

lower

需要手动在Hardware[硬件]中点击Add[添加]添加CD/DVD Drive选择下载好的virtioISO文件

lower

然后其他的一切照常,直到

nodisk

这块找不到硬盘,需要选择加载驱动程序

nodisk

然后选择驱动盘virtio的,点击打开,从amd64那导入对应系统名字的驱动

nodisk

我的是windows server 2019的镜像所以导入的是2k19的驱动,导入完毕后选择导入的驱动,点击下一页

nodisk

nodisk

这样就能看得到硬盘了,选中后继续后续的安装步骤,选中后继续后续的安装步骤如同前面的教程,直到系统安装完毕,进入桌面。

3.通过virtio-win-guest-tools安装驱动

此时安装成功,出现桌面后,还需要手动安装驱动

打开VirtIO驱动所在的CD光驱目录,最下面有一个virtio-win-guest-tools程序,会安装用到的virtio驱动,这个驱动也会包含virtio的网卡驱动

wk

wk

wk

点击安装完毕后就安装上网卡驱动了,后续网络设置参考前面的初始化网络的教程

4.安装网卡驱动(备选)

此时安装成功,出现桌面后,还需要手动安装网卡驱动才能连通网络:

  1. 打开 控制面板设备管理器
  2. 找到 以太网控制器,右键选择 更新驱动程序
  3. 选择 浏览我的计算机以查找驱动程序软件 (R)
  4. 浏览到VirtIO驱动所在的CD光驱目录
  5. 打开其中的 NetKVM 文件夹
  6. 根据当前系统版本选择对应的驱动文件夹(和上面相同的操作,我会选择2k19文件夹,里面的amd64驱动)
  7. 确认安装,完成后即可成功加载VirtIO的网卡驱动

wk

wk

wk

后续网络设置参考前面的初始化网络的教程

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

',132)]))}const eo=s(A,[["render",R]]);export{oo as __pageData,eo as default}; diff --git a/assets/guide_pve_pve_windows.md.CgcOlWEK.lean.js b/assets/guide_pve_pve_windows.md.CgcOlWEK.lean.js new file mode 100644 index 0000000000..fa42694d1a --- /dev/null +++ b/assets/guide_pve_pve_windows.md.CgcOlWEK.lean.js @@ -0,0 +1 @@ +import{_ as e}from"./chunks/wk7.Bl1-W8YX.js";import{_ as s,c,o as i,ag as a}from"./chunks/framework.QPV3Ar9-.js";const d="/assets/kvm.CI48mv3H.png",t="/assets/dlwiniso.BxXucu9m.png",p="/assets/dlwiniso1.CQyxWlSu.png",r="/assets/general.BkOp2iK4.png",n="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",g="/assets/disks.BJniy5pO.png",m="/assets/cpu.DedcVQ_T.png",_="/assets/memory.CH7Gxf76.png",h="/assets/network.DPXM5W42.png",w="/assets/finish.Cf6DgPp1.png",u="/assets/start.vjgB4hml.png",v="/assets/gic1.XkdPXihx.png",k="/assets/gic2.s5VB7-xp.png",b="/assets/gic3.2zLznATL.png",y="/assets/gic4.CX3t8C19.png",x="/assets/gic5.pjwHWuhn.png",C="/assets/gic6.BnmyenL0.png",z="/assets/gic7.ZYHWzF5W.png",P="/assets/gic8.BwCbmRgC.png",f="/assets/gic9.62-9wTBo.png",q="/assets/net1.CUyp8ayS.png",V="/assets/net2.BP2m5XnQ.png",I="/assets/net3.BJFg7Me5.png",S="/assets/net4.CANZtcPE.png",D="/assets/virtio.CUVhk14O.png",E="/assets/lower2.SPGPKJ4N.png",B="/assets/lower1.DFw6c1iw.png",O="/assets/nodisk.CH47I8Tu.png",N="/assets/nodisk1.gZ09o2py.png",M="/assets/nodisk2.Do6XEKMW.png",W="/assets/nodisk3.1vBQc75S.png",K="/assets/nodisk4.CJjHGgtp.png",L="/assets/wk4.K5XvE6uQ.png",T="/assets/wk5.BEJ5BAWW.png",U="/assets/wk6.D9MKwk3w.png",X="/assets/wk1.BGnwsbrE.png",H="/assets/wk2.BasdNK2d.png",G="/assets/wk3.CWstwLHH.png",oo=JSON.parse('{"title":"通过PVE开设Windows虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_windows.md","filePath":"guide/pve/pve_windows.md","lastUpdated":1772424525000}'),A={name:"guide/pve/pve_windows.md"};function R(Q,o,F,J,$,j){return i(),c("div",null,o[0]||(o[0]=[a("",132)]))}const eo=s(A,[["render",R]]);export{oo as __pageData,eo as default}; diff --git a/assets/guide_pve_pve_windows.md.DtZLGn1u.js b/assets/guide_pve_pve_windows.md.DtZLGn1u.js deleted file mode 100644 index 886b3c550c..0000000000 --- a/assets/guide_pve_pve_windows.md.DtZLGn1u.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as e}from"./chunks/wk7.Bl1-W8YX.js";import{_ as c,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const d="/assets/kvm.CI48mv3H.png",p="/assets/dlwiniso.BxXucu9m.png",a="/assets/dlwiniso1.CQyxWlSu.png",r="/assets/general.BkOp2iK4.png",n="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",m="/assets/disks.BJniy5pO.png",g="/assets/cpu.DedcVQ_T.png",_="/assets/memory.CH7Gxf76.png",h="/assets/network.DPXM5W42.png",w="/assets/finish.Cf6DgPp1.png",v="/assets/start.vjgB4hml.png",u="/assets/gic1.XkdPXihx.png",k="/assets/gic2.s5VB7-xp.png",b="/assets/gic3.2zLznATL.png",x="/assets/gic4.CX3t8C19.png",C="/assets/gic5.pjwHWuhn.png",P="/assets/gic6.BnmyenL0.png",f="/assets/gic7.ZYHWzF5W.png",q="/assets/gic8.BwCbmRgC.png",V="/assets/gic9.62-9wTBo.png",I="/assets/net1.CUyp8ayS.png",S="/assets/net2.BP2m5XnQ.png",D="/assets/net3.BJFg7Me5.png",E="/assets/net4.CANZtcPE.png",B="/assets/virtio.CUVhk14O.png",O="/assets/lower2.SPGPKJ4N.png",N="/assets/lower1.DFw6c1iw.png",M="/assets/nodisk.CH47I8Tu.png",W="/assets/nodisk1.gZ09o2py.png",y="/assets/nodisk2.Do6XEKMW.png",K="/assets/nodisk3.1vBQc75S.png",L="/assets/nodisk4.CJjHGgtp.png",T="/assets/wk4.K5XvE6uQ.png",U="/assets/wk5.BEJ5BAWW.png",X="/assets/wk6.D9MKwk3w.png",H="/assets/wk1.BGnwsbrE.png",G="/assets/wk2.BasdNK2d.png",z="/assets/wk3.CWstwLHH.png",oo=JSON.parse('{"title":"通过PVE开设Windows虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_windows.md","filePath":"guide/pve/pve_windows.md","lastUpdated":1772422214000}'),A={name:"guide/pve/pve_windows.md"};function R(Q,o,F,J,$,j){return t(),s("div",null,o[0]||(o[0]=[i('

通过PVE开设Windows虚拟机

开设时选择KVM虚拟化还是QEMU的TCG仿真

宿主机本身如果支持嵌套虚拟化,那么就可用hostkvm64qemu64类型的CPU

从性能上来说,host > kvm64 > qemu64

qemu类型虚拟化性能损耗很多

如果本身不支持嵌套虚拟化,那么只能用qemu64类型的CPU,且需要在启动虚拟机前修改Options[选项]中的KVM hardware virtualization[KVM硬件虚拟化]

设置为no取消Enabled[启用]的勾选

kvm

如果你实在不清楚本机是否支持嵌套虚拟化,那么查看 系统与硬件配置要求 --> 检测环境 检测确保可用(含尝试性启用功能)

它的主体逻辑在

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

推荐直接使用本教程中的PVE的 系统和硬件配置要求 --> 环境检测 进行一键检测,或者如下检测逻辑:

egrep -c '(vmx|svm)' /proc/cpuinfo 检测是否为1

cat /sys/module/kvm_intel/parameters/nested是否存在且为1

lsmod | grep -q kvm检测是否已加载

这些都支持的时候,选host类型才100%无问题,其他情况下使用可能存在未知报错自行尝试。

使用带virtio的iso镜像文件开设

1.下载镜像

安装需要提前下载镜像文件local(pve) --> ISO images --> Download from URL

下载链接URL:可使用

https://github.com/ILLKX/Windows-VirtIO

中的文件链接,文件名字File Name:win.iso

download

点击下载Download,下载完成后当前的页面可见win.iso的文件大小,可见格式为iso。

downloaded

2.设置模板

页面顶部右上角点击Create VM

General窗口中,Resource Pool:勾选mypoolName填写win,然后点击Next

general

OS窗口中,ISO image勾选win.isoGuest OS勾选TypeMicrosoft Windows类型,Version选择当前ISOwin的版本,示例下载是2022,就选11/2022类型,然后点击Next

OS

System窗口中,Graphic card勾选VirtIO-GPU类型,Machine勾选q35类型,SCSI Controller勾选VirtIO SCSI类型,BIOS勾选Default (SeaBIOS)类型,然后点击Next

system

Disk窗口中,Cache勾选Write Back类型,Disk size (GiB)填写你要分配的硬盘大小,一般不小于20Storage选择存储在哪个盘,示例只有系统盘local所以就选loacl,然后点击Next

disk

CPU窗口中,Cores填写所需核数,CPU类型按照前面描述的方法选择,然后点击Next

cpu

Memory窗口中,Memory (MiB)填写所需内存大小,然后点击Next

memory

Network窗口中,Bridge勾选vmbr1类型,Model勾选VirtIO (paravirtualized)类型,Firewall取消勾选,然后点击Next

Network

Confirm窗口中,点击Finish

finish

3.图形化配置安装

左侧点击设置好的模板,右上角点击Start启动虚拟机,然后点击Console进入VNC界面,等待操作系统启动。

console

然后在VNC中点击下一页,然后点击现在安装,然后点击我没有产品密钥,然后勾选接受许可,点击下一页,然后勾选自定义安装

win0

win1

win2

win3

win4

然后如果镜像本身带virtio,那么应该可见可选系统存储的硬盘及其大小,选中后点击下一页

win5

win6

然后等待系统安装,应该会自动重启几次,大概耗时10分钟以上。

win7

安装完成后首次登录会要求设置密码,正常设置即可

win8

设置完成后,NOVNC页面左侧有一个弹出框,点击第一个按钮,然后根据登录提示,点击Ctrl+Alt+最后一个按钮,进入登录页面。

4.初始化网络

由于通过本项目设置的PVE是静态网络,所以登陆后需要手动修改绑定的IP地址,不通过DHCP

在桌面右下角右击点出打开 网络和Internet设置,点击后,在弹出的设置页面中点击更改适配器设置

win9

然后在网络链接中勾选以太网,点击更改此连接的设置

win10

在弹出框中点击Internet协议版本4(TCP/IPV4)选中后点击属性

win11

在新弹出的弹出框中,选择并点击使用下面的IP地址(s),然后分别填入

IP地址(I):172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码(U):255.255.255.0

默认网关(D):172.16.1.1

然后选择点击使用下面的DNS服务器地址(E),分别填入

8.8.8.8
-144.144.144.144

然后右下角点击确定,注意不要勾选退出时验证

win12

然后其他弹出框都选确定就行了,然后本虚拟机就有网络了。

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用不带virtio的iso镜像开设

1.下载镜像

无virtio的win镜像下载可使用

https://github.com/ILLKX/Windows

这块的镜像

virtio的iso镜像可使用

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

下载

virtio也可以只下载msi包,本地用软件打包成iso压缩格式再本地上传到ProxmoxVE中也可以

这样的话包小一些,前者官方的是包含所有WIN镜像支持的包总计500MB左右,后者自己打包5MB左右

2.virtio导入

注意这里的导入在ProxmoxVE的8.x及之后的版本中,OS这一栏默认可选择virtio启动加载,如图所示

virtio

而在更低版本的ProxmoxVE中,比如7.x和6.x的版本,OS这一栏默认无法选择virtio启动加载

lower

需要手动在Hardware[硬件]中点击Add[添加]添加CD/DVD Drive选择下载好的virtioISO文件

lower

然后其他的一切照常,直到

nodisk

这块找不到硬盘,需要选择加载驱动程序

nodisk

然后选择驱动盘virtio的,点击打开,从amd64那导入对应系统名字的驱动

nodisk

我的是windows server 2019的镜像所以导入的是2k19的驱动,导入完毕后选择导入的驱动,点击下一页

nodisk

nodisk

这样就能看得到硬盘了,选中后继续后续的安装步骤,选中后继续后续的安装步骤如同前面的教程,直到系统安装完毕,进入桌面。

3.通过virtio-win-guest-tools安装驱动

此时安装成功,出现桌面后,还需要手动安装驱动

打开VirtIO驱动所在的CD光驱目录,最下面有一个virtio-win-guest-tools程序,会安装用到的virtio驱动,这个驱动也会包含virtio的网卡驱动

wk

wk

wk

点击安装完毕后就安装上网卡驱动了,后续网络设置参考前面的初始化网络的教程

4.安装网卡驱动(备选)

此时安装成功,出现桌面后,还需要手动安装网卡驱动才能连通网络:

  1. 打开 控制面板设备管理器
  2. 找到 以太网控制器,右键选择 更新驱动程序
  3. 选择 浏览我的计算机以查找驱动程序软件 (R)
  4. 浏览到VirtIO驱动所在的CD光驱目录
  5. 打开其中的 NetKVM 文件夹
  6. 根据当前系统版本选择对应的驱动文件夹(和上面相同的操作,我会选择2k19文件夹,里面的amd64驱动)
  7. 确认安装,完成后即可成功加载VirtIO的网卡驱动

wk

wk

wk

后续网络设置参考前面的初始化网络的教程

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

',132)]))}const eo=c(A,[["render",R]]);export{oo as __pageData,eo as default}; diff --git a/assets/guide_pve_pve_windows.md.DtZLGn1u.lean.js b/assets/guide_pve_pve_windows.md.DtZLGn1u.lean.js deleted file mode 100644 index a5d781c6bb..0000000000 --- a/assets/guide_pve_pve_windows.md.DtZLGn1u.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./chunks/wk7.Bl1-W8YX.js";import{_ as c,c as s,o as t,ag as i}from"./chunks/framework.CSeR4K32.js";const d="/assets/kvm.CI48mv3H.png",p="/assets/dlwiniso.BxXucu9m.png",a="/assets/dlwiniso1.CQyxWlSu.png",r="/assets/general.BkOp2iK4.png",n="/assets/os.CX7bMEp5.png",l="/assets/system.C_AmkiPg.png",m="/assets/disks.BJniy5pO.png",g="/assets/cpu.DedcVQ_T.png",_="/assets/memory.CH7Gxf76.png",h="/assets/network.DPXM5W42.png",w="/assets/finish.Cf6DgPp1.png",v="/assets/start.vjgB4hml.png",u="/assets/gic1.XkdPXihx.png",k="/assets/gic2.s5VB7-xp.png",b="/assets/gic3.2zLznATL.png",x="/assets/gic4.CX3t8C19.png",C="/assets/gic5.pjwHWuhn.png",P="/assets/gic6.BnmyenL0.png",f="/assets/gic7.ZYHWzF5W.png",q="/assets/gic8.BwCbmRgC.png",V="/assets/gic9.62-9wTBo.png",I="/assets/net1.CUyp8ayS.png",S="/assets/net2.BP2m5XnQ.png",D="/assets/net3.BJFg7Me5.png",E="/assets/net4.CANZtcPE.png",B="/assets/virtio.CUVhk14O.png",O="/assets/lower2.SPGPKJ4N.png",N="/assets/lower1.DFw6c1iw.png",M="/assets/nodisk.CH47I8Tu.png",W="/assets/nodisk1.gZ09o2py.png",y="/assets/nodisk2.Do6XEKMW.png",K="/assets/nodisk3.1vBQc75S.png",L="/assets/nodisk4.CJjHGgtp.png",T="/assets/wk4.K5XvE6uQ.png",U="/assets/wk5.BEJ5BAWW.png",X="/assets/wk6.D9MKwk3w.png",H="/assets/wk1.BGnwsbrE.png",G="/assets/wk2.BasdNK2d.png",z="/assets/wk3.CWstwLHH.png",oo=JSON.parse('{"title":"通过PVE开设Windows虚拟机","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/pve/pve_windows.md","filePath":"guide/pve/pve_windows.md","lastUpdated":1772422214000}'),A={name:"guide/pve/pve_windows.md"};function R(Q,o,F,J,$,j){return t(),s("div",null,o[0]||(o[0]=[i("",132)]))}const eo=c(A,[["render",R]]);export{oo as __pageData,eo as default}; diff --git a/assets/incomplete_bashvm.md.BPKxitFB.js b/assets/incomplete_bashvm.md.ulBcWfGK.js similarity index 85% rename from assets/incomplete_bashvm.md.BPKxitFB.js rename to assets/incomplete_bashvm.md.ulBcWfGK.js index 58c7091288..e743a663ec 100644 --- a/assets/incomplete_bashvm.md.BPKxitFB.js +++ b/assets/incomplete_bashvm.md.ulBcWfGK.js @@ -1 +1 @@ -import{_ as e,c as t,o as r,ag as o}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/bashvm.md","filePath":"incomplete/bashvm.md","lastUpdated":1772422214000}'),s={name:"incomplete/bashvm.md"};function h(n,a,l,i,p,m){return r(),t("div",null,a[0]||(a[0]=[o('

仓库

https://github.com/babywhale321/bashvm

https://bashvm.com/

说明

如果你想深入了解怎么开设一个虚拟机,怎么转发端口,那么这个项目将完全从底层开始,一步步教你如何开设虚拟机

缺点

非常的繁琐,非常的耗时,不如别的项目快速设置网络和开设

',7)]))}const _=e(s,[["render",h]]);export{d as __pageData,_ as default}; +import{_ as e,c as t,o as r,ag as o}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/bashvm.md","filePath":"incomplete/bashvm.md","lastUpdated":1772424525000}'),s={name:"incomplete/bashvm.md"};function h(n,a,l,i,p,m){return r(),t("div",null,a[0]||(a[0]=[o('

仓库

https://github.com/babywhale321/bashvm

https://bashvm.com/

说明

如果你想深入了解怎么开设一个虚拟机,怎么转发端口,那么这个项目将完全从底层开始,一步步教你如何开设虚拟机

缺点

非常的繁琐,非常的耗时,不如别的项目快速设置网络和开设

',7)]))}const _=e(s,[["render",h]]);export{d as __pageData,_ as default}; diff --git a/assets/incomplete_bashvm.md.BPKxitFB.lean.js b/assets/incomplete_bashvm.md.ulBcWfGK.lean.js similarity index 56% rename from assets/incomplete_bashvm.md.BPKxitFB.lean.js rename to assets/incomplete_bashvm.md.ulBcWfGK.lean.js index c06d9662a7..3fc2c17351 100644 --- a/assets/incomplete_bashvm.md.BPKxitFB.lean.js +++ b/assets/incomplete_bashvm.md.ulBcWfGK.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as r,ag as o}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/bashvm.md","filePath":"incomplete/bashvm.md","lastUpdated":1772422214000}'),s={name:"incomplete/bashvm.md"};function h(n,a,l,i,p,m){return r(),t("div",null,a[0]||(a[0]=[o("",7)]))}const _=e(s,[["render",h]]);export{d as __pageData,_ as default}; +import{_ as e,c as t,o as r,ag as o}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/bashvm.md","filePath":"incomplete/bashvm.md","lastUpdated":1772424525000}'),s={name:"incomplete/bashvm.md"};function h(n,a,l,i,p,m){return r(),t("div",null,a[0]||(a[0]=[o("",7)]))}const _=e(s,[["render",h]]);export{d as __pageData,_ as default}; diff --git a/assets/incomplete_cockpit.md.BJoO4w05.js b/assets/incomplete_cockpit.md.BJoO4w05.js new file mode 100644 index 0000000000..f99b0e34f0 --- /dev/null +++ b/assets/incomplete_cockpit.md.BJoO4w05.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/cockpit.md","filePath":"incomplete/cockpit.md","lastUpdated":1772424525000}'),l={name:"incomplete/cockpit.md"};function n(p,s,h,r,d,c){return e(),a("div",null,s[0]||(s[0]=[t('

仓库

hits

https://github.com/oneclickvirt/cockpit

安装

支持的系统:Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

只安装带容器的

shell
bash install.sh --ct

只安装带虚拟机的

shell
bash install.sh --vm

仅安装面板

shell
bash install.sh

容器和虚拟机依赖都进行安装

shell
bash install.sh --all

缺点

网络自行配置,镜像自行导入,端口自行映射,只是比纯命令行多了一个GUI界面罢了

致谢

https://cockpit-project.org/running.html

',21)]))}const g=i(l,[["render",n]]);export{o as __pageData,g as default}; diff --git a/assets/incomplete_cockpit.md.BJoO4w05.lean.js b/assets/incomplete_cockpit.md.BJoO4w05.lean.js new file mode 100644 index 0000000000..fd6765e248 --- /dev/null +++ b/assets/incomplete_cockpit.md.BJoO4w05.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as t}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/cockpit.md","filePath":"incomplete/cockpit.md","lastUpdated":1772424525000}'),l={name:"incomplete/cockpit.md"};function n(p,s,h,r,d,c){return e(),a("div",null,s[0]||(s[0]=[t("",21)]))}const g=i(l,[["render",n]]);export{o as __pageData,g as default}; diff --git a/assets/incomplete_cockpit.md.ESBqMLK9.js b/assets/incomplete_cockpit.md.ESBqMLK9.js deleted file mode 100644 index 5f8ddcf6c4..0000000000 --- a/assets/incomplete_cockpit.md.ESBqMLK9.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/cockpit.md","filePath":"incomplete/cockpit.md","lastUpdated":1772422214000}'),l={name:"incomplete/cockpit.md"};function h(p,s,n,r,k,c){return t(),a("div",null,s[0]||(s[0]=[e('

仓库

hits

https://github.com/oneclickvirt/cockpit

安装

支持的系统:Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

只安装带容器的

shell
bash install.sh --ct

只安装带虚拟机的

shell
bash install.sh --vm

仅安装面板

shell
bash install.sh

容器和虚拟机依赖都进行安装

shell
bash install.sh --all

缺点

网络自行配置,镜像自行导入,端口自行映射,只是比纯命令行多了一个GUI界面罢了

致谢

https://cockpit-project.org/running.html

',21)]))}const g=i(l,[["render",h]]);export{d as __pageData,g as default}; diff --git a/assets/incomplete_cockpit.md.ESBqMLK9.lean.js b/assets/incomplete_cockpit.md.ESBqMLK9.lean.js deleted file mode 100644 index 3ec5cd6cd4..0000000000 --- a/assets/incomplete_cockpit.md.ESBqMLK9.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/cockpit.md","filePath":"incomplete/cockpit.md","lastUpdated":1772422214000}'),l={name:"incomplete/cockpit.md"};function h(p,s,n,r,k,c){return t(),a("div",null,s[0]||(s[0]=[e("",21)]))}const g=i(l,[["render",h]]);export{d as __pageData,g as default}; diff --git a/assets/incomplete_convoy.md.7Wc1m7po.js b/assets/incomplete_convoy.md.7Wc1m7po.js new file mode 100644 index 0000000000..13c14d3fc9 --- /dev/null +++ b/assets/incomplete_convoy.md.7Wc1m7po.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/convoy.md","filePath":"incomplete/convoy.md","lastUpdated":1772424525000}'),n={name:"incomplete/convoy.md"};function l(p,s,h,o,r,c){return t(),a("div",null,s[0]||(s[0]=[e('

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

安装前提条件:

  • 已安装 PVE,但不能是同一节点(不能是同一台机器)
  • 系统为 Debian 11
  • CPU 至少 2 核,硬盘至少 20G,内存至少 4G(内存包含 swap)

我不保证这个脚本没有错误,本项目未完整

国际

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

',15)]))}const g=i(n,[["render",l]]);export{d as __pageData,g as default}; diff --git a/assets/incomplete_convoy.md.ibyG8Sy2.lean.js b/assets/incomplete_convoy.md.7Wc1m7po.lean.js similarity index 56% rename from assets/incomplete_convoy.md.ibyG8Sy2.lean.js rename to assets/incomplete_convoy.md.7Wc1m7po.lean.js index b3a6502418..6f744cdecf 100644 --- a/assets/incomplete_convoy.md.ibyG8Sy2.lean.js +++ b/assets/incomplete_convoy.md.7Wc1m7po.lean.js @@ -1 +1 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/convoy.md","filePath":"incomplete/convoy.md","lastUpdated":1772422214000}'),n={name:"incomplete/convoy.md"};function l(p,s,h,o,r,c){return t(),a("div",null,s[0]||(s[0]=[e("",15)]))}const g=i(n,[["render",l]]);export{d as __pageData,g as default}; +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/convoy.md","filePath":"incomplete/convoy.md","lastUpdated":1772424525000}'),n={name:"incomplete/convoy.md"};function l(p,s,h,o,r,c){return t(),a("div",null,s[0]||(s[0]=[e("",15)]))}const g=i(n,[["render",l]]);export{d as __pageData,g as default}; diff --git a/assets/incomplete_convoy.md.ibyG8Sy2.js b/assets/incomplete_convoy.md.ibyG8Sy2.js deleted file mode 100644 index 281a1d7fa4..0000000000 --- a/assets/incomplete_convoy.md.ibyG8Sy2.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/convoy.md","filePath":"incomplete/convoy.md","lastUpdated":1772422214000}'),n={name:"incomplete/convoy.md"};function l(p,s,h,o,r,c){return t(),a("div",null,s[0]||(s[0]=[e('

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

安装前提条件:

  • 已安装 PVE,但不能是同一节点(不能是同一台机器)
  • 系统为 Debian 11
  • CPU 至少 2 核,硬盘至少 20G,内存至少 4G(内存包含 swap)

我不保证这个脚本没有错误,本项目未完整

国际

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

',15)]))}const g=i(n,[["render",l]]);export{d as __pageData,g as default}; diff --git a/assets/incomplete_index.md.B0rxzu5o.js b/assets/incomplete_index.md.DLyUERmz.js similarity index 90% rename from assets/incomplete_index.md.B0rxzu5o.js rename to assets/incomplete_index.md.DLyUERmz.js index 2e765dc903..fdd8e99b32 100644 --- a/assets/incomplete_index.md.B0rxzu5o.js +++ b/assets/incomplete_index.md.DLyUERmz.js @@ -1 +1 @@ -import{_ as e,c as t,o as i}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","description":"","frontmatter":{"layout":"home","title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","hero":{"name":"其他虚拟化项目","text":"一些不完整的虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/incomplete/webvirtcloud"}]},"features":[{"title":"注意事项","details":"这块每个项目都有对应的缺点,每个项目都不像之前的项目一样简单好用,有一定的学习成本。"},{"title":"难易程度","details":"基于项目本身的使用难度,由易到难排序,越往后你能得到本指南的引导越少。"},{"title":"项目缺点","details":"每个项目都有部分缺点导致不被认为是完整的一键项目,有一些操作需要手动执行命令无法一键化。"}]},"headers":[],"relativePath":"incomplete/index.md","filePath":"incomplete/index.md","lastUpdated":1772422214000}'),a={name:"incomplete/index.md"};function n(l,o,s,r,c,p){return i(),t("div")}const h=e(a,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","description":"","frontmatter":{"layout":"home","title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","hero":{"name":"其他虚拟化项目","text":"一些不完整的虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/incomplete/webvirtcloud"}]},"features":[{"title":"注意事项","details":"这块每个项目都有对应的缺点,每个项目都不像之前的项目一样简单好用,有一定的学习成本。"},{"title":"难易程度","details":"基于项目本身的使用难度,由易到难排序,越往后你能得到本指南的引导越少。"},{"title":"项目缺点","details":"每个项目都有部分缺点导致不被认为是完整的一键项目,有一些操作需要手动执行命令无法一键化。"}]},"headers":[],"relativePath":"incomplete/index.md","filePath":"incomplete/index.md","lastUpdated":1772424525000}'),a={name:"incomplete/index.md"};function n(l,o,s,r,c,p){return i(),t("div")}const h=e(a,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/incomplete_index.md.B0rxzu5o.lean.js b/assets/incomplete_index.md.DLyUERmz.lean.js similarity index 90% rename from assets/incomplete_index.md.B0rxzu5o.lean.js rename to assets/incomplete_index.md.DLyUERmz.lean.js index 2e765dc903..fdd8e99b32 100644 --- a/assets/incomplete_index.md.B0rxzu5o.lean.js +++ b/assets/incomplete_index.md.DLyUERmz.lean.js @@ -1 +1 @@ -import{_ as e,c as t,o as i}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","description":"","frontmatter":{"layout":"home","title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","hero":{"name":"其他虚拟化项目","text":"一些不完整的虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/incomplete/webvirtcloud"}]},"features":[{"title":"注意事项","details":"这块每个项目都有对应的缺点,每个项目都不像之前的项目一样简单好用,有一定的学习成本。"},{"title":"难易程度","details":"基于项目本身的使用难度,由易到难排序,越往后你能得到本指南的引导越少。"},{"title":"项目缺点","details":"每个项目都有部分缺点导致不被认为是完整的一键项目,有一些操作需要手动执行命令无法一键化。"}]},"headers":[],"relativePath":"incomplete/index.md","filePath":"incomplete/index.md","lastUpdated":1772422214000}'),a={name:"incomplete/index.md"};function n(l,o,s,r,c,p){return i(),t("div")}const h=e(a,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as i}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","description":"","frontmatter":{"layout":"home","title":"其他虚拟化项目","titleTemplate":"其他不完整的虚拟化项目","hero":{"name":"其他虚拟化项目","text":"一些不完整的虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"查看项目 →","link":"/incomplete/webvirtcloud"}]},"features":[{"title":"注意事项","details":"这块每个项目都有对应的缺点,每个项目都不像之前的项目一样简单好用,有一定的学习成本。"},{"title":"难易程度","details":"基于项目本身的使用难度,由易到难排序,越往后你能得到本指南的引导越少。"},{"title":"项目缺点","details":"每个项目都有部分缺点导致不被认为是完整的一键项目,有一些操作需要手动执行命令无法一键化。"}]},"headers":[],"relativePath":"incomplete/index.md","filePath":"incomplete/index.md","lastUpdated":1772424525000}'),a={name:"incomplete/index.md"};function n(l,o,s,r,c,p){return i(),t("div")}const h=e(a,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/incomplete_pterodactyl.md.DJBeL-tc.js b/assets/incomplete_pterodactyl.md.DJBeL-tc.js new file mode 100644 index 0000000000..ab0454b58b --- /dev/null +++ b/assets/incomplete_pterodactyl.md.DJBeL-tc.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/pterodactyl.md","filePath":"incomplete/pterodactyl.md","lastUpdated":1772424525000}'),l={name:"incomplete/pterodactyl.md"};function n(h,s,p,r,d,k){return t(),a("div",null,s[0]||(s[0]=[e('

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

进一步调研发现开设servers和绑定用户极麻烦,不如原生直接docker方便,故而暂不做后续开发了

说明

目前支持的系统

系统类型版本范围备注
Ubuntu20.04(推荐), 22.04, 24.04已支持
Debian11(Bullseye), 12(Bookworm)已支持

Panel

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

wings端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

会生成需要在wings端执行的命令

生成的命令执行完毕后等待20秒以上,避免一些初始化流程未走完,然后wings端再执行:

shell
bash install_wings.sh

然后在http://<your_ip>/admin/nodes就能看到你的节点已经被自动添加纳管,心跳是绿色的

Thanks

https://pterodactyl.io/

',32)]))}const g=i(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/incomplete_pterodactyl.md.DJBeL-tc.lean.js b/assets/incomplete_pterodactyl.md.DJBeL-tc.lean.js new file mode 100644 index 0000000000..27afe58867 --- /dev/null +++ b/assets/incomplete_pterodactyl.md.DJBeL-tc.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/pterodactyl.md","filePath":"incomplete/pterodactyl.md","lastUpdated":1772424525000}'),l={name:"incomplete/pterodactyl.md"};function n(h,s,p,r,d,k){return t(),a("div",null,s[0]||(s[0]=[e("",32)]))}const g=i(l,[["render",n]]);export{c as __pageData,g as default}; diff --git a/assets/incomplete_pterodactyl.md.FLSCdFrT.js b/assets/incomplete_pterodactyl.md.FLSCdFrT.js deleted file mode 100644 index d8685ac2c0..0000000000 --- a/assets/incomplete_pterodactyl.md.FLSCdFrT.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/pterodactyl.md","filePath":"incomplete/pterodactyl.md","lastUpdated":1772422214000}'),l={name:"incomplete/pterodactyl.md"};function e(p,s,n,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h('

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

进一步调研发现开设servers和绑定用户极麻烦,不如原生直接docker方便,故而暂不做后续开发了

说明

目前支持的系统

系统类型版本范围备注
Ubuntu20.04(推荐), 22.04, 24.04已支持
Debian11(Bullseye), 12(Bookworm)已支持

Panel

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

wings端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

会生成需要在wings端执行的命令

生成的命令执行完毕后等待20秒以上,避免一些初始化流程未走完,然后wings端再执行:

shell
bash install_wings.sh

然后在http://<your_ip>/admin/nodes就能看到你的节点已经被自动添加纳管,心跳是绿色的

Thanks

https://pterodactyl.io/

',32)]))}const g=i(l,[["render",e]]);export{c as __pageData,g as default}; diff --git a/assets/incomplete_pterodactyl.md.FLSCdFrT.lean.js b/assets/incomplete_pterodactyl.md.FLSCdFrT.lean.js deleted file mode 100644 index 5d84ee98de..0000000000 --- a/assets/incomplete_pterodactyl.md.FLSCdFrT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as h}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/pterodactyl.md","filePath":"incomplete/pterodactyl.md","lastUpdated":1772422214000}'),l={name:"incomplete/pterodactyl.md"};function e(p,s,n,k,r,d){return t(),a("div",null,s[0]||(s[0]=[h("",32)]))}const g=i(l,[["render",e]]);export{c as __pageData,g as default}; diff --git a/assets/incomplete_virtfusion.md.C7dpycXa.js b/assets/incomplete_virtfusion.md.C7dpycXa.js deleted file mode 100644 index de890ce194..0000000000 --- a/assets/incomplete_virtfusion.md.C7dpycXa.js +++ /dev/null @@ -1,7 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtfusion.md","filePath":"incomplete/virtfusion.md","lastUpdated":1772422214000}'),n={name:"incomplete/virtfusion.md"};function h(e,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[l(`

官方文档

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

一键安装

debian11

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

缺点

每台服务器每个邮箱只有一次30天试用的证书,无永久的免费的证书

仅支持 amd64/x86_64 架构

`,18)]))}const c=i(n,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/incomplete_virtfusion.md.C7dpycXa.lean.js b/assets/incomplete_virtfusion.md.C7dpycXa.lean.js deleted file mode 100644 index 0bd8ac9cfc..0000000000 --- a/assets/incomplete_virtfusion.md.C7dpycXa.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtfusion.md","filePath":"incomplete/virtfusion.md","lastUpdated":1772422214000}'),n={name:"incomplete/virtfusion.md"};function h(e,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[l("",18)]))}const c=i(n,[["render",h]]);export{o as __pageData,c as default}; diff --git a/assets/incomplete_virtfusion.md.QYJAyYWd.js b/assets/incomplete_virtfusion.md.QYJAyYWd.js new file mode 100644 index 0000000000..cfffa21da0 --- /dev/null +++ b/assets/incomplete_virtfusion.md.QYJAyYWd.js @@ -0,0 +1,7 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtfusion.md","filePath":"incomplete/virtfusion.md","lastUpdated":1772424525000}'),t={name:"incomplete/virtfusion.md"};function e(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[l(`

官方文档

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

一键安装

debian11

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
+curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
+curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
+curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

缺点

每台服务器每个邮箱只有一次30天试用的证书,无永久的免费的证书

仅支持 amd64/x86_64 架构

`,18)]))}const c=i(t,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/incomplete_virtfusion.md.QYJAyYWd.lean.js b/assets/incomplete_virtfusion.md.QYJAyYWd.lean.js new file mode 100644 index 0000000000..f8993bc142 --- /dev/null +++ b/assets/incomplete_virtfusion.md.QYJAyYWd.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtfusion.md","filePath":"incomplete/virtfusion.md","lastUpdated":1772424525000}'),t={name:"incomplete/virtfusion.md"};function e(h,s,p,r,k,d){return n(),a("div",null,s[0]||(s[0]=[l("",18)]))}const c=i(t,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/incomplete_virtualizor-docker.md.C37UUw8m.js b/assets/incomplete_virtualizor-docker.md.BjoBN8Nn.js similarity index 85% rename from assets/incomplete_virtualizor-docker.md.C37UUw8m.js rename to assets/incomplete_virtualizor-docker.md.BjoBN8Nn.js index b8e4b91d3a..65d0a4449a 100644 --- a/assets/incomplete_virtualizor-docker.md.C37UUw8m.js +++ b/assets/incomplete_virtualizor-docker.md.BjoBN8Nn.js @@ -1 +1 @@ -import{_ as a,c as t,o as r,ag as o}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtualizor-docker.md","filePath":"incomplete/virtualizor-docker.md","lastUpdated":1772422214000}'),i={name:"incomplete/virtualizor-docker.md"};function l(n,e,c,d,p,s){return r(),t("div",null,e[0]||(e[0]=[o('

仓库

https://github.com/ivstiv/virtualizor-docker

说明

在docker中开设的 virtualizor

证书用的是试用的证书,有效期一天,且默认只安装了OpenVZ的虚拟化方式

缺点

毫无社区,一切自行摸索

admin面板的端口不要看脚本的提示信息,以仓库说明为准。

',8)]))}const u=a(i,[["render",l]]);export{_ as __pageData,u as default}; +import{_ as a,c as t,o as r,ag as o}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtualizor-docker.md","filePath":"incomplete/virtualizor-docker.md","lastUpdated":1772424525000}'),i={name:"incomplete/virtualizor-docker.md"};function l(n,e,c,d,p,s){return r(),t("div",null,e[0]||(e[0]=[o('

仓库

https://github.com/ivstiv/virtualizor-docker

说明

在docker中开设的 virtualizor

证书用的是试用的证书,有效期一天,且默认只安装了OpenVZ的虚拟化方式

缺点

毫无社区,一切自行摸索

admin面板的端口不要看脚本的提示信息,以仓库说明为准。

',8)]))}const u=a(i,[["render",l]]);export{_ as __pageData,u as default}; diff --git a/assets/incomplete_virtualizor-docker.md.C37UUw8m.lean.js b/assets/incomplete_virtualizor-docker.md.BjoBN8Nn.lean.js similarity index 59% rename from assets/incomplete_virtualizor-docker.md.C37UUw8m.lean.js rename to assets/incomplete_virtualizor-docker.md.BjoBN8Nn.lean.js index fe39b9504a..58c6bc5c67 100644 --- a/assets/incomplete_virtualizor-docker.md.C37UUw8m.lean.js +++ b/assets/incomplete_virtualizor-docker.md.BjoBN8Nn.lean.js @@ -1 +1 @@ -import{_ as a,c as t,o as r,ag as o}from"./chunks/framework.CSeR4K32.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtualizor-docker.md","filePath":"incomplete/virtualizor-docker.md","lastUpdated":1772422214000}'),i={name:"incomplete/virtualizor-docker.md"};function l(n,e,c,d,p,s){return r(),t("div",null,e[0]||(e[0]=[o("",8)]))}const u=a(i,[["render",l]]);export{_ as __pageData,u as default}; +import{_ as a,c as t,o as r,ag as o}from"./chunks/framework.QPV3Ar9-.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/virtualizor-docker.md","filePath":"incomplete/virtualizor-docker.md","lastUpdated":1772424525000}'),i={name:"incomplete/virtualizor-docker.md"};function l(n,e,c,d,p,s){return r(),t("div",null,e[0]||(e[0]=[o("",8)]))}const u=a(i,[["render",l]]);export{_ as __pageData,u as default}; diff --git a/assets/incomplete_webvirtcloud.md.C1K19L75.js b/assets/incomplete_webvirtcloud.md.C1K19L75.js deleted file mode 100644 index 2295d70f70..0000000000 --- a/assets/incomplete_webvirtcloud.md.C1K19L75.js +++ /dev/null @@ -1,48 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const n="/assets/admin.DfyN1XBs.png",h="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",e="/assets/webvirtcloud.DNieKxNE.png",y=JSON.parse('{"title":"WebVirtCloud 安装指南","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud.md","filePath":"incomplete/webvirtcloud.md","lastUpdated":1772422214000}'),k={name:"incomplete/webvirtcloud.md"};function r(d,s,o,F,c,g){return t(),a("div",null,s[0]||(s[0]=[l('

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原官方删除了项目不再维护了,这里只能用我个人修复和更改后的代码进行部署。

效果图展示

admin

user

1. 控制端安装

系统要求

最低配置要求:

  • CPU: 1 核
  • 内存: 1 GB RAM
  • 硬盘: 空余 10 GB
  • 系统:Debian11+,Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

默认登录信息

  • 用户名: admin@spiritlhl.net
  • 密码: admin

面板地址

  • 用户面板: https://192-168-0-114.nip.io
  • 管理后台: https://192-168-0-114.nip.io/admin

注意: 请将 192.168.0.114 替换为你的公网 IP,以获取真实可访问地址。

安装命令

国际版本:

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
-&& chmod +x install_webvirt_cloud.sh \\
-&& bash install_webvirt_cloud.sh

国内版本:

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
-&& chmod +x install_webvirt_cloud.sh \\
-&& bash install_webvirt_cloud.sh

TIP

执行过程中可能会卡在clone仓库后一直不动,此时按ctrl+c退出执行后,重新执行安装脚本就行了,系Docker安装后卡在build项目的阶段了。

2. 计算节点安装

重要提示: Hypervisor 和 Controller 不能在同一虚拟机上安装,否则网络会出现冲突。

系统要求

建议配置:

  • CPU: 2 核
  • 内存: 4 GB RAM
  • 硬盘: 空余 40 GB
  • 系统:AlmaLinux8+,RockyLinux8+

额外说明:

  • 实际使用建议更高配置,测试环境只够开 4 台最小的虚拟机。
  • 服务器推荐支持 KVM 嵌套虚拟化的,若VM-x/AMD-V/Hyper-V未启用也可以,会自动切换为QEMU使用TCG仿真开设虚拟机,只不过性能会有所损耗。
  • 跳过 env 检测安装,直接使用二进制文件,无需安装依赖。

环境检测

检测服务器是否支持 KVM 嵌套虚拟化:

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

选择硬件单项测试

计算节点安装步骤

  1. 下载安装脚本:

    国际版本:

    bash
    curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    -&& chmod +x install_hypervisor.sh

    国内版本:

    bash
    curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    -&& chmod +x install_hypervisor.sh
  2. 执行安装(替换为你的 Controller IP):

    bash
    bash install_hypervisor.sh x.x.x.x

    请将 x.x.x.x 替换为你的 Controller 控制端的实际 IP 地址。

  3. 面板纳管节点
    执行完毕后会有提示需要在Controller面板端需要填写的内容。
    面板端要填入Hostname的是当前计算节点的IPV4地址,还有要填入Token识别节点。

NetworkManager 版本问题

安装过程中可能会出现以下错误:

Connection 'eth0' (bed050e9-ff49-4665-8112-24ddf2a1cd3c) successfully deleted.
-Warning: nmcli (1.48.10) and NetworkManager (1.42.2) versions don't match. Restarting NetworkManager is advised.
-Error: Failed to add 'br-ext' connection: connection.autoconnect-ports: unknown property

解决方法: 重启服务器后重新执行安装命令。

安装耗时提示

  • 整个过程大约耗时 10~25 分钟
  • 大部分时间用于下载 finnix-125.iso/var/lib/libvirt/isos/finnix-125.iso
  • 该部分无法加速,建议使用 tmux 或 screen 等工具防止中断。

添加计算节点到控制面板

安装完成后会生成一个 Token,用于在控制端(Admin 面板)中添加计算节点:

路径: Admin Panel > Computers > Add Computer

  • HostName 需要填写计算节点的公网IPV4地址
  • Token 填在计算节点上获取到的token密钥

3. 公网IPV4端口映射

3.1 自动映射

自动映射功能特点:

  • 自动监控:实时监控虚拟机状态变化,自动应用或清理端口映射规则
  • 智能端口分配:根据虚拟机IP地址自动计算和分配不冲突的端口
  • 规则持久化:使用firewall-cmd确保端口映射规则在宿主机重启后依然有效
  • 映射记录:自动维护映射信息记录文件,便于查看和管理
  • 冲突防护:智能检测并避免端口冲突,确保每个虚拟机都有唯一的端口映射

安装方法

  1. 下载脚本到临时目录:

    国际版本:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh

    国内版本:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh
  2. 添加执行权限:

    bash
    chmod +x /tmp/vm_port_mapping_setup.sh
  3. 运行安装程序:

    bash
    /tmp/vm_port_mapping_setup.sh

脚本会自动完成以下操作:

  • 将自身复制到系统目录 /usr/local/sbin/vm_port_mapping_daemon.sh
  • 创建systemd服务单元文件
  • 启用并启动服务

端口映射规则

守护进程会为每个虚拟机分配以下端口:

  1. SSH端口

    • 计算公式:(IP最后一段) × 100 + 22 + 10000
    • 示例:对于IP地址 192.168.33.114,映射的SSH端口为 114×100+22+10000 = 21422
  2. 额外端口

    • 每个虚拟机分配10个额外端口
    • 起始端口:20000 + (IP最后一段) × 100
    • 结束端口:起始端口 + 9
    • 示例:对于IP地址 192.168.33.114,额外端口范围为 20000+(114×100) 至 20000+(114×100)+9

如果计算出的端口已被占用,程序会自动寻找下一个可用端口,确保不发生冲突。

映射文件

所有端口映射信息保存在 /etc/vm_port_mapping/mapping.txt 文件中,格式为:

虚拟机名字 IP地址 MAC地址 SSH映射端口 额外端口起始 额外端口结束

可使用以下命令进行查看

shell
cat /etc/vm_port_mapping/mapping.txt

显示示例:

Virtance-1 192.168.33.114 52:54:00:5f:77:92 21422 31400 31409

服务管理

  • 查看服务状态

    bash
    systemctl status vm-port-mapping
  • 启动服务

    bash
    systemctl start vm-port-mapping
  • 停止服务

    bash
    systemctl stop vm-port-mapping
  • 禁用自启动

    bash
    systemctl disable vm-port-mapping
  • 查看日志

    bash
    journalctl -u vm-port-mapping
    -# 或
    -cat /var/log/vm_port_mapping.log
  • 手动触发规则更新

    bash
    systemctl restart vm-port-mapping

常见问题

端口映射不生效

检查以下内容:

  • 确认服务正在运行:systemctl status vm-port-mapping
  • 检查日志文件:cat /var/log/vm_port_mapping.log
  • 确认防火墙服务正常:systemctl status firewalld
  • 验证虚拟机网络接口配置:virsh domiflist 虚拟机名称
手动添加映射规则

通常不需要手动添加规则,但如果需要,可以这样操作:

  1. 停止服务:

    bash
    systemctl stop vm-port-mapping
  2. 编辑映射文件:

    bash
    nano /etc/vm_port_mapping/mapping.txt
  3. 启动服务:

    bash
    systemctl start vm-port-mapping
清理所有规则
bash
systemctl stop vm-port-mapping
-grep -f /etc/vm_port_mapping/mapping.txt | while read -r vm_name ip_address mac ssh_port port_start port_end; do
-  firewall-cmd --permanent --remove-forward-port="port=$ssh_port:proto=tcp:toport=22:toaddr=$ip_address"
-  for ((port=port_start; port<=port_end; port++)); do
-    firewall-cmd --permanent --remove-forward-port="port=$port:proto=tcp:toport=$port:toaddr=$ip_address"
-  done
-done
-firewall-cmd --reload
安全建议
  • 定期检查映射文件和日志,确保没有未授权的映射
  • 不要手动修改 /etc/vm_port_mapping/ 目录下的文件,除非你完全了解其影响
  • 确保 firewalld 服务正常运行,以便规则能够正确持久化

卸载方法

如需卸载此服务:

bash
systemctl stop vm-port-mapping
-systemctl disable vm-port-mapping
-rm -f /etc/systemd/system/vm-port-mapping.service
-rm -f /usr/local/sbin/vm_port_mapping_daemon.sh
-rm -rf /etc/vm_port_mapping
-systemctl daemon-reload

3.2 手动映射

假设此时你的虚拟机在用户端控制面板显示为

wv1

且宿主机的命令执行ip a | head -n 15结果为

shell
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
-    inet 127.0.0.1/8 scope host lo
-       valid_lft forever preferred_lft forever
-    inet6 ::1/128 scope host
-       valid_lft forever preferred_lft forever
-2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
-    link/ether 52:54:00:f1:d6:8b brd ff:ff:ff:ff:ff:ff
-    altname enp0s3
-    inet 你的公网IPV4地址/对应的子网掩码 scope global noprefixroute ens3
-       valid_lft forever preferred_lft forever
-    inet6 2a0b:4140:4c60::2/48 scope global noprefixroute
-       valid_lft forever preferred_lft forever
-    inet6 fe80::5054:ff:fef1:d68b/64 scope link noprefixroute
-       valid_lft forever preferred_lft forever

可见公网IPV4地址绑定的接口是ens3,所以后面的命令这里用ens3

那么映射当前虚拟机的22端口到公网IPV4的3322端口的命令为:

shell
# 添加 DNAT 规则:将公网3322流量转发到宿主机本地的192.168.33.130:22
-iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 3322 -j DNAT --to-destination 192.168.33.130:22
-# 添加 POSTROUTING:本机 NAT 伪装,以便连接正常返回
-iptables -t nat -A POSTROUTING -p tcp -d 192.168.33.130 --dport 22 -j MASQUERADE
-# 需要允许 INPUT 的3322端口通过(firewalld 默认是开启了的)
-iptables -I INPUT -p tcp --dport 3322 -j ACCEPT

这样内网的虚拟机就被映射出来,可以直接远程登录使用了。

4. 问题排查

添加计算节点错误排查

在Controller控制端执行:

shell
telnet <node ip> 8884

在计算节点执行:

shell
systemctl status webvirtcompute
-systemctl status libvirtd
-systemctl status prometheus
-systemctl status prometheus-libvirt-exporter

如果以上都查不出问题,那么就需要到Controller控制端执行:

shell
docker exec -it webvirtcloud-backend /bin/sh
-vi webvirtcloud/settings/production.py

DEBUG=False 改成 DEBUG=True,然后保存文件后,容器内执行:

shell
UV_PROJECT_ENVIRONMENT=/usr/local uv sync --dev

然后exit退出容器后,执行:

shell
docker restart webvirtcloud-backend
-sleep 3
-docker logs webvirtcloud-backend -f

然后前端去触发错误的位置,这块日志实时加载就会看到对应的报错了。

Controller 重启后 Docker 容器不自重启

如果 Docker 容器在系统重启后没有自动重启,执行以下命令:

bash
docker start $(docker ps -a -q)

5. 缺点

系统镜像是写死的,没法使用自己制作的自定义镜像,也没办法导出使用。

目前系统镜像是本人推送到Github仓库的那些镜像,具体自定义的镜像可导入PVE的qcow2格式的镜像,但需要在配置中填写哈希码。

https://github.com/retspen/webvirtcloud 不是同一个项目,不要搞混淆了。

webvirtcloud

',109)]))}const u=i(k,[["render",r]]);export{y as __pageData,u as default}; diff --git a/assets/incomplete_webvirtcloud.md.C1K19L75.lean.js b/assets/incomplete_webvirtcloud.md.C1K19L75.lean.js deleted file mode 100644 index f69693c155..0000000000 --- a/assets/incomplete_webvirtcloud.md.C1K19L75.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as l}from"./chunks/framework.CSeR4K32.js";const n="/assets/admin.DfyN1XBs.png",h="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",e="/assets/webvirtcloud.DNieKxNE.png",y=JSON.parse('{"title":"WebVirtCloud 安装指南","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud.md","filePath":"incomplete/webvirtcloud.md","lastUpdated":1772422214000}'),k={name:"incomplete/webvirtcloud.md"};function r(d,s,o,F,c,g){return t(),a("div",null,s[0]||(s[0]=[l("",109)]))}const u=i(k,[["render",r]]);export{y as __pageData,u as default}; diff --git a/assets/incomplete_webvirtcloud.md.Ce7iEahO.js b/assets/incomplete_webvirtcloud.md.Ce7iEahO.js new file mode 100644 index 0000000000..ff05c25d9a --- /dev/null +++ b/assets/incomplete_webvirtcloud.md.Ce7iEahO.js @@ -0,0 +1,48 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/admin.DfyN1XBs.png",t="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",h="/assets/webvirtcloud.DNieKxNE.png",u=JSON.parse('{"title":"WebVirtCloud 安装指南","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud.md","filePath":"incomplete/webvirtcloud.md","lastUpdated":1772424525000}'),r={name:"incomplete/webvirtcloud.md"};function k(d,s,o,c,F,g){return n(),a("div",null,s[0]||(s[0]=[e('

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原官方删除了项目不再维护了,这里只能用我个人修复和更改后的代码进行部署。

效果图展示

admin

user

1. 控制端安装

系统要求

最低配置要求:

  • CPU: 1 核
  • 内存: 1 GB RAM
  • 硬盘: 空余 10 GB
  • 系统:Debian11+,Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

默认登录信息

  • 用户名: admin@spiritlhl.net
  • 密码: admin

面板地址

  • 用户面板: https://192-168-0-114.nip.io
  • 管理后台: https://192-168-0-114.nip.io/admin

注意: 请将 192.168.0.114 替换为你的公网 IP,以获取真实可访问地址。

安装命令

国际版本:

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
+&& chmod +x install_webvirt_cloud.sh \\
+&& bash install_webvirt_cloud.sh

国内版本:

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \\
+&& chmod +x install_webvirt_cloud.sh \\
+&& bash install_webvirt_cloud.sh

TIP

执行过程中可能会卡在clone仓库后一直不动,此时按ctrl+c退出执行后,重新执行安装脚本就行了,系Docker安装后卡在build项目的阶段了。

2. 计算节点安装

重要提示: Hypervisor 和 Controller 不能在同一虚拟机上安装,否则网络会出现冲突。

系统要求

建议配置:

  • CPU: 2 核
  • 内存: 4 GB RAM
  • 硬盘: 空余 40 GB
  • 系统:AlmaLinux8+,RockyLinux8+

额外说明:

  • 实际使用建议更高配置,测试环境只够开 4 台最小的虚拟机。
  • 服务器推荐支持 KVM 嵌套虚拟化的,若VM-x/AMD-V/Hyper-V未启用也可以,会自动切换为QEMU使用TCG仿真开设虚拟机,只不过性能会有所损耗。
  • 跳过 env 检测安装,直接使用二进制文件,无需安装依赖。

环境检测

检测服务器是否支持 KVM 嵌套虚拟化:

bash
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

选择硬件单项测试

计算节点安装步骤

  1. 下载安装脚本:

    国际版本:

    bash
    curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    +&& chmod +x install_hypervisor.sh

    国内版本:

    bash
    curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_hypervisor.sh -o install_hypervisor.sh \\
    +&& chmod +x install_hypervisor.sh
  2. 执行安装(替换为你的 Controller IP):

    bash
    bash install_hypervisor.sh x.x.x.x

    请将 x.x.x.x 替换为你的 Controller 控制端的实际 IP 地址。

  3. 面板纳管节点
    执行完毕后会有提示需要在Controller面板端需要填写的内容。
    面板端要填入Hostname的是当前计算节点的IPV4地址,还有要填入Token识别节点。

NetworkManager 版本问题

安装过程中可能会出现以下错误:

Connection 'eth0' (bed050e9-ff49-4665-8112-24ddf2a1cd3c) successfully deleted.
+Warning: nmcli (1.48.10) and NetworkManager (1.42.2) versions don't match. Restarting NetworkManager is advised.
+Error: Failed to add 'br-ext' connection: connection.autoconnect-ports: unknown property

解决方法: 重启服务器后重新执行安装命令。

安装耗时提示

  • 整个过程大约耗时 10~25 分钟
  • 大部分时间用于下载 finnix-125.iso/var/lib/libvirt/isos/finnix-125.iso
  • 该部分无法加速,建议使用 tmux 或 screen 等工具防止中断。

添加计算节点到控制面板

安装完成后会生成一个 Token,用于在控制端(Admin 面板)中添加计算节点:

路径: Admin Panel > Computers > Add Computer

  • HostName 需要填写计算节点的公网IPV4地址
  • Token 填在计算节点上获取到的token密钥

3. 公网IPV4端口映射

3.1 自动映射

自动映射功能特点:

  • 自动监控:实时监控虚拟机状态变化,自动应用或清理端口映射规则
  • 智能端口分配:根据虚拟机IP地址自动计算和分配不冲突的端口
  • 规则持久化:使用firewall-cmd确保端口映射规则在宿主机重启后依然有效
  • 映射记录:自动维护映射信息记录文件,便于查看和管理
  • 冲突防护:智能检测并避免端口冲突,确保每个虚拟机都有唯一的端口映射

安装方法

  1. 下载脚本到临时目录:

    国际版本:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh

    国内版本:

    bash
    wget -O /tmp/vm_port_mapping_setup.sh https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/refs/heads/main/extra_scripts/vm_port_mapping_daemon.sh
  2. 添加执行权限:

    bash
    chmod +x /tmp/vm_port_mapping_setup.sh
  3. 运行安装程序:

    bash
    /tmp/vm_port_mapping_setup.sh

脚本会自动完成以下操作:

  • 将自身复制到系统目录 /usr/local/sbin/vm_port_mapping_daemon.sh
  • 创建systemd服务单元文件
  • 启用并启动服务

端口映射规则

守护进程会为每个虚拟机分配以下端口:

  1. SSH端口

    • 计算公式:(IP最后一段) × 100 + 22 + 10000
    • 示例:对于IP地址 192.168.33.114,映射的SSH端口为 114×100+22+10000 = 21422
  2. 额外端口

    • 每个虚拟机分配10个额外端口
    • 起始端口:20000 + (IP最后一段) × 100
    • 结束端口:起始端口 + 9
    • 示例:对于IP地址 192.168.33.114,额外端口范围为 20000+(114×100) 至 20000+(114×100)+9

如果计算出的端口已被占用,程序会自动寻找下一个可用端口,确保不发生冲突。

映射文件

所有端口映射信息保存在 /etc/vm_port_mapping/mapping.txt 文件中,格式为:

虚拟机名字 IP地址 MAC地址 SSH映射端口 额外端口起始 额外端口结束

可使用以下命令进行查看

shell
cat /etc/vm_port_mapping/mapping.txt

显示示例:

Virtance-1 192.168.33.114 52:54:00:5f:77:92 21422 31400 31409

服务管理

  • 查看服务状态

    bash
    systemctl status vm-port-mapping
  • 启动服务

    bash
    systemctl start vm-port-mapping
  • 停止服务

    bash
    systemctl stop vm-port-mapping
  • 禁用自启动

    bash
    systemctl disable vm-port-mapping
  • 查看日志

    bash
    journalctl -u vm-port-mapping
    +# 或
    +cat /var/log/vm_port_mapping.log
  • 手动触发规则更新

    bash
    systemctl restart vm-port-mapping

常见问题

端口映射不生效

检查以下内容:

  • 确认服务正在运行:systemctl status vm-port-mapping
  • 检查日志文件:cat /var/log/vm_port_mapping.log
  • 确认防火墙服务正常:systemctl status firewalld
  • 验证虚拟机网络接口配置:virsh domiflist 虚拟机名称
手动添加映射规则

通常不需要手动添加规则,但如果需要,可以这样操作:

  1. 停止服务:

    bash
    systemctl stop vm-port-mapping
  2. 编辑映射文件:

    bash
    nano /etc/vm_port_mapping/mapping.txt
  3. 启动服务:

    bash
    systemctl start vm-port-mapping
清理所有规则
bash
systemctl stop vm-port-mapping
+grep -f /etc/vm_port_mapping/mapping.txt | while read -r vm_name ip_address mac ssh_port port_start port_end; do
+  firewall-cmd --permanent --remove-forward-port="port=$ssh_port:proto=tcp:toport=22:toaddr=$ip_address"
+  for ((port=port_start; port<=port_end; port++)); do
+    firewall-cmd --permanent --remove-forward-port="port=$port:proto=tcp:toport=$port:toaddr=$ip_address"
+  done
+done
+firewall-cmd --reload
安全建议
  • 定期检查映射文件和日志,确保没有未授权的映射
  • 不要手动修改 /etc/vm_port_mapping/ 目录下的文件,除非你完全了解其影响
  • 确保 firewalld 服务正常运行,以便规则能够正确持久化

卸载方法

如需卸载此服务:

bash
systemctl stop vm-port-mapping
+systemctl disable vm-port-mapping
+rm -f /etc/systemd/system/vm-port-mapping.service
+rm -f /usr/local/sbin/vm_port_mapping_daemon.sh
+rm -rf /etc/vm_port_mapping
+systemctl daemon-reload

3.2 手动映射

假设此时你的虚拟机在用户端控制面板显示为

wv1

且宿主机的命令执行ip a | head -n 15结果为

shell
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
+    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+    inet 127.0.0.1/8 scope host lo
+       valid_lft forever preferred_lft forever
+    inet6 ::1/128 scope host
+       valid_lft forever preferred_lft forever
+2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
+    link/ether 52:54:00:f1:d6:8b brd ff:ff:ff:ff:ff:ff
+    altname enp0s3
+    inet 你的公网IPV4地址/对应的子网掩码 scope global noprefixroute ens3
+       valid_lft forever preferred_lft forever
+    inet6 2a0b:4140:4c60::2/48 scope global noprefixroute
+       valid_lft forever preferred_lft forever
+    inet6 fe80::5054:ff:fef1:d68b/64 scope link noprefixroute
+       valid_lft forever preferred_lft forever

可见公网IPV4地址绑定的接口是ens3,所以后面的命令这里用ens3

那么映射当前虚拟机的22端口到公网IPV4的3322端口的命令为:

shell
# 添加 DNAT 规则:将公网3322流量转发到宿主机本地的192.168.33.130:22
+iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 3322 -j DNAT --to-destination 192.168.33.130:22
+# 添加 POSTROUTING:本机 NAT 伪装,以便连接正常返回
+iptables -t nat -A POSTROUTING -p tcp -d 192.168.33.130 --dport 22 -j MASQUERADE
+# 需要允许 INPUT 的3322端口通过(firewalld 默认是开启了的)
+iptables -I INPUT -p tcp --dport 3322 -j ACCEPT

这样内网的虚拟机就被映射出来,可以直接远程登录使用了。

4. 问题排查

添加计算节点错误排查

在Controller控制端执行:

shell
telnet <node ip> 8884

在计算节点执行:

shell
systemctl status webvirtcompute
+systemctl status libvirtd
+systemctl status prometheus
+systemctl status prometheus-libvirt-exporter

如果以上都查不出问题,那么就需要到Controller控制端执行:

shell
docker exec -it webvirtcloud-backend /bin/sh
+vi webvirtcloud/settings/production.py

DEBUG=False 改成 DEBUG=True,然后保存文件后,容器内执行:

shell
UV_PROJECT_ENVIRONMENT=/usr/local uv sync --dev

然后exit退出容器后,执行:

shell
docker restart webvirtcloud-backend
+sleep 3
+docker logs webvirtcloud-backend -f

然后前端去触发错误的位置,这块日志实时加载就会看到对应的报错了。

Controller 重启后 Docker 容器不自重启

如果 Docker 容器在系统重启后没有自动重启,执行以下命令:

bash
docker start $(docker ps -a -q)

5. 缺点

系统镜像是写死的,没法使用自己制作的自定义镜像,也没办法导出使用。

目前系统镜像是本人推送到Github仓库的那些镜像,具体自定义的镜像可导入PVE的qcow2格式的镜像,但需要在配置中填写哈希码。

https://github.com/retspen/webvirtcloud 不是同一个项目,不要搞混淆了。

webvirtcloud

',109)]))}const m=i(r,[["render",k]]);export{u as __pageData,m as default}; diff --git a/assets/incomplete_webvirtcloud.md.Ce7iEahO.lean.js b/assets/incomplete_webvirtcloud.md.Ce7iEahO.lean.js new file mode 100644 index 0000000000..4d1fc3d09d --- /dev/null +++ b/assets/incomplete_webvirtcloud.md.Ce7iEahO.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.QPV3Ar9-.js";const l="/assets/admin.DfyN1XBs.png",t="/assets/user.CWGLyZGM.png",p="/assets/wv1.8ARiSJ9x.png",h="/assets/webvirtcloud.DNieKxNE.png",u=JSON.parse('{"title":"WebVirtCloud 安装指南","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud.md","filePath":"incomplete/webvirtcloud.md","lastUpdated":1772424525000}'),r={name:"incomplete/webvirtcloud.md"};function k(d,s,o,c,F,g){return n(),a("div",null,s[0]||(s[0]=[e("",109)]))}const m=i(r,[["render",k]]);export{u as __pageData,m as default}; diff --git a/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.js b/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.js deleted file mode 100644 index 76b7e55d5f..0000000000 --- a/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.js +++ /dev/null @@ -1,8 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const p="/assets/vcr1.NRLOOynQ.jpg",l="/assets/vcr2.DC9j-Ib5.jpg",n="/assets/vcr3.Ea5Km6nQ.jpg",c="/assets/vcr4.B9DOiqQ8.jpg",r="/assets/vcr5.BajXu8XE.jpg",h="/assets/vcr6.CxN-b1o3.jpg",o="/assets/vcr7.D4aYKhIW.jpg",d="/assets/vcr8.ByRFpMlF.jpg",k="/assets/vcr9.B4apCqgi.jpg",g="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",v="/assets/vcr12.BNQe5j_u.jpg",b="/assets/vcr13.JV3PfcCZ.jpg",_="/assets/deadimage.BBBzAqkc.jpg",u="/assets/vcr14.Cjyr65Qp.jpg",F="/assets/resize.ppnxVOAW.jpg",q=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud_retspen.md","filePath":"incomplete/webvirtcloud_retspen.md","lastUpdated":1772422214000}'),C={name:"incomplete/webvirtcloud_retspen.md"};function y(B,s,E,w,f,x){return t(),a("div",null,s[0]||(s[0]=[e(`

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/oneclickvirt/webvirtcloud_retspen

控制节点和计算节点同时安装

  • 支持系统:Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • 推荐系统:Debian12+,Ubuntu22.04+
  • 低版本系统会自动编译python新版本的安装包后再进行部署,所以推荐使用新系统不必编译直接安装

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
-&& chmod +x install_webvirt_cloud_retspen.sh \\
-&& bash install_webvirt_cloud_retspen.sh

国内

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
-&& chmod +x install_webvirt_cloud_retspen.sh \\
-&& bash install_webvirt_cloud_retspen.sh

安装完成后打开公网IP地址,就能看到登录页面。

登录信息用户名和密码都是admin,记得登录后自行修改。

开设Linux虚拟机

进入控制面板后,修改完admin的密码后,需要自行设置计算节点。

vcr1

选择本地类型,添加命名为local。

vcr2

创建完成后,点击眼睛按钮,进入查看

vcr3

存储一栏中添加存储,选择Dir类型,添加名字叫local。如果你需要使用ISO类型的系统引导,那么需要创建ISO类型的存储,如果不需要的话跟着本指南走,就仅需要创建Dir类型。

vcr4

vcr5

创建完毕后,下载对应系统的qcow2文件,使用下面这个仓库的链接

https://github.com/oneclickvirt/pve_kvm_images/releases/tag/images

示例中下载使用debian12的qcow2镜像使用

shell
cd /var/lib/libvirt/images
-wget https://cdn.spiritlhl.net/https://github.com/oneclickvirt/pve_kvm_images/releases/download/images/debian12.qcow2
-chmod 777 debian12.qcow2

回到实例页面创建实例

vcr6

计算节点选择local

vcr7

芯片组使用默认的就行,换不换都没问题

vcr8

创建虚拟机可以使用预定义的配置大小,也可以自行使用自定义大小,看你的选择。

vcr9

注意这块填写的实例名字不能和刚刚下载的镜像的文件名字重复,比如示例中就不能填写debian12

vcr10

创建成功后不能立即点击开机。

vcr11

需要修改磁盘设置。

vcr12

这块修改qcow2文件为debian12.qcow2,对应之前下载的qcow2的文件的名字,使用镜像。

vcr13

修改确认后会在原来的计算节点的存储的local卷里看到有一个多余的盘,比如这里的test.qcow2,最好删除,避免占用磁盘

deadimage

修改完成确认无误后,才可回到电源页面开机。

vcr14

镜像的默认登录的用户名是root,密码是password或者是 oneclickvirt

开机后,你会发现硬盘只有原始镜像的大小,此时需要调整硬盘大小,需要再次关机,此时能见到下图页面的按钮可用且硬盘大小也识别出来了。

没有经过首次开机,硬盘的大小是识别不出来的,识别不出来就不能进行修改,所以首次开关机是必须的。

resize

修改后重启虚拟机,会发现有新的盘空间未分配,此时需要按照下面的方法扩容硬盘。

查看盘路径和剩余空白空间未分配的:

shell
lsblk

然后使用下述命令阔盘

shell
fdisk /dev/vda

按以下顺序操作:

输入d删除旧的分区(是的,需要删除旧的 vda1,数据不会丢失,因为后面不会格式化)。

输入n后回车新建一个分区。

类型选 primary(默认 p),直接回车就行

分区号同样选1

起始位置必须和旧分区一样(默认是对的)按回车就行

显示是否需要擦除指纹,输入Y回车

结束位置直接按回车,使用全部剩余空间

输入w保存并退出。

此时再使用lsblk可确认新的空闲硬盘被分配成功了。

缺点

网络还是没有自动配置,不如上一个项目智能,还得手动配置一下。

需要在已经开好的虚拟机的VNC中,登录后执行

shell
systemctl enable cloud-init
-reboot

手动启用配置为重启后自启动,然后重启服务器,就有网了。

`,70)]))}const D=i(C,[["render",y]]);export{q as __pageData,D as default}; diff --git a/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.lean.js b/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.lean.js deleted file mode 100644 index a58463d096..0000000000 --- a/assets/incomplete_webvirtcloud_retspen.md.B87r6Z-E.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const p="/assets/vcr1.NRLOOynQ.jpg",l="/assets/vcr2.DC9j-Ib5.jpg",n="/assets/vcr3.Ea5Km6nQ.jpg",c="/assets/vcr4.B9DOiqQ8.jpg",r="/assets/vcr5.BajXu8XE.jpg",h="/assets/vcr6.CxN-b1o3.jpg",o="/assets/vcr7.D4aYKhIW.jpg",d="/assets/vcr8.ByRFpMlF.jpg",k="/assets/vcr9.B4apCqgi.jpg",g="/assets/vcr10.D8t6cQ5v.jpg",m="/assets/vcr11.Cz1VMbIx.jpg",v="/assets/vcr12.BNQe5j_u.jpg",b="/assets/vcr13.JV3PfcCZ.jpg",_="/assets/deadimage.BBBzAqkc.jpg",u="/assets/vcr14.Cjyr65Qp.jpg",F="/assets/resize.ppnxVOAW.jpg",q=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud_retspen.md","filePath":"incomplete/webvirtcloud_retspen.md","lastUpdated":1772422214000}'),C={name:"incomplete/webvirtcloud_retspen.md"};function y(B,s,E,w,f,x){return t(),a("div",null,s[0]||(s[0]=[e("",70)]))}const D=i(C,[["render",y]]);export{q as __pageData,D as default}; diff --git a/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.js b/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.js new file mode 100644 index 0000000000..fa9368ce9a --- /dev/null +++ b/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.js @@ -0,0 +1,8 @@ +import{_ as i,c as a,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/vcr1.NRLOOynQ.jpg",l="/assets/vcr2.DC9j-Ib5.jpg",n="/assets/vcr3.Ea5Km6nQ.jpg",r="/assets/vcr4.B9DOiqQ8.jpg",c="/assets/vcr5.BajXu8XE.jpg",o="/assets/vcr6.CxN-b1o3.jpg",d="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",k="/assets/vcr9.B4apCqgi.jpg",g="/assets/vcr10.D8t6cQ5v.jpg",b="/assets/vcr11.Cz1VMbIx.jpg",m="/assets/vcr12.BNQe5j_u.jpg",u="/assets/vcr13.JV3PfcCZ.jpg",v="/assets/deadimage.BBBzAqkc.jpg",_="/assets/vcr14.Cjyr65Qp.jpg",F="/assets/resize.ppnxVOAW.jpg",j=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud_retspen.md","filePath":"incomplete/webvirtcloud_retspen.md","lastUpdated":1772424525000}'),y={name:"incomplete/webvirtcloud_retspen.md"};function C(B,s,w,E,f,x){return e(),a("div",null,s[0]||(s[0]=[p(`

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/oneclickvirt/webvirtcloud_retspen

控制节点和计算节点同时安装

  • 支持系统:Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • 推荐系统:Debian12+,Ubuntu22.04+
  • 低版本系统会自动编译python新版本的安装包后再进行部署,所以推荐使用新系统不必编译直接安装

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
+&& chmod +x install_webvirt_cloud_retspen.sh \\
+&& bash install_webvirt_cloud_retspen.sh

国内

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \\
+&& chmod +x install_webvirt_cloud_retspen.sh \\
+&& bash install_webvirt_cloud_retspen.sh

安装完成后打开公网IP地址,就能看到登录页面。

登录信息用户名和密码都是admin,记得登录后自行修改。

开设Linux虚拟机

进入控制面板后,修改完admin的密码后,需要自行设置计算节点。

vcr1

选择本地类型,添加命名为local。

vcr2

创建完成后,点击眼睛按钮,进入查看

vcr3

存储一栏中添加存储,选择Dir类型,添加名字叫local。如果你需要使用ISO类型的系统引导,那么需要创建ISO类型的存储,如果不需要的话跟着本指南走,就仅需要创建Dir类型。

vcr4

vcr5

创建完毕后,下载对应系统的qcow2文件,使用下面这个仓库的链接

https://github.com/oneclickvirt/pve_kvm_images/releases/tag/images

示例中下载使用debian12的qcow2镜像使用

shell
cd /var/lib/libvirt/images
+wget https://cdn.spiritlhl.net/https://github.com/oneclickvirt/pve_kvm_images/releases/download/images/debian12.qcow2
+chmod 777 debian12.qcow2

回到实例页面创建实例

vcr6

计算节点选择local

vcr7

芯片组使用默认的就行,换不换都没问题

vcr8

创建虚拟机可以使用预定义的配置大小,也可以自行使用自定义大小,看你的选择。

vcr9

注意这块填写的实例名字不能和刚刚下载的镜像的文件名字重复,比如示例中就不能填写debian12

vcr10

创建成功后不能立即点击开机。

vcr11

需要修改磁盘设置。

vcr12

这块修改qcow2文件为debian12.qcow2,对应之前下载的qcow2的文件的名字,使用镜像。

vcr13

修改确认后会在原来的计算节点的存储的local卷里看到有一个多余的盘,比如这里的test.qcow2,最好删除,避免占用磁盘

deadimage

修改完成确认无误后,才可回到电源页面开机。

vcr14

镜像的默认登录的用户名是root,密码是password或者是 oneclickvirt

开机后,你会发现硬盘只有原始镜像的大小,此时需要调整硬盘大小,需要再次关机,此时能见到下图页面的按钮可用且硬盘大小也识别出来了。

没有经过首次开机,硬盘的大小是识别不出来的,识别不出来就不能进行修改,所以首次开关机是必须的。

resize

修改后重启虚拟机,会发现有新的盘空间未分配,此时需要按照下面的方法扩容硬盘。

查看盘路径和剩余空白空间未分配的:

shell
lsblk

然后使用下述命令阔盘

shell
fdisk /dev/vda

按以下顺序操作:

输入d删除旧的分区(是的,需要删除旧的 vda1,数据不会丢失,因为后面不会格式化)。

输入n后回车新建一个分区。

类型选 primary(默认 p),直接回车就行

分区号同样选1

起始位置必须和旧分区一样(默认是对的)按回车就行

显示是否需要擦除指纹,输入Y回车

结束位置直接按回车,使用全部剩余空间

输入w保存并退出。

此时再使用lsblk可确认新的空闲硬盘被分配成功了。

缺点

网络还是没有自动配置,不如上一个项目智能,还得手动配置一下。

需要在已经开好的虚拟机的VNC中,登录后执行

shell
systemctl enable cloud-init
+reboot

手动启用配置为重启后自启动,然后重启服务器,就有网了。

`,70)]))}const q=i(y,[["render",C]]);export{j as __pageData,q as default}; diff --git a/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.lean.js b/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.lean.js new file mode 100644 index 0000000000..e8680c1a00 --- /dev/null +++ b/assets/incomplete_webvirtcloud_retspen.md.yiTxty3Z.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as e,ag as p}from"./chunks/framework.QPV3Ar9-.js";const t="/assets/vcr1.NRLOOynQ.jpg",l="/assets/vcr2.DC9j-Ib5.jpg",n="/assets/vcr3.Ea5Km6nQ.jpg",r="/assets/vcr4.B9DOiqQ8.jpg",c="/assets/vcr5.BajXu8XE.jpg",o="/assets/vcr6.CxN-b1o3.jpg",d="/assets/vcr7.D4aYKhIW.jpg",h="/assets/vcr8.ByRFpMlF.jpg",k="/assets/vcr9.B4apCqgi.jpg",g="/assets/vcr10.D8t6cQ5v.jpg",b="/assets/vcr11.Cz1VMbIx.jpg",m="/assets/vcr12.BNQe5j_u.jpg",u="/assets/vcr13.JV3PfcCZ.jpg",v="/assets/deadimage.BBBzAqkc.jpg",_="/assets/vcr14.Cjyr65Qp.jpg",F="/assets/resize.ppnxVOAW.jpg",j=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtcloud_retspen.md","filePath":"incomplete/webvirtcloud_retspen.md","lastUpdated":1772424525000}'),y={name:"incomplete/webvirtcloud_retspen.md"};function C(B,s,w,E,f,x){return e(),a("div",null,s[0]||(s[0]=[p("",70)]))}const q=i(y,[["render",C]]);export{j as __pageData,q as default}; diff --git a/assets/incomplete_webvirtmgr.md.XecR36zI.js b/assets/incomplete_webvirtmgr.md.XecR36zI.js new file mode 100644 index 0000000000..4ae36299a5 --- /dev/null +++ b/assets/incomplete_webvirtmgr.md.XecR36zI.js @@ -0,0 +1,5 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtmgr.md","filePath":"incomplete/webvirtmgr.md","lastUpdated":1772424525000}'),n={name:"incomplete/webvirtmgr.md"};function l(r,s,h,p,k,d){return t(),a("div",null,s[0]||(s[0]=[e(`

WebVirtMgr 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/retspen/webvirtmgr

控制节点和计算节点同时安装

  • 支持系统:Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • 系统会自动编译python的2.7的安装包后再进行部署,编译过程中会有报错提示但不用理会,只要脚本还在跑就说明一切正常

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
+&& chmod +x install_webvirtmgr.sh \\
+&& bash install_webvirtmgr.sh

国内

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
+&& chmod +x install_webvirtmgr.sh \\
+&& bash install_webvirtmgr.sh

缺点

原项目已经不再有维护,完全不推荐使用。

`,12)]))}const b=i(n,[["render",l]]);export{o as __pageData,b as default}; diff --git a/assets/incomplete_webvirtmgr.md.XecR36zI.lean.js b/assets/incomplete_webvirtmgr.md.XecR36zI.lean.js new file mode 100644 index 0000000000..4dad253b5b --- /dev/null +++ b/assets/incomplete_webvirtmgr.md.XecR36zI.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.QPV3Ar9-.js";const o=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtmgr.md","filePath":"incomplete/webvirtmgr.md","lastUpdated":1772424525000}'),n={name:"incomplete/webvirtmgr.md"};function l(r,s,h,p,k,d){return t(),a("div",null,s[0]||(s[0]=[e("",12)]))}const b=i(n,[["render",l]]);export{o as __pageData,b as default}; diff --git a/assets/incomplete_webvirtmgr.md.pI65os4S.js b/assets/incomplete_webvirtmgr.md.pI65os4S.js deleted file mode 100644 index ef1b984403..0000000000 --- a/assets/incomplete_webvirtmgr.md.pI65os4S.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as s,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtmgr.md","filePath":"incomplete/webvirtmgr.md","lastUpdated":1772422214000}'),l={name:"incomplete/webvirtmgr.md"};function h(n,i,r,p,k,d){return t(),a("div",null,i[0]||(i[0]=[e(`

WebVirtMgr 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/retspen/webvirtmgr

控制节点和计算节点同时安装

  • 支持系统:Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • 系统会自动编译python的2.7的安装包后再进行部署,编译过程中会有报错提示但不用理会,只要脚本还在跑就说明一切正常

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
-&& chmod +x install_webvirtmgr.sh \\
-&& bash install_webvirtmgr.sh

国内

bash
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \\
-&& chmod +x install_webvirtmgr.sh \\
-&& bash install_webvirtmgr.sh

缺点

原项目已经不再有维护,完全不推荐使用。

`,12)]))}const g=s(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/incomplete_webvirtmgr.md.pI65os4S.lean.js b/assets/incomplete_webvirtmgr.md.pI65os4S.lean.js deleted file mode 100644 index fb532be45f..0000000000 --- a/assets/incomplete_webvirtmgr.md.pI65os4S.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as t,ag as e}from"./chunks/framework.CSeR4K32.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"incomplete/webvirtmgr.md","filePath":"incomplete/webvirtmgr.md","lastUpdated":1772422214000}'),l={name:"incomplete/webvirtmgr.md"};function h(n,i,r,p,k,d){return t(),a("div",null,i[0]||(i[0]=[e("",12)]))}const g=s(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/index.md.Dy439T9m.js b/assets/index.md.Cfr7VjVV.js similarity index 92% rename from assets/index.md.Dy439T9m.js rename to assets/index.md.Cfr7VjVV.js index 884fb42d33..f286f973b2 100644 --- a/assets/index.md.Dy439T9m.js +++ b/assets/index.md.Cfr7VjVV.js @@ -1 +1 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"库苏恩","titleTemplate":"一键虚拟化项目","description":"","frontmatter":{"layout":"home","title":"库苏恩","titleTemplate":"一键虚拟化项目","tagline":"开源、易于使用的服务器虚拟化项目","hero":{"name":"一键虚拟化项目","text":"开源、易于使用的服务器虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键使用","details":"支持一键命令安装使用,轻松在X86_64和ARM架构的服务器上创建虚拟机或容器"},{"title":"基于主流系统开发","details":"基于 Debian、Ubuntu、Centos 等系统的长期维护版本开发,无论是什么系统总有一个方法能让你虚拟化出容器或虚拟机"},{"title":"端口转发和IP分配自动化","details":"自带内外网端口转发和IP地址自动分配(含IPV6、IPV4),支持TCP/UDP、VNC/RDP等协议,无需人工管理"},{"title":"批量虚拟化","details":"支持使用 QEMU、KVM、LXC、Docker 虚拟化批量开设容器或虚拟机"},{"title":"多系统多环境支持","details":"开设出的容器或虚拟机已支持主流系统,涵盖 Linux、Windows、MacOS、Android 系统,也支持纯粹的浏览器环境或桌面环境"},{"title":"自限制滥用","details":"部分虚拟化开设的容器或虚拟机支持设置屏蔽和装载限制,避免被用于滥用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1772422214000}'),i={name:"index.md"};function n(s,l,d,o,r,c){return a(),e("div")}const h=t(i,[["render",n]]);export{m as __pageData,h as default}; +import{_ as t,c as e,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"库苏恩","titleTemplate":"一键虚拟化项目","description":"","frontmatter":{"layout":"home","title":"库苏恩","titleTemplate":"一键虚拟化项目","tagline":"开源、易于使用的服务器虚拟化项目","hero":{"name":"一键虚拟化项目","text":"开源、易于使用的服务器虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键使用","details":"支持一键命令安装使用,轻松在X86_64和ARM架构的服务器上创建虚拟机或容器"},{"title":"基于主流系统开发","details":"基于 Debian、Ubuntu、Centos 等系统的长期维护版本开发,无论是什么系统总有一个方法能让你虚拟化出容器或虚拟机"},{"title":"端口转发和IP分配自动化","details":"自带内外网端口转发和IP地址自动分配(含IPV6、IPV4),支持TCP/UDP、VNC/RDP等协议,无需人工管理"},{"title":"批量虚拟化","details":"支持使用 QEMU、KVM、LXC、Docker 虚拟化批量开设容器或虚拟机"},{"title":"多系统多环境支持","details":"开设出的容器或虚拟机已支持主流系统,涵盖 Linux、Windows、MacOS、Android 系统,也支持纯粹的浏览器环境或桌面环境"},{"title":"自限制滥用","details":"部分虚拟化开设的容器或虚拟机支持设置屏蔽和装载限制,避免被用于滥用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1772424525000}'),i={name:"index.md"};function n(s,l,d,o,r,c){return a(),e("div")}const h=t(i,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/index.md.Dy439T9m.lean.js b/assets/index.md.Cfr7VjVV.lean.js similarity index 92% rename from assets/index.md.Dy439T9m.lean.js rename to assets/index.md.Cfr7VjVV.lean.js index 884fb42d33..f286f973b2 100644 --- a/assets/index.md.Dy439T9m.lean.js +++ b/assets/index.md.Cfr7VjVV.lean.js @@ -1 +1 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.CSeR4K32.js";const m=JSON.parse('{"title":"库苏恩","titleTemplate":"一键虚拟化项目","description":"","frontmatter":{"layout":"home","title":"库苏恩","titleTemplate":"一键虚拟化项目","tagline":"开源、易于使用的服务器虚拟化项目","hero":{"name":"一键虚拟化项目","text":"开源、易于使用的服务器虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键使用","details":"支持一键命令安装使用,轻松在X86_64和ARM架构的服务器上创建虚拟机或容器"},{"title":"基于主流系统开发","details":"基于 Debian、Ubuntu、Centos 等系统的长期维护版本开发,无论是什么系统总有一个方法能让你虚拟化出容器或虚拟机"},{"title":"端口转发和IP分配自动化","details":"自带内外网端口转发和IP地址自动分配(含IPV6、IPV4),支持TCP/UDP、VNC/RDP等协议,无需人工管理"},{"title":"批量虚拟化","details":"支持使用 QEMU、KVM、LXC、Docker 虚拟化批量开设容器或虚拟机"},{"title":"多系统多环境支持","details":"开设出的容器或虚拟机已支持主流系统,涵盖 Linux、Windows、MacOS、Android 系统,也支持纯粹的浏览器环境或桌面环境"},{"title":"自限制滥用","details":"部分虚拟化开设的容器或虚拟机支持设置屏蔽和装载限制,避免被用于滥用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1772422214000}'),i={name:"index.md"};function n(s,l,d,o,r,c){return a(),e("div")}const h=t(i,[["render",n]]);export{m as __pageData,h as default}; +import{_ as t,c as e,o as a}from"./chunks/framework.QPV3Ar9-.js";const m=JSON.parse('{"title":"库苏恩","titleTemplate":"一键虚拟化项目","description":"","frontmatter":{"layout":"home","title":"库苏恩","titleTemplate":"一键虚拟化项目","tagline":"开源、易于使用的服务器虚拟化项目","hero":{"name":"一键虚拟化项目","text":"开源、易于使用的服务器虚拟化项目","image":"https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritlhls/pages/main/logo.png","actions":[{"theme":"brand","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键使用","details":"支持一键命令安装使用,轻松在X86_64和ARM架构的服务器上创建虚拟机或容器"},{"title":"基于主流系统开发","details":"基于 Debian、Ubuntu、Centos 等系统的长期维护版本开发,无论是什么系统总有一个方法能让你虚拟化出容器或虚拟机"},{"title":"端口转发和IP分配自动化","details":"自带内外网端口转发和IP地址自动分配(含IPV6、IPV4),支持TCP/UDP、VNC/RDP等协议,无需人工管理"},{"title":"批量虚拟化","details":"支持使用 QEMU、KVM、LXC、Docker 虚拟化批量开设容器或虚拟机"},{"title":"多系统多环境支持","details":"开设出的容器或虚拟机已支持主流系统,涵盖 Linux、Windows、MacOS、Android 系统,也支持纯粹的浏览器环境或桌面环境"},{"title":"自限制滥用","details":"部分虚拟化开设的容器或虚拟机支持设置屏蔽和装载限制,避免被用于滥用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1772424525000}'),i={name:"index.md"};function n(s,l,d,o,r,c){return a(),e("div")}const h=t(i,[["render",n]]);export{m as __pageData,h as default}; diff --git a/case/case1.html b/case/case1.html index 2827fbc1d2..f0a9bfdffa 100644 --- a/case/case1.html +++ b/case/case1.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

ECS

Build and Release

FOSSA Status

Hits Downloads

融合怪测评项目 - GO版本

(仅环境安装[非必须]使用shell外无额外shell文件依赖,环境安装只是为了测的更准,极端情况下无环境依赖安装也可全测项目)

如有问题请 issues 反馈。

Go 版本:https://github.com/oneclickvirt/ecs

Shell 版本:https://github.com/spiritLHLS/ecs


适配系统和架构

编译与测试支持情况

编译支持的架构测试支持的架构编译支持的系统测试支持的系统
amd64amd64LinuxLinux
arm64arm64WindowsWindows
armMacOS(Darwin)MacOS
386FreeBSD
mips,mipsleAndroid
mips64,mips64le
ppc64,ppc64le
s390xs390x
riscv64

更多架构与系统请自行测试或编译,如有问题请开 issues。

待支持的系统

系统说明
OpenBSD/NetBSD部分Goalng的官方库未支持本系统(尤其是net相关项目)

功能

本项目初次使用建议查看说明:跳转


使用说明

Linux/FreeBSD/MacOS

一键命令

一键命令将默认不安装依赖,默认不更新包管理器,默认非互动模式

  • 国际用户无加速:

    bash
    export noninteractive=true && curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs
  • 国际/国内使用 CDN 加速:

    bash
    export noninteractive=true && curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs
  • 国内用户使用 CNB 加速:

    bash
    export noninteractive=true && curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs
  • 短链接:

    bash
    export noninteractive=true && curl -L https://bash.spiritlhl.net/goecs -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

    bash
    export noninteractive=true && curl -L https://ba.sh/JrVa -o goecs.sh && chmod +x goecs.sh && ./goecs.sh install && goecs

如果需要测试更准确,请按照下面的详细说明进行安装,添加非必需的依赖

详细说明

以下命令可控制是否安装依赖是否更新包管理器互动模式和非交互模式

展开查看详细说明
  1. 下载脚本

    国际用户无加速:

    bash
    curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国际/国内使用 CDN 加速:

    bash
    curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh

    国内用户使用 CNB 加速:

    bash
    curl -L https://cnb.cool/oneclickvirt/ecs/-/git/raw/main/goecs.sh -o goecs.sh && chmod +x goecs.sh
  2. 更新包管理器(可选择)并安装环境

    bash
    ./goecs.sh env

    非互动模式:

    bash
    export noninteractive=true && ./goecs.sh env
  3. 安装 goecs 本体(仅下载二进制文件无依赖安装)

    bash
    ./goecs.sh install
  4. 升级 goecs 本体

    bash
    ./goecs.sh upgrade
  5. 卸载 goecs 本体

    bash
    ./goecs.sh uninstall
  6. 帮助命令

    bash
    ./goecs.sh -h
  7. 唤起菜单

    bash
    goecs

命令参数化

展开查看各参数说明
bash
Usage: goecs [options]
+    
Skip to content
- +GOOS=darwin GOARCH=amd64 go build -o goecs_darwin

QA

Q: 为什么默认使用sysbench而不是geekbench

A: 比较二者特点

比较项sysbenchgeekbench
适用范围轻量级,几乎可在任何服务器上运行重量级,小型机器无法运行
测试要求无需网络,无特殊硬件需求需联网,IPV4环境,至少1G内存
开源情况基于LUA,开源,可自行编译各架构版本官方二进制闭源代码,不支持自行编译
测试稳定性核心测试组件10年以上未变每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU)
测试内容仅测试计算性能覆盖多种性能测试,分数加权计算,但部分测试实际不常用
适用场景适合快速测试,仅测试计算性能适合综合全面的测试
排行榜sysbench.spiritlhl.netbrowser.geekbench.com

goecs测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求

Q: 为什么使用Golang而不是Rust重构

A: 因为网络相关的项目目前以Golang语言为趋势,大多组件有开源生态维护,Rust很多得自己手搓,我懒得搞我没那个技术力

Q: 为什么不继续开发Shell版本而是选择重构

A: 因为太多千奇百怪的环境问题了,还是提前编译好测试的二进制文件比较容易解决环境问题(泛化性更好)

Q: 每个测试项目的说明有吗?

A: 每个测试项目有对应的维护仓库,自行点击查看仓库说明

Q: 测试进行到一半如何手动终止?

A: 按ctrl键和c键终止程序,终止后依然会在当前目录下生成goecs.txt文件和分享链接,里面是已经测试到的信息。

Q: 非Root环境如何进行测试?

A: 手动执行安装命令,实在装不上也没问题,直接在release中下载对应架构的压缩包解压后执行即可,只要你能执行的了文件。或者你能使用docker的话用docker执行。

致谢

感谢 DKLYDataHub - IP Geolocation Datahe.net bgp.tools ipinfo.io maxmind.com cloudflare.com ip.sb scamalytics.com abuseipdb.com ip2location.com ip-api.com ipregistry.co ipdata.co ipgeolocation.io ipwhois.io ipapi.com ipapi.is ipqualityscore.com bigdatacloud.com virustotal.com ipfighter.com getipintel.net fraudlogix.com 等网站提供的API进行检测,感谢互联网各网站提供的查询资源

感谢

h501

提供的免费托管支持本开源项目的共享测试结果存储

同时感谢以下平台提供编辑和测试支持

golandibmzmto

History Usage

goecs

Stargazers over time

Stargazers over time

License

FOSSA Status

+ \ No newline at end of file diff --git a/case/case2.html b/case/case2.html index 5512b37f06..511a7d0aa1 100644 --- a/case/case2.html +++ b/case/case2.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,43 +22,43 @@ -
Skip to content

仓库

https://github.com/spiritLHLS/one-click-installation-script

Hits

所有脚本如需在国内服务器使用,请在链接前加上https://ghproxy.com/确保命令可以下载本仓库的shell脚本执行

一键修复脚本

运行所有一键修复脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键尝试修复apt源

  • 支持系统:Ubuntu 12+,Debian 6+
  • 修复apt下载包进程意外退出导致的源锁死
  • 修复apt源broken损坏
  • 修复apt源多进程占用锁死
  • 修复apt源公钥缺失
  • 修复替换系统可用的apt源列表,国内用阿里源,国外用官方源
  • 修复本机的Ubuntu系统是EOL非长期维护的版本(奇数或陈旧的偶数版本),将替换为Ubuntu官方的old-releases仓库以支持apt的使用
  • 修复只保证apt update不会报错,其他命令报错未修复
  • 如若修复后install还有问题,重启服务器解决问题
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/package.sh -o package.sh && chmod +x package.sh && bash package.sh

一键尝试修复系统时间

  • 支持系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 由于系统时间不准确都是未进行时区时间同步造成的,使用chronyd进行时区时间同步后应当解决了问题
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/modify_time.sh -o modify_time.sh && chmod +x modify_time.sh && bash modify_time.sh

一键尝试修复sudo警告

  • 一键尝试修复sudo: unable to resolve host xxx: Name or service not known警告(爆错)

不要在生产环境上使用该脚本,否则容易造成网络hosts配置错误,配置的host名字不在外网IP上反而在内网IP(127.0.0.1)上

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/check_sudo.sh -o check_sudo.sh && chmod +x check_sudo.sh && bash check_sudo.sh

一键修改系统自带的journal日志记录大小释放系统盘空间

  • 支持系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 1.自定义修改大小,单位为MB,一般500或者1000即可,有的系统日志默认给了5000甚至更多,不是做站啥的没必要
    • 请注意,修改journal目录大小会影响系统日志的记录,因此,在修改journal目录大小之前如果需要之前的日志,建议先备份系统日志到本地
  • 2.自定义修改设置系统日志保留日期时长,超过日期时长的日志将被清除
  • 3.默认修改日志只记录warning等级(无法自定义)
  • 4.以后日志的产生将受到日志文件大小,日志保留时间,日志保留等级的限制
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/resize_journal.sh -o resize_journal.sh && chmod +x resize_journal.sh && bash resize_journal.sh

一键尝试修复网络

该脚本轻易勿要使用,请确保运行时服务器无重要文件或程序,出现运行bug后续可能需要重装系统

一定要在screen中执行该脚本,否则可能导致修改过程中ssh断链接而修改失败卡住最终SSH无法连接!不在screen中执行后果自负!

  • 支持系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 尝试修复nameserver为google源或cloudflare源
  • 尝试修复为IP类型对应的网络优先级(默认IPV4类型,纯V6类型再替换为IPV6类型)
bash
curl -L https://cdn.spiritlhl.workers.dev/https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/repair_scripts/network.sh -o network.sh && chmod +x network.sh && bash network.sh

如果是纯V6的也可以不使用上面脚本的nat64,使用warp添加V4网络

比如:https://github.com/fscarmen/warp

bash
wget -N https://raw.githubusercontent.com/fscarmen/warp/main/menu.sh && bash menu.sh [option] [lisence]

非纯V6的,带V4切换优先级到IPV4可用以下命令

bash
sudo sed -i 's/.*precedence ::ffff:0:0\/96.*/precedence ::ffff:0:0\/96  100/g' /etc/gai.conf && sudo systemctl restart networking

一键环境安装脚本

只推荐在新服务器上安装,环境不纯净不保证不出bug

运行所有一键环境安装脚本前注意看说明,以及保证服务器无重要数据,运行后造成的一切后果作者不负任何责任,自行评判风险!

一键安装jupyter环境

  • 本脚本尝试使用Miniconda3安装虚拟环境jupyter-env再进行jupyter和jupyterlab的安装,如若安装机器不纯净勿要轻易使用本脚本!
  • 本脚本为实验性脚本可能会有各种bug,勿要轻易尝试!
  • 验证已支持的系统:
    • Ubuntu 系 - 推荐,脚本自动挂起到后台
    • Debian 系 - 部分可能需要手动挂起到后台,详看脚本运行安装完毕的后续提示
  • 可能支持的系统(未验证):centos 7+,Fedora,Almalinux 8.5+
  • 执行脚本,之前有用本脚本安装过则直接打印设置的登陆信息,没安装过则进行安装再打印信息,如果已安装但未启动则自动启动后再打印信息
  • 如果是初次安装无脑输入y回车即可,按照提示进行操作即可,安装完毕将在后台常驻运行,自动添加常用的安装包通道源
  • 安装完毕后,如果需要在lab中安装第三方库需要在lab中使用terminal并使用conda进行下载而不是pip3下载,这是需要注意的一点
  • 安装过程中有判断是否为中国IP,可选择是否使用中国镜像

原始用途是方便快捷的在按小时计费的超大型服务器上部署python环境进行科学计算,充分利用时间别浪费在构建环境上。

bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/jupyter.sh -o jupyter.sh && chmod +x jupyter.sh && bash jupyter.sh

一键安装R语言环境

  • 安装前需使用Miniconda3安装虚拟环境jupyter-env,然后进行jupyter和jupyterlab的安装,再然后才能安装本内核
  • 简单的说,需要执行本仓库对应的jupyter安装脚本再运行本脚本安装R语言环境,会自动安装R环境内核和图形设备支持库
  • x11可能需要手动启动一下,执行sudo /usr/bin/Xorg
  • 可能支持的系统(未验证):centos 7+,Fedora,Almalinux 8.5+
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/R.sh -o R.sh && chmod +x R.sh && bash R.sh

一键安装rust环境

  • 支持系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 加载官方脚本安装,前置条件适配系统以及后置条件判断安装的版本
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/rust.sh -o rust.sh && chmod +x rust.sh && bash rust.sh

一键安装C环境

  • 一键安装C++环境
  • 支持系统:使用apt或者yum作为包管理器的系统
  • 如果未安装则安装,如果有安装则提示升级
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/cplusplus.sh -o cplusplus.sh && chmod +x cplusplus.sh && bash cplusplus.sh

一键安装vnstat环境

  • 支持系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 加载官方文件编译安装,前置条件适配系统以及后置条件判断安装的版本
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/vnstat.sh -o vnstat.sh && chmod +x vnstat.sh && bash vnstat.sh

一键升级低版本debian为debian11

  • 支持系统:debian 6+
  • 升级后需要重启系统加载内核,升级过程中需要选择的都无脑按回车即可
  • 升级是一个版本迭代一个版本,所以如果版本低,每执行一次升级一个版本,直至升级到debian11
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/todebian11.sh -o todebian11.sh && chmod +x todebian11.sh && bash todebian11.sh

一键升级低版本ubuntu为ubuntu22

  • 支持系统:Ubuntu 16+
  • 升级后需要重启系统加载内核,升级过程中需要选择的都无脑按回车即可
  • 升级是一个版本迭代一个版本,所以如果版本低,每执行一次升级一个版本,直至升级到ubuntu22
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/toubuntu22.sh -o toubuntu22.sh && chmod +x toubuntu22.sh && bash toubuntu22.sh

一键安装zipline平台

  • 应该支持的系统:Ubuntu 18+,Debian 8+,centos 7+,Fedora,Almalinux 8.5+
  • 暂时只在Ubuntu上验证无问题
  • 如若要设置反向代理绑定域名,安装前请保证原服务器未安装过nginx,如若已安装过nginx,请自行配置反向代理本机的3000端口
  • 默认一路回车是不启用反代不安装nginx的,自行选择,如需通过本脚本配置反代系统一定要未安装过nginx并在填写y或Y开启安装
  • zipline 平台功能: ShareX,自定义短链接,文件上传分享,多用户校验,高亮显示,阅后即焚,设置简单 (含pastebin)
  • 自动安装docker,docker-compose,如若已安装zipline在/root目录下,则自动更新
  • 反向代理如若已设置成功,还需要在面板设置中填写域名,绑定启用
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/zipline.sh -o zipline.sh && chmod +x zipline.sh && bash zipline.sh

如果需要删除0字节文件,打开/root/zipline文件夹,执行

docker-compose exec zipline yarn scripts:clear-zero-byte

按照提示操作

一键安装filebrowser平台

  • 端口设置为3030了,其他登陆信息详见提示
  • filebrowser平台支持下载上传文件到服务器,批量下载多个文件(自定义压缩格式),构建文件分享链接,设置分享时长
  • 如果本地有启用IPV6优先级可能绑定到V6去了,使用lsof -i:3030查看绑定情况,切换优先级后再安装就正常了
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/filebrowser.sh -o filebrowser.sh && chmod +x filebrowser.sh && bash filebrowser.sh

一键删除平台监控

  • 一键移除大多数云服务器监控
  • 涵盖阿里云、腾讯云、华为云、UCLOUD、甲骨文云、京东云
bash
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/install_scripts/dlm.sh -o dlm.sh && chmod +x dlm.shh && bash dlm.sh

部分手动命令

一键开启root登陆并替换密码

bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

一键屏蔽邮件端口避免被恶意程序使用

bash
iptables -A INPUT -p tcp --dport 25 -j DROP
+    
Skip to content
- +sudo apt remove coder -y
+ \ No newline at end of file diff --git a/case/case3.html b/case/case3.html index 7345a5c1d7..ec33ed9e53 100644 --- a/case/case3.html +++ b/case/case3.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/spiritLHLS/ecsspeed

Hits

ecsspeed

自动更新测速服务器节点列表的网络基准测试脚本

Network benchmarking script that automatically updates the list of speed measurement server nodes

说明

所有组件以及数据均来源于平台或已有的开源项目,无非开源部分,放心食用

对应 speedtest.net 的自动更新测速服务器ID的测速脚本

日常推荐使用

bash <(wget -qO- bash.spiritlhl.net/ecs-net)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-net.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-net.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表大概每7天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

当官方CLI安装失败(如罕见的架构或者官方网站访问失败时)自动使用 speedtest-go 作为替代品测速

对应 speedtest.cn 的自动更新测速服务器ID的测速脚本

单线程测速

bash <(wget -qO- bash.spiritlhl.net/ecs-cn)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-cn.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-cn.sh)

支持测速的架构:i386, x86_64, amd64, arm64, s390x, riscv64, ppc64le, ppc64

涵盖中国三大运营商、香港、台湾的测速节点,默认的三网测速每个运营商选择本机ping值最低的两个节点测速,详情三网测速才是全测,节点列表每天自动更新一次。

支持国内服务器测试(有判断是否为国内机器),但由于国内服务器带宽过小,会很慢,详见初次运行的显示

自动更新测试服务器列表的三网延迟测试脚本

平均耗时10~15秒

bash <(wget -qO- bash.spiritlhl.net/ecs-ping)

bash <(wget -qO- --no-check-certificate https://github.com/spiritLHLS/ecsspeed/raw/main/script/ecsspeed-ping.sh)

或国内用

bash <(wget -qO- --no-check-certificate https://ghproxy.com/https://raw.githubusercontent.com/spiritLHLS/ecsspeed/main/script/ecsspeed-ping.sh)

效果图

图片

功能

  • [x] 自动抓取 speedtest.cn 节点信息结合已有信息去重并更新列表数据
  • [x] 自动抓取 speedtest.net 节点信息结合已有信息去重并更新列表数据
  • [x] 对应 speedtest.net 的自动更新测速服务器列表的测速脚本
  • [x] 对应 speedtest.cn 的自动更新测速服务器列表的测速脚本
  • [x] 自动更新测试服务器列表的三网Ping值测试脚本

.cn数据

仓库:https://github.com/spiritLHLS/speedtest.cn-CN-ID

.net数据

仓库:https://github.com/spiritLHLS/speedtest.net-CN-ID

- +
Skip to content
+ \ No newline at end of file diff --git a/case/case4.html b/case/case4.html index 71844d095c..30d8ae4f14 100644 --- a/case/case4.html +++ b/case/case4.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/oneclickvirt/backtrace

Hits

backtrace

三网回程路由线路测试

基于 https://github.com/zhanghanyun/backtrace 的重构和优化,与原版存在很大不同

路由的线路判断最终还是得人工判断的才准确,本项目测试结果仅供参考

功能

  • [x] 检测回程显示IPV4地址时的线路,不显示IP地址时显示ASN检测不到,原版backtrace也支持
  • [x] 支持对48379929163线路的判断,原版backtrace也支持
  • [x] 支持对CN2GTCN2GIA线路的判断,原版backtrace不支持
  • [x] 支持对CMIN2CMI线路的判断,原版backtrace不支持
  • [x] 支持对整个回程路由进行线路分析,与原版backtrace仅进行一次判断不同
  • [x] 修复原版backtrace对IPV4地址信息获取时json解析失败依然打印信息的问题
  • [x] 增加对全平台的编译支持,原版backtrace仅支持linux平台的amd64和arm64架构

使用

shell
curl https://raw.githubusercontent.com/oneclickvirt/backtrace/main/backtrace_install.sh -sSf | sh

更多架构请查看 https://github.com/oneclickvirt/backtrace/releases/tag/output

概览图

图片

图片

图片

- +
Skip to content
+ \ No newline at end of file diff --git a/case/case5.html b/case/case5.html index 2304e4825b..3b11c8f7a2 100644 --- a/case/case5.html +++ b/case/case5.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/spiritLHLS/Oracle-server-keep-alive-script

Hits

Oracle-server-keep-alive-script

实际不止可以在甲骨文服务器上使用,也可以使用在任意ARM或X86_64架构的系统,用作资源占用

甲骨文服务器保活脚本

适配系统:已在Ubuntu 20+,Debian 10+, Centos 7+, Oracle linux 8+,AlmaLinux 8.5+

上述系统验证无问题,别的主流系统应该也没有问题

可选占用:CPU,内存,带宽

安装完毕后如果有问题请卸载脚本反馈问题(重复卸载也没问题)

所有资源(除了CPU)可选默认配置则动态占用,实时调整,避免服务器有别的任何资源已经超过限额了仍然再占用资源

为避免GitHub的CDN抽风加载不了新内容,所有新更新已使用Gitlab仓库

由于speedtest-go的release依赖于GitHub,所以请检查 www.githubstatus.com ,有问题时无法安装带宽占用

基础开发完毕,测试中,有问题请在issues中反馈

选项1安装,选项2卸载,选项3更新安装引导脚本,选项4退出脚本

安装过程中无脑回车则全部可选的占用都占用,不需要什么占用输入n再回车

如果选择带宽占用,会询问使用speedtest-go占用还是使用wget占用,按照提示进行选择即可

有询问是否需要带宽占用的参数自定义,这时候默认选项就是n,回车就使用默认配置,输入y再回车则需要按照提示自定义参数

curl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh && chmod +x oalive.sh && bash oalive.sh

bash oalive.sh

bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)

说明

  • 提供两种CPU占用模式:DD模拟占用和科学计算模式,用户可以自由选择,占用范围设置在15%至25%之间,更推荐DD模拟占用
  • DD模拟占用在守护进程中设置了CPU占用的最高限制
  • 默认情况下,CPU占用设置为25%最高值,计算方法是核数乘以12%,如果计算结果低于25%,则设置为该值;如果计算结果高于25%,则按照计算结果的比例进行设置。
  • 内存占用设置为占用总内存的20%,占用时间为300秒,休息时间为300秒。
  • 每300秒检测一次内存占用情况,并根据需要动态调整占用大小。如果内存占用已经大于20%,则不增加占用。
  • 在占用过程中,使用守护进程和开机自启服务,以确保占用任务持续且有效。
  • 默认选项的带宽占用每45分钟下载一次大小在1G至10G之间的文件,只进行下载而不保存。在下载过程中会占用硬盘空间,但在下载完成后会自动释放。
  • 默认选项的带宽占用动态调整实际下载的带宽/速率,限制每次下载的最长时长为6分钟。在每次下载之前,会测试最大可用带宽,并根据实时结果将下载速率设置为30%的带宽。
  • 带宽占用测试使用了speedtest-cli和speedtest-go两种工具,以防其中之一不可用时使用第二种工具,用户可以自定义设置带宽占用,此时详见设置提示。
  • 提供一键卸载所有占用服务的选项,卸载将删除所有脚本、服务、任务、守护进程和开机自启设置。
  • 提供一键检查更新的功能,更新范围仅限于脚本更新。请在更新后重新设置占用服务
  • 对所有进程执行增加唯一性检测,避免重复运行,使用PID文件进行判断。

如若不希望一键的,希望自定义设置时间的,请查看README_CRON.md自行设置定时任务

- +
Skip to content
+ \ No newline at end of file diff --git a/case/case6.html b/case/case6.html index e50eaab89e..dbeb104bf4 100644 --- a/case/case6.html +++ b/case/case6.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/spiritLHLS/addswap

addswap

为openvz、kvm虚拟化的linux服务器增加swap分区(虚拟内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

已增加openvz架构重启swap自动添加的

openvz这个添加=掩耳盗铃,实际受到虚拟化限制应该是无法添加的,只能由虚拟化的宿主机控制,同理LXC虚拟化的也只能由宿主机控制,都无法自主添加虚拟内存SWAP

因此,该项目不再更新,除非另有需求

单位换算:输入 1024 产生 1G SWAP内存

致谢

kvm分区原版脚本源自 https://www.moerats.com/

bash
curl -L https://www.moerats.com/usr/shell/swap.sh -o swap.sh && chmod +x swap.sh && bash swap.sh

openVZ分区原版脚本源自

http://linux-problem-solver.blogspot.com/2013/08/create-fake-swap-in-openvz-vps-if-you-get-swapon-failed-operation-not-permitted-error.html

感谢 @fscarmen 提供优化建议

- +
Skip to content
+ \ No newline at end of file diff --git a/case/case7.html b/case/case7.html index 11d5a3f9ed..349f045304 100644 --- a/case/case7.html +++ b/case/case7.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/spiritLHLS/addzram

addzram

为linux服务器启用zram(压缩内存)

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addzram/main/addzram.sh -o addzram.sh && chmod +x addzram.sh && bash addzram.sh

类同前面的addswap项目

同样是给机器优化内存占用的东西,只不过zram是压缩内存占用,swap是附加虚拟内存增加内存空间,二者都会占用CPU资源,zram在CPU性能冗余的机器上使用更优

(理论上zram会比swap的性能占用低,但未实际测试过)

单位换算:输入 1024 产生 1G 的 zram 设备压缩内存,zram 设备大小不能大于实际内存大小

致谢

感谢 @Ella-Alinda 提供优化建议

- +
Skip to content
+ \ No newline at end of file diff --git a/case/index.html b/case/index.html index a6e3d40c83..01aa6d92f4 100644 --- a/case/index.html +++ b/case/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ - - + + \ No newline at end of file diff --git a/developer/index.html b/developer/index.html index e15b50eab7..2e4adce7fe 100644 --- a/developer/index.html +++ b/developer/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ - - + + \ No newline at end of file diff --git a/developer/l10n.html b/developer/l10n.html index 2871136220..b3219bb18f 100644 --- a/developer/l10n.html +++ b/developer/l10n.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
- +
Skip to content
+ \ No newline at end of file diff --git a/en/developer/index.html b/en/developer/index.html index 465f1ab944..e6699bab89 100644 --- a/en/developer/index.html +++ b/en/developer/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Development ManualWelcome to the oneclickvirt Development Manual.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/developer/l10n.html b/en/developer/l10n.html index bb57f95781..46bf9d6d3e 100644 --- a/en/developer/l10n.html +++ b/en/developer/l10n.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

You can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/block/block_docker.html b/en/guide/block/block_docker.html index eb6e922b04..9f4f0a55b3 100644 --- a/en/guide/block/block_docker.html +++ b/en/guide/block/block_docker.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/block/block_incus.html b/en/guide/block/block_incus.html index 92d443f302..8477666ed9 100644 --- a/en/guide/block/block_incus.html +++ b/en/guide/block/block_incus.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/block/block_iptables.html b/en/guide/block/block_iptables.html index a0604d64a9..122281ed58 100644 --- a/en/guide/block/block_iptables.html +++ b/en/guide/block/block_iptables.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

Blocking abuse through iptables

Basic Usage of iptables

1. Start iptables

In most Linux distributions, the iptables service can be started using the following command:

bash
sudo systemctl start iptables

2. Set Rules

After starting iptables, you can set rules to block abusive traffic. For example, the following command will block traffic from a specific IPv4 address:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. Query Rules

After setting the rules, you can use the following command to view the current iptables rules:

bash
sudo iptables -L

This will list all input, output, and forwarding rules.

4. Stop iptables

If you need to stop the iptables service, you can use the following command:

bash
sudo systemctl stop iptables

5. Save Rules

To ensure that the rules persist after a reboot, you can save the current rules:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. Restore Rules

When you need to restore the rules, you can use the following command:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. Other Common Commands

  • List Rules (Detailed Information):

    bash
    sudo iptables -L -v
  • Delete Specific Rule:

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • Flush All Rules:

    bash
    sudo iptables -F

Block abusive traffic on the host

  • prevention in advance

Blocking Mining Behavior

shell
strings=(
+    
Skip to content
- +iptables -X SPEED_BLOCK
+ \ No newline at end of file diff --git a/en/guide/block/block_lxd.html b/en/guide/block/block_lxd.html index 58b68e9a6d..9d002c22a3 100644 --- a/en/guide/block/block_lxd.html +++ b/en/guide/block/block_lxd.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Blocking Abusive Behavior via Shell Scripts

Blocking Ingress/Egress Traffic on Easily Abused Ports and Filtering Out Port Scanning and Exploitation Toolkits

  • (Optional, this script is solely for preventing container abuse and is not mandatory to install.)
  • Precautionary Measures

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

Use the 'screen' command to configure monitoring and blocking of certain processes' commands: terminate containers immediately upon the appearance of specific processes.

  • To stop monitoring, you can use the 'screen' command to stop the window named 'lxc_monitor' and delete it.
  • (Optional, this script is only for preventing misuse of containers; it's fine not to install it.)
  • Shutdown afterwards.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/block/block_pve.html b/en/guide/block/block_pve.html index 5a50f14bcc..8de84c2fbc 100644 --- a/en/guide/block/block_pve.html +++ b/en/guide/block/block_pve.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

Avoid theft by setting up a firewall to limit the IPs used by the VMs

Create the following file under the PVE's host machine

shell
/etc/pve/firewall/<VMID>.fw
+    
Skip to content
- +xxx.xxx.xxx.xxx

<VMID> is replaced with the VMID number of the virtual machine, <net0> is replaced with the corresponding alias in the network device (which generally doesn't need to be changed unless you're restricted to IPV6), and xxx.xxx.xxx.xxx is replaced with the public IP address, noting that this IP corresponds to the network device in front of it.

The idea here is that net0 can only use the IP xxx.xxx.xxx.xxx, if you use any other IP the data will be dropped, thus restricting the VM to only use this IP.

There can be more than one IP, once this rule is enabled the VM can't use any other IP, if you don't write an IPv6 address it means the VM can't use an IPv6 address.

TIP

This setting is only recommended when opening VMs with separate IPs that are not NAT full port mapped, otherwise it may cause strange issues resulting in the server being without a network.

This method is not suitable for use on PVEs that open any NAT VMs/containers.

+ \ No newline at end of file diff --git a/en/guide/containerd/containerd_build.html b/en/guide/containerd/containerd_build.html index a696586103..16b6a940aa 100644 --- a/en/guide/containerd/containerd_build.html +++ b/en/guide/containerd/containerd_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,16 +22,16 @@ -
Skip to content

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single containerd container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and containerd-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

Example

Supported variables for running:

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
nerdctl ps -a

Enter container

shell
nerdctl exec -it ct1 bash

Enter Alpine container

shell
nerdctl exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
nerdctl rm -f ct1

View container logs

shell
nerdctl logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+    
Skip to content
- +rm -rf ctlog

Restart All Containers After Host Reboot

By default, containers are not configured to auto-restart. Run the following command to start all stopped containers:

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
+ \ No newline at end of file diff --git a/en/guide/containerd/containerd_install.html b/en/guide/containerd/containerd_install.html index 25d7ce729b..58ad7b8ce2 100644 --- a/en/guide/containerd/containerd_install.html +++ b/en/guide/containerd/containerd_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Preface

Install the containerd environment, including containerd + runc + nerdctl + CNI + buildkitd full suite.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs containerd + runc + nerdctl + CNI + buildkitd (via nerdctl-full bundle)
  • Automatically configures CNI network (containerd-net: 172.20.0.0/16) with iptables NAT rules
  • Detects public IPv6 address; if present, automatically creates containerd-ipv6 CNI network and starts NDP Responder
  • Installs DNS liveness check service (check-dns.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

After installation, run nerdctl ps -a to verify the containerd environment is working correctly.

Uninstall containerd Environment

One-click uninstall of the entire containerd environment, including all containers, images, CNI networks, systemd services, and nerdctl/containerd binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and CNI network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/containerd/containerd_precheck.html b/en/guide/containerd/containerd_precheck.html index f70ee38973..3047ed0c73 100644 --- a/en/guide/containerd/containerd_precheck.html +++ b/en/guide/containerd/containerd_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The containerd solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/containerd

Project Features

Bulk or individual NAT server provisioning based on containerd + nerdctl runtime

  • Installs containerd + runc + nerdctl + CNI + buildkitd via the nerdctl-full bundle
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to official images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Default unprivileged containers, supports lxcfs mounting (if lxcfs is installed on the host)
  • Supports disk limit parameters (requires xfs/btrfs snapshotter with storage-opt support)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with Docker

Featurecontainerddocker
Runtimecontainerd + runcDocker daemon + runc
Management CLInerdctldocker
Daemon requiredLightweight daemonHeavy Docker daemon
Container supportLinux containers (LXC)Linux containers + KVM VMs
Installationnerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/containerd/containerd_qa.html b/en/guide/containerd/containerd_qa.html index 7311137e37..bd17056193 100644 --- a/en/guide/containerd/containerd_qa.html +++ b/en/guide/containerd/containerd_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,15 +22,15 @@ -
Skip to content

FAQ

nerdctl: command not found

The containerd environment is not correctly installed or /usr/local/bin is not in PATH.

Fix:

shell
export PATH="/usr/local/bin:$PATH"
+    
Skip to content
- +iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

Container IPv6 not working

  1. Confirm the host has a public IPv6 address
  2. Check if the containerd-ipv6 CNI network exists:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. Check if the ndpresponder container is running:
shell
nerdctl ps | grep ndpresponder

Image pull failed

The script includes built-in CDN detection. You can also manually test CDN availability:

shell
curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

How to completely reset the containerd environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

If lxcfs is not installed on the host, containers will see the host's CPU/memory view. Install lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
+yum install -y lxcfs       # CentOS/RHEL

Disk limit not working

Disk limits require xfs or btrfs snapshotter support. The default overlay snapshotter does not support container-level disk limits.

For disk limits, refer to the docker or incus solution documentation.

+ \ No newline at end of file diff --git a/en/guide/containerd/containerd_thanks.html b/en/guide/containerd/containerd_thanks.html index 0ff15decdb..54909a88cb 100644 --- a/en/guide/containerd/containerd_thanks.html +++ b/en/guide/containerd/containerd_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/dashboard.html b/en/guide/dashboard.html index 2786a496fc..3f0b556364 100644 --- a/en/guide/dashboard.html +++ b/en/guide/dashboard.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Preparation Work

To virtualize a server, you will need:

  1. A server (VPS or Dedicated Server) that can connect to the public internet. It's preferable if this server can access GitHub's RAW pages perfectly, as some projects and components might not use CDN acceleration.

  2. A stable SSH connection from your local machine. If the connection isn't stable, you can use the screen command to create a window and execute commands within that window.

TIP

If you're unfamiliar with the screen command, please search for relevant tutorials to learn it, or you can use tmux as an alternative.

  1. Ensure that the server's system and hardware meet the requirements specified by the corresponding project. Refer to the project's documentation for detailed information.

This document will use a VPS as an example, and the VPS should be clean without any native environment issues. If necessary, reinstall the system to ensure the initial environment's cleanliness.

WARNING

The PVE project might cause problems on the host machine. If you're not familiar with debugging bugs and fixing system issues, it's not recommended to use PVE in a production environment. When using PVE-related scripts, make sure the host machine can be reinstalled at any time.

Project Repository

Welcome Star and Fork, all resources are open source, no non-open source parts, reproduced as well as the use of please write on the source of this site, thank you!

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/dashboardq.html b/en/guide/dashboardq.html index 645cd28460..5f6013ad8a 100644 --- a/en/guide/dashboardq.html +++ b/en/guide/dashboardq.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_android.html b/en/guide/docker/docker_android.html index 1254d44c7d..9302ac0081 100644 --- a/en/guide/docker/docker_android.html +++ b/en/guide/docker/docker_android.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,13 +22,13 @@ -
Skip to content

Running Android Virtual Machine in Docker

One-Click Deployment

  • Customizable Android version
  • Automatically creates a validated web website
  • Automatically installs Nginx and configures reverse proxy. Option to bind a domain is available. Default is port 80 if no domain binding is chosen.
  • No need to worry about host machine supporting nested virtualization
  • Supports x86_64 and ARM architectures

Host machine should have a minimum configuration of 1 core, 2GB RAM, and 15GB storage, else starting the setup might lead to host machine freezing.

Ubuntu is recommended for hosting, Debian may cause white screen on Android.

Newer Android versions occupy more resources. The above configuration requirements are for the minimum version of Android. (Personally tested with the tag "12.0.0-latest", higher versions resulted in a blank screen. Test which version works for you.)

If, after 5 minutes after opening, the login verification of the browser page still keeps failing, then please check the logs of the Android container, it is probable that the Android container has crashed, and it is recommended to replace the container with a lower version of the Android system for installation.

Setup:

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

After executing the command, follow the prompts to input the required information. Make sure to choose the version by entering the corresponding number index. Once the installation is complete, open YourMachineIPv4+80Port to log in.

If you need to check the generated Android information and web login details, execute cat /root/android_info to retrieve the information.

Default username: onea Default password: oneclick

For remote desktop, click on H264 Converter to initiate the redirection.

Please note that currently only one Android container can be generated. Do not generate duplicates. If you need to replace the version, please execute the subsequent commands after deletion.

Temporarily only support the opening has been used, can not restart the server, reboot may not be able to restart after the mapping success, self-test

Deletion:

  • Delete the container
  • Delete the corresponding container image
  • Delete the configuration file
shell
docker rm -f android
+    
Skip to content
- +rm -rf /root/android_info

Install the APK file

Click list files to open the file directory, switch to the /storage/emulated/0/Download directory, drag and drop the apk into it to install it, and wait for the progress to finish running, and the apk will be uploaded to the Android container.

At this point, go back to the Android interface, open the file manager, it will show the file you just uploaded, click on it to install.

+ \ No newline at end of file diff --git a/en/guide/docker/docker_build.html b/en/guide/docker/docker_build.html index 68781e0b3b..0491533744 100644 --- a/en/guide/docker/docker_build.html +++ b/en/guide/docker/docker_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,31 +22,31 @@ -
Skip to content

Introduction

There are two methods of building

Setting Up Standalone

  • Generate only one docker
  • Can be configured to bind a separate IPV6 address, but requires a docker previously installed using the environment installation command of this set of scripts, and requires the host to be bound to at least the /112 IPV6 subnet
  • Support for x86_64 and ARM architecture servers

Download the Script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

Example

Running the supported variables are as follows

./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

Currently, the system only supports selecting:

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

with Debian being the default choice.

The hard disk size can only be set by filling in the value if you have selected the option to support limiting the hard disk size during the previous Docker installation, it is not limited when not filled in by default.

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

The following is the information for the created example container:

AttributeValue
Container Nametest
Username for SSH Loginroot
Password for SSH Login123456
Number of CPU Cores1
Memory Size512MB
SSH Port25000
Port Range for Internal and External Mapping34975 to 35000
Operating Systemdebian
Whether to bind a separate IPV6 addressN
Disk Size5G

Deleting the test container

shell
docker rm -f test
+    
Skip to content
- +done
+ \ No newline at end of file diff --git a/en/guide/docker/docker_custom.html b/en/guide/docker/docker_custom.html index 4fa46e5e7c..290a6986d5 100644 --- a/en/guide/docker/docker_custom.html +++ b/en/guide/docker/docker_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

Script for One-Click Installation of Certain Containers using Docker

Each container has specific configuration requirements; please refer to them individually.

If the configured memory is not enough, then it's okay to make up for it with the virtual memory here.

Note that the following scripts must be pre-installed using the environment installation scripts in this set of tutorials before using them

One-Click Setup of Firefox Browser Container

  • Crash recovery on startup has been configured.
  • Chinese fonts have been integrated into the container.
  • Built-in web validation with the option to set a custom password.
  • Maximum memory usage for the container is customizable.
  • Choice to enable VNC port, disabled by default.
  • No need to consider support for nested virtualization or server architecture.
  • Audio mapping is not supported; sound transmission is unavailable on both the web and VNC.

The host machine should have at least 1 core, 1GB RAM, and 5GB disk space. The created container will occupy a minimum of 1GB disk space.

Setup:

After setup, the default password is oneclick.

The default web port is 3003. Once the setup is complete, simply open HOST_IPV4:PORT in your browser.

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

Deletion

Modify the following port number 3003 to your actual port number, and then execute the command to delete the container, configuration file, and corresponding image

shell
PORT="3003"
+    
Skip to content
- +docker rmi lscr.io/linuxserver/chromium

One-Click Setup of Desktop Container

  • Crashes automatically restart have been configured.
  • Chinese fonts are included in the setup.
  • Built-in web validation with the ability to set your own username and password.
  • Customizable maximum memory usage for the container.
  • No need to consider nested virtualization support and server architecture.
  • Sound mapping is supported, and sound can be transmitted via the web interface.

A complete Linux desktop on which you can use a browser

The host system requires at least 1 core, 2 GB of RAM, and 5 GB of hard disk space. The created container will occupy a minimum of 3.2 GB of hard disk space.

Setup Instructions:

After setup, the default username is onew and the password is oneclick. The default maximum memory usage is 2 GB.

The default web port for HTTP protocol is 3004, and for HTTPS protocol is 3005. After setup, open the corresponding protocol with localhost's IPV4:port in your web browser.

Run the following command to download and execute the setup script:

curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

Deletion

Command:

shell
docker ps -a

Query for containers with a prefix of 'webtop' in their names, and record the IDs of these containers.

shell
docker rm -f container_ID

To remove the corresponding image, you can use the following command after deleting all associated containers:

shell
docker rmi lscr.io/linuxserver/webtop

One-Click Installation of Guacamole

A web-based tool for controlling servers using protocols like SSH or RDP.

Website: http://your_IPV4_address:80/guacamole

Default Username: guacadmin

Default Password: guacadmin

After installation, remember to change the password upon login.

The host machine should have at least 1 core, 2GB RAM, and 10GB of disk space; otherwise, launching might lead to host machine freezing!

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh
+ \ No newline at end of file diff --git a/en/guide/docker/docker_install.html b/en/guide/docker/docker_install.html index f8436247dd..b4e2a0cc79 100644 --- a/en/guide/docker/docker_install.html +++ b/en/guide/docker/docker_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

Preface

Support for running Docker virtualization on various systems, including Linux, Android, and Windows.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Detect the system environment and install the corresponding components
  • Install docker and docker-compose.
  • Download some configuration scripts required by default
  • Detect if there is an IPV6 address, check if it is greater than or equal to /112, and if so, configure the docker's ipv6 network.
  • If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.
  • Support for x86_64 and ARM architecture servers
  • The installation process will ask you to enter some options, select the Docker installation path, select whether the Docker installation can limit the hard disk

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

OR

bash dockerinstall.sh

TIP

The environment installation process may require you to reboot the server and then execute the script again, see the instructions after the script is run for more details

Detect whether Docker supports limiting container hard disk size

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

Or specify a different storage limit size (in MB), the default test of the 500MB limit of the container whether the limit is successful

shell
# 1GB Limit
-bash disk_test.sh 1000

Uninstall Docker Environment

One-click uninstall of the entire Docker environment, including all containers, images, networks, systemd services, and binaries:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_macos.html b/en/guide/docker/docker_macos.html index be00130d7b..a62e26a540 100644 --- a/en/guide/docker/docker_macos.html +++ b/en/guide/docker/docker_macos.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_precheck.html b/en/guide/docker/docker_precheck.html index 175341e45f..58ef850914 100644 --- a/en/guide/docker/docker_precheck.html +++ b/en/guide/docker/docker_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

WARNING

If the host has an IPV6 network, the installation will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/docker

Project Features

Bulk or individual NAT server provisioning via docker

Default use of debian system optional alpine system, each container comes with 1 external ssh port, 25 internal and external network ports, you can choose whether to bind IPV6 address

The default creation of unprivileged containers, and does not mount and host docker daemon communication, so ** host created docker virtualization NAT servers can not be nested within the virtualization docker **

By default, lxcfs is installed and enabled, so that when querying resources within a container, CPU and memory use the configured view instead of the host's view.

By default, you can choose whether or not to share the hard disk of the host machine, and you can choose whether or not to install it as an environment that can limit the size of the hard disk during Docker installation.

Configuration requirements

The system can be installed docker can be used, the network can connect to the Github raw interface can be used, hardware configuration as long as not pull across the line, free hard disk has 3G on it!

(If you need to bind an IPV6 address, then please make sure to use the installation script of this set of scripts for docker installation, you need it to automatically preset some of the settings)

If the hardware resources are just a little bit better, need to limit more things and need to limit the size of the hard disk, you can use the incus partition of the script batch open LXC virtualization containers

If the hardware is very good and you have a lot of resources, you can use the PVE partition script to batch open KVM virtualized VMs.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_qa.html b/en/guide/docker/docker_qa.html index 1a7931c491..76c22a7341 100644 --- a/en/guide/docker/docker_qa.html +++ b/en/guide/docker/docker_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Solve the puzzle

Common Docker Commands

Check real-time resource usage of a specific container

docker stats <container_name>

Enter a specific container

docker exec -it <container_name> /bin/bash

Clean Docker cache, remove unused resources including images, containers, networks, etc.

docker system prune -a

Uninstall all Docker images and containers

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

View logs of a specific container

docker logs <container_name_or_ID>

View overall disk usage of Docker

docker system df

List all containers

docker ps -a

List all images

docker images

Remove a specific container

docker rm -f <container_name_or_ID>

Remove a specific image

docker rmi <image_name_or_ID>
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_thanks.html b/en/guide/docker/docker_thanks.html index ad64c0789c..6b86b1ec6c 100644 --- a/en/guide/docker/docker_thanks.html +++ b/en/guide/docker/docker_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/docker/docker_windows.html b/en/guide/docker/docker_windows.html index d013db216c..5d30abf180 100644 --- a/en/guide/docker/docker_windows.html +++ b/en/guide/docker/docker_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

Running Windows Virtual Machine in Docker

One-Click Deployment (Using Vagrant)

  • Shares all resources of the host machine; based on Docker, so it only occupies the size of the system, suitable for multiple instances.
  • Shares IP; Docker's NAT mapping is employed. You can choose whether to map to the external network or just the internal network.
  • The configured Windows system is set to use a maximum of 1 core, 2GB RAM, and 50GB hard disk by default. Actual usage may vary based on usage patterns.
  • No need for iptables for NAT mapping; port mappings are automatically deleted when containers are removed, making maintenance easier.
  • Ensure that the host machine supports nested virtualization, and currently, only X86_64 architecture systems are supported. I haven't compiled corresponding images for ARM devices at the moment.

The host machine needs to support nested virtualization and currently only supports systems based on the X86_64 architecture; I don't have an ARM machine on hand to compile the corresponding image at the moment.

Command:

shell
egrep -c '(vmx|svm)' /proc/cpuinfo

The result should be greater than or equal to 1 and cannot be 0.

Next, you need to configure Docker to start using the v1 version of cgroup.

shell
sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
+    
Skip to content
- + windows:2022

Important Notes

It is not recommended to use docker commit to save changes to this image, as repeated layer stacking may cause the image size to exceed 40 GB.

For personalized configuration or additional software integration, always start from the builder image to ensure a clean and maintainable result.

+ \ No newline at end of file diff --git a/en/guide/incus/incus_custom.html b/en/guide/incus/incus_custom.html index 43e186a93e..2cc77f9ac8 100644 --- a/en/guide/incus/incus_custom.html +++ b/en/guide/incus/incus_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,42 +22,42 @@ -
Skip to content

Custom

Adding a customized mirror source

https://incusimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/incus_images for details.

shell
incus remote remove spiritlhl
+    
Skip to content
- +systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

+ \ No newline at end of file diff --git a/en/guide/incus/incus_extra_config.html b/en/guide/incus/incus_extra_config.html index 1d32e080b8..084f61f235 100644 --- a/en/guide/incus/incus_extra_config.html +++ b/en/guide/incus/incus_extra_config.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for incus containers created with incus.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
+    
Skip to content
- +apt-get update

For instructions on adding sources to other systems, refer to the official repository documentation at https://github.com/zabbly/incus?tab=readme-ov-file#installation.

+ \ No newline at end of file diff --git a/en/guide/incus/incus_install.html b/en/guide/incus/incus_install.html index 88cd087fb8..48d51b1566 100644 --- a/en/guide/incus/incus_install.html +++ b/en/guide/incus/incus_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

Incus

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus One-Click Installation Guide

WARNING

If this is a new server, make sure that both update and curl are working properly before executing this script.

  • Prerequisites: Ubuntu 20+(Not recommended to use Incus, please use LXD), Debian 11+(Recommended), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

OR

shell
bash incus_install.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

TIP

The execution process may require a manual reboot to load the storage type into the kernel, the installation is completed at the end of the execution will automatically reboot the server, the first time after the complete installation of the reboot will take about 400 ~ 500 seconds, please be patient

WARNING

If you need to open more than 200 Incus containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Manual Installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic Incus installation process.

Disable Firewall

bash
apt update
+    
Skip to content
- +incus -h

If there are no exceptions, continue execution

incus admin init

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

+ \ No newline at end of file diff --git a/en/guide/incus/incus_lxc.html b/en/guide/incus/incus_lxc.html index 66a492f669..32da6ccb7e 100644 --- a/en/guide/incus/incus_lxc.html +++ b/en/guide/incus/incus_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

Running LXC Container in Incus

Images available for creating LXC Containers

A portion of the available system parameters are shown here for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually opened out of the Stream version)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (CGroupV1 needs to be enabled in GRUB or it won't start.)
  • kali,archlinux
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

TIP

The version number has ended the long-term maintenance of the general no longer have an official mirror, temporarily did not find the archive address of the historical mirror, if you find welcome to leave a message I will add support!

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Download script

Downloading the boot script is NOT REQUIRED, if you have used the command to install incus with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian11)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port`` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that ```can't be null, and it needs to be set to 0 if it's not to be mapped.

Support custom container system, do not fill in the leave blank default use debian11, pay attention to the incoming parameters for the system name + version number

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
incus stop test
+    
Skip to content
- +wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

+ \ No newline at end of file diff --git a/en/guide/incus/incus_precheck.html b/en/guide/incus/incus_precheck.html index 7164225181..c0db212fc4 100644 --- a/en/guide/incus/incus_precheck.html +++ b/en/guide/incus/incus_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the incus module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/incus

Requirements

Hardware requirements.

  • System: Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(After installing bash on your own), Arch
  • Virtualization: KVM, VMWARE recommended.
  • CPU: The number of cores should be greater than or equal to 2, otherwise there may be a kernel idling slice cycle resulting in 100% occupancy
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the Github raw page on the line

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu24 and Debian12, other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open incus containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for incus containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/incus/incus_qa.html b/en/guide/incus/incus_qa.html index a964c5074a..a5ec404951 100644 --- a/en/guide/incus/incus_qa.html +++ b/en/guide/incus/incus_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Solve the puzzle

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both Incus and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause Incus to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus has high CPU usage on single-core hosts after long-term use

This high CPU usage is native to Incus, there is no workaround for it, and it can only be reproduced on single-core hosts, so you don't need to bother with multi-core hosts.

You need to install a timed task to detect and fix the problem, and check the usage every 5 minutes to see if you need to restart the Incus back-end.

  • Download
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart. sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • Installation
bash
bash incus_fixed_restart.sh install

will be copied to /usr/local/bin/incus_fixed_restart.sh and written to cron to run every minute.

  • Uninstall
bash
bash incus_fixed_restart.sh uninstall

Removes cron tasks, script files, log files, and count files.

  • Runs normally (called by cron)
bash
/usr/local/bin/incus_fixed_restart.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/incus/incus_qemu.html b/en/guide/incus/incus_qemu.html index ce49f920c5..3045fc5be6 100644 --- a/en/guide/incus/incus_qemu.html +++ b/en/guide/incus/incus_qemu.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

Running QEMU Virtualized Linux Virtual Machines in Incus

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
incus console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
incus stop -f test
+    
Skip to content
- +ls
+ \ No newline at end of file diff --git a/en/guide/incus/incus_thanks.html b/en/guide/incus/incus_thanks.html index da5352d554..a1e98c3640 100644 --- a/en/guide/incus/incus_thanks.html +++ b/en/guide/incus/incus_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/incus/incus_windows.html b/en/guide/incus/incus_windows.html index 0fec833818..8bb9860b98 100644 --- a/en/guide/incus/incus_windows.html +++ b/en/guide/incus/incus_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,15 +22,15 @@ -
Skip to content

Running Windows Virtual Machines in Incus

Verify the Incus Driver

Ensure that incus info output contains qemu, otherwise you cannot create VMs:

shell
incus info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, incus drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
+    
Skip to content
- +incus start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, incus will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then incus delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
incus config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_custom.html b/en/guide/lxd/lxd_custom.html index 3ed632a8de..86a8a506cb 100644 --- a/en/guide/lxd/lxd_custom.html +++ b/en/guide/lxd/lxd_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,42 +22,42 @@ -
Skip to content

Custom

Adding a customized mirror source

https://lxdimages.spiritlhl.net/

This mirror source is obtained by me through daily patching, and will be updated daily, what exactly is patched can be found at https://github.com/oneclickvirt/lxd_images for details.

shell
lxc remote remove spiritlhl
+    
Skip to content
- +systemctl enable --now wg-quick@warp

3: Autorun: fscarmen's one-click scripts

Finally, the one-click script for fscarmen is introduced. The script is mentioned as a handy tool to simplify the configuration process. It also automatically handles advanced parameters such as Optimal MTU, Optimal Endpoint, etc.

Project: https://github.com/fscarmen/warp-sh

# Run one-key script
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_extra_config.html b/en/guide/lxd/lxd_extra_config.html index 3ee3c342c9..2a3d0fc6e9 100644 --- a/en/guide/lxd/lxd_extra_config.html +++ b/en/guide/lxd/lxd_extra_config.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,23 +22,23 @@ -
Skip to content

Custom Configuration

TIP

The following configurations may increase the load on the server. Only install them if necessary.

Automatic IPV6 Address Configuration

  • (Optional, not required if not using)
  • This script is only suitable for servers that have an IPV6 subnet with a prefix, and the server has bound the first IP of the subnet as its IPV6 address or IPV6 gateway.
  • Automatically configures IPV6 addresses for LXC containers created with LXD.
  • Integrated into buildct.sh and can be controlled by variables without needing to be downloaded beforehand. You don't need to manually use this script; when using buildct.sh, configure with variable Y to enable it.

Download Script

Command:

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

Automatically configure IPV6 mapped addresses for containers

bash
bash build_ipv6_network.sh Container_Name(change_me)

A message is printed when the mapping is complete (Default mapping without iptables)

Example (automatically configure the test container with an IPV6 address, a test_v6 file is written when the configuration is complete)

bash
bash build_ipv6_network.sh test

PS: Add ipv6 processing can choose whether to use ip6tables for mapping, the default is not to use ip6tables for mapping but to add new network devices for mapping.

Use ip6tables for mapping

bash
bash build_ipv6_network.sh Container_name Y

If ip6tables is used for mapping, remove all IPV6 mapped rules available:

bash
ip6tables -t nat -F PREROUTING
+    
Skip to content
- +snap install lxdmosaic

After the installation is complete, open the hen IP address, follow the prompts to set the password for admin, other all the way to the default will be able to use the panel!

+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_install.html b/en/guide/lxd/lxd_install.html index 72fdf487f7..472594cf9c 100644 --- a/en/guide/lxd/lxd_install.html +++ b/en/guide/lxd/lxd_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,13 +22,13 @@ -
Skip to content

LXD

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD One-Click Installation Guide

WARNING

If this is a new server, make sure that both apt update and apt install curl are working properly before executing this script.

TIP

It's recommended to wait for at least 5 minutes after the system boots up before executing the following commands. This is to avoid the script being executed by the default system settings, which could cause issues with apt sources.

  • Prerequisites: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • During installation, you will be prompted to enter the storage pool creation path as well as the size, and all the VMs or containers you want to open end up taking up space in the storage pool
  • The server needs to be restarted after the environment installation process to load some default configurations
  • By default, lxd's lxcfs-related configuration is enabled, so that in-container querying of container information changes to information about the container itself rather than the host
  • This installer has been tested to work on either physical or non-physical machines

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

OR

shell
bash lxdinstall.sh

Example of initialization configuration:

If you don't need to specify the path of a non-system disk as the default storage pool, then you can directly enter or type n when choosing whether to customize the storage pool path, and you don't need to specify the path.

If you need to specify the path of a non-system disk as the default pool, then you need to select y and enter the corresponding path (the actual absolute path of the disk you mounted).

If the corresponding disk has 18 Gigabytes of free hard disk space in addition to the occupied space and you want to open a 15 Gigabyte storage pool, follow the command line prompts to enter 15.

WARNING

If you need to open more than 200 LXD containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Installation of WEB Control Panel

Customization There are tutorials on how to enable the official panel, but here do not choose to use the official panel, because the official panel in order to security, at the expense of a lot of user experience, this piece of using the

https://github.com/turtle0x1/LxdMosaic

third-party panels

shell
sudo snap install lxdmosaic

Do a straightforward one-click install, then open the current host's https://<public IP address>/ and force access to it to get to the setup page

lxd

lxd

lxd

This piece can be changed if you need to set up the site name

lxd

Better than nothing can only mean that there is no RBAC access control for sub-user segregation

Manual installation (optional)

Not recommended, just to install for some oddball environments where one-click scripts won't run, or if you want to understand the most basic LXD installation process.

Disable Firewall

bash
apt update
+    
Skip to content
- +/snap/bin/lxd init

If the following error occurs in the above command

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

Use the command patch before installing lxd

snap install core

If there are no exceptions, the results of the above three lines of commands are as follows

Just enter the default for the normal options

Choose the size of the physical disk (hint: select the default option with a minimum of 1GB). Generally, I fill in the available disk space minus the memory size, then multiply by 0.95 and round down. Here, I entered 10GB.

Remember to select 'no' for options containing 'auto' when prompted to update the image, in order to avoid occupying the system.

Test whether symbolic links are functioning in LXC.

lxc -h

If an error is reported then execute the following command to soft connect the lxc command

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
+export PATH=$PATH:/snap/bin

After connecting, test the lxc command again to see if there is an error about not being able to find it

+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_lxc.html b/en/guide/lxd/lxd_lxc.html index 1d4cc4966a..6631dd51ed 100644 --- a/en/guide/lxd/lxd_lxc.html +++ b/en/guide/lxd/lxd_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

LXC virtualization

Generate only one NAT container

  • Generate only one NAT container, with customizable restrictions on all content.

Downloading the boot script is NOT REQUIRED, if you have used the command to install LXD with one click, the corresponding boot script will be downloaded automatically, so you don't need to download the script again.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

Usage

. /buildct.sh name Cpu_num Memory_size Hard_disk_size SSH_port Extranet_start_port Extranet_stop_port Download_speed Upload_speed Whether_IPV6_is_enabled(Y or N) System(leave blank for debian12)

Memory size is calculated in MB, hard disk size is calculated in GB, download speed upload speed is calculated in Mbit, whether to enable IPV6 does not have to fill in Y or N, no this parameter can also be left blank default does not enable IPV6

If external start port`` and external stop port are both set to 0, then we don't do interval port mapping, only the basic SSH port is mapped, note that ```can't be null, and it needs to be set to 0 if it's not to be mapped.

Support for customizing the system of the container, do not fill out the default use of debian12 when left blank, note that the incoming parameters for the system name + version number, such as:

  • debian12, debian13
  • ubuntu22, ubuntu24
  • centos8,centos9
  • alpine3.16, alpine3.17, alpine3.18,alpine3.19
  • Note that the combination of lowercase letters + numbers or only lowercase letters, try it yourself, if the search is not the system will automatically exit the script
  • The version number can be with English decimal point, in order to adapt to the alpine version number has been supported.
  • If you can't open it, it may be that the hard disk is not big enough or it doesn't fit the host, try it by yourself.
  • The images currently in use are triple filtered and prioritized: self-hostedofficial-hostedopsmaru
  • A complete list of supported systems for self-compiling images: x86_64_all_images.txt and arm64_all_images.txt

Example

Here is the information about the example chick that is being raised:

AttributeValue
container's Nametest
Username for SSH Loginroot
Password for SSH LoginRandomly generated
Number of CPU Cores1
Memory Size256MB
Disk Size2G
Range of Internal and External Port Mapping20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Automatically Set External IPv6 AddressNo
Operating SystemDebian 12
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

If you need to see the information, run

shell
cat ct_name_change_me

For example, the information for the query example is

shell
cat test

If you have already generated chicks through the above methods and still need to batch generate chicks, you can use a customized batch generation version of the script, but note that you should first delete the test chicks before batch generating chicks

Delete Test Chick

shell
lxc stop test
+    
Skip to content
- +wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

Just download the other one-click scripts yourself.

+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_precheck.html b/en/guide/lxd/lxd_precheck.html index 44fe44ddab..25d9430d36 100644 --- a/en/guide/lxd/lxd_precheck.html +++ b/en/guide/lxd/lxd_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If your host does not have an IPV6 subnet and you want to assign IPV6 addresses to containers, then please check the Customize partition in the LXD module for the Attach a free IPV6 address segment to the host, and attach an IPV6 subnet to the host before installing the environment.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/lxd

Requirements

Hardware requirements.

  • System: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
  • Virtualization: KVM, VMWARE recommended.
  • Memory: At least 512MB of RAM
  • Hard disk: hard disk (system disk) at least 10G
  • Network: Independent IPV4 address, IPV6 is optional, bandwidth can download scripts on the line, the network can connect to the public network.

PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump

PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump

Project Features

  • This set of script development using Ubuntu20, Ubuntu other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported

  • Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.

  • Support for docker nested virtualization of open LXC containers has been set up, and the default normal version and pure probe version use the debian11 system.

  • lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view

  • Have blocked the container may be used to abuse the toolkit and IPV4 network TCP/UDP protocol ports ( 3389 8888 54321 65432 ), to prevent the container is used for scanning and blasting, and can be external process checking for problems automatically shut down

  • Has supported one-click configuration of IPV6 addresses for LXC containers (provided that the mother hen has an IPV6 subnet, no IPV6 address is not configured), automatically adapted to the size of the subnet

  • Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use fdisk -l and df to check.

  • See Other notes for details on mounting other disks.

  • One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration

Detecting the environment

Use the subsequent script must execute this command to detect the hen whether it meets the requirements

Command:

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_qa.html b/en/guide/lxd/lxd_qa.html index 57d6686c0f..dc63f25d53 100644 --- a/en/guide/lxd/lxd_qa.html +++ b/en/guide/lxd/lxd_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

Solve the puzzle

What if the lxc command says it can't be found after LXD is installed?

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
-export PATH=$PATH:/snap/bin

After executing this command try

lxc -h

to see if the lxc command is fixed.

What to do if you open centos7 and find that CGroupV1 is not supported?

Enable CGroup V1: To enable CGroup V1 on an Ubuntu system, you need to edit the kernel boot parameters.

Please note that before changing kernel boot parameters, make sure to backup important data and settings to prevent unexpected problems.

Edit the ```/etc/default/grubfile and addsystemd.unified_cgroup_hierarchy=0to the end of the parameters inGRUB_CMDLINE_LINUX_DEFAULT``, just like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

Save the file and run the following command to update the GRUB boot.

bash
sudo update-grub

Reboot the system for the changes to take effect

If the above changes still do not support the opening of centos7, try using a different host system.

Requires both LXD and Docker compatibility to exist

If left unaddressed, docker will override the iptables setting and cause LXD to have no network link

You need to install a scheduled task to detect and fix this issue

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Currently verified VPS vendors that can open containers with separate IPV6 addresses.

kuroit Phoenix, USA regular

datalix German AMD Promotions

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_qemu.html b/en/guide/lxd/lxd_qemu.html index 016cfd94ef..7dc6a8c39b 100644 --- a/en/guide/lxd/lxd_qemu.html +++ b/en/guide/lxd/lxd_qemu.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

QEMU virtualization

Available Images for QEMU Virtual Machines

Here are some of the available system parameters for your reference:

  • debian10, debian11, debian12, debian13
  • ubuntu18, ubuntu20, ubuntu22
  • centos8, centos9 (actually deployed as Stream versions)
  • alpine3.15, alpine3.16, alpine3.17, alpine3.18
  • openwrt21, openwrt22, fedora37, fedora38, fedora39
  • rockylinux8, rockylinux9, oracle8, oracle9
  • oracle7, centos7 (all require enabling CGroupV1 in GRUB, otherwise they won't start - see FAQ for details)
  • kali, archlinux
  • Note that all are combinations of lowercase letters + numbers or lowercase letters only. Try them yourself - if the system is not found in the search, the script will automatically exit.
  • Version numbers can include English decimal points to accommodate Alpine version numbers.
  • Systems that fail to start may be due to insufficient disk space, memory, or incompatibility with the host machine. Check the error messages for systems that won't start.
  • Currently, only self-compiled images are used for virtual machine systems. Non-self-compiled images lack dependencies and configurations and cannot be used.
  • Complete list of supported systems for self-compiled images: kvm_images

Creating a Single NAT Server

  • Create only one NAT server with customizable limitations for all content

Download Script

International:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Domestic (China):

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

Usage

./buildvm.sh ServerName CPUCores MemorySize DiskSize SSHPort ExternalStartPort ExternalEndPort DownloadSpeed UploadSpeed EnableIPV6(Y or N) System(leave empty for debian11)

CPU cores must be less than or equal to the host machine's cores. Memory size is calculated in MB, disk size in GB, download and upload speeds in Mbit. EnableIPV6 doesn't necessarily need to be Y or N - it can be omitted, defaulting to disabled IPV6.

If both ExternalStartPort and ExternalEndPort are set to 0, no external port range mapping will be performed - only the basic SSH port will be mapped. Note that these cannot be empty - set them to 0 if no mapping is needed.

Supports custom server systems. When left empty, debian13 is used by default. Note that the parameter should be system name + version number.

Except for Alpine systems, all other systems require disk size greater than 6G, otherwise the system won't start, cannot initialize and function, and will crash during the setup process.

Example

Here's the information for the example server being created:

PropertyValue
Server Nametest
SSH Login Usernameroot
SSH Login PasswordRandomly generated
CPU Cores1
Memory Size256MB
Disk Size10G
Internal/External Port Mapping Range20002 to 20025
Upload Bandwidth500Mbit
Download Bandwidth500Mbit
Auto-configure External IPV6N
Systemdebian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

To enter the virtual machine, execute:

shell
lxc console test

To exit, first press and hold Ctrl then press a, release them, then press q.

To view information, execute:

shell
cat ServerName

For example, to query the example's information:

shell
cat test

Delete Test Server

shell
lxc stop -f test
+    
Skip to content
- +ls
+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_thanks.html b/en/guide/lxd/lxd_thanks.html index abe16025af..a1b52f263c 100644 --- a/en/guide/lxd/lxd_thanks.html +++ b/en/guide/lxd/lxd_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/lxd/lxd_windows.html b/en/guide/lxd/lxd_windows.html index e59f9885db..712372f411 100644 --- a/en/guide/lxd/lxd_windows.html +++ b/en/guide/lxd/lxd_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,25 +22,25 @@ -
Skip to content

Running Windows Virtual Machines in LXD

Verify the LXD Driver

Ensure that lxc info output contains qemu, otherwise you cannot create VMs:

shell
lxc info | grep -i driver:

If it only shows lxc, no need to read the subsequent tutorials, lxd drivers don't support opening a VM.

Prepare the Environment and Patch the Image

Execute the following commands in sequence in the /root directory:

shell
apt update
+    
Skip to content
- +lxc start winvm

The following image can be seen after startup (test visit a website)

No need to configure your own network, lxd will automatically assign IPV4 addresses and connect to the network.

Remove the remote component to restart the browser mapping

If you need to delete the VM and recreate it due to resource limitations or other reasons, use pkill -f websockify to terminate all SPICE signal forwarding, then lxc delete -f winvm to forcibly delete the VM.

shell
lsof -i :6080

Check if the PID for the corresponding port still exists to ensure it has completely stopped (if you have signal forwarding for multiple VMs, it's better not to use pkill to delete all of them; use kill -9 to delete the PID for the specific port).

If it crashes and stops within a few minutes of first startup

Need to add CPU passthrough

shell
lxc config set winvm raw.qemu -- "-cpu host"

Just start the virtual machine again

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

Disadvantages

The frontend lacks authentication, so you can't set user passwords.

If you need frontend authentication, you'll need to use Guacamole with additional settings to implement it, which won't be covered in detail here.

The VM piece doesn't have some well established interactive panels and adaptations, spice is too old (although there is a web-based spice client), and the official panels don't support rbac with a username and password and can only be used with certificates.

+ \ No newline at end of file diff --git a/en/guide/oneclickvirt/oneclickvirt_install.html b/en/guide/oneclickvirt/oneclickvirt_install.html index f4275654d5..61ece65dc3 100644 --- a/en/guide/oneclickvirt/oneclickvirt_install.html +++ b/en/guide/oneclickvirt/oneclickvirt_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

OneClickVirt

Distinguish between the panel side and the controlled side. The controlled side needs to have the corresponding virtualization environment installed in advance. You can use the main installation of other virtualization in one-click virtualization for environment installation. The control side is actually just a panel, with no virtualization environment requirements.

Controlled Side

For other virtual environments corresponding to this guide, their main installation scripts can be used to set up the environment. We won't elaborate further here. This tutorial provides installation commands for the main setup of the four major virtualization technologies. Please refer to them directly.

If possible, always use the scripts to install the corresponding environment. Otherwise, you may encounter strange issues like inconsistent presets. If you lack technical expertise, do not manually install the environment. Use scripts for everything.

The controlled end only requires the virtualization environment to be installed. There is no need to install an additional agent for control. Simply ensure SSH login is possible (the SSH login address can be public or internal network, as long as connectivity is unimpeded).

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Panel Side

Hardware requirements include at least 1G of free memory and 2G of free disk space. Installation can be completed through any of the following methods.

Installation MethodApplicable ScenarioAdvantagesDisadvantages
Frontend-Backend Separated DeploymentHigh performance, minimal resource usageBest performance, flexible configurationComplex configuration, requires reverse proxy setup
All-in-One DeploymentWorks with or without public IPv4 addressSimple deployment, no reverse proxy neededRelatively poor performance
Docker Deployment (Pre-built Image)Quick deployment, larger resource usageOne-click installation, data persistenceRequires Docker environment, large image download
Docker Compose DeploymentSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time
Dockerfile Self-CompilationSuitable for source code updates and maintenanceHighly customizableRequires Docker environment, lengthy compilation time

Installation via Pre-compiled Binary Files

Two methods are distinguished here:

  • Frontend-backend separated deployment (backend and frontend are compiled separately into corresponding files for deployment), better performance
  • All-in-one deployment (frontend and backend combined into one file for deployment), relatively poorer performance

Frontend-Backend Separated Deployment

Linux
Download Script

International

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
Environment Installation

Interactive environment installation

./install.sh env

Non-interactive environment installation

noninteractive=true ./install.sh env
Main Installation
./install.sh install

Installation directory: /opt/oneclickvirt

After successful installation, you need to manually start the service:

shell
systemctl start oneclickvirt

Other usage methods:

Stop service:

shell
systemctl stop oneclickvirt

Enable auto-start on boot:

shell
systemctl enable oneclickvirt

Check status:

shell
systemctl status oneclickvirt

View logs:

shell
journalctl -u oneclickvirt -f

Restart service:

shell
systemctl restart oneclickvirt
Upgrade Frontend and Backend
./install.sh upgrade

Except for configuration files, both backend and frontend files will be upgraded

During the upgrade process, you will be prompted whether you need to customize the frontend file path. If you choose not to customize, it will be extracted to /opt/oneclickvirt/web/ by default

This setting is mainly to accommodate the issue that 1panel cannot customize the frontend file path. The 1panel file path is similar to /opt/1panel/www/sites/beta/index/web, where beta is the name of the website you set up

Deploy Frontend

The previous installation script will extract the static files to (when not customized)

shell
cd /opt/oneclickvirt/web/

This path

Use nginx or caddy to establish a static website with this path. Whether you need to bind a domain name is your choice

After the static files are deployed, you need to reverse proxy the backend address for frontend use. Here is a specific example using OpenResty:

You need to reverse proxy the path /api to the backend http://127.0.0.1:8888 address. If you are using 1panel, you only need to fill in these, and the default backend domain name uses the default $host without modification.

If you are using nginx or caddy, please refer to the proxy source code below and modify it yourself for proxying

shell
location /api {
+    
Skip to content
- + oneclickvirt:no-db

Database Initialization

After installing and starting mysql, create an empty database oneclickvirt with type utf8mb4. It's best to make it accessible only locally at 127.0.0.1. Save the corresponding username and password. (If you are using the all-in-one Docker deployment container, it comes with a built-in database and you don't need to create an empty database yourself. The corresponding database is already started and available in the container by default)

After opening the corresponding frontend page, it will automatically redirect to the initialization interface.

Fill in the database information and related user information. If the database connection test is successful, you can click Initialize System.

After completing initialization, it will automatically redirect to the homepage, and you can explore and use it yourself.

If the default user information is used for initialization, the default account is:

Administrator account name and password are respectively:

admin
Admin123!@#

During the initialization process, all image seed data is loaded into the database by default, but by default only debian and alpine related version images are enabled. This is to avoid user selection difficulties caused by too many enabled images.

If you need additional types of images, you need to search by type, architecture, and version in the system image management interface under administrator privileges and enable them.

After initialization, please immediately change the default administrator username and password, and disable or delete the default enabled test user testuser. This can be done in the administrator's user management page.

+ \ No newline at end of file diff --git a/en/guide/oneclickvirt/oneclickvirt_precheck.html b/en/guide/oneclickvirt/oneclickvirt_precheck.html index e96b4be411..1837f4a753 100644 --- a/en/guide/oneclickvirt/oneclickvirt_precheck.html +++ b/en/guide/oneclickvirt/oneclickvirt_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

Preface

This is a control panel for interfacing with mainstream virtualization technologies, supplementing features not natively supported by virtualization platforms such as user management, traffic monitoring, NAT port mapping, and custom system images.

Welcome to support the project with a Star for free --> https://github.com/oneclickvirt/oneclickvirt

WARNING

This is a project in early development and may have various bugs and instabilities. Please assess the risks before use. Updates will be relatively frequent.

Environment Requirements

Supported architectures: amd64 or arm64

Supported systems: Linux, Windows, or any self-compiled system architecture

Only requires public network access. The deployed machine does not need an independent public IP address. This is just a virtualization control panel that only needs port display for the frontend. In fact, one important reason for development is that I need to manage multiple virtualization environments without a public IPv4 address.

This control panel has no special environmental dependency requirements. For one-click deployment, you can use the all-in-one Docker image with database included or docker-compose deployment with separated containers.

Frontend static files are deployed through nginx or caddy or OpenResty. For non-source code deployment and non-Docker deployment, API path reverse proxy to the backend port is required.

WARNING

Managed nodes require the host machine's network interface to be directly bound to the IP address to be mapped, such as a public IP. Host machines providing the IP to be mapped via methods like port mapping (e.g., Alibaba Cloud VPC) or NAT forwarding are not supported. Host machines providing the IP to be mapped using full-port NAT or port forwarding cannot serve as node machines. (Simply put, if a cloud server has a public IP address, this IP must be directly bound to the network interface card. It cannot be a scenario where the NIC only has an internal IP without a public IP, with traffic routing through the internal IP and then being forwarded to the public IP.)

Platform Features

  • Language internationalization: Frontend supports bilingual display in Chinese and English, defaults to Chinese display, with switchable default system language

  • Provider Integration: Supports ProxmoxVE, Incus, Docker, LXD - four major mainstream virtualization platforms, with more platforms coming soon

  • Flexible Instance Types: Supports automatic creation of virtual machines (VM) and containers (Container), providing a unified virtualization resource management experience through abstraction design

  • Built-in Image Seed Data: No need to search for platform-specific images yourself. All platforms come with self-compiled image loading, supporting unified management or custom image download URLs

  • Automatic NAT Port Mapping: Supports automatic port mapping for IPv4/IPv6, with mapped IPs supporting non-public IPs. Supports multiple network types:

NAT IPv4
+    
Skip to content
- +Pure IPv6
  • Port Mapping Methods: Flexibly selects the best mapping solution automatically based on different Providers (native, device proxy, iptables, etc.)

  • Traffic Statistics: Integrates IP-level and network interface-level precise network traffic statistics. Forces traffic data synchronization during sensitive operations to ensure data accuracy

  • Monthly traffic usage statistics reset at the beginning of each month. Supports traffic statistics and limits at user, instance, and Provider levels

  • Invitation Code System: Supports non-public registration invitation mechanism, with different resource quota limits based on user levels

  • Resource Limits: Supports setting instance quantity/CPU/memory/disk/bandwidth quota management and traffic usage restrictions

  • All code is open source, but no commercial development will be undertaken

+ \ No newline at end of file diff --git a/en/guide/oneclickvirt/oneclickvirt_qa.html b/en/guide/oneclickvirt/oneclickvirt_qa.html index 0737d41d65..9f54f65afc 100644 --- a/en/guide/oneclickvirt/oneclickvirt_qa.html +++ b/en/guide/oneclickvirt/oneclickvirt_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Please Report Issues to the Corresponding Repository

What to Do If You Forgot the Administrator Password

You need to forcibly change the password through database operations

  1. Generate Password Hash
bash
# Generate using Python (replace NewPassword123! with your new password)
-python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

Example output: $2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. Enter the Database

Docker Deployment (All-in-One Version):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

Standalone Database Deployment:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. Update Password
sql
-- View administrator account
+    
Skip to content
- +netstat -lntp

Only by running:

shell
incus config device show instance1

or:

shell
lxd config device show instance1

to view configured port mapping rules, as traffic bypasses the host and forwards directly externally.

The correct method to check port mappings is to examine nftables rules

shell
nft list ruleset

or view only the NAT table:

shell
nft list table ip nat

On systems using iptables, use:

shell
iptables -t nat -L

If traffic is flowing in or out, inspect actual connection states with:

shell
conntrack -L | grep <port>
+ \ No newline at end of file diff --git a/en/guide/oneclickvirt/oneclickvirt_thanks.html b/en/guide/oneclickvirt/oneclickvirt_thanks.html index 7afdc73e11..656809e90c 100644 --- a/en/guide/oneclickvirt/oneclickvirt_thanks.html +++ b/en/guide/oneclickvirt/oneclickvirt_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Acknowledgments

We extend our gratitude to the following platforms for providing servers available for testing.

https://console.zmto.com/

https://fossvps.org/

https://community.ibm.com/zsystems/form/l1cc-oss-vm-request/

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/oneclickvirt/oneclickvirt_usage.html b/en/guide/oneclickvirt/oneclickvirt_usage.html index ba0638dc63..7703893850 100644 --- a/en/guide/oneclickvirt/oneclickvirt_usage.html +++ b/en/guide/oneclickvirt/oneclickvirt_usage.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

Usage Guide

This document provides detailed instructions on how to use this panel. If you have any questions, please join the group for assistance from administrators: https://t.me/oneclickvirt

User Management

After logging into the administrator interface, open the user management page and you must click reset password to ensure the admin account password is a strong password, preventing malicious brute force attacks. If you defined your own password during initialization, you may skip resetting the password.

Resetting the password will automatically generate a strong password, which is displayed only once. Be sure to copy and save it to avoid forgetting it.

If you need to change a user's type, click on the corresponding user to edit. The edit popup supports changing the user type.

Administrators can click on the avatar in the upper right corner, where the dropdown menu has a button to switch between administrator and regular user views. If you need to test any features, you can directly use the administrator user for testing. (Regular users do not have this view switching button)

Managing Nodes

First, you need to ensure that the node to be managed has one of the four major virtualization technologies installed.

Ping the node's IP from the machine where this panel is deployed. Ideally, the latency should be within 300ms and the packet loss rate should not be too high, otherwise connection failures may occur, resulting in missed command execution in control.

Below are the steps for setting up nodes. Required and mandatory steps must be followed, while optional steps depend on your needs.

Basic Information (Required)

The server name should preferably use only English letters and numbers, avoid special characters, and ideally be within 6 characters. When creating containers or virtual machines later, this server name will be automatically added as a prefix.

Select the virtualization technology name you actually installed for the server type. Docker can only create containers by default, while other virtualization technologies can create virtual machines.

For SSH address, fill in the node's public IPv4 address or internal SSH connection address. This address will be used for SSH connections and API connections.

NAT port mapping prioritizes using the port IP for mapping. If no specific port IP is provided, the SSH address IP will be used for mapping. Neither needs to be a public IPv4 address.

In the port field, fill in the port for SSH connection to the node.

Description can note some information about the current node, visible only to administrators.

Status is enabled by default, allowing regular users to apply and claim instances after health checks.

Architecture is the node's own architecture. Currently supports managing amd64 and arm64 architecture nodes, select accordingly.

(Nodes with existing instances are temporarily not supported for management. The feature to synchronize and manage existing instances has not yet been developed)

Connection Configuration (Required)

Username is recommended to be root user, as automatic API configuration later requires downloading some dependencies. Non-root users may encounter permission issues.

Password is the password used for SSH login. Of course, if you don't use a password and use key-based login, that's also acceptable.

SSH timeout configuration is designed to test connectivity and optimize fault tolerance, and can also be used to check connectivity.

After filling in the previous information, click test and corresponding prompt values will appear. Click apply to proceed. Of course, not applying is also fine, with higher fault tolerance.

The latency here is the latency of actually executing commands on the corresponding node via ping, so it's generally around 2s or more, which is normal latency.

This design is to accommodate nodes with extremely poor connectivity to the panel machine. Increasing these parameter values means higher fault tolerance.

Execution timeout generally doesn't need modification unless your node's performance is particularly weak and command execution takes a long time.

Location Information (Optional)

Directly enter a specific country and click to select. Most countries already have presets with corresponding flag icons.

After setting the location, regular users will be able to see the corresponding flag and region in the application interface, along with the automatically matched continent.

You can optionally fill in the corresponding city. Not filling it in is fine and doesn't affect usage.

Instance Type and Quantity Limits (Required)

For docker type nodes, only containers can be created. Other virtualization types support creating both containers and virtual machines (provided the node itself supports it; forced creation on unsupported nodes will automatically fail).

If you don't need to create virtual machines, be sure to uncheck the virtual machine option.

If the quantity limit maintains the default parameter of 0, it means no node-level quantity limit for this type of instance.

For container type, it's recommended to set the quantity according to the following formula:

Node free storage disk size / Minimum disk size of instances to be distributed = Maximum number of instances

For virtual machine type:

Node free memory size (including virtual memory) / Minimum memory size of instances to be distributed = Number of instances

The reason for this calculation is that containers generally don't limit total CPU quantity and memory size, but limit disk size, while memory is usually the bottleneck for the number of virtual machines that can be created.

If you need to overcommit, the values obtained from the above calculation rules can be appropriately increased, and the following configuration should be set up.

Resource Overcommitment Configuration (Optional)

Overcommitment resource configuration means whether to strictly limit corresponding resources. Removing limits means no checks will be performed and forced creation may occur, which may lead to creation task failures.

By default, container type doesn't limit total CPU and memory pre-allocation, but limits total pre-allocated disk capacity to achieve optimal resource sharing and maximum number of instances. Generally doesn't need modification.

By default, virtual machine type limits all resources, with the maximum total pre-allocated resources not exceeding actual resource size.

For ProxmoxVE, there's also a storage pool name setting for the disk to be created. If it's a multi-disk PVE, you need to set which storage pool to create on.

Other types of virtualization environments have asked about the specific storage pool creation location during installation, so there's no need to set it.

In general, if you need to limit which resources cannot be overcommitted, click limit. After limiting, corresponding resources cannot be overcommitted; without limiting, corresponding resources can be overcommitted.

The limit here is for the total resource usage of this type of instance on this node, used to calculate available resources and limit instance creation.

Not recommended to modify unless you know what this setting does.

IP Mapping Configuration (Optional)

Generally doesn't need modification. Here you can set the number of port mappings, range, network configuration method, and port mapping method for each instance.

By default, instances are created with NAT-mapped public IPv4 ports. The priority of mapped IPs is: Port IP > SSH connection IP (used when port IP is not set)

If the node itself has an IPv6 subnet greater than or equal to /80 in size, change the network configuration to create instances with independent public IPv6 addresses.

Extremely, you can also create instances with only independent IPv6 addresses. Make your own choice.

Not recommended to modify the mapping method unless you know what this setting does. The default configuration is already the best configuration.

Bandwidth and Traffic Configuration (Required)

Literal meaning: set the maximum bandwidth and total available traffic calculated by natural month for instances created on the node. Traffic monitoring and traffic statistics are not automatically enabled by default.

Starting traffic monitoring will have a corresponding memory burden because traffic statistics data needs to be cached. Even after extreme optimization by this project, it will still increase with bandwidth. Don't enable traffic statistics if you don't have enough memory.

If traffic statistics are enabled, pay attention to the statistics mode. The default statistics mode is the most universal. If your local performance is good enough (mainly enough memory), you can choose higher collection frequency and collection quantity. If performance is very poor, it's recommended to choose the last tier. Custom parameters are also supported, but not recommended for beginners to modify; the preset modes are sufficient.

If traffic statistics are enabled, note that the allocated bandwidth for levels should not be too large. Monitoring will dynamically generate configuration files according to the allocated bandwidth for monitoring. The larger the bandwidth, the more memory monitoring occupies.

LevelInstance Bandwidthplugin_pipe_sizesql_cache_entriesBase UsageBurst Usage
Low≤50 Mbps2 MB325~8 MB8~12 MB
Medium-Low51~100 Mbps10 MB6410~15 MB15~30 MB
Medium101~200 Mbps25 MB12815~20 MB30~50 MB
Medium-High201~500 Mbps50 MB25620~30 MB50~80 MB
High501~1000 Mbps128 MB51230~50 MB80~150 MB
Very High1001~2000 Mbps256 MB76850~80 MB150~300 MB
Extremely High>2000 Mbps512 MB102480~120 MB300~600 MB

Traffic statistics error margin is about 0.1G deviation per 10G. NAT mapping and instances with independent IPv6 IPs are automatically handled, no manual management needed.

However, if traffic statistics were previously enabled and need to be disabled and monitoring uninstalled later, you need to delete the monitoring in the following place first before disabling traffic statistics. This ensures complete uninstallation, otherwise it will still collect statistics in the background.

Only after enabling traffic control will the traffic monitoring management button appear here. After entering, three buttons are visible, mainly for manually synchronizing monitoring situations. Generally, if traffic monitoring is not enabled after some instances are created, manual management is not needed. If needed, just click detect traffic monitoring, which will batch detect the monitoring situation of all instances under the current instance.

Level Restrictions (Required)

Five levels are preset here, and users will be filtered through this restriction configuration when applying and claiming.

During the actual instance creation process, the node-level level restrictions will be compared with the global user level resource restrictions, taking the minimum value as the user's available resource limit on the current node.

This setting is to specialize the configuration limits of instances that users of corresponding levels can create on the current node, avoiding situations where global limits are not suitable for the current node. Global limits can be set in system configuration and are generally used for user account-level resource usage restrictions.

Advanced Settings (Optional)

Expiration time:

Prevents users from continuing to operate expired nodes. Expired nodes will be automatically frozen, at which time corresponding instances will not allow any operations but will not be automatically deleted. If a node is frozen, please clean and delete it in time.

Task concurrency control:

Default is single-threaded serial execution. At the same time, only one add/delete/modify task (corresponding to instance creation, deletion, and reset operations) will exist.

Can be changed to multi-threaded concurrent execution, where multiple add/delete/modify tasks can exist at the same time. Only when concurrent execution is used does the concurrency number setting make sense.

Serial execution is suitable for situations where the node itself has weak performance or the platform has few users. Concurrent operation is suitable for situations where the node itself has strong performance or there are many users. Please choose the mode yourself.

Personally recommend using default settings. Concurrent execution may have boundary conditions that have not been fully tested and may have bugs.

Task polling settings:

Controls whether to enable task execution and the interval for polling to check status. Generally keep default.

Operation execution rules:

Node operation mode supports API only, SSH only, and automatic switching. By default, automatic switching mode is used. Generally, there's no need to modify unless there are special requirements.

If you need to enable API operation mode, after successfully saving the node settings, click the auto-configure API button outside to execute background tasks to automatically interface with the virtualization platform API, no manual configuration required. After waiting for about 15-20 seconds, it should have been configured successfully. Click the button to see the configuration history tasks and corresponding logs. After successful configuration, click health check again to ensure the API status is green online status, and you've successfully configured and enabled the API.

Hardware Configuration (Optional)

Only lxd and incus support setting default instance parameter configurations. Generally use the defaults unless you need to manually limit certain special hardware resources; otherwise, generally no modification is needed.

If you need to set the maximum percentage of CPU usage or similar parameters, the settings here can meet your requirements.

Health Check (Required)

Click the operation button

After saving the node, after completing the health check, regular users can see the corresponding server and can apply for creation. If health check is not performed, users cannot apply for creation and claiming.

After health check, it will display whether the corresponding type of connection status is online and will automatically detect the actual total resources of the entire machine. This total resource amount is the total resource limit for non-overcommitted creation set above.

Whether the API is available does not affect specific usage. Auto-configuring the API is not mandatory.

System Images

By default, seed data will include all available images for all virtualization environments. By default, only alpine and debian images are enabled to avoid too many available images for users.

If you need images for any system, any virtualization environment, any architecture, please search and enable them yourself, otherwise users cannot select the corresponding images.

Custom image addresses are temporarily not supported. The current frontend entry function is not available. Do not manually enter images.

System Configuration

General options here won't be elaborated on. There are two configurations that need special explanation.

User Level Configuration (Required)

This limits the total account available resources for regular user levels.

When creating instances on corresponding nodes, this global configuration will work together with the node's own level configuration to filter and provide users with configurations that meet both conditions.

Instance Permission Configuration (Required)

Here you can control the minimum level required for users to perform sensitive operations. You can control the minimum user level required for instance creation, instance deletion, and instance system reset.

Configuration File

The default system configuration is already sufficient for light usage. If advanced customization is needed, you need to modify the configuration file or modify it in the administrator interface after initialization.

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

This is the complete initialization configuration file. Below we will explain the specific configuration items:

auth Authentication Configuration

yaml
auth:
+    
Skip to content
- + stacktrace-key: stacktrace

Detailed configuration for system log recording, based on the zap log library.

  • compress-logs: Whether to compress archived log files
  • director: Log file storage directory
  • encode-level: Log level encoding method, options are LowercaseLevelEncoder (lowercase), CapitalLevelEncoder (uppercase)
  • format: Log output format, options are console (console format), json (JSON format)
  • level: Log level, options are debug, info, warn, error. It's recommended to use debug during development and debugging, and info or warn in production environments
  • log-in-console: Whether to output logs to console simultaneously
  • max-array-elements: Maximum number of elements to record for array type fields
  • max-backups: Maximum number of historical log files to retain
  • max-file-size: Maximum size of a single log file in MB
  • max-log-length: Maximum length of a single log entry, excess will be truncated
  • max-string-length: Maximum recording length for string fields
  • prefix: Log prefix identifier
  • retention-day: Log file retention days, automatically deleted after expiration
  • show-line: Whether to display the filename and line number of log calls
  • stacktrace-key: Key name for stack trace information

Note: When debugging issues, level should be set to debug to obtain detailed log information.

+ \ No newline at end of file diff --git a/en/guide/podman/podman_build.html b/en/guide/podman/podman_build.html index e39ad6763a..2f3f530d0a 100644 --- a/en/guide/podman/podman_build.html +++ b/en/guide/podman/podman_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,20 +22,20 @@ -
Skip to content

Preface

Two methods for provisioning containers.

Single Container Provisioning

  • Creates a single Podman container, automatically detects international or China mainland server
  • Can configure binding of an independent IPv6 address (requires host with public IPv6 and podman-ipv6 network configured during installation)
  • Supports x86_64 and ARM64 architecture servers

Download Script

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

China Mainland

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

Example

Supported variables for running:

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

Currently supported system values:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

Default is debian if not specified.

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

Example container information:

AttributeValue
Container namect1
SSH usernameroot
SSH passwordMyPassword
CPU cores1
Memory512MB
SSH port25000
External/internal port range34975 to 35000
Systemdebian
Independent IPv6N
Disk sizeUnlimited

List all containers

shell
podman ps -a

Enter container

shell
podman exec -it ct1 bash

Enter Alpine container

shell
podman exec -it ct1 sh

Type exit to leave the container.

Delete container

shell
podman rm -f ct1

View container logs

shell
podman logs ct1

Batch Container Provisioning

  • Multiple runs inherit configuration and generate sequentially
  • Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
  • Container information recorded to ctlog file
  • Recommended to run in screen to avoid SSH disconnection

Run

International

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+    
Skip to content
- +systemctl enable container-ct1

Or manually start all stopped containers:

shell
podman ps -aq -f status=exited | xargs -r podman start
+ \ No newline at end of file diff --git a/en/guide/podman/podman_install.html b/en/guide/podman/podman_install.html index 725cd0129c..4dc74cb33f 100644 --- a/en/guide/podman/podman_install.html +++ b/en/guide/podman/podman_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Preface

Install the Podman environment, including podman + network configuration + DNS liveness check service.

Setting Up Virtual Memory

TIP

Allocate some swap space to prevent your machine from crashing.

Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.

It is recommended to allocate virtual memory twice the size of your physical memory.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Environment Setup

  • Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Installs Podman via each distribution's official packages (daemonless architecture, no Docker daemon required)
  • Automatically configures Podman network (podman-net: 172.21.0.0/16)
  • Detects public IPv6 address; if present, automatically creates podman-ipv6 network and starts NDP Responder
  • Installs DNS liveness check service (check-dns-podman.service)
  • Supports x86_64 and ARM64 architecture servers

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

After installation, run podman ps -a to verify the Podman environment is working correctly.

Uninstall Podman Environment

One-click uninstall of the entire Podman environment, including all containers, images, networks, and auxiliary files:

International

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

China Mainland

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

The script requires entering yes to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and Podman network configurations. Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/podman/podman_precheck.html b/en/guide/podman/podman_precheck.html index 996754b721..cfea4d72d5 100644 --- a/en/guide/podman/podman_precheck.html +++ b/en/guide/podman/podman_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Introduction

The following is an introduction to the non-customized sections. Please ensure that you don't confuse them with the customized parts.

If your host does not have an IPv6 subnet and you want to assign IPv6 addresses to containers, the host itself needs a public IPv6 address. The installation script will automatically detect and configure this.

WARNING

The Podman solution does not support KVM/QEMU virtual machines. It only supports Linux containers (LXC) and is suitable for environments without KVM hardware virtualization support.

Feel free to give the project a Star for free support! --> https://github.com/oneclickvirt/podman

Project Features

Bulk or individual NAT server provisioning based on Podman (daemonless architecture) runtime

  • Uses each distribution's official packages to install Podman (no daemon, daemonless architecture)
  • Uses self-compiled base images (stored in GitHub Releases), with offline loading prioritized and fallback to ghcr.io images
  • Each container comes with 1 external SSH port, 25 consistent internal/external ports, with optional independent IPv6 address binding
  • Supports lxcfs mounting (if lxcfs is installed on the host), providing real /proc view inside containers
  • Native rootless support (this solution runs as root to simplify network configuration)
  • Supports China CDN acceleration

Supported Systems

Systemamd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

Configuration Requirements

  • Host OS: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
  • Architecture: x86_64 (amd64) or ARM64
  • Kernel must support overlay filesystem
  • Network must be able to connect to GitHub raw interface
  • At least 3GB free disk space
  • No KVM hardware support required

Comparison with containerd and Docker

Featurepodman (this project)containerddocker
DaemonNone (daemonless)Lightweight containerdHeavy Docker daemon
Runtimecrun/runcruncrunc
CLIpodmannerdctldocker
Rootless supportNativeRequires configRequires config
Image formatOCIOCIOCI
Network backendnetavark/CNICNIDocker bridge
Container supportLinux containers (LXC)Linux containers (LXC)Linux containers + KVM VMs
InstallationSystem package managernerdctl-full bundleDocker official script

It is recommended to add some SWAP virtual memory before provisioning NAT servers to avoid host crash due to sudden memory spikes.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/podman/podman_qa.html b/en/guide/podman/podman_qa.html index e23bbe25f0..4c571eabdc 100644 --- a/en/guide/podman/podman_qa.html +++ b/en/guide/podman/podman_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,14 +22,14 @@ -
Skip to content

FAQ

podman: command not found

The Podman environment is not correctly installed. Re-run the installation script:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Container cannot access external network (IPv4)

Check if iptables NAT rules exist:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

If not present, add manually:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
+    
Skip to content
- +ghcr.io/oneclickvirt/podman:<os> # multi-arch manifest

Manually pull image example:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

How to completely reset the Podman environment

Uninstall, then reinstall:

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman vs containerd: which to choose?

  • For daemonless architecture with no background daemon, or if you prefer the system package manager, choose Podman
  • For a lightweight daemon + nerdctl CLI experience, choose containerd
  • For KVM virtual machines (Windows/macOS/Android), choose docker or PVE/Incus/LXD solutions

DNS issues

Podman installation configures the check-dns-podman.service. Check if it's running:

shell
systemctl status check-dns-podman

Manual DNS fix:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
+echo "nameserver 1.1.1.1" >> /etc/resolv.conf
+ \ No newline at end of file diff --git a/en/guide/podman/podman_thanks.html b/en/guide/podman/podman_thanks.html index 56d2148b14..d887983d0e 100644 --- a/en/guide/podman/podman_thanks.html +++ b/en/guide/podman/podman_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/pve/images/readme.html b/en/guide/pve/images/readme.html index ba149be8d9..cde47c30de 100644 --- a/en/guide/pve/images/readme.html +++ b/en/guide/pve/images/readme.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

暂存图片

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/pve/pve_android.html b/en/guide/pve/pve_android.html index 4ff3f27118..0d8a5d114e 100644 --- a/en/guide/pve/pve_android.html +++ b/en/guide/pve/pve_android.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Android Virtual Machine

Android System Image Download

Download links for Android system version 9 and earlier:

International

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

Domestic (China)

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Download links for Android system version 10 and later:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

Virtual Machine Setup

Setting up an Android Virtual Machine with version 9 and earlier images

This guide demonstrates using:

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

as an example

1

Template Configuration

Create a virtual machine with VMID 100 and select the corresponding storage disk

2

Select the Android image, then choose Linux for Type and choose an option with version 2.6 for Version

3

Select Vmware compatible for Graphic card, other options are default as shown

4

Choose SATA for disk format, allocate at least 30GB of disk space (size can be chosen based on your needs)

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface

9

System Installation

After entering the boot menu, select the option starting with Installation

10

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it

11

Choose not to use GPT format

12

When the empty disk is displayed, select New

13

Select partition type Primary

14

Then you'll be prompted to specify the size of the space. Just press Enter to use all available space

15

Then select Flags, move to Bootable, press Enter until Boot appears under Flags

16

Then move to Write and press Enter to write changes

17

You'll be asked to confirm whether to continue. Type yes and press Enter to continue

18

After a progress bar completes, you'll return to the initial menu. Select Quit to exit the menu, everything is now ready

19

Then you'll return to the UI interface. Use the previously initialized disk and select the OK button

20

Use the arrow keys to select ext4 file system type, then select the OK button

21

Confirm formatting by selecting the Yes button

22

Confirm GRUB boot installation by selecting the OK button

23

Confirm the file system is readable and writable by selecting the OK button

24

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button

25

After a while, you'll enter the Android logo screen

26

Removing the Image

Then there will be a black screen. If it's still black after 3-5 minutes, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

ar

Then execute qm start 100 on the host machine again, and you should enter the Android system initialization interface

System Initialization

In the initialization interface, select the language and click the confirm button

27

It will try to connect to WiFi. Since our PVE installation uses a completely static network configuration, just skip this and set it up later

31

Click the next button to confirm the time settings

32

Click to cancel screen protection, confirm to skip again

33

After a period of black screen, the main screen application selection will appear. If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine as before, and it should display after entering VNC

Select Quickstep

34

Network Settings

After entering the desktop, you need to set up the network. Click the settings icon in the upper left corner

35

A dropdown appears, click and hold to pull down

36

Click the gear button

37

Enter Network & Internet settings

38

Double-click WIFI with the left mouse button

39

Modify the detected VirtWIFI. Right-click to bring up the selection box, then click Modify network

40

Advanced options appear, click to open hidden options

41

Configure the network settings as shown

IP address 172.16.1.xxx (replace xxx with your desired IP, I used 100 because my vmid is 100 for convenience)

Subnet mask 24

Default gateway 172.16.1.1

DNS 8.8.8.8 or 144.144.144.144

Then click the save button

42

At this point, the settings may still not be applied. Turn off WiFi and then turn it back on, it should then show as connected

43

Then exit to the main interface, click on Google Chrome, and try to open a webpage

44

You can see that opening this guide's URL works without problems, proving that the network is connected

45

Setting up an Android Virtual Machine with version 10 and later images

This guide demonstrates using:

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

as an example

1

Template Configuration

The host machine needs to execute the following command to install graphics environment dependencies

shell
apt install libgl1 libegl1 -y

Then start creating the virtual machine by clicking the Create VM button in the upper right corner. Fill in VMID, Name, Resource Pool

2

Select the Android image, then choose Linux for Type and an option with version 2.6 for Version

3

If the host machine has a GPU, select VirGL GPU for Graphic card.

If the host machine doesn't have a GPU, select VirtIO or Vmware compatible for Graphic card.

Select q35 for Machine, select OVMF (UEFI) for BIOS, and select local for EFI Storage.

4

Choose SATA for disk format. How much disk space to allocate is up to you, but at least 30GB is recommended

5

CPU count should be at least 2 cores

If your host machine supports nested virtualization, choose host for CPU type (verified to work)

If your host machine doesn't support nested virtualization, choose qemu64 for CPU type, and after creating the template, go to Options and uncheck KVM hardware virtualization before starting the virtual machine (no guarantee that system initialization will work properly)

6

Memory should be at least 4GB, enter at least 4096

7

Select vmbr1 for the network bridge, choose VirtIO (paravirtualized) for Model, and uncheck Firewall

8

After clicking the continue button, the template is successfully created. You need to manually start it and enter the VNC interface.

System Installation

After entering the boot menu, select the option ending with Installation

9

Then you need to create disk partitions. If you can't select it, press the keyboard button 'c' to select it.

10

Choose not to use GPT format, continue using cfdisk format.

11

When the format selection box appears, select gpt.

12

When the empty disk is displayed, select New.

13

Because you need to create an EFI partition, you need to change the size rather than using the default. Change the number to 1 to allocate 1GB of disk space, then press Enter.

14

Then you'll return to the menu bar. Use the arrow keys to select Type, then press Enter to choose the format type for the partition

15

Use the arrow keys to select the first option EFI System, then press Enter

16

Now you're back at the menu bar. In the upper half of the page, you can see the specific partition size and format

17

Then press the down arrow key to select the next empty partition line

18

Select New from the menu bar, then press Enter

19

Here you need to fill in the partition size. Match it with the empty partition size shown in the upper right corner, then press Enter.

20

Return to the menu bar, select Write, press Enter to write the partition.

21

You'll be prompted to enter yes to confirm. Enter it and press Enter.

22

After a progress bar runs, you should return to the menu bar. Select Quit to exit the menu, everything is now ready

23

Then you'll return to the UI interface. Use the previously initialized 1GB disk and select the OK button

24

Use the arrow keys to select fat32 file system type, then select the OK button

25

Confirm not to modify the name by selecting the OK button

26

Confirm formatting by selecting the Yes button

27

Then you'll return to the initial UI bar. Select the second partition that is not 1GB in size and select the OK button

28

Use the arrow keys to select ext4 file system type, then select the OK button

29

Confirm not to modify the name by selecting the OK button

30

Confirm formatting by selecting the Yes button

31

Choose not to use extra space for updates by selecting the No button

32

Confirm GRUB2 EFI BootLoader by selecting the OK button

33

After a progress bar runs for some time, it will show that installation was successful. Select Reboot and the OK button.

34

System Initialization

After a while, you'll enter the logo screen.

35

After some more time, you should enter the initial Android interface. You'll see a popup and the time. Hold the left mouse button and swipe up

36

The main screen application selection will appear. Select Quickstep

If this interface doesn't appear after waiting 3-5 minutes, restart the virtual machine, and it should display after entering VNC

37

Removing the Image

After the Android interface appears, execute qm stop 100 on the host machine, then start removing the image file.

Remove the installed ISO file by manually clicking on the corresponding CD in the Hardware section of the ProxmoxVE web interface and selecting Remove

br

Then execute qm start 100 on the host machine again, and you should enter the system's initial interface.

Network Settings

After entering the desktop, you need to set up the network. Hold the left mouse button in the indicated position and swipe up

38

A bunch of applications will pop up. Find the one called Bliss Ethernet Manager and click to open it

39

Click to open IP Assignment, select Static type, click the OK button to confirm

40

Click to open IP Address, enter 172.16.1.xxx/24 (I used 100 for xxx because my virtual machine VMID is 100 for easy identification), click the OK button to confirm

41

Click to open Gateway Address, enter 172.16.1.1, click the OK button to confirm

42

Click to open DNS Address, enter 8.8.8.8, click the OK button to confirm

43

Then in the application interface, click Interface Up and Refresh, then press the exit key on the keyboard to exit the program

44

Open the browser in the main interface to verify that the network is working properly

45

You can see that opening this guide works without problems, the network is functioning

46

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/pve/pve_custom.html b/en/guide/pve/pve_custom.html index c7783e9259..aeb4bad288 100644 --- a/en/guide/pve/pve_custom.html +++ b/en/guide/pve/pve_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,41 +22,41 @@ -
Skip to content

Customized partitions

Installing Proxmox VE 7 on a non-Debian system

Minimum local hardware requirements are the same as for the previous normal installation.

You need to install docker first.

curl -sSL https://get.docker.com/ | sh
+    
Skip to content
- +2a01:4f8:1c1c:94de::6

This approach can be used when the host machine has not been fully allocated a subnet larger than /80, possesses only a few IPv6 addresses, yet requires the creation of instances with independent IPv6 addresses.

+ \ No newline at end of file diff --git a/en/guide/pve/pve_install.html b/en/guide/pve/pve_install.html index a81fe899bb..f9a07e9f31 100644 --- a/en/guide/pve/pve_install.html +++ b/en/guide/pve/pve_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

PVE Body Installation

If you don't know how to choose an option during installation, just press enter.

TIP

For low-configuration hosts, it is recommended to check the contents of the Custom partition after all the content has been installed to perform memory tuning and reduce the memory footprint.

Installation on non-physical machines

Proxmox installed by this method can subsequently use all scripts of this project.

One-click PVE installation

TIP

Suggest debian12+, the actual test part of the independent server debian11 system will appear a reboot network will be lost, debian12 does not have such a problem!

  • The installation is the latest PVE from the apt source at the moment.
  • For example, debian10 is pve6.4, debian11 is pve7.x, debian12 is pve8.x, debian13 is pve9.x
  • Changes to the /etc/hosts file (to fix the wrong hostname setting for merchants and to add the required content for PVE)
  • /etc/cloud/cloud.cfg file modification (to avoid overwriting modified hostname etc.)
  • /etc/network/interfaces file modification (fix auto, dhcp type to static, add vmbr0 gateway)
  • Detect whether it is China IP, if it is China IP use Tsinghua mirror source, otherwise use the official source, and at the same time deal with the source of apt and the corresponding nameserver, to avoid disconnections
  • Create vmbr0 (independent IP gateway), the host allows addr and gateway for intranet IP or extranet IP, has been automatically recognized
  • vmbr0 creation support to open pure IPV4, pure IPV6, dual-stack virtual machine, automatic identification of IPV4 address and IPV6 address, automatic identification of the corresponding IP interval
  • Installation of the necessary toolkit for PVE to open a virtual machine
  • x86_64 replace enterprise subscriptions in apt sources with community sources, arm sources built using third-party patches for fixes
  • Print query Linux system kernel and PVE kernel installed or not
  • Setting up DNS detection 8.8.8.8.8 for boot add DNS systemd service
  • Download PVE and printout of login information after adding APT source link for PVE

All modified files have been set to read-only mode to avoid overwriting after reboot.

If you want to modify the file, please use` chattr -i file path to cancel the read-only lock, and run chattr +i file path to lock the read-only lock when you finish modifying the file.

You will be prompted to reboot your system once during the execution process, After rebooting, be sure to wait at least 20 seconds to make sure the system does not reboot automatically again.

Because the original environment may be missing ifupdown or ifupdown2 environment, there is a self-installation daemon loaded for the installation, after the installation of the system will automatically reboot the system again, wait for 20 seconds without reboot to ensure that the installation has been run.

If the host itself exists SLAAC assigned IPV6 address, will be able to choose whether to use the largest IPV6 subnet range, the default carriage return does not use the largest IPV6 subnet range only use the local IPV6, if you subsequently need to attach a separate IPV6 address to the virtual machine/container, the option must be selected y.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

or

shell
bash install_pve.sh

TIP

After successful installation, the web page may not be safe to open, click on Advanced or More Options and insist on accessing it!

The login information is your SSH account and password.

Pre-configure the environment

  • Creating a resource pool mypool
  • Remove the subscription popup
  • Attempt to enable hardware passthrough
  • Detect and auto-install AppArmor modules.
  • Before rebooting the system, it is recommended to hook up nezha probe to facilitate the use of the command line in the background without SSH, to avoid the possibility that SSH may lead to the loss of the root password after the reboot due to the merchant's strange presets.
  • Before executing reboot, you need to wait for the background task to finish executing, some host system apt command execution is very slow, you have to wait for a while to finish executing, of course, most of the machines are not so bad!

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

Automatically configure the host's gateway

WARNING

Before using this command, please make sure that you have restarted the server and that PVE can use the WEB terminal normally before executing this command. Do not execute this command immediately after restarting the machine, wait for at least 1 minute after the WEB terminal is successfully started before executing this command. If the WEB side doesn't start, run systemctl status pveproxy to see if it starts, if it's stuck, run systemctl start pveproxy to start the WEB side.

TIP

This step is most likely to cause SSH disconnections, the reason is to modify the network without waiting for the PVE kernel to start, which will result in setting conflicts, so wait at least a few minutes until the kernel is started, that is, the WEB side is started successfully before execution.

TIP

If the host needs to attach an IPV6 tunnel (add an IPV6 subnet to a host that does not have an IPV6 address) before executing this command, please check the IPV6 free subnet attachment section to attach to the corresponding configuration file, but please ignore 'initial environment modifications' and attach directly, and then execute the following one-click gateway configuration commands after verifying that you have an IPV6 address.

  • If vmbr0 is not created, it is automatically created with the same logic as the main installation
  • Create vmbr1 (NAT gateway) to support IPV4 servers that open NAT for IPV6 networks with NAT.
  • Create vmbr2 (standalone IPV6 gateway), use ndppd to solve the problem of MAC verification of IPV6 addresses by the host, support the opening of servers with standalone IPV6 networks.
  • If you want to see the complete settings, you can execute cat /etc/network/interfaces to see, if you need to modify the gateway you need to modify the file, the web site can not be modified!
  • Load iptables and set back to source and allow NAT port forwarding.

In short, vmbr0 is responsible for v4 standalone IPs, and vmbr1 is responsible for complex v4/v6 NATs, vmbr2 is responsible for v6 standalone IPs.

Open independent IPV4 virtual machine using vmbr0, gateway with the host, IPV4/CIDR using the same network segment address and the same subnet mask, using the host's unbound IPV4 address for IPV4/CIDR, of course, if the subsequent use of this script does not need to pay attention to this point of the nuances of the thing

Use vmbr1 for IPV4 VM with NAT, 172.16.1.1 for gateway, 172.16.1.x/24 for IPV4/CIDR, where x can't be 1, but of course you don't need to pay attention to this minutia if you use this script later.

Command:

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

This step may require you to reboot your system after a few minutes of successful execution, see the final execution of the script at the end of the tip. However, a reboot will ensure that some of the hidden settings are loaded successfully, so be sure to reboot the server once if you are in a position to do so.

To this point the main body is installed.

Installation on a physical machine

Proxmox installed by this method NOT to be used subsequently with all scripts of this project.

This method has not been tested and adapted on a large scale, only I installed PVE8.4 on the local machine, the router itself is not automatically obtain an IP address but fixed IP address connection way, if there is a problem corresponding to the warehouse open issues.

U disk burning official ISO

Official ISO download address:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

You need to download it locally in advance.

You also need a USB flash drive with a good read/write rate for making a boot disk, as the boot disk needs to be formatted using rufus for boot disk making, you need to make sure that the USB flash drive is empty before making the disk

rufus download address (download to your local, not USB flash drive):

https://rufus.ie/zh/

or

https://github.com/pbatard/rufus

Burning needs to use DD method to burn, the original data of the USB flash disk will be completely erased after burning.

PVE installation

Find out how to get into the BIOS on the host itself, and modify two things after entering the BIOS

  1. Safe boot needs to be turned off

  2. the order of the boot needs to be moved to the first USB order

Then save the settings, then insert the USB flash drive, reboot the system, and choose to use the graphical interface for installation.

FQDN need to fill in a URL, you can fill in something like pve.spiritlhl.net, preferably a sub-domain of the domain name you own, not the actual domain name if you write it as something like pve.localsite.com will also work, the subsequent may not be used!

After the installation will automatically shut down and restart, reboot after the black screen can be unplugged USB, to avoid restarting the installation from the USB flash drive, of course, if you forget to reboot to the installation page, shut down the machine after unplugging the USB flash drive and then start up is also OK!

Wireless Network Configuration

Download the required zip file and shell scripts

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

After downloading, unzip the zip file, drag the wireless folder into the root directory of a new USB flash drive, and the wireless.sh file has to be put into the root directory as well.

After the flash drive is plugged into the physical machine, you need to mount the flash drive, here sdx1 is the actual path of the flash drive queried by the first command, you need to modify it yourself

shell
fdisk -l 
-mount /dev/sdx1 /mnt

The wireless.zip on the USB flash drive should be unzipped and opened to see the deb file.

At this point, run the one-click configuration

shell
bash /mnt/wireless.sh

After the configuration is complete, the system will automatically reboot and the public network will be available after the reboot.

During the execution of the configuration script, you will be prompted to enter the name and password of the WIFI. Since there is no Chinese input method in the pure CI environment, the name of the WIFI must be composed of English numbers only, and the password must be the same.

Cautions

Physical machine after the installation of unlimited modules can not use NAT to connect directly to the virtual machine to access the network, so the subsequent tutorials of this project does not support this method of access to the bridge, the subsequent scripts of this project does not support this method of installation of Proxmox.

Currently feasible wireless module used on the PVE success stories, are required to WIFI router access to the network is automatically obtain an IP address (DHCP) (the subsequent use of openwrt or ikuai or directly nat after the network available within the virtual machine), or can be modified in the router static routing table, if the WIFI router to use a fixed IP address Connection to the network, for the time being did not find success stories.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/pve/pve_kvm.html b/en/guide/pve/pve_kvm.html index c3cd3f6e14..3704c39f6c 100644 --- a/en/guide/pve/pve_kvm.html +++ b/en/guide/pve/pve_kvm.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

Linux Virtual Machine (KVM/TCG Virtualization)

SSH Login Instructions

When open a virtual machine, the default generated username can be something other than root, in which case you need to run sudo -i to switch to root!

If the default username is not root, the default unset root password is password or oneclickvirt.

After logging into SSH and switching to root privileges, be sure to change the root password, which can be changed using the following command:

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

Considerations for opening a virtual machine with an IPV6 address

Due to long-term inactivity IPV6 does not use may lead to NDP broadcast cache invalidation reset, generally idle for about 50 minutes will appear IPV6 unavailable, commonly known as "IPV6 cutoff", at this time it is necessary to set up a timer task.

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

Executing the above commands in the opened virtual machine ensures that the IPV6 network is always used and does not fail over.

Images available for creating virtual machines

  • Pre-installed with cloud-init enabled.
  • Enabled SSH login.
  • Pre-configured SSH to listen on ports 22 for both IPv4 and IPv6.
  • Enabled password authentication for login.
  • Enabled root login.
  • Partially pre-installed QEMU guest agent.
  • System support:
    • See pve_kvm_images or kvm_images for details on the x86_64 architecture, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.
    • For arm architecture, see the systems listed in ubuntu or debian, you only need to write the system name + system version number, such as ubuntu20, ubutnu22, debian11, debian12, and so on.

Virtual machines with standalone NAT configuration.

  • Automatically deploy NAT servers with the default Debian 10 image, chosen for its minimal footprint.
  • It's possible to customize the image used through the command, and pre-configured images are available. These images come with storage settings ranging from 2 to 10 GB of disk space. For regular use, at least 10 GB of disk space is recommended. You can increase the disk size if certain images fail to start.
  • The command allows for specifying the storage disk location. When not specified, it defaults to the local disk, which is the system disk. It can also be set to a mount disk as displayed in PVE.
  • Recommended custom memory size is 512 MB.
  • Automatic internal and external port mapping, including ports 22, 80, 443, and 25 other port numbers shared between internal and external networks.
  • After generation, there's a wait time for the virtual machine's internal cloud-init configuration to establish network and login information. This process takes approximately 5 minutes.
  • Pertinent virtual machine information will be stored in the NOTES section of the corresponding VM on the web interface, accessible for viewing through the web portal.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically added. However, there won't be any public IPV6 addresses.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

TIP

Note that usernames consisting of only numbers may cause issues with cloud-init. It's preferable to use usernames that are entirely in English or start with an English character.

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

Meaning of each parameter

shell
# ./buildvm.sh VMID Username Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Public_Port_Start Public_Port_End System Storage_Disk Independent_IPV6_address(leave default N blank)

TIP

Note that the Password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the Password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

After setup is completed, you can execute cat vm111 to view the information or check the NOTES section for the corresponding VM on the WEB interface.

Below is the information for the example VM that has been set up:

AttributeValue
VMID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size10G
SSH Port40001
Port 8040002
Port 44340003
Port Range for NAT50000 to 50025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific VM

  • Stop VM
  • Delete VM
  • Delete port mapping
  • Restart network
  • Delete log files

Download Script

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

Meaning of each parameter

You can delete the VM with the corresponding VMID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each VMID, and more than one can be deleted at a time.

Batch Creation of Virtual Machines with NAT

WARNING

Before initial use, ensure that the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port forwarding, as conflicting settings may result in bugs.

TIP

Before initiating the batch creation process, please use the 'screen' command to execute it in the background. This will help avoid interruptions due to the instability of SSH caused by extended batch creation times.

  • The batch creation process can be run multiple times to generate multiple virtual machines (VMs).
  • NAT servers are automatically created during the process. If left blank, the default Debian 11 image will be used. You can also customize the image name. Refer to the list of supported images in the previous section.
  • Automatic internal and external port mapping is performed, including ports 22, 80, 443, and other ports with identical internal and external numbers (25 ports in total).
  • After generation, a waiting period is required for the cloud-init configuration of the VM's network and login information to be set up. This process takes approximately 5 minutes. There is a 60-second interval between creating each VM to avoid potential performance issues.
  • The default network configuration for VMs created in batches includes port mappings for ports 22, 80, 443, and a range of 25 ports for internal and external communication.
  • You can customize the number of CPU cores, memory size, disk size, and which storage disk on the host machine to use for batch creation. Ensure you calculate available resources before proceeding.
  • Relevant information about the virtual machines will be stored in the 'NOTES' section of the corresponding VM on the web interface, where you can view them.
  • If the host machine comes with an IPv6 subnet, an IPv6 network will be automatically attached, although there will be no public IPv6 addresses available.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

After the setup is completed, you can execute cat vmlog to view the information, or check the NOTES in the corresponding VM on the web interface.

Delete All Virtual Machines

  • Delete all VMs
  • Delete all NAT port mappings
  • Restart the network
  • Delete log files
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
+    
Skip to content
- +service netfilter-persistent restart

This will cause the host to lose the ability to open VMs/containers with NAT that do not have a separate IPV4 address, so be careful!

After this, You will only be able to open VMs with separate IPV4 addresses.

Creating Virtual Machines with Pure IPv6 Addresses

The prerequisite is that the host provides an IPv6 subnet instead of just a standalone IPv6 address, and the host does not have MAC address verification enabled.

Automatic Selection of IPv6 Addresses without Manual Specification

  • Pure IPV6 refers to a bound public IPV6 address, where the actual VM still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address, based on the virtual machine's number, to the virtual machine.
  • System-related information will be stored in the NOTES section of the respective virtual machine, accessible for viewing on the web interface.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

Meaning of each parameter

shell
# ./buildvm_onlyv6.sh VMID username password CPU_cores memory_GB disk_GB operating_system storage_disk

TIP

Note that the password here should be a mix of English and numbers only, and start with English, so as to avoid failing to set the password due to special characters being escaped during the setup process.

Test Example

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

The above command is used to create a virtual machine with only IPv6 addresses.

ParameterValue
VMID152
Usernameroot
Passwordoneclick123
CPU1 core
Memory1024MB
Disk10GB
Operating Systemdebian12
Storage Disklocal

TIP

Note that only VMIDs from 100 to 256 can be used here, no other numbers can be used.

+ \ No newline at end of file diff --git a/en/guide/pve/pve_lxc.html b/en/guide/pve/pve_lxc.html index 82cdd70f30..e8e0b9c497 100644 --- a/en/guide/pve/pve_lxc.html +++ b/en/guide/pve/pve_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

LXC Virtualization

WARNING

If you need to open more than 200 LXC containers on a single server, then it is not recommended to use this project, there may be problems with lxcfs access drift, which generates IO occupancy that cannot be released. (This is a native LXC problem that can't be fixed.)

Images available for creating LXC Containers

x86_64:

Auto-patching images: https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

Automated daily pulls for compilation and patching

Self-patching images: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

Some of these images are flawed and not guaranteed to be available for all PVEs, with names like ubuntu16.04, debian6, centos7, opensuse42.2, opensuse42.3 Don't use them unless necessary.

and

Run pveam available --section system to see the names and version numbers of the officially available systems.

Priority: Self-patching images (not supported by Proxmox-VE 5 and below) > Official default images (both supported) image

The version has been automatically recognized by a script to use the corresponding image.

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

Supported systems can be viewed in the file above, which lists debian and ubuntu systems do not use the aliases in it, just use the numeric designators.

TIP

All system parameters are lowercase system names spliced with version numbers, e.g. debian11, ubuntu22, etc. (Self-patched images support some out-of-the-way systems, such as centos6, centos7, debian8, debian9, etc.)

The default CT username for all systems is root

TIP

Of course, sometimes there are special cases where the version may be current/base, in which case it is sufficient to use only the English system name, e.g. archlinux, gentoo, kali.

Creating Individual LXC Containers for Virtualization

WARNING

Before initial use, ensure that the current PVE (Proxmox Virtual Environment) is clean and the host machine has not undergone any port mapping, as conflicts in settings could lead to bugs.

TIP

Before creating containers, use the 'screen' command to run them in the background. This helps to avoid extended creation times that might lead to interruptions due to unstable SSH connections.

  • Automatically create NAT servers using the default Debian 11 image, or customize the system image as needed.
  • Automatically perform internal and external network port mapping, including ports 22, 80, 443, and 25 additional ports with identical numbers for both internal and external networks.
  • After generation, allow some time for the virtual machine to configure its internal network and login information. This process takes approximately 3 minutes.
  • The default network configuration includes port mappings for 22, 80, 443, and a range of 25 ports for both internal and external networks.
  • Customize the number of cores, memory size, disk size, and the storage disk on the host machine for allocation. Ensure that you calculate available resources before creating containers.
  • Optionally specify the storage disk location in the command. When not specified, it defaults to the local disk, which is the system disk. Alternatively, you can specify a mount disk as displayed in PVE.
  • The created containers are enabled with SSH by default, allowing root login. They are also configured to support nested virtualization for Docker.
  • Relevant container information will be stored in the respective container's notes, accessible through the web interface.
  • If the host machine has an IPV6 subnet, IPV6 networking will be automatically attached, but no public IPV6 addresses will be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

Meaning of each parameter

shell
# ./buildct.sh CTID Password Number_of_CPU_Cores Memory Disk SSH_Port Port_80 Port_443 Start_Public_Port End_Public_Port System Storage_Disk Independent_IPV6_address(leave default N blank)

Test Example

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

After setting up, you can execute cat ct111 to view the information, or check the NOTES section on the web interface.

Here is the information for the created example CT:

Please note that "CT" and other technical terms might have specific meanings in different contexts. If "CT" stands for something specific in your domain, you might want to provide additional context for accurate translation.

AttributeValue
CTID111
SSH Usernameroot
SSH Passwordoneclick123
Number of CPU Cores1
Memory Size512MB
Disk Size5G
SSH Port20001
Port 8020002
Port 44320003
Port Range for NAT30000 to 30025
Operating Systemdebian11
Host Storage Disklocal
IPV6 addressN

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

Deletion specific CT

  • Stop CT
  • Delete CT
  • Delete Port Mapping
  • Restart Network
  • Delete Log Files

Download Script

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

Meaning of each parameter

You can delete the CT with the corresponding CTID, as demonstrated here using the example 111 above

shell
./pve_delete.sh 111

The actual number of deletions is not fixed, a space separates each CTID, and more than one can be deleted at a time.

Batch Creation of LXC Containers with NAT

WARNING

Make sure the current Proxmox Virtual Environment (PVE) is clean and the host machine has not undergone any port mapping before the first use, as conflicting settings may result in bugs.

TIP

Before initiating the creation process, it's recommended to use the 'screen' command to execute the batch creation. This will prevent interruptions due to potential instability in SSH during the extended creation time.

  • It is possible to run the batch container creation process multiple times. However, please be mindful of allocating enough memory to the host machine to prevent system crashes. For adding swap space, refer to this link.
  • There is a 60-second interval between creating each container to avoid sudden performance bottlenecks.
  • Customization options include selecting the number of CPU cores, memory size, disk size, and the storage drive on the host machine. Ensure that you have calculated available resources appropriately before initiating the process.
  • The created containers have SSH enabled by default, allowing root login. Additionally, they are configured to support nested virtualization for Docker usage.
  • Relevant information about the containers will be stored in the corresponding container's notes, which can be viewed on the web interface.
  • If the host machine has an IPv6 subnet, it will be automatically assigned to the containers. However, public IPv6 addresses will not be provided.
  • Optionally enable or disable standalone IPV6, requires the host to have at least one /64 subnet.

Usage Instructions

Download Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

After the setup is complete, you can execute cat ctlog to view the information, or check in the NOTES section on the web interface.

Delete All CT

  • Delete all CTs
  • Delete port mappings for all NATs
  • Restart the network
  • Delete log files
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
+    
Skip to content
- +iptables-save > /etc/iptables/rules.v4

Creating Virtual Machines with Pure IPv6 Addresses

The premise is that the host provides an IPv6 subnet rather than a standalone IPv6 address, and the host does not have MAC address filtering enabled.

Automatic Selection of IPv6 Addresses, No Manual Configuration Needed

  • Pure IPV6 refers to a bound public IPV6 address, where the actual container still has the host's IPV4 network but no external IPV4 port
  • Automatically detect available IPv6 ranges and bind the corresponding V6 address based on the container number to the container.
  • Relevant system information will be stored in the NOTES of the corresponding container, accessible for viewing on the web interface.

Download script

Command:

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

Example Usage

shell
./buildct_onlyv6.sh CTID Password Number_of_CPU_Cores Memory_Size_in_MB Disk_Size_in_GB Operating_System Storage_Disk
shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

The above command signifies the creation of a container with a pure IPV6 address.

AttributeValue
Container TypeCT
CTID152
Usernameroot
Passwordoneclick123
CPU Cores1
Memory1024MB
Disk10G
Operating Systemdebian13
Storage DiskLocal Disk (System Disk)

TIP

Note that only CTIDs from 100 to 256 can be used here, no other numbers can be used.

+ \ No newline at end of file diff --git a/en/guide/pve/pve_macos.html b/en/guide/pve/pve_macos.html index f989d9cefd..021f864254 100644 --- a/en/guide/pve/pve_macos.html +++ b/en/guide/pve/pve_macos.html @@ -9,12 +9,12 @@ - + - - + + - + @@ -23,7 +23,7 @@ -
Skip to content

Setting Up MacOS Virtual Machine

Prerequisites

System and hardware configuration requirements left bar --> Configuration requirements

You can only set up a MacOS virtual machine when the environment detection confirms that the host machine supports KVM nested virtualization. Otherwise, it will be detected by hardware and cannot be set up.

Setting Up the Prerequisites

  • Automatically identify CPU type (AMD or Intel) and set nested virtualization parameters according to the type.
  • Modify GRUB boot parameters to enable IOMMU and disable default framebuffer.
  • Add VFIO module support for hardware device passthrough.
  • Blacklist sound card and graphics card driver modules to avoid conflicts with macOS.
  • Configure KVM-related kernel parameters, ignore MSR errors, and improve compatibility.
  • Patch Proxmox frontend status detection logic to bypass status restrictions.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

After successful execution, it will show that the system will restart in 15 seconds. This is the normal process, as kernel parameters cannot take effect without restarting.

System Image Download

  • All images have pre-installed components and are relatively large (minimum about 4.9GB). Download and extraction tasks will run in the background.
  • Images are complete systems with all components and can be booted and used without internet connection.
  • If the free space on the system disk is less than twice the size of the image, the download will be rejected.
  • Images are in 7z compressed format and need to be extracted before use.
  • You can check the status of current download and extraction tasks at any time. Virtual machines can only be created after completion.
shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh --lang=en

Or

shell
bash install_macos_images.sh --lang=en

After the background download task starts, you can close the SSH window and wait for 30 minutes to 3 hours (depending on your server bandwidth and connectivity) to download the ISO 7z compressed package.

When the download task is complete and the current download task query shows empty, you can choose to execute the extraction task. The waiting time for extraction depends on your server's CPU performance.

When the extraction task is complete and the current extraction task query shows empty, all preparations are ready.

Tasks of the same type can run concurrently, and any task can be canceled at any time by entering the PID value.

Build from https://github.com/oneclickvirt/macos currently supported image compressed packages:

# Listed by system release date from old to new
+    
Skip to content
- +sequoia.iso.7z (Size: 15.02GB)

MACOS Virtual Machine Template Setup

  • Systems high-sierra, mojave, catalina require at least 2 cores, 4G of RAM and 40G of hard disk to run.
  • big-sur and newer MACOS systems require at least 6 cores, 6G RAM and 50G hard disk.
  • The newer the version of the system (the later the serial number of the download), the more hardware is required.
  • All images are boot disk images without any personal data, so disk allocation, login information setup, and network settings need to be manually configured according to the instructions.
  • You need to manually start the virtual machine from the web interface. Before starting, you can check if all templates meet your expectations.

Download Template Script

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

Parameter Meanings

shell
# ./buildvm_macos.sh VMID CPU_cores Memory Disk SSH_port VNC_port System Storage_disk Independent_IPV6(default_N_if_empty)

TIP

The disk size here is only the size of the virtual machine's disk. During the actual setup process, the program will also mount the boot disk and system image, so the actual disk requirement for setting up a virtual machine is virtual machine disk size + image size + boot disk size (500MB). Always be aware of whether your disk space is sufficient for setting up virtual machines.

Example Command

Using the oldest version (high-sierra) as an example, the supported configuration is as follows (very laggy)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

After the template is set up, you can run cat vm100 to view information, or check the NOTES in the corresponding VM in the WEB interface.

TIP

If you did not install PVE on Debian through this project, but installed PVE directly using the official ISO, and did not merge the local and local-lvm partitions, or the local partition is not enabled to support the VM disk type, then the local in the one-click command above should be changed to local-lvm, and you need to use a VM disk-supporting Partitioning for virtual machine creation

Here is the information for the example VM:

PropertyValue
VMID100
CPU cores2
Memory size4096MB
Disk size45G
SSH port44022
VNC port45901
Systemhigh-sierra
Host storage disklocal
Independent IPV6N

TIP

Note that VMID can only use numbers from 100 to 256, other numbers are not available

MACOS System Boot and Installation

After completing the previous steps, you can see a gray virtual machine waiting to be started in the panel.

mac0

After clicking start, enter the VNC panel. The selection box on the left has a full-screen button. It is recommended to operate in full screen to avoid resolution issues.

mac00

After about 3 minutes of boot disk loading, a startup disk will be displayed on the left center of the screen. Click directly or press Enter.

After another 3-5 minutes of startup disk loading, four selection boxes will appear. Select Disk Utility and click to enter.

mac1

After entering, you can see three disks and one image. Find the disk larger than 40G named QEMU HARDDISK Media, and click Erase.

mac2

A pop-up window will appear, requiring you to rename the name to macos for easy identification and use later, then click Erase to continue initialization.

mac3

After initialization is complete, click Done.

mac4

Now you need to exit the Disk Utility interface. Click Disk Utility in the upper right corner and select Quit Disk Utility to exit the current selection box.

mac5

Then you return to the previous four selection boxes. Select Install macOS XXXX (since I am using Big Sur as an example, XXXX is Big Sur), and click continue.

mac6

In the following steps, continue clicking continue, then click Agree, and then Agree again.

mac7

mac8

mac9

Until those three disks appear again, but here you can see the disk larger than 40G named macos. Select it and click continue.

mac10

After a period of file copying and disk loading (about 12 minutes), you will formally enter the system installation phase. Choose your region based on where the host machine is located.

mac11

After selecting the region, continue clicking continue.

mac12

mac13

Until the Migration Assistant data migration option appears, select Not Now in the lower left corner to not import user data.

mac14

Then you will be prompted to create a user. Fill in the username, account name, and login password. After setting up, click continue.

mac15

After that, you will continue clicking continue until the system installation is complete.

Network Configuration

Since the system installation was performed in an offline environment, you need to manually configure a static network connection to the host's bridge.

Click the WIFI button in the upper right corner, turn off WIFI, and then click Network Preferences ...

mac16

After entering the settings interface, click the Advanced button to enter the advanced settings interface.

mac17

Fill in the static network configuration in the TCP/IP tab.

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx (replace xxx with the IP you want to bind, my vmid is 100, so I wrote 100 for convenience)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

If you need to configure an IPV6 network, similar to the IPV4 settings above, you will need to fill in the public IPV6 address bound to the virtual machine (written in the Note box in the PVE panel), subnet mask 128, and the default gateway obtained by executing cat /usr/local/bin/pve_check_ipv6 on the host.

mac18

Fill in the static network DNS configuration in the DNS tab.

Generally, adding 8.8.8.8 and 1.1.1.1 is sufficient. For use in mainland China, use 114.114.114.114.

mac19

After filling in and applying, the top left of the settings will show that the network is connected.

mac20

Now, opening the default browser and visiting any website will allow you to access public network resources, proving that the network has worked.

Remove ISO

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Macos system is to uninstall opencore.iso and xxxx (the system image used for installation).iso, similar to the Windows system uninstallation of win image and virtio image in the example picture above.

+ \ No newline at end of file diff --git a/en/guide/pve/pve_precheck.html b/en/guide/pve/pve_precheck.html index 2138fb526a..317dab4f8f 100644 --- a/en/guide/pve/pve_precheck.html +++ b/en/guide/pve/pve_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

Preface

The following is the introduction of the non-customized part, the customized part has its own corresponding introduction, do not get confused!

If there are unadapted merchants or machines welcome to contact @spiritlhl_bot, will try to support it sometime!

WARNING

Will change the network structure of the host, please make sure that the host can reset the system at any time and that there is no important data on the host before running it.

Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/pve

Various requirements

It is recommended that debian try to use the latest stable version of the system before use.

Warning: This project only supports servers with a dedicated public IPv4 address

This project relies on a fixed IPv4 address for network allocation and does not support the following scenarios:

  • Environments with dynamic IPv4 (e.g., servers whose IP address changes after reboot)
  • Environments without a dedicated public IPv4 address (e.g., accessing the internet via home router NAT and requiring DHCP to obtain an address)

If your server does not have a publicly routable static IPv4 address, please do not use this project.

The one-click installation script of this project only adapts to Debian systems, non-Debian can not be installed through the APT source, the official only gives the image of Debian, other systems can only use the ISO installation, or use custom partitions and other ways to solve the problem in the FAQ partition.

  • System requirements: Debian 8+

TIP

It is recommended to install debian11 instead of debian12+, because the latter is a beta version, and the debian11 installation is the stable version.

  • Hardware requirements: 2 cores 2G RAM x86_64 or arm architecture server hard disk at least 20G
  • Hardware requirements for KVM: VM-X or AMD-V support (some VPS and all Dedicated servers support).
  • If hardware or system requirements are not met, you can use incus to batch open LXC containers Jump

If you use IPV6 tunnels for IPV6 subnet attachment on the host, be sure to add the contents in the corresponding file when PVE is successfully installed but the gateway is not automatically set, and do not add IPV6 tunnels at the very beginning (without installing PVE).

Warning: If the host is a standalone server without IPMI can not reinstall the system themselves, do not use this script, please directly entrust the technician to manually ISO install PVE, do not use this project, otherwise it may result in loss of connectivity (some of the standalone servers network settings do not support hot-plugging)

Setting up virtual memory (SWAP) (optional, not required)

TIP

Memory to open some swap lest the machine blow up, if your host computer does not have enough memory and a lot of free hard disk.

Unit conversion: Enter 1024 to generate 1G SWAP-virtual memory, virtual memory occupies hard disk space.

When the actual memory is not enough, the virtual memory will be automatically used for memory usage, but it will bring high IO usage and CPU performance.

Refer to the description of the organization's related project Jump This opens the size of virtual memory

Physical Memory SizeRecommended SWAP Size
≤ 2G2x memory size
2G < memory ≤ 8GEqual to physical memory
≥ 8GAbout 8G is sufficient
Hibernation neededAt least equal to physical memory

The above values are only recommended settings, the actual value according to their own needs, do not blindly copy the value!

Command:

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Detecting the environment

  • This project related scripts must be executed before the execution of this script to detect the environment, if it does not meet the requirements of the installation of PVE will not be able to use the subsequent scripts
  • Detection of the local IPV6 network configuration (with or without IPV6 can be installed, just query)
  • Detection of the hardware configuration meets the minimum requirements
  • Detection of the hardware environment can be nested virtualization KVM type of servers, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • Detect whether the system environment can be nested virtualization KVM type of server, can not be nested virtualization KVM can also open QEMU TCG server, performance is poor
  • can not be nested virtualization KVM servers do not recommend the installation of the PVE, it is better to use incus for better performance.

Command:

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

If you need to update the IPV6 information before querying, then execute the following command before querying

bash
rm -rf /usr/local/bin/pve_ipv6*
+    
Skip to content
- +rm -rf /usr/local/bin/pve_last_ipv6*

Commands to set up the testing environment for executing this project are as follows:

图片

To perform the above-mentioned query, you only need to use the one-click script below to automatically create a virtual machine. There is no need to manually modify settings on the web interface.

图片

After creating the virtual machines using the subsequent script as mentioned above, it may be necessary to manually modify the settings on the web interface. You will need to disable hardware nested virtualization for each respective virtual machine, as shown in the following diagram.

图片

Stop the virtual machine before making modifications. After the modifications are done, you can start the machine to use NOVNC. Failure to close it may result in bugs that render this virtual machine unusable.

If you forcibly install PVE to enable KVM, even if the startup fails, you can also disable this option and try to start the virtual machine to see if it works.

The reason for these issues is what was stated above, the host does not support nested virtualized KVMs for acceleration.

TIP

Please use the "screen" command to suspend execution before launching the virtual machine, in order to avoid prolonged startup times. Unstable SSH connections could lead to interruptions during the intermediate execution.



+ \ No newline at end of file diff --git a/en/guide/pve/pve_qa.html b/en/guide/pve/pve_qa.html index 1489b7920c..c901140bb9 100644 --- a/en/guide/pve/pve_qa.html +++ b/en/guide/pve/pve_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,21 +22,21 @@ -
Skip to content

Solve the puzzle

Within 30 seconds of executing the script, the machine dropped.

Original system execution

systemctl restart networking

See if it is not directly offline, if so that is the machine native problem, hot plug or dhcp caused by the network can not restart, it is recommended to replace the host system or DD a new system to try!

Generally speaking, this situation occurs in the exclusive service Debian11 system, switch to Debian12+ system will not be a problem!

Installation of PVE fails with an error saying that some packages do not exist.

Execute the following command to query the source of apt

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

If you see

deb file://
-deb cdrom:[

A line starting like this proves that the host is using local sources instead of network sources, and you need to replace the sources in /etc/apt/sources.list with a line such as

pct

Replace the network source with the same to install using the PVE one-click install script.

Replacing the network source can be done using the following command for apt source replacement

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

Successful PVE Installation but Lost Connection After Reboot

If the machine successfully installs PVE and the web interface is accessible, but loses connection after a reboot, please execute the following commands after a successful PVE installation and before rebooting:

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
+    
Skip to content
- +cat /etc/iptables/rules.v4 | iptables-restore

Detect whether the merchant has falsely declared the IPV6 subnet size, resulting in the inability to set up virtual machines/containers with independent IPV6 addresses.

Use the following command to test the actual subnet mask size on a clean machine that does not have Proxmox VE installed.

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

If the test result is 128, it proves that the merchant has falsely labelled the subnet size, and only one IPV6 address cannot be additionally allocated to virtual machines/containers.

Another situation is that the merchant only gives permission to add, but does not actually give the complete IPV6 subnet to the machine. A typical example is virtfusion, which requires adding IPV6 IPs one by one in the background. In this case, it is also impossible to open.

virtfusion's customer service explanation for this situation:

All of the blocks you get for IPv6 are 1 x /64 however you need to add and route them to the VPS.
+Once you add 1 IPv6 you need to ping the gateway (its in the panel under networking) and then ping the IPv6 address, then repeat for every IPv6 address you add.

Host IPv6 Subnet Change Requires Corresponding Configuration Updates

Three areas require updating:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ Files containing IPv6 addresses

After completing the update, restart the host machine and proceed with the setup. You should then be able to use the new network segment.

Adding a New Node to an Existing PVE Cluster (Create / Join Cluster)

To form a cluster from two independent Proxmox VE instances, the following prerequisites must be met:

Cluster Prerequisites

  1. Unique Hostnames
    The hostname of each node must be unique to avoid conflicts. It is recommended to use names like pve1, pve2, etc.

  2. Unique VMIDs
    There must be no duplicate VMIDs across the two PVE nodes. If conflicts exist, adjust the VMIDs beforehand to prevent issues during cluster merge.

  3. Network Connectivity & Low Latency
    Both nodes must be able to ping each other. A low-latency network (LAN or high-speed public connection) is recommended for reliable cluster communication.

Creating the Cluster (Run on Any Node)

  1. Log in to the web interface of the node where the cluster will be created (e.g., pve1).
  2. Navigate to: Datacenter → Cluster → Create Cluster.
  3. Enter a name for the cluster (Cluster Name).
  4. Select the network interface to be used for cluster communication (e.g., public IP if only one interface is available).
  5. Click Create to initialize the cluster.
  6. Once the cluster is created, click Join Information and copy the displayed information for use on the joining node.

Note: The cluster has no "master" or "slave" nodes—any node can be the one that initiates the cluster.

Joining the Cluster (Run on the Second Node)

  1. Log in to the web interface of the node to be added (e.g., pve2).
  2. Navigate to: Datacenter → Cluster → Join Cluster.
  3. Paste the Join Information from pve1 into the input field.
  4. Enter the password of root user on pve1 in the Peer Password field.
  5. Click Join to begin the joining process.
  6. Wait until the process completes successfully, then refresh the page or re-login. You should now see both nodes in the same cluster.

Cluster Benefits

  • Nodes can share resources and migrate virtual machines.
  • ISO images and templates can be transferred more conveniently between nodes.

Verified VPS Providers

VPS Providers Offering KVM Virtualization with NAT

spartanhost Debian12 on a Dedicated Server (Debian11 has problems)

interserver VPS or dedicated servers

frantech Las Vegas Tier 2

eugamehost US Phoenix Black Friday Special

amhost Testing version

digitalocean Perminu Intel and Regular 4-core versions

skrime Lowest configuration of AMD Ryzen KVM Server

webdock AMD KVM Server

4vps Russian and Greek testing versions

adtaq Storage KVM server with lowest configuration

nocix Dedicated servers

online.net Debian12 on a Dedicated Server (Debian11 has problems)

OVH Public Cloud needs to be installed after dd as a pure system using the following command

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd ' oneclickvirt139' --network "static"

At this point, the system username after dd is root, and the password is oneclickvirt139.

If it doesn't work, please check the issues and instructions in https://github.com/leitbogioro/Tools. A common problem is that OVH standalone servers are dd'd, which requires the source system to be remounted as raid1 on debian12 by default, and then parameterized to specify dd'd as raid0 in order to be successful, using the following command

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

VPS Providers Offering NAT with LXC Virtualization

Tencent Cloud Worry-Free and Student editions

spectraip KVM servers

Linode Lowest configuration with dedicated CPU

hosthatch Special high-configuration servers

hetzner Cloud servers

rackdog Servers with floating IP

vultr Standard Cloud servers

azure Standard machines

scaleway ARM architecture servers

aws EC2 servers

Google cloud platform - GCP AMD servers

+ \ No newline at end of file diff --git a/en/guide/pve/pve_thanks.html b/en/guide/pve/pve_thanks.html index a4ffe5ec4a..37677ea579 100644 --- a/en/guide/pve/pve_thanks.html +++ b/en/guide/pve/pve_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/en/guide/pve/pve_windows.html b/en/guide/pve/pve_windows.html index bac80ea029..ae10777748 100644 --- a/en/guide/pve/pve_windows.html +++ b/en/guide/pve/pve_windows.html @@ -9,12 +9,12 @@ - + - - + + - + @@ -23,9 +23,9 @@ -
Skip to content

Setting Up Windows Visual Machine

Choose KVM virtualization or QEMU's TCG emulation at startup

The host itself, if it supports nested virtualization, can use host or kvm64 or qemu64 type CPUs

In terms of performance, host > kvm64 > qemu64

The qemu type of virtualization has a lot of performance loss

If you don't support nested virtualization, you can only use qemu64 type CPU, and you need to change KVM hardware virtualization in Options before you start the VM

Set it to no to uncheck Enabled[enabled].

If you're really not sure if your machine supports nested virtualization, then check System and Hardware Configuration Requirements --> Detecting the Environment Detecting to ensure it's available (with attempts to enable the feature)

The main logic for this is in the

https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

It is recommended to use PVE's System and Hardware Requirements --> Environment Detection in this tutorial for one-click detection, or the following detection logic:

egrep -c '(vmx|svm)' /proc/cpuinfo if it is 1

cat /sys/module/kvm_intel/parameters/nested if it exists and is 1

lsmod | grep -q kvm if it is loaded.

If all of these are supported, choose the host type to be 100% problem-free, in other cases there may be unknown errors try it yourself.

Using ISO Image with VirtIO for VM Setup

1. Download the Image

Before installation, you need to download the image file via local(pve) --> ISO images --> Download from URL

For the download link (URL:), you can use files from: https://github.com/ILLKX/Windows-VirtIO

Enter win.iso as the File Name:

download

Click Download. After downloading is complete, you can see the file size of win.iso on the current page, confirming it's in ISO format.

downloaded

2. Setting Up the Template

Click Create VM in the top right corner of the page.

In the General window, select mypool for Resource Pool:, enter win for Name, then click Next.

general

In the OS window, select win.iso for ISO image. For Guest OS, select Microsoft Windows as the Type and choose the appropriate Version for your ISO. For example, if you downloaded Windows 2022, select 11/2022, then click Next.

OS

In the System window, select VirtIO-GPU for Graphic card, q35 for Machine, VirtIO SCSI for SCSI Controller, and Default (SeaBIOS) for BIOS, then click Next.

system

In the Disk window, select Write Back for Cache, enter your desired disk size in Disk size (GiB) (generally not less than 20), and choose the storage location in Storage. In this example, only the system disk local is available, so local is selected. Then click Next.

disk

In the CPU window, enter the number of cores needed in Cores, then click Next.

cpu

In the Memory window, enter the desired memory size in Memory (MiB), then click Next.

memory

In the Network window, select vmbr1 for Bridge, VirtIO (paravirtualized) for Model, uncheck Firewall, then click Next.

Network

In the Confirm window, click Finish.

finish

3. Graphical Installation Configuration

Click on the template you've set up on the left, click Start in the upper right corner to start the virtual machine, then click Console to enter the VNC interface and wait for the operating system to boot.

console

In the VNC, click Next, then Install now, then I don't have a product key, check Accept license, click Next, and then select Custom installation.

win0win1win2win3win4

If the image comes with VirtIO drivers, you should be able to see the available system storage disk and its size. Select it and click Next.

win5win6

Wait for the system to install. It may restart automatically several times and could take more than 10 minutes.

win7

After installation is complete, you'll be asked to set a password during first login.

win8

Once setup is complete, there's a pop-up box on the left side of the NOVNC page. Click the first button, then follow the login prompt by pressing Ctrl+Alt+last button to enter the login page.

4. Network Initialization

Since the PVE is set up with a static network through this project, you need to manually modify the bound IP address after logging in, rather than using DHCP.

Right-click in the bottom right corner of the desktop and select Open Network and Internet settings. In the settings page that appears, click Change adapter options. win9

In the Network Connections, select Ethernet and click Change settings of this connection. win10

In the popup window, select Internet Protocol Version 4 (TCP/IPv4) and click Properties. win11

In the new dialog box, select Use the following IP address and enter: IP address(I): 172.16.1.xxx (replace xxx with your desired IP, I used 100 for convenience as my vmid is 100) Subnet mask(U): 255.255.255.0 Default gateway(D): 172.16.1.1

Then select Use the following DNS server addresses and enter:

8.8.8.8
-144.144.144.144

Click OK in the bottom right corner, and make sure Validate settings upon exit is NOT checked.

win12

Click OK and Yes for any other dialog boxes, and your virtual machine will now have network connectivity.

5. Unmounting the CD Drive

Manually click on the corresponding CD in the Hardware on the web side of ProxmoxVE and select Remove, then restart the VM and you can use it directly.

wk

Using ISO Images without VirtIO for VM Installation

1. Download Images

For Windows images without VirtIO, you can use:

https://github.com/ILLKX/Windows

For VirtIO ISO images, you can use:

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

Alternatively, you can download just the MSI package, package it into an ISO format locally, and then upload it to ProxmoxVE.

This way, the package is smaller. The official package contains support for all Windows images and is about 500MB, while a self-packaged one is around 5MB.

2. VirtIO Import

Note that in ProxmoxVE version 8.x and later, you can select VirtIO boot loading by default in the OS section, as shown in the image:

virtio

In lower versions of ProxmoxVE, such as 7.x and 6.x, you cannot select VirtIO boot loading by default in the OS section:

lower

You need to manually add CD/DVD Drive by clicking Add in the Hardware section and selecting the downloaded VirtIO ISO file:

lower

Then proceed as usual until you reach:

nodisk

At this point, you can't find the hard disk. You need to select Load Driver:

nodisk

Then select the VirtIO as your driver disk, click open, and import the corresponding system driver from the amd64 directory:

nodisk

I'm using a Windows Server 2019 image, so I imported the 2k19 driver. After importing, select the imported driver and click Next:

nodisk

nodisk

Now you should be able to see the hard disk. Select it and continue with the installation steps as in the previous tutorial until the system installation is complete and you reach the desktop.

3. Installing Drivers via virtio-win-guest-tools

Once successfully installed and at the desktop, you still need to manually install the drivers.

Open the VirtIO driver's CD drive directory. At the bottom, there's a virtio-win-guest-tools program that will install the required VirtIO drivers, including the VirtIO network card driver:

wk

wk

wk

After clicking install, the network card driver will be installed. For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

4. Installing Network Card Driver (Alternative)

After successful installation and reaching the desktop, you may still need to manually install the network card driver to connect to the network:

  1. Open Control PanelDevice Manager
  2. Find the Ethernet Controller, right-click and select Update Driver
  3. Select Browse my computer for driver software (R)
  4. Browse to the VirtIO driver's CD drive directory
  5. Open the NetKVM folder
  6. Select the driver folder corresponding to your current system version (like the above operation, I would choose the 2k19 folder with amd64 drivers)
  7. Confirm the installation, and after completion, the VirtIO network card driver will be successfully loaded

wk

wk

wk

For subsequent network settings, refer to the network initialization tutorial mentioned earlier.

5. Unmounting the CD Drive

In the ProxmoxVE web interface, manually click on the corresponding CD in the Hardware section, select Remove, and then restart the virtual machine. This way, you can use it directly:

wk

The old Windows image only includes Internet Explorer.

Manually enter the following URL in IE: https://www.microsoft.com/zh-cn/edge/download to download the file.

Since IE does not automatically whitelist certificates, multiple pop-ups will appear. Click “Add Domain,” save the changes, and only then will the download button appear on the page.

Additionally, older systems lack the WebView2 component by default. A prompt will appear indicating that this component must be downloaded and installed separately to enable modern browser functionality.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/bashvm.html b/en/incomplete/bashvm.html index c420a81b06..0fe7a574ec 100644 --- a/en/incomplete/bashvm.html +++ b/en/incomplete/bashvm.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/babywhale321/bashvm

https://bashvm.com/

Description

If you want to go deeper into how to open a VM and how to forward ports, then this program will start completely from the bottom and teach you step by step how to open a VM!

Disadvantages

Very tedious and time consuming, not as fast as other programs to set up a network and open a VM

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/cockpit.html b/en/incomplete/cockpit.html index 34dd7a70a9..c6f252a339 100644 --- a/en/incomplete/cockpit.html +++ b/en/incomplete/cockpit.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

hits

https://github.com/oneclickvirt/cockpit

Installation

Supported Systems: Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

Install only with Podman containers

shell
bash install.sh --ct

Install only with virtual machines

shell
bash install.sh --vm

Panel Mount Only

shell
bash install.sh

Both container and VM dependencies are installed

shell
bash install.sh --all

Disadvantages

The network is self-configuring, the mirrors are self-importing, the ports are self-mapped, and there is just one more GUI interface than the command line.

Thanks

https://cockpit-project.org/running.html

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/convoy.html b/en/incomplete/convoy.html index bf302d4675..ae552c6e2a 100644 --- a/en/incomplete/convoy.html +++ b/en/incomplete/convoy.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

One-click installation of convoy panel

Prerequisites for installation:

  • PVE is installed, but not the same node(not the same machine)
  • System is debian 11
  • CPU at least 2 cores, hard disk at least 20G, memory at least 4G (memory covers swap)

I don't guarantee that this script is error-free, it's just for my own amusement.

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/index.html b/en/incomplete/index.html index a9474c0820..a7c166c58c 100644 --- a/en/incomplete/index.html +++ b/en/incomplete/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Other Virtualization ProjectsSome incomplete virtualization projects

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/pterodactyl.html b/en/incomplete/pterodactyl.html index 9fbb18db41..ba5f559928 100644 --- a/en/incomplete/pterodactyl.html +++ b/en/incomplete/pterodactyl.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

After further research, it was found that creating servers and binding users is too cumbersome compared to using native Docker directly, so further development is currently suspended.

Description

Currently supported systems:

OS TypeVersion RangeNotes
Ubuntu20.04 (recommended), 22.04, 24.04Supported
Debian11 (Bullseye), 12 (Bookworm)Supported

Panel

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

On the wings side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

On the panel side, run:

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

This will generate a command to be executed on the wings side.

After executing the generated command, wait for more than 20 seconds to avoid issues caused by unfinished initialization processes. Then on the wings side, run:

shell
bash install_wings.sh

Then go to http://<your_ip>/admin/nodes and you should see your node has been automatically added and managed, with a green heartbeat.

Thanks

https://pterodactyl.io/

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/virtfusion.html b/en/incomplete/virtfusion.html index 06166c205e..22c40dfd24 100644 --- a/en/incomplete/virtfusion.html +++ b/en/incomplete/virtfusion.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,14 +22,14 @@ -
Skip to content

Official Documents

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

One-click Installation

debian11

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

Disadvantages

Only one 30-day trial certificate per server per mailbox, no permanent free certificates

Supports only amd64/x86_64 architectures

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/virtualizor-docker.html b/en/incomplete/virtualizor-docker.html index 1b497a81aa..1b490b4d83 100644 --- a/en/incomplete/virtualizor-docker.html +++ b/en/incomplete/virtualizor-docker.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/ivstiv/virtualizor-docker

Description

The virtualizor opened in the docker

The certificate used is a trial certificate, valid for one day, and only the OpenVZ virtualization method is installed by default

Disadvantages

There is no community, so you have to figure it out on your own.

Ports for admin panel Don't look at the script's prompt messages, go with the repository instructions.

- +
Skip to content
+ \ No newline at end of file diff --git a/en/incomplete/webvirtcloud.html b/en/incomplete/webvirtcloud.html index 9ebf1faf50..89e9f24084 100644 --- a/en/incomplete/webvirtcloud.html +++ b/en/incomplete/webvirtcloud.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,26 +22,26 @@ -
Skip to content

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

The original official deleted the project is no longer maintained, here can only be deployed with my personal fixes and changes to the code.

Rendering display

admin

user

1. Controller Installation

System Requirements

Minimum Requirements:

  • CPU: 1 core
  • Memory: 1 GB RAM
  • Storage: 10 GB free space
  • System: Debian11+, Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

Default Login Information

  • Username: admin@spiritlhl.net
  • Password: admin

Panel Access

  • User Panel: https://192-168-0-114.nip.io
  • Admin Backend: https://192-168-0-114.nip.io/admin

Note: Replace 192.168.0.114 with your public IP to get the actual accessible address.

Installation Command

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \
+    
Skip to content
- +docker logs webvirtcloud-backend -f

Then trigger the error in the frontend, and you'll see the corresponding error in the real-time loaded logs.

Docker Containers Not Auto-Restarting After Controller Reboot

If Docker containers don't automatically restart after system reboot, execute:

bash
docker start $(docker ps -a -q)

5. Drawbacks

System images are hard-coded; you can't use your own custom images, nor export them for use.

This is not the same project as https://github.com/retspen/webvirtcloud, don't confuse them.

+ \ No newline at end of file diff --git a/en/incomplete/webvirtcloud_retspen.html b/en/incomplete/webvirtcloud_retspen.html index 1f00b4dbb1..1638a3f141 100644 --- a/en/incomplete/webvirtcloud_retspen.html +++ b/en/incomplete/webvirtcloud_retspen.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,13 +22,13 @@ -
Skip to content

WebVirtCloud Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository::https://github.com/oneclickvirt/webvirtcloud_retspen

Controller Node and Computer Node Installation

  • Supported Systems: Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • Recommended system: Debian12+, Ubuntu22.04+.
  • Lower versions of the system will automatically compile the new version of python installation package before deployment, so it is recommended to use a new system without compiling directly installed!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \
+    
Skip to content
- +chmod 777 debian12.qcow2

Return to the instance page to create a new instance.

vcr6

Select local as the compute node.

vcr7

The default chipset is fine; changing it is optional.

vcr8

You can use predefined sizes for the virtual machine or customize it, depending on your preference.

vcr9

Note: the instance name must not duplicate the system name. For example, you cannot use debian12 as the instance name in this case.

vcr10

After successful creation, do not power it on immediately.

vcr11

You need to modify the disk settings first.

vcr12

Change the disk file to debian12.qcow2, which matches the qcow2 image you previously downloaded.

vcr13

After the modification is confirmed you will see a redundant disk in the local volume of the original compute node's storage, such as test.qcow2 here, which is best deleted to avoid hogging the disk

deadimage

Once confirmed and configured correctly, return to the power page and turn on the VM.

vcr14

The default login for the image is:

  • Username: root
  • Password: password or oneclickvirt

After booting, you will find that the hard disk is only the size of the original image, at this time you need to adjust the size of the hard disk, you need to shut down the computer again, at this time, you can see the buttons on the following page is available and the size of the hard disk is also recognized.

Without the first boot, the size of the hard disk is not recognized, recognition can not be modified, so the first switch is necessary.

resize

After the modification and restart the virtual machine, you will find that there is new disk space unallocated, at this time you need to follow the following method resize disk.

Check the disk path and remaining blank space unallocated:

shell
lsblk

Then use the following command to resizeen the disk

shell
fdisk /dev/vda

Do this in the following order:

Type d to delete the old partition (yes, you need to delete the old vda1, no data will be lost as it will not be formatted later).

Type n and enter to create a new partition.

Select primary for type (default p) and just enter.

Partition number is also 1.

The start position must be the same as the old partition (default is right), just press enter.

Show if you want to erase fingerprints, type Y and enter.

Press enter at the end position to use all the remaining space.

Type w to save and exit.

At this point, use lsblk to confirm that the new free disk has been successfully allocated.

Disadvantages

Networking is not auto-configured — not as smart as the previous project — you still need to configure it manually.

You need to be in the VNC of the opened VM, logged in and execute

shell
systemctl enable cloud-init
+reboot

Manually enable the configuration to self-start after reboot, then reboot the server and you have internet.

+ \ No newline at end of file diff --git a/en/incomplete/webvirtmgr.html b/en/incomplete/webvirtmgr.html index e3fb94ac6d..c9f48f59e9 100644 --- a/en/incomplete/webvirtmgr.html +++ b/en/incomplete/webvirtmgr.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

WebVirtMgr Installation Guide

hits

Repository: https://github.com/oneclickvirt/webvirtcloud

Origin Repository: https://github.com/retspen/webvirtmgr

Control nodes and compute nodes installed at the same time

  • Supported systems: Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • The system will automatically compile python 2.7 installer and then deployed, there will be an error in the compilation process but do not pay attention to it, as long as the scripts are still running, it means that everything is fine!
bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \
+    
Skip to content
- +&& bash install_webvirtmgr.sh

Disadvantages

The origin project is no longer maintained and is not recommended at all.

+ \ No newline at end of file diff --git a/en/index.html b/en/index.html index 4ec37d22e8..d64b6d7895 100644 --- a/en/index.html +++ b/en/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

One Click VirtualizationOpen source, easy to use server virtualization project

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/block/block_docker.html b/guide/block/block_docker.html index 6ffba1dc8c..3131e73652 100644 --- a/guide/block/block_docker.html +++ b/guide/block/block_docker.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/block/block_incus.html b/guide/block/block_incus.html index 2fde53cedd..1bce33a1d9 100644 --- a/guide/block/block_incus.html +++ b/guide/block/block_incus.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/block/block_iptables.html b/guide/block/block_iptables.html index b529bdbd3f..d697dc10fe 100644 --- a/guide/block/block_iptables.html +++ b/guide/block/block_iptables.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

通过iptables屏蔽滥用

iptables的基础使用说明

1. 启动 iptables

在大多数 Linux 发行版中,iptables 服务可以通过以下命令启动:

bash
sudo systemctl start iptables

2. 设置规则

在启动 iptables 后,可以设置相应的规则来屏蔽滥用流量。例如,以下命令将阻止来自特定IPV4地址的流量:

bash
sudo iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP

3. 查询规则

设置完规则后,可以使用以下命令查看当前的 iptables 规则:

bash
sudo iptables -L

这将列出所有输入、输出和转发的规则。

4. 停止 iptables

如果需要停止 iptables 服务,可以使用以下命令:

bash
sudo systemctl stop iptables

5. 保存规则

为了确保在重启后规则依然生效,可以保存当前的规则:

bash
sudo iptables-save | sudo tee /etc/iptables/rules.v4

6. 恢复规则

在需要恢复规则时,可以使用以下命令:

bash
sudo iptables-restore < /etc/iptables/rules.v4

7. 其他常用命令

  • 列出规则(详细信息)

    bash
    sudo iptables -L -v
  • 删除特定规则

    bash
    sudo iptables -D INPUT -s 192.168.1.100 -j DROP
  • 清空所有规则

    bash
    sudo iptables -F

在宿主机上屏蔽滥用行为

屏蔽挖矿行为

strings=(
+    
Skip to content
- +iptables -X SPEED_BLOCK
+ \ No newline at end of file diff --git a/guide/block/block_lxd.html b/guide/block/block_lxd.html index 86ed7a5d09..f4bc74fe9b 100644 --- a/guide/block/block_lxd.html +++ b/guide/block/block_lxd.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

通过shell脚本屏蔽滥用行为

屏蔽容易被滥用的端口的出入流量以屏蔽端口和屏蔽滥用工具包

  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事前预防

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/rules.sh -o rules.sh && chmod +x rules.sh && bash rules.sh

使用screen配置监控屏蔽某些进程的执行遇到某些进程的出现直接关闭容器

  • 如需停止监控可使用screen命令停止lxc_moniter这个名字的窗口并删除
  • (非必须,该脚本仅仅是为了防止容器滥用方便,不装的也没问题)
  • 事后停机

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_monitor.sh -o build_monitor.sh && chmod +x build_monitor.sh && bash build_monitor.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/block/block_pve.html b/guide/block/block_pve.html index 8a816d1d69..f7b743d12e 100644 --- a/guide/block/block_pve.html +++ b/guide/block/block_pve.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,11 +22,11 @@ -
Skip to content

通过设置防火墙限制虚拟机使用的IP避免盗用

在PVE的宿主机下创建以下文件

shell
/etc/pve/firewall/<VMID>.fw
+    
Skip to content
- +xxx.xxx.xxx.xxx

<VMID>替换为虚拟机的VMID数字,<net0>替换为网络设备中对应的别名(一般不用修改,除非你限制的IPV6),xxx.xxx.xxx.xxx替换为公网IP地址,注意此IP对应前面的网络设备。

这里的意思是net0只能使用xxx.xxx.xxx.xxx这个IP,如果使用其他的IP数据将会被丢弃,从而达到限制虚拟机只能使用此IP的目的。

这里可以有多个IP,一旦启用此规则该VM就无法使用除此之外的任何IP,如果你没有写IPv6地址则代表该VM无法使用IPv6地址。

TIP

本设置仅推荐在开设非NAT全端口映射的独立IP的虚拟机时使用,否则可能导致奇奇怪怪的问题造成服务器没网。

该方法不适合开设任何NAT虚拟机/容器的PVE上使用。

+ \ No newline at end of file diff --git a/guide/containerd/containerd_build.html b/guide/containerd/containerd_build.html index ba1fd7ee59..aa991eb97f 100644 --- a/guide/containerd/containerd_build.html +++ b/guide/containerd/containerd_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,16 +22,16 @@ -
Skip to content

前言

两种开设方式

单独开设

  • 只生成一个 containerd 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 containerd-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
-chmod +x onecontainerd.sh

示例

运行支持的变量如下

bash
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
nerdctl ps -a

进入容器

shell
nerdctl exec -it ct1 bash

进入 Alpine 容器

shell
nerdctl exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
nerdctl rm -f ct1

查看容器日志

shell
nerdctl logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
+    
Skip to content
- +rm -rf ctlog

宿主机重启后重启所有容器

默认容器没有设置停止后自重启,需要执行以下命令启动所有停止的容器

shell
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
+ \ No newline at end of file diff --git a/guide/containerd/containerd_install.html b/guide/containerd/containerd_install.html index 25ef9e5306..fd6aa2a79d 100644 --- a/guide/containerd/containerd_install.html +++ b/guide/containerd/containerd_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

安装 containerd 环境,包含 containerd + runc + nerdctl + CNI + buildkitd 全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 安装 containerd + runc + nerdctl + CNI + buildkitd(通过 nerdctl-full bundle)
  • 自动配置 CNI 网络(containerd-net:172.20.0.0/16)并设置 iptables NAT 规则
  • 检测公网 IPV6 地址,若存在则自动创建 containerd-ipv6 CNI 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

TIP

安装完成后建议执行 nerdctl ps -a 验证 containerd 环境是否正常运行

卸载 containerd 环境

一键卸载 containerd 全套环境,包括所有容器、镜像、CNI 网络、systemd 服务、nerdctl/containerd 二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、CNI 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/containerd/containerd_precheck.html b/guide/containerd/containerd_precheck.html index afafe44e21..58d32899e9 100644 --- a/guide/containerd/containerd_precheck.html +++ b/guide/containerd/containerd_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

containerd 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/containerd

项目特点

基于 containerd + nerdctl 运行时,通过批量或单独开设 NAT 服务器

  • 使用 nerdctl-full 安装 containerd + runc + nerdctl + CNI + buildkitd 全套组件
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到官方镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 默认创建非特权容器,支持 lxcfs 挂载(若宿主机安装了 lxcfs)
  • 支持磁盘限制参数(需 xfs/btrfs snapshotter 支持 storage-opt)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 docker 对比

特性containerddocker
运行时containerd + runcDocker daemon + runc
管理命令nerdctldocker
是否需要守护进程轻量级守护进程重量级 Docker daemon
容器支持Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/containerd/containerd_qa.html b/guide/containerd/containerd_qa.html index 53fa6f0a8c..17987661c3 100644 --- a/guide/containerd/containerd_qa.html +++ b/guide/containerd/containerd_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

常见问题答疑

nerdctl: command not found

containerd 环境未正确安装或 /usr/local/bin 不在 PATH 中

解决方法:

shell
export PATH="/usr/local/bin:$PATH"
+    
Skip to content
- +iptables -A FORWARD -d 172.20.0.0/16 -j ACCEPT

容器 IPv6 未生效

  1. 确认宿主机有公网 IPv6 地址
  2. 检查 containerd-ipv6 CNI 网络是否存在:
shell
cat /etc/cni/net.d/20-containerd-ipv6.conflist
  1. 检查 ndpresponder 容器是否运行:
shell
nerdctl ps | grep ndpresponder

镜像拉取失败

优先尝试国内 CDN 加速,脚本内置 CDN 检测,也可手动切换:

shell
# 测试 CDN 是否可用
+curl -4 -sL -k "https://cdn0.spiritlhl.top/https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test" --max-time 6

如何完全重置 containerd 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
+bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)

lxcfs 相关问题

如果宿主机未安装 lxcfs,容器内查询的 CPU/内存为宿主机视图。安装 lxcfs:

shell
apt-get install -y lxcfs   # Debian/Ubuntu
+yum install -y lxcfs       # CentOS/RHEL

磁盘限制不生效

磁盘限制需要 xfs 或 btrfs snapshotter 支持,默认 overlay snapshotter 不支持容器级磁盘限制。

如需磁盘限制,请查看 docker 方案或 incus 方案中对应的说明。

+ \ No newline at end of file diff --git a/guide/containerd/containerd_thanks.html b/guide/containerd/containerd_thanks.html index bb0cc21c8d..67bd6c01c6 100644 --- a/guide/containerd/containerd_thanks.html +++ b/guide/containerd/containerd_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/dashboard.html b/guide/dashboard.html index feddee0c1b..8c97071fe6 100644 --- a/guide/dashboard.html +++ b/guide/dashboard.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

准备工作

需要虚拟化出服务器,你需要:

  1. 一台可以连接公网的服务器( VPS 或 Dedicated Server),最好能完美访问 Github 的 RAW 页面,部分项目部分组件可能未使用 CDN 加速

TIP

如果您位于中国大陆,访问 Github 有困难,请注意配套脚本和项目是否有说明已使用 CDN 加速

  1. 本地可以稳定连接SSH,如果不能稳定连接,请使用screen命令创建窗口后,在窗口内执行命令

TIP

不会用screen命令的,自行查找相关教程学习,或者用tmux替代也行

  1. 确保服务器的系统和硬件满足对应项目的要求,详见对应项目说明

本文档将以VPS作为范例,且该VPS纯净,无原生环境问题,如有必要请重装系统保证初始环境的纯净

WARNING

PVE项目可能造成宿主机出现问题,如果你不会看Bug和修复系统,那么不建议你在生产环境中使用,使用PVE相关脚本请确保宿主机随时可重装系统

项目仓库

欢迎Star和Fork,所有资源均开源,无非开源部分,转载以及使用请写上来源于本站,谢谢

OneClickVirt

https://github.com/oneclickvirt/oneclickvirt

PVE

https://github.com/oneclickvirt/pve

Hits

Incus

https://github.com/oneclickvirt/incus

Hits

Docker

https://github.com/oneclickvirt/docker

Hits

LXD

https://github.com/oneclickvirt/lxd

Hits

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/dashboardq.html b/guide/dashboardq.html index 948ae31509..c636efa086 100644 --- a/guide/dashboardq.html +++ b/guide/dashboardq.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Give me a cup of coffee.

https://ko-fi.com/spiritlhl

WeChat

WeChat

USDT-TRC20

bash
TNqjaPYAmDsm9pbpLY79pixE8z1ce3Zj1B

USDT-Polygon/Matic

bash
0xb81b44cb00f9e6e084f85e5da604ec479e7ffab6
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_android.html b/guide/docker/docker_android.html index f67430702a..2aad70840e 100644 --- a/guide/docker/docker_android.html +++ b/guide/docker/docker_android.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,13 +22,13 @@ -
Skip to content

在Docker中开设Android虚拟机

一键开设

  • 自定义安卓版本
  • 自动创建带校验的web网站
  • 自动进行nginx安装和反向代理的配置,可选择是否绑定域名,默认回车不绑定使用80端口
  • 无需考虑宿主机是否支持嵌套虚拟化
  • 支持x86_64和ARM架构

宿主机的配置至少要有1核2G内存15G硬盘,否则开设可能会导致宿主机卡死

宿主机推荐 Ubuntu 系统,Debian 系统可能导致安卓屏幕白屏

安卓版本越新占用越大,以上的配置要求是最低版本安卓的配置要求 (个人测试到 12.0.0-latest 的tag可用,更高版本映射白屏了,自己测试哪个能用吧)

如果开设后,过了5分钟浏览器网页的登录验证还是一直失败,那么请查询安卓容器的日志,大概率安卓容器崩溃了,建议更换更低的安卓系统版本的容器进行安装

开设

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/create_android.sh -o create_android.sh && chmod +x create_android.sh && bash create_android.sh

命令执行后按照提示输入即可,注意选择版本输入的是序号,对应选项的数字序号,安装完毕后打开本机IPV4+80端口可登录

如果需要查询生成的安卓信息和web登录信息,执行cat /root/android_info可查询信息

默认的用户名 onea

默认密码 oneclick

远程的桌面点击H264 Converter跳转就是了

暂时只支持生成一个安卓容器,勿要重复生成,如需替换版本请执行后续命令删除后再次开设

暂时只支持开设后一直使用,不可重启服务器,重启后可能无法自重启映射成功,自测

删除

  • 删除容器
  • 删除容器对应镜像
  • 删除配置文件
docker rm -f android
+    
Skip to content
- +rm -rf /root/android_info

安装APK文件

点击list files打开文件目录,切换到/storage/emulated/0/Download目录,把apk拖拽进来进行安装,等待进度跑完,apk就上传到安卓容器里面了。

此时回到安卓的界面,打开文件管理器,就会显示你刚上传的文件,点击后可进行安装。

+ \ No newline at end of file diff --git a/guide/docker/docker_build.html b/guide/docker/docker_build.html index 3a6a6bfa40..ebdbd897ad 100644 --- a/guide/docker/docker_build.html +++ b/guide/docker/docker_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,31 +22,31 @@ -
Skip to content

前言

两种开设方式

单独开设

  • 只生成一个docker,这里有判断为国际服务器还是国内服务器,如果在国内服务器上开设,容器内的包管理源自动替换为清华源
  • 可配置绑定独立的IPV6地址,但需要先前使用本套脚本的环境安装命令安装的docker,且需要宿主机至少绑定了/112的IPV6子网
  • 支持x86_64和ARM架构的服务器

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedocker.sh -o onedocker.sh && chmod +x onedocker.sh

示例

运行支持的变量如下

bash
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>

目前system仅支持选择

  • alpine
  • debian
  • ubuntu
  • almalinux
  • rockylinux
  • openeuler

默认不填则是debian

硬盘大小仅在前面Docker安装时选择了支持限制硬盘大小的选项,这块才可填写数值设置硬盘大小,默认不填时不限制

shell
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码123456
CPU核数1
内存大小512MB
SSH端口25000
内外网映射端口一致的区间34975到35000
系统debian
是否绑定独立的IPV6地址N
硬盘大小5G

相关操作

删除示例

shell
docker rm -f test
+    
Skip to content
- +done
+ \ No newline at end of file diff --git a/guide/docker/docker_custom.html b/guide/docker/docker_custom.html index fc2a76a393..b8433d7e71 100644 --- a/guide/docker/docker_custom.html +++ b/guide/docker/docker_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,18 +22,18 @@ -
Skip to content

使用Docker一键安装某些容器的脚本

每个容器都有对应的配置要求,自行查看,内存不够的用https://github.com/spiritLHLS/addswap

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

开设虚拟内存补足也行

注意,以下脚本使用前务必使用本套教程中的环境安装脚本进行前期环境安装

一键开设Firefox浏览器的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置密码
  • 可自定义容器最大的内存占用
  • 可选是否开启VNC端口,默认不开启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 不支持声音映射,无论是WEB端还是VNC端都无法传输声音

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码1G硬盘

开设

如果未设置自定义密码,开设后默认的密码是oneclick

默认的web端口是3003,开设后打开本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh -o onefirefox.sh && chmod +x onefirefox.sh && bash onefirefox.sh

删除

修改以下端口号3003为你实际的端口号,然后执行命令回车两次即可删除容器、配置文件、对应镜像

shell
PORT="3003"
+    
Skip to content
- +docker rmi lscr.io/linuxserver/chromium

注意事项

  • nginx,caddy等https映射的时候要映射3004的端口,不要映射3005端口
  • 部署以后安静的等待15分钟,不然中文库没安装全,会出现不可预料的错误
  • 进入远程桌面浏览器以后点击左侧的设置->点开输入法进行设置,不然没法输入中文

图片

一键开设Desktop的容器

  • 已设置崩溃自启
  • 已设置带中文字体
  • 自带web的校验,可自设置用户名和密码
  • 可自定义容器最大的内存占用
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 支持声音映射,WEB端可传输声音

完整的Linux桌面,可以在上面使用浏览器

宿主机需要至少1核2G内存5G硬盘,开设的容器大小将占用起码3.2G硬盘

开设

开设后默认的用户名是onew,密码是oneclick,默认的内存最大占用是2GB

默认的http协议的web端口是3004,默认的https协议的web端口是3005,开设后打开对应协议的本机IPV4:端口即可

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh

删除

执行

shell
docker ps -a

查询name的前缀是webtop的容器,记录容器的ID用

shell
docker rm -f 容器的ID

删除所有关联的容器后可用

shell
docker rmi lscr.io/linuxserver/webtop

删除对应镜像

一键安装guacamole

一个网页端连接SSH或RDP等协议控制服务器的玩意

网址:http://你的IPV4地址:80/guacamole

默认用户: guacadmin

默认密码: guacadmin

安装完毕登录后自行修改

宿主机的配置至少要有1核2G内存10G硬盘,否则开设可能会导致宿主机卡死!

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh -o guacamole.sh && chmod +x guacamole.sh && bash guacamole.sh

一键开设RustDesk的容器

  • 已设置崩溃自启
  • 无需考虑是否支持嵌套虚拟化和服务器的架构
  • 传输质量看你的服务器和各端之间的连通性和延迟

一个跨端的远控中继端(非客户端),支持双向控制

宿主机需要至少1核1G内存10G硬盘,对带宽的需求极低

开设

安装后客户端在这里找 https://github.com/rustdesk/rustdesk/releases/latest

在设置中设置中继服务器的IP即可,支持 Android、Windows、Linux、浏览器 端,支持电脑远控手机

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onerustdesk.sh -o onerustdesk.sh && chmod +x onerustdesk.sh && bash onerustdesk.sh

删除

删除容器

shell
docker rm -f hbbs
+docker rm -f hbbr

删除对应镜像

shell
docker rmi rustdesk/rustdesk-server
+ \ No newline at end of file diff --git a/guide/docker/docker_install.html b/guide/docker/docker_install.html index b7ab4a1ae7..ad3d7a8edd 100644 --- a/guide/docker/docker_install.html +++ b/guide/docker/docker_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

前言

支持开设 Docker 虚拟化的各系统,含 Linux、Android、Windows 系统

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存

TIP

内存开点swap免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 检测系统环境,安装对应组件
  • 安装docker和docker-compose,这里有判断为国际服务器还是国内服务器,自动安装对应源的docker
  • 下载默认需要的一些配置脚本,设置默认的网络配置
  • 检测如果存在IPV6地址,检测其是否大于或等于/112,如果符合条件,则配置docker的ipv6的网络
  • 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
  • 支持x86_64和ARM架构的服务器
  • 安装过程中会要求你输入一些选项,选择Docker安装路径,选择Docker安装是否可限制硬盘

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/dockerinstall.sh -o dockerinstall.sh && chmod +x dockerinstall.sh && bash dockerinstall.sh

bash dockerinstall.sh

TIP

环境安装过程中可能要求你重启服务器后再次执行脚本,详见脚本运行后的说明

检测Docker是否支持限制容器硬盘大小

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh

或者指定不同的存储限制大小(单位:MB),默认测试500MB限制的容器是否限制成功

shell
# 1GB限制
-bash disk_test.sh 1000

卸载 Docker 环境

一键卸载 Docker 全套环境,包括所有容器、镜像、网络、systemd 服务、二进制文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/main/dockeruninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。薐删内容包括所有容器、镜像、网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_macos.html b/guide/docker/docker_macos.html index 79351458ed..ae02d0a71c 100644 --- a/guide/docker/docker_macos.html +++ b/guide/docker/docker_macos.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_precheck.html b/guide/docker/docker_precheck.html index 4f07de194e..653e4795ff 100644 --- a/guide/docker/docker_precheck.html +++ b/guide/docker/docker_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

WARNING

如果宿主机带IPV6网络的话,安装会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/docker

项目特点

通过docker批量或单独开设NAT服务器(Bulk or individual NAT server provisioning via docker)

默认使用debian系统可选alpine系统,每个容器自带1个外网ssh端口,25个内外网一致端口,可选择是否绑定IPV6地址

默认创建的是非特权容器,且不挂载与宿主机的docker的守护进程之间的通信,所以宿主机创建的docker虚拟化的NAT服务器内无法再嵌套虚拟化docker

默认安装并启用lxcfs,使得在容器内的查询资源时CPU和内存使用的是配置的视图而不是宿主机的视图

默认可选择是否共享宿主机的硬盘,在Docker安装的时候可选择是否安装为可限制硬盘大小的环境

配置要求

系统可安装docker即可用,网络能连接Github的raw界面就能用,硬件配置只要不拉跨就行,空闲硬盘有3G就行

(如果需要绑定IPV6地址,那么请保证使用本套脚本的环境预设脚本进行环境安装,需要它自动预设部分设置)

如果硬件资源只是好了一点,需要限制更多东西并需要限制硬盘大小,可使用incus分区的脚本批量开LXC虚拟化的容器

如果硬件非常好资源很多,可使用PVE分区的脚本批量开KVM虚拟化的虚拟机

推荐在开设NAT服务器前先增加部分SWAP虚拟内存,避免突发的内存占用导致宿主机卡死

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_qa.html b/guide/docker/docker_qa.html index 0230494e66..f91a1be1c3 100644 --- a/guide/docker/docker_qa.html +++ b/guide/docker/docker_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

解惑

常见的一些docker命令

查询某个容器的实时占用

docker stats 容器名字

进入某个容器

docker exec -it 容器名字 /bin/bash

清理 Docker 缓存,清理未使用的资源,包括镜像、容器、网络等

docker system prune -a

卸载所有docker的镜像和容器

docker rm -f $(docker ps -aq); docker rmi $(docker images -aq)

查看对应容器日志

docker logs 容器名字或ID

查看docker整体的disk占用

docker system df

查看所有容器

docker ps -a

查看所有镜像

docker images

删除某个特定容器

docker rm -f 容器名字或ID

删除某个特定镜像

docker rmi 镜像名字或ID
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_thanks.html b/guide/docker/docker_thanks.html index c77705a87e..807d8b1e3f 100644 --- a/guide/docker/docker_thanks.html +++ b/guide/docker/docker_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/docker/docker_windows.html b/guide/docker/docker_windows.html index 21fc52f892..0768ad81fc 100644 --- a/guide/docker/docker_windows.html +++ b/guide/docker/docker_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

在Docker中开设Windows系统虚拟机

一键开设(通过vagrant)

  • 共享宿主机所有资源(CPU、内存、硬盘),基于docker所以只占用系统的大小,适合多开
  • 共享IP,做了docker的NAT映射,可选择是否映射到外网或仅内网
  • 设置的win系统默认最多占用为1核2G内存50G硬盘,实际占用看使用情况
  • 无需iptables进行NAT映射,删除容器时自动删除了端口的映射,方便维护
  • 需要考虑宿主机是否支持嵌套虚拟化,暂时只支持X86_64架构的系统

宿主机需要支持嵌套虚拟化,且暂时只支持X86_64架构的系统,否则不可开设

执行

egrep -c '(vmx|svm)' /proc/cpuinfo

结果需要大于或等于1,不能为0

然后需要先设置docker切换使用v1版cgroup启动

sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="\1 systemd.unified_cgroup_hierarchy=0"/' /etc/default/grub
+    
Skip to content
- + windows:2022

注意事项

不建议在当前镜像基础上使用 docker commit 保存修改,因为写入层会不断叠加,导致二次生成的镜像体积可能超过 40G。

如需进行个性化配置或集成应用,请builder 镜像开始自行构建新镜像,以保持镜像整洁与可维护性。

+ \ No newline at end of file diff --git a/guide/incus/incus_custom.html b/guide/incus/incus_custom.html index 9f6897cecd..b21f865193 100644 --- a/guide/incus/incus_custom.html +++ b/guide/incus/incus_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,42 +22,42 @@ -
Skip to content

自定义

给incus启用官方的web面板进行控制

先查看 incus论坛活跃用户分享的第三方教程

不懂的部分见 给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://incusimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/incus_images 可见详细说明。

shell
incus remote remove spiritlhl
+    
Skip to content
- +systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

+ \ No newline at end of file diff --git a/guide/incus/incus_extra_config.html b/guide/incus/incus_extra_config.html index 743c8fe975..fefdfac341 100644 --- a/guide/incus/incus_extra_config.html +++ b/guide/incus/incus_extra_config.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为incus创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
+    
Skip to content
- +apt-get update

其他系统如何添加源可参考 https://github.com/zabbly/incus?tab=readme-ov-file#installation 官方仓库的说明

+ \ No newline at end of file diff --git a/guide/incus/incus_install.html b/guide/incus/incus_install.html index 002c563c49..ae92fa3ab6 100644 --- a/guide/incus/incus_install.html +++ b/guide/incus/incus_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

Incus

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

Incus主体安装

WARNING

如果是全新的服务器,务必保证curl命令可用且update无问题再执行本脚本。

  • 环境要求:Ubuntu 20+(不推荐Incus请使用LXD), Debian 11+(推荐), RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/incus_install.sh -o incus_install.sh && chmod +x incus_install.sh && bash incus_install.sh

shell
bash incus_install.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

TIP

执行过程中可能会要求手动重启加载存储类型到内核中,安装完毕执行到最后会自动进行服务器重启,首次完整安装完毕后的自动重启最多大概耗时400~500秒,请耐心等待

WARNING

如果你需要在一台服务器上开启超过200个INCUS容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的Incus安装流程。

关闭防火墙

bash
apt update
+    
Skip to content
- +incus -h

如果无异常,继续执行

incus admin init

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

incus -h
+ \ No newline at end of file diff --git a/guide/incus/incus_lxc.html b/guide/incus/incus_lxc.html index 99bedd7a15..bfa79be7f7 100644 --- a/guide/incus/incus_lxc.html +++ b/guide/incus/incus_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

在 Incus 中运行 LXC 容器

开设LXC容器可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载脚本

下载开机脚本是非必须的,如果你使用过一键安装incus的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian11,注意传入参数为系统名字+版本号

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian11
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian11

需要进入容器内部则执行

incus exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
incus stop test
+    
Skip to content
- +wget https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

+ \ No newline at end of file diff --git a/guide/incus/incus_precheck.html b/guide/incus/incus_precheck.html index 685fe21928..580d221b3a 100644 --- a/guide/incus/incus_precheck.html +++ b/guide/incus/incus_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看incus模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/incus

要求

硬件要求:

  • 系统:Ubuntu 20+, Debian 11+, RockyLinux 9+, AlmaLinux 9+, Centos 9+, Alpine(自行安装bash后), Arch
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • CPU:内核数最好大于或等于2,否则可能出现内核空转切片循环导致占用100%
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接Github的raw页面就行

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu24Debian12,别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换(优先级: btrfs > lvm > zfs > ceph > dir )

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加各种第三方镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像(含自修复镜像)

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/pre_check.sh)
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/incus/incus_qa.html b/guide/incus/incus_qa.html index f382a1a7b6..7861777437 100644 --- a/guide/incus/incus_qa.html +++ b/guide/incus/incus_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

解惑

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要Incus和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致Incus无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

Incus在单核的宿主机上长期使用后CPU占用过高

这个CPU占用过高系Incus原生问题,暂时没有解决方式,且仅在单核宿主机上可复现,多核宿主机不必理会

需要安装一个定时任务定时检测和修复这个问题,每5分钟检测一遍占用看看是否需要重启Incus后端

  • 下载

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/incus_fixed_restart.sh -o incus_fixed_restart.sh && chmod +x incus_fixed_restart.sh && bash incus_fixed_restart.sh
  • 安装
bash
bash incus_fixed_restart.sh install

会复制到 /usr/local/bin/incus_fixed_restart.sh 并写入 cron 每分钟执行。

  • 卸载
bash
bash incus_fixed_restart.sh uninstall

会删除 cron 任务、脚本文件、日志文件和计数文件。

  • 正常运行(由 cron 调用)
bash
/usr/local/bin/incus_fixed_restart.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销款

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/incus/incus_qemu.html b/guide/incus/incus_qemu.html index 9a3f981ea6..26c727d360 100644 --- a/guide/incus/incus_qemu.html +++ b/guide/incus/incus_qemu.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

在 Incus 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
incus console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
incus stop -f test
+    
Skip to content
- +ls
+ \ No newline at end of file diff --git a/guide/incus/incus_thanks.html b/guide/incus/incus_thanks.html index 26c56249c5..c5d217909d 100644 --- a/guide/incus/incus_thanks.html +++ b/guide/incus/incus_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/incus/incus_windows.html b/guide/incus/incus_windows.html index 8954d47034..7a530792ff 100644 --- a/guide/incus/incus_windows.html +++ b/guide/incus/incus_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,15 +22,15 @@ -
Skip to content

在 Incus 中运行 Windows 虚拟机

检查 Incus 驱动

确保 incus info 输出中含有 qemu,否则无法创建 VM:

shell
incus info | grep -i driver:

若显示只有 lxc,则incus的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root 目录下按顺序执行以下命令:

shell
apt update
+    
Skip to content
- +incus start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,incus将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后incus delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
incus config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

+ \ No newline at end of file diff --git a/guide/lxd/lxd_custom.html b/guide/lxd/lxd_custom.html index b509471826..86a7dc3417 100644 --- a/guide/lxd/lxd_custom.html +++ b/guide/lxd/lxd_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,42 +22,42 @@ -
Skip to content

自定义

给lxd启用官方的web面板

给机房的Ubuntu22.04安装LXD共享GPU资源-配置web 部分的内容

添加自定义的镜像源

https://lxdimages.spiritlhl.net/

本镜像源是本人通过每日修补得到的,每日会进行更新,具体进行了什么修补在 https://github.com/oneclickvirt/lxd_images 可见详细说明。

shell
lxc remote remove spiritlhl
+    
Skip to content
- +systemctl enable --now wg-quick@warp

自动安装和运行(fscarmen的一键脚本)

最后,介绍 fscarmen 的一键脚本。提到该脚本是一个方便的工具,可以简化配置过程。并自动处理最优 MTU, 最优 Endpoint 等进阶参数。

项目介绍: https://github.com/fscarmen/warp-sh

# 运动脚本
+wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh

image.png

+ \ No newline at end of file diff --git a/guide/lxd/lxd_extra_config.html b/guide/lxd/lxd_extra_config.html index 3f2b383ea9..edab896a2e 100644 --- a/guide/lxd/lxd_extra_config.html +++ b/guide/lxd/lxd_extra_config.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,23 +22,23 @@ -
Skip to content

其他自定义配置

TIP

以下的配置安装会加重宿主机的负担,非必要不要安装

自动配置IPV6地址

  • (非必须,不使用的也没问题)
  • 该脚本仅适用于宿主机有给IPV6子网且是至少/112的,且宿主机绑定了子网的第一个IP宿主机的IPV6地址或IPV6的gateway
  • 自动为LXD创建的LXC容器配置IPV6地址
  • 已集成到buildct.sh中可使用变量控制且无需事先下载,该脚本可不手动使用,在使用buildct.sh时配置Y开启即可

下载脚本

国际

bash
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/build_ipv6_network.sh -o build_ipv6_network.sh && chmod +x build_ipv6_network.sh

自动为容器配置IPV6映射地址(默认不使用iptables进行映射)

bash
bash build_ipv6_network.sh 容器名称

映射完毕会打印信息

示例(给test容器自动配置IPV6地址,配置完成会写入一个test_v6的文件信息)

bash
bash build_ipv6_network.sh test

PS:增加ipv6处理过程中可选择是否使用ip6tables进行映射,默认不使用ip6tables方式进行映射而使用新增网络设备的方式进行映射

使用ip6tables进行映射

bash
bash build_ipv6_network.sh 容器名称 Y

若使用了ip6tables进行映射,则删除所有IPV6已映射的规则可用:

bash
ip6tables -t nat -F PREROUTING
+    
Skip to content
- +snap install lxdmosaic

安装完毕后打开宿主机IP地址,按照提示设置admin的密码,其他一路默认就能使用面板了

+ \ No newline at end of file diff --git a/guide/lxd/lxd_install.html b/guide/lxd/lxd_install.html index 756b085b94..25aca232c9 100644 --- a/guide/lxd/lxd_install.html +++ b/guide/lxd/lxd_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,13 +22,13 @@ -
Skip to content

LXD

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间。

当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用。

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

LXD主体安装

WARNING

如果是全新的服务器,务必保证apt updateapt install curl都无问题再执行本脚本。

  • 环境要求:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 安装过程中会提示输入存储池创建路径以及大小,你所有要开的虚拟机或容器最终占用的空间是在存储池中
  • 环境安装过程后需要重启服务器以加载一些默认配置
  • 默认启用lxd的lxcfs相关配置,使得容器内查询容器信息变更为容器本身的信息而不是宿主机信息
  • 实测本安装程序在物理机器或非物理机器上都可使用

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/lxdinstall.sh -o lxdinstall.sh && chmod +x lxdinstall.sh && bash lxdinstall.sh

shell
bash lxdinstall.sh

初始化配置的例子:

如果不需要指定非系统盘的路径做默认存储池,那么选择是否自定义存储池路径时直接回车或输入n即可,不需要指定路径。

如果需要指定非系统盘的路径做默认的存储池,那么需要选择y,然后输入对应的路径(你挂载的盘的实际的绝对路径)。

如果对应的盘除去已占用空间还有18G硬盘空余,想要开设15G的存储池,按照命令行的提示则输入15

WARNING

如果你需要在一台服务器上开启超过200个LXD容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

安装WEB控制面板

自定义 教程中有关于官方面板怎么启用的教程,但这里不选择使用官方的面板,因为官方面板为了安全性,牺牲了很多用户体验,这块使用

https://github.com/turtle0x1/LxdMosaic

的第三方面板

shell
sudo snap install lxdmosaic

直接进行一键安装,然后打开当前宿主机的https://<公网IP地址>/,强制访问,就能进入设置页面

lxd

lxd

lxd

这块如果你需要设置网站名字可以改改

lxd

聊胜于无只能说,没有RBAC权限控制进行分用户隔离

手动安装(备选)

不推荐,只是为了一些奇葩环境一键脚本跑不动的时候进行安装,或则你想要了解最基础的LXD安装流程。

关闭防火墙

bash
apt update
+    
Skip to content
- +/snap/bin/lxd init

如果上面的命令中出现下面的错误

(snap "lxd" assumes unsupported features: snapd2.39 (try to update snapd and refresh the core snap))

使用命令修补后再进行lxd的安装

snap install core

如果无异常,上面三行命令执行结果如下

图片

一般的选项回车默认即可

选择配置物理盘大小(提示默认最小1GB那个选项),一般我填空闲磁盘大小减去内存大小后乘以0.95并向下取整,这里我填了10GB

提示带auto的更新image的选项记得选no,避免更新占用系统

测试lxc有没有软连接上

lxc -h

如果报错则执行以下命令软连接lxc命令

bash
! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
+export PATH=$PATH:/snap/bin

连接后再测试lxc命令是否有报错找不到

+ \ No newline at end of file diff --git a/guide/lxd/lxd_lxc.html b/guide/lxd/lxd_lxc.html index d7b6a6962e..e74c807649 100644 --- a/guide/lxd/lxd_lxc.html +++ b/guide/lxd/lxd_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,17 +22,17 @@ -
Skip to content

LXC虚拟化

单独生成一个NAT容器

  • 只生成一个NAT容器,可自定义限制所有内容

下载开机脚本是非必须的,如果你使用过一键安装LXD的命令,自动已下载对应的开机脚本,不需要重复下载该脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh && dos2unix buildct.sh

使用方法

./buildct.sh 容器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义容器的系统,不填写留空时默认使用debian12,注意传入参数为系统名字+版本号,如:

  • debian12,debian13
  • ubuntu22,ubuntu24
  • centos8,centos9 (实际都是Stream版本)
  • alpine3.16,alpine3.17,alpine3.18,alpine3.19
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的容器系统有三重筛选,优先级:自编译官方opsmaru
  • 自编译镜像完整的支持系统的列表:x86_64_all_images.txtarm64_all_images.txt

示例

以下为开设的示例容器的信息:

属性
容器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小2G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
./buildct.sh test 1 256 2 20001 20002 20025 500 500 N debian13

需要进入容器内部则执行

lxc exec test /bin/bash

退出则输入exit回车即可

需要查看信息则执行

shell
cat 容器名字

比如查询示例的信息就是

shell
cat test

如果已通过以上方法生成过容器,还需要批量生成容器,可使用自定义批量生成版本的脚本,但注意先删除测试容器再进行批量生成容器

删除测试容器

shell
lxc stop test
+    
Skip to content
- +wget https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildct.sh -O /root/buildct.sh && chmod +x /root/buildct.sh

其他一键脚本自己对应下载回来就行了

+ \ No newline at end of file diff --git a/guide/lxd/lxd_precheck.html b/guide/lxd/lxd_precheck.html index ef3fc8c5e8..18820cb63e 100644 --- a/guide/lxd/lxd_precheck.html +++ b/guide/lxd/lxd_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,那么请先查看LXD模块中的自定义分区中的给宿主机附加免费的IPV6地址段的内容,给宿主机附加上IPV6子网后再进行环境安装

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/lxd

要求

硬件要求:

  • 系统:Ubuntu 18+(推荐),Debian 8+(更推荐Incus)
  • 虚拟化:推荐KVM、VMWARE虚拟化
  • 内存:内存至少512MB
  • 硬盘:硬盘(系统盘)至少10G
  • 网络:独立的IPV4地址,IPV6可有可无,带宽能下载脚本就行,网络能连接公共网络

PS: 如果硬件非常好资源很多,可使用PVE批量开KVM虚拟化的虚拟机 跳转

PS: 如果硬件资源更烂,虚拟化不支持,可使用docker版本的,适配面更广 跳转

项目特点

  • 本套脚本开发使用的Ubuntu,Ubuntu别的长期维护版本应该也没问题,某个存储类型无法使用时自动切换

  • 已设置同时进行TCP和UDP转发,除了SSH端口其他的映射内网外网端口一致

  • 已设置支持开出的LXC容器进行docker嵌套虚拟,默认普通版本和纯探针版本使用debian11系统

  • 已设置默认启用lxcfs,使得在容器内的查询资源时使用的是配置的视图而不是宿主机的视图

  • 已屏蔽容器内可能用于滥用的工具包和IPV4网络的TCP/UDP协议的端口( 3389 8888 54321 65432 ),以防止容器被用于扫描和爆破,且可外置进程检查有问题自动停机

  • 已支持一键为LXC容器配置IPV6地址(前提是宿主机有IPV6子网,无IPV6地址则不配置),自动适配子网大小

  • 已增加清华镜像源,如果官方镜像丢失时,将使用镜像源下载容器镜像

  • 保证你要开的盘为默认的系统盘(sda或者sda1)而不是挂载的盘(sdb之类的),不确定的使用fdisk -ldf查看

  • 挂载其他盘的详看 其他说明

  • 一键脚本支持自定义限制所有内容,普通版本支持多次运行批量生成不覆盖先前生成的配置

检测环境

使用后续脚本的务必执行本命令检测宿主机是否符合要求

国际

bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)

国内

bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/lxd/lxd_qa.html b/guide/lxd/lxd_qa.html index 912cca3fd6..48384521db 100644 --- a/guide/lxd/lxd_qa.html +++ b/guide/lxd/lxd_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

解惑

LXD安装后lxc命令显示找不到

! lxc -h >/dev/null 2>&1 && echo 'alias lxc="/snap/bin/lxc"' >> /root/.bashrc && source /root/.bashrc
-export PATH=$PATH:/snap/bin

执行这个命令后尝试

lxc -h

看看lxc命令是否已修复

开设centos7发现报错CGroupV1不支持

启用CGroup V1:要在Ubuntu系统上启用CGroup V1,需要编辑内核启动参数。

请注意,在更改内核启动参数之前,请务必备份重要的数据和设置,以防止意外的问题。

编辑/etc/default/grub文件,将GRUB_CMDLINE_LINUX_DEFAULT中的参数末尾加上systemd.unified_cgroup_hierarchy=0,如

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

保存文件并运行以下命令更新GRUB引导。

bash
sudo update-grub

重启系统,使更改生效

如果上述更改仍旧不支持开设centos7,那么请使用别的宿主机系统尝试

需要LXD和Docker兼容同时存在

如果不做处理,docker会覆写iptables设置导致LXD无网络链接

需要安装一个定时任务定时检测和修复这个问题

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/incus/main/extra_scripts/docker-coexistence.sh -o docker-coexistence.sh && chmod +x docker-coexistence.sh && bash docker-coexistence.sh

目前已验证可开带独立IPV6地址容器的VPS商家

kuroit 中的 美国凤凰城 regular

datalix 中的 德国AMD 促销

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/lxd/lxd_qemu.html b/guide/lxd/lxd_qemu.html index 14846359bf..d46d5e9686 100644 --- a/guide/lxd/lxd_qemu.html +++ b/guide/lxd/lxd_qemu.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

在 LXD 中运行 QEMU 虚拟化的 Linux 虚拟机

开设QEMU虚拟机可使用的镜像

这里展示一部分可使用的系统参数供你参考:

  • debian10,debian11,debian12, debian13
  • ubuntu18,ubuntu20,ubuntu22
  • centos8,centos9 (实际开设出来都是Stream版本)
  • alpine3.15,alpine3.16,alpine3.17,alpine3.18
  • openwrt21,openwrt22,fedora37,fedora38,fedora39
  • rockylinux8,rockylinux9,oralce8,oracle9
  • oralce7,centos7 (都需要在GRUB中启用CGroupV1否则无法启动,详细介绍见常见问题答疑)
  • kali,archlinux
  • 注意都是小写字母+数字的组合或仅小写字母,自行尝试,如果搜索无该系统则会自动退出脚本
  • 版本号可以带英文小数点,为了适配alpine的版本号已支持
  • 开不起来的可能是硬盘或内存不够大或者本身就不适配宿主机,自行尝试查看开不起来的报错
  • 目前使用的虚拟机系统仅使用 自编译 的镜像,非自编译镜像缺少依赖和设置不可使用
  • 自编译镜像完整的支持系统的列表:kvm_images

单独生成一个NAT服务器

  • 只生成一个NAT服务器,可自定义限制所有内容

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh && dos2unix buildvm.sh

使用方法

./buildvm.sh 服务器名称 CPU核数 内存大小 硬盘大小 SSH端口 外网起端口 外网止端口 下载速度 上传速度 是否启用IPV6(Y or N) 系统(留空则为debian11)

CPU核数需要小于或等于宿主机的核数,内存大小以MB计算,硬盘大小以GB计算,下载速度上传速度以Mbit计算,是否启用IPV6不一定要填Y或者N,没有这个参数也行,留空默认不开启IPV6

如果外网起端口外网止端口都设置为0则不做区间外网端口映射了,只映射基础的SSH端口,注意不能为空,不进行映射需要设置为0

支持自定义服务器的系统,不填写留空时默认使用debian13,注意传入参数为系统名字+版本号

除了alpine系统,其他系统的硬盘大小必须大于6G,否则系统起不来,无法初始化和使用,开设的中途阶段就会崩溃。

示例

以下为开设的示例服务器的信息:

属性
服务器名字test
SSH登录的用户名root
SSH登录的密码随机生成
CPU核数1
内存大小256MB
磁盘大小10G
内外网映射端口一致的区间20002到20025
上传带宽500Mbit
下载带宽500Mbit
自动设置外网IPV6地址N
系统debian13
shell
./buildvm.sh test 1 512 10 20001 20002 20025 500 500 N debian13

需要进入虚拟机内部则执行

shell
lxc console test

退出则先按住Ctrl再按a,松开后,再按q

需要查看信息则执行

shell
cat 服务器名字

比如查询示例的信息就是

shell
cat test

删除测试服务器

shell
lxc stop -f test
+    
Skip to content
- +ls
+ \ No newline at end of file diff --git a/guide/lxd/lxd_thanks.html b/guide/lxd/lxd_thanks.html index 78863d1cc9..0aaa64d106 100644 --- a/guide/lxd/lxd_thanks.html +++ b/guide/lxd/lxd_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/lxd/lxd_windows.html b/guide/lxd/lxd_windows.html index 2c207f8259..29c1abb976 100644 --- a/guide/lxd/lxd_windows.html +++ b/guide/lxd/lxd_windows.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,25 +22,25 @@ -
Skip to content

在 LXD 中运行 Windows 虚拟机

检查 lxd 驱动

确保lxc info输出中含有qemu,否则无法创建VM:

shell
lxc info | grep -i driver:

若显示只有lxc,则lxd的驱动不支持开设虚拟机,不需要看后续的教程了。

准备环境和修补镜像

/root目录下按顺序执行以下命令:

shell
apt update
+    
Skip to content
- +lxc start winvm

启动后可见如下图(测试访问一个网站)

无需自行进行网络配置,lxd将自动分配IPV4地址和连接网络

删除远程组件重新启动浏览器映射

如果发现资源没给够等原因需要删虚拟机重新开设,那么需要使用pkill -f websockify终止所有的spice信号转发,然后lxc delete -f winvm强行删除虚拟机。

shell
lsof -i :6080

查询对应端口的PID号是否还存在,确保已完全停止(如果你有多个虚拟机的信号转发,那么最好不要用pkill删除所有,用kill -9删除对应端口的PID即可)。

如果首次启动没过几分钟就崩溃停机了

需要添加CPU直通

shell
lxc config set winvm raw.qemu -- "-cpu host"

再次启动虚拟机即可

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

缺点

前端无权限校验,没法设置用户密码

如果需要前端鉴权,那么得使用Guacamole添加一些设置来实现,这里就不赘述了

虚拟机这块没有成型的一些交互面板和适配,spice古老了(虽然有网页端的spice客户端),官方的面板又不支持rbac使用用户名密码,只能通过证书使用

+ \ No newline at end of file diff --git a/guide/oneclickvirt/oneclickvirt_install.html b/guide/oneclickvirt/oneclickvirt_install.html index 2ddd0417d8..0477070b3f 100644 --- a/guide/oneclickvirt/oneclickvirt_install.html +++ b/guide/oneclickvirt/oneclickvirt_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

OneClickVirt

区分面板端和受控端,受控端需要提前安装好对应虚拟化的环境,可使用一键虚拟化中别的虚拟化的主体安装进行环境安装,主控端实际就是一个面板,没有虚拟化环境需求。

受控端

对应本说明别的虚拟环境的主体安装脚本可以进行环境安装,这里不过多赘述,四大主流的虚拟化技术的主体安装本教程都有对应的安装命令进行安装,自行查阅。

如有条件务必使用脚本进行对应的环境安装,否则可能出现预设不一致等奇奇怪怪的问题,没有技术力不要手动安装环境,一切通过脚本。

受控端只需要安装好虚拟化环境即可,不必额外安装agent进行控制,只要确保SSH能登录即可(SSH登录地址可公网可内网,连通性无问题即可)。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

面板端

硬件上需要至少1G空闲内存和2G空闲硬盘,通过下面任一方式安装完成即可。

安装方式适用场景优点缺点
前后端分离部署高性能,占用最小性能最佳、灵活配置配置复杂,需配置反向代理
一体化部署本地有无公网IPV4地址皆可部署简单、无需反向代理性能较差
Docker部署(预构建镜像)快速部署,占用较大一键安装、数据持久化需要Docker环境,下载镜像较大
DockerCompose部署适合源码更新维护高度自定义需要Docker环境,编译耗时长
Dockerfile自编译适合源码更新维护高度自定义需要Docker环境,编译耗时长

通过预编译二进制文件安装

这里区分两种方式:

  • 前后端分离部署(后端前端分开编译出对应文件进行部署),性能更好
  • 一体化部署(前后端合二为一只需要部署一个文件),性能较差

前后端分离部署

Linux
下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/oneclickvirt/refs/heads/main/install.sh -o install.sh && chmod +x install.sh
环境安装

有交互地安装环境

./install.sh env

无交互地安装环境

noninteractive=true ./install.sh env
本体安装
./install.sh install

安装目录: /opt/oneclickvirt

安装成功后,需要手动启动服务:

shell
systemctl start oneclickvirt

其他使用方法:

停止服务:

shell
systemctl stop oneclickvirt

开机自启:

shell
systemctl enable oneclickvirt

查看状态:

shell
systemctl status oneclickvirt

查看日志:

shell
journalctl -u oneclickvirt -f

重启服务:

shell
systemctl restart oneclickvirt
升级前后端
./install.sh upgrade

除了配置文件,后端和前端文件都会升级

升级过程中会提示是否需要自定义前端文件路径,若选择不自定义,则默认解压到/opt/oneclickvirt/web/

这个设置主要是为了适配1panel不可自定义前端文件路径的问题,1panel的文件路径类似/opt/1panel/www/sites/beta/index/web,其中beta是你设置的网站的名字

部署前端

前面安装脚本会将静态文件解压到(未自定义时)

shell
cd /opt/oneclickvirt/web/

这个路径下

使用nginxcaddy以这个路径建立静态网站即可,是否需要域名绑定自行选择

静态文件部署完毕后,需要反代后端地址给前端使用,这里具体以OpenResty为例:

需要反代路径/api到后端的http://127.0.0.1:8888地址上,如果你使用的的是1panel,那么就只需要填写这些即可,默认的后端域名使用默认的$host不需要修改。

如果你使用的是nginxcaddy,请参考下方的代理源码自行修改进行代理

shell
location /api {
+    
Skip to content
- + oneclickvirt:no-db

数据库初始化

安装启动了mysql后,创建一个空的数据库oneclickvirt,使用类型utf8mb4,最好仅本地127.0.0.1可访问,对应用户名和密码保存好。(如果你安装使用的是docker一体化部署的容器,自带数据库无需自己创建空数据库,默认已在容器中启动了对应的数据库可用了)

打开前端对应的页面后,将自动跳转到初始化界面。

填写数据库信息和相关用户信息,测试数据库链接无问题,则可点击初始化系统。

完成初始化后会自动跳转到首页,可以自行探索并使用了。

如果使用的是默认的用户信息进行初始化,那么默认的账户为:

管理员账户名密码分别为:

admin
Admin123!@#

初始化过程中,默认加载了所有的镜像种子数据到数据库中,但是默认仅启用了debianalpine相关版本的镜像,这是为了避免过多镜像启用导致用户选择困难。

如果你需要额外类型的镜像,需要在管理员权限下,在系统镜像管理界面按照类型、架构、版本搜索并进行启用。

初始化后请立即修改默认的管理员的用户名密码,并禁用或删除默认启用的测试用户testuser,这一部分可在管理员的用户管理页面进行操作。

+ \ No newline at end of file diff --git a/guide/oneclickvirt/oneclickvirt_precheck.html b/guide/oneclickvirt/oneclickvirt_precheck.html index fec16aec81..a0faf6c7dc 100644 --- a/guide/oneclickvirt/oneclickvirt_precheck.html +++ b/guide/oneclickvirt/oneclickvirt_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

前言

这是一个用于对接主流虚拟化技术的控制面板,补足虚拟化技术本身不支持的用户管理、流量监控、NAT端口映射以及自定义系统镜像等内容。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/oneclickvirt

WARNING

这是一个处于早期开发的项目,可能有各种BUG和不稳定之处,若使用则自行斟酌风险,更新会比较频繁,如若使用不了不要强行使用。

环境需求

支持的架构:amd64或arm64

支持的系统:Linux、Windows、或者自行编译的任何架构的系统

只要有公网就行,部署的机器不必有独立的公网IP地址,这只是一个虚拟化的控制面板,有端口显示前端就行,甚至开发的一个重要原因是我需要无公网IPV4地址管理一堆虚拟化环境。

本控制面板无特殊的环境依赖需求,需要一键部署的可使用包含数据库的一体化Docker镜像或者分容器的docker-compose部署。

前端静态文件通过nginxcaddyOpenResty之一部署,非源码部署且非Docker部署的需要进行API路径反代到后端端口。

WARNING

纳管的节点要求宿主机网卡直接绑定待映射IP地址如公网IP。不支持通过类似阿里云 VPC 的端口映射、NAT 转发等方式提供待映射IP的宿主机。使用全端口 NAT 或端口转发方式提供待映射IP的宿主机,无法作为节点机器。(简单的说,云服务器有公网IP地址,那么这个IP地址必须是绑定在网卡上的,不能网卡只有内网IP没公网IP,然后流量走内网IP再转公网IP)

平台特点

  • 语言国际化,前端支持中英双语切换显示,默认使用中文显示,可切换默认的系统语言

  • 对接Provider: 支持 ProxmoxVE、Incus、Docker、LXD 四大主流虚拟化平台,更多平台敬请期待

  • 灵活实例类型: 支持自动创建虚拟机(VM)和容器(Container),通过抽象化设计提供统一的虚拟化资源管理体验

  • 自带镜像种子数据:无需自行查找对应平台的镜像,所有平台均自带自编译的镜像加载,支持统一管理或自行添加镜像下载地址

  • 自动NAT端口映射: 支持IPv4/IPv6的自动端口映射,映射的IP支持非公网IP,支持多种网络类型:

NAT IPv4
+    
Skip to content
- +纯IPv6
  • 端口映射方式: 灵活根据不同Provider自动选择最佳映射方案(原生、设备代理、iptables等)

  • 流量统计:集成IP级和网络接口级进行精确的网络流量统计, 敏感操作时强制同步流量数据,确保数据准确性

  • 每月初统一重置用户流量使用统计,支持用户级、实例级、Provider级的流量统计和限制

  • 邀请码系统:支持非公开注册邀请机制,根据用户等级设置不同的资源配额限制

  • 资源限制:支持设置实例数量/CPU/内存/磁盘/带宽配额管理,流量使用限制

  • 所有代码开源,但不会进行任何商用开发

+ \ No newline at end of file diff --git a/guide/oneclickvirt/oneclickvirt_qa.html b/guide/oneclickvirt/oneclickvirt_qa.html index a0072804e6..a6a208c920 100644 --- a/guide/oneclickvirt/oneclickvirt_qa.html +++ b/guide/oneclickvirt/oneclickvirt_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

如有问题请反馈对应仓库

忘记了管理员密码怎么办

需要通过数据库操作强行更改密码

  1. 生成密码哈希
bash
# 使用 Python 生成(将 NewPassword123! 替换为您的新密码)
-python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"

输出示例:$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  1. 进入数据库

Docker 部署(一体化版本):

bash
docker exec -it oneclickvirt mysql -u root oneclickvirt

独立数据库部署:

bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
  1. 更新密码
sql
-- 查看管理员账户
+    
Skip to content
- +netstat -lntp

只有通过:

shell
incus config device show 实例1

或:

shell
lxd config device show 实例1

才能看到已配置的端口映射规则,因为流量不过宿主机直接对外转发。

正确的端口映射查找方式是查看 nftables 规则

shell
nft list ruleset

或仅查看 NAT 表:

shell
nft list table ip nat

在使用 iptables 的系统中可使用:

shell
iptables -t nat -L

如果有流量进出,查看真实连接状态可使用:

shell
conntrack -L | grep <>
+ \ No newline at end of file diff --git a/guide/oneclickvirt/oneclickvirt_thanks.html b/guide/oneclickvirt/oneclickvirt_thanks.html index 94468f585d..8222ed6a6e 100644 --- a/guide/oneclickvirt/oneclickvirt_thanks.html +++ b/guide/oneclickvirt/oneclickvirt_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/oneclickvirt/oneclickvirt_usage.html b/guide/oneclickvirt/oneclickvirt_usage.html index ed7ba59669..7e103f8319 100644 --- a/guide/oneclickvirt/oneclickvirt_usage.html +++ b/guide/oneclickvirt/oneclickvirt_usage.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

使用说明

这里将详细说明本面板的使用方式,如有问题请加群求助管理员:https://t.me/oneclickvirt

用户管理

登录进入管理员界面后,打开用户管理页面后,必须点击重置密码,以确保admin账户的密码为强密码,确保不会被恶意爆破。如果初始化的时候,你使用了自行定义的密码,那么不重置密码也可以。

重置密码会自动生成强密码,仅展示一次,务必复制保存好,避免遗忘。

如果需要更改用户的类型,就需要点击对应用户进行编辑,编辑的弹窗支持更改用户类型。

管理员可以点击右上角头像,下拉栏目中有切换管理员和普通用户视图的按钮,如果需要测试任何功能,可以直接使用管理员用户测试。(普通用户没有这个视图切换按钮)

纳管节点

首先,需要确保要纳管的节点已经安装了四大虚拟化技术的其中之一。

部署了本面板的机器上ping对应的节点的IP,最好延迟在300ms以内且丢包率不要太高,否则可能出现无法连接导致控制中遗漏命令执行的情况。

以下是设置节点的设置步骤,必填和必需的步骤必须要走,非必填非必需的步骤走不走看你需求。

基本信息(必填)

服务器名称最好仅英文+数字,不要用特殊字符,最好控制在6个字符以内,后续开设容器或虚拟机的时候,会自动带上这个服务器名称前缀。

服务器类型选择你实际安装了的虚拟化技术名称,docker默认只能开设容器,其他虚拟化技术可开设虚拟机。

SSH地址填写节点的公网IPV4地址或内网SSH链接地址,这个地址将被用作SSH连接和API连接。

NAT端口映射优先使用端口IP进行映射,如果不提供具体的端口IP,将使用SSH地址的IP进行映射,都不需要是公网IPV4地址。

端口框填写SSH连接节点的端口。

描述可备注当前节点的一些信息,仅管理员可见。

状态默认为启用状态,允许后面的健康检测后,被普通用户申请领取开设实例。

架构是节点本身的架构,目前支持纳管amd64架构和arm64架构的节点,自己对应选取。

(暂时不支持纳管的节点本身已经有实例,暂未开发同步纳管实例的功能)

连接配置(必填)

用户名推荐使用root用户,因为后面自动配置api的时候需要对应下载一些依赖,非root用户看你访问问题。

密码就是SSH登录用的密码,当然如果你不使用密码,使用密钥登录也是可以的。

SSH超时配置是设计测试连通性和优化容错率的,也可以用来检测连通性。

前面信息填写完毕后,点击测试,会出现对应的提示值,点击应用即可,当然不进行应用也行,容错率更高一些行。

这里的延迟部署ping的延迟,是实际在对应的节点上执行命令的延迟,所以一般会在2s左右或以上,这是正常的延迟。

这么设计是为了适配一些与面板机器连通性极差的节点,这些参数的数值增加意味着更高的容错率。

执行超时时间一般不需要进行修改,除非你的节点本身性能特别弱,执行命令耗时很久。

位置信息(可选)

直接输入具体国家进行点击勾选,大部分国家都已经有预设了,有对应的旗帜图标。

设置位置后,普通用户的申请领取界面将可以看到对应的旗帜和地区,还有自动匹配的所在大洲。

可选填对应的城市,不填写也行,不影响使用。

实例类型和数量限制(必填)

对于docker类型的节点,只能开设容器,其他虚拟化类型都支持开设容器和虚拟机(前提是节点本身支持,不支持的强行开设任务会自动失败)。

如果不需要开设虚拟机,务必取消虚拟机的勾选。

数量限制如果保持默认的参数0,意味着不进行节点层面的这个类型的实例数量限制。

对于容器类型,建议按照以下公式设置数量

节点空闲存储盘大小 / 将分发的实例的最小硬盘大小 = 实例最大数量

对于虚拟机类型,则

节点空闲内存大小(含虚拟内存) / 将分发的实例的最小内存大小 = 实例数量

这样计算的原因在于,容器一般不限制总的CPU数量和内存大小,但限制硬盘大小,虚拟机一般内存才是开设数量的瓶颈。

如果你需要超开,那么以上计算规则得到的数值可适当增大,并配置下面的配置。

资源超配置(可选)

超配置资源含义是是否要进行对应资源的严格限制,取消限制意味着不进行检查强行开设,可能导致开设任务失败。

默认容器类型不限制CPU和内存预分配的总量,但限制预分配的硬盘总量,以达到最优化的资源共享和最大化的实例数量,一般不需要进行修改。

默认虚拟机类型限制所有资源,预分配的资源总量最大值不超过实际资源大小。

对于ProxmoxVE,还有一个开设的硬盘所在存储池名字可以设置,如果是多盘的pve,需要设置开设在哪个存储池上。

其他类型的虚拟化环境在安装过程中有询问具体存储池开设位置了,所以就不需要设置了。

总的来说,如果需要限制哪种资源不被超开,那么就点击限制,限制后将无法超开对应资源,不限制则可超开对应资源。

这里限制的是该节点上此类实例的总资源占用,用于计算可用资源和限制实例创建。

不推荐进行修改,除非你知道这块的设置在干什么。

IP映射配置(可选)

一般不需要进行修改,这里可以设置每个实例的端口映射数量、区间、网络配置方式、端口映射方式。

默认开设带NAT映射公网IPV4端口的实例,映射的IP的优先级是:端口IP > SSH连接时的IP(如果端口IP未设置时使用)

如果节点本身有一段IPV6子网大于等于/80大小的,那么选择网络配置更改,可开设带公网独立IPV6地址的实例。

极端一点,也可以开设仅独立IPV6地址的实例,自行选择吧。

不推荐对映射方式进行修改,除非你知道这块的设置在干什么,默认的配置已经是最好的配置了。

带宽流量配置(必填)

字面意思,设置节点开设出的实例的最大带宽和以自然月计算的可用流量总量,默认不自动启用流量监控和流量统计。

启动流量监控会有对应的内存负担,因为需要缓存流量统计数据,哪怕本项目极致优化后,还是会随着带宽的增大而增大,内存不够用的不要开启流量统计。

启用了流量统计的话,要注意统计模式,默认的统计模式是最普适的,如果你本地的性能足够好(主要是内存够多),可选择更高的采集频率和采集数量,如果性能非常差,建议选择最后一档。当然也支持自定义参数,但不推荐新手修改,预设的模式足矣。

如果启用了流量统计,那么需要注意等级分配的带宽不要过大,监控将动态按照分配的带宽进行配置文件生成进行监控,带宽越大监控占用的内存越大。

级别实例带宽plugin_pipe_sizesql_cache_entries基础占用突发占用
≤50 Mbps2 MB325~8 MB8~12 MB
中低51~100 Mbps10 MB6410~15 MB15~30 MB
101~200 Mbps25 MB12815~20 MB30~50 MB
中高201~500 Mbps50 MB25620~30 MB50~80 MB
501~1000 Mbps128 MB51230~50 MB80~150 MB
超高1001~2000 Mbps256 MB76850~80 MB150~300 MB
极高>2000 Mbps512 MB102480~120 MB300~600 MB

流量统计的误差10G大概会偏差0.1G左右,已自动处理NAT映射以及带IPV6独立IP的情况,无需手动管理了。

但如果是之前有启用了流量统计,后续需要关闭并卸载监控了,那么需要在下面这个地方先对应删除了监控再关闭流量统计,这样才能确保完全卸载,否则还是会在后台统计。

只有启用了流量控制之后,这块才会出现流量监控管理的按钮,进入之后可见三个按钮,主要用于手动同步监控的情况,一般来说不是实例开设了一些之后再启用流量监控的情况无需手动管理,有需求的直接点击检测流量监控即可,会批量检测当前实例下的所有实例的监控情况。

等级限制(必填)

这块预设了5个等级,用户申请领取的时候,将经过这个限制筛选配置。

在实际实例开设过程中,节点层面的等级限制 将与 全局的用户等级的资源限制 互相比对,取其中的最小值作为用户在当前节点可用的资源限制。

这样设置是为了特殊化当前节点对应等级的用户可开设的实例的配置限制,避免有时候全局限制不适用当前节点,全局限制在系统配置中可设置,一般用于用户整个账户层面的使用资源限制。

高级设置(可选)

过期时间:

防止用户继续操作已经过期的节点,过期节点将自动冻结,此时对应的实例将不允许任何操作,但不会自动删除,如果冻结了节点请及时清理删除节点。

任务并发控制:

默认单线程串联执行,同一时刻,只会存在一个增删改的任务(对应实例的开设删除重置操作)。

可以更改为多线程并发执行,同一时刻可以存在多个增删改任务,只有并发执行时,并发数量的设置才有意义。

串联执行适合节点本身性能弱或平台用户数量少的情况,并发操作适合节点本身性能强或用户数量多的情况,请自行选择模式。

个人推荐使用默认设置,并发执行可能存在未完全测试出来的边界条件,可能有BUG。

任务轮询设置:

控制是否启用任务执行,以及任务执行轮询检查状态的间隔,一般保持默认即可。

操作执行规则:

节点操作模式支持 仅API,仅SSH,自动切换 ,默认使用自动切换模式,一般来说没必要修改,除非有特殊需求。

如果需要启用API操作模式,需要在设置保存节点成功后,在外面点击自动配置API按钮,将执行后台任务自动对接虚拟化平台的API,无需人工配置。等待一段时间大概15~20秒后,应该已经配置成功,点击按钮可见配置历史任务及对应的日志。配置成功后,再点击健康检测,确保API状态为绿色在线状态,就配置启用API成功了。

硬件配置(可选)

仅lxd和incus下支持设置默认的实例参数配置,一般使用默认的就行了,除非你需要手动限制某些特殊的硬件资源,否则一般不需要修改。

如果你需要设置CPU占用的最大百分比等内容,这里的设置可以满足你的需求。

健康检测(必选)

点击操作按钮

保存节点后,点击健康检测完成后,普通用户才能看到对应的服务器,才能进行申请开设,若未进行健康检测,用户无法申请开设领取。

健康检测后会显示对应的类型的连接状态是否在线,会自动检测整机的实际资源总量,这个资源总量就是前面设置的不超配开设的资源总量限制。

API是否可用不影响具体使用,自动配置API是非必需的

系统镜像

默认种子数据会录入所有虚拟化环境可用的镜像,默认仅启用alpine和debian镜像,避免用户可用镜像过多。

如果需要任何系统任何虚拟化环境任何架构对应的镜像,请自行搜索后进行启用,否则用户选择不了对应的镜像。

暂时不支持自定义镜像地址,目前前端录入的功能是不可用的,不要手动录入镜像。

系统配置

一般的选项这里不多赘述了,有必要特殊说明的就两个配置。

用户等级配置(必填)

这里限制的是普通用户等级对应的总的账户可用的资源总量。

在对应节点开设实例的时候,这个全局配置将和节点本身的等级配置共同筛选同时符合条件的配置提供给用户选择。

实例权限配置(必填)

这里可用控制用户敏感操作所需的最低等级,可以控制 实例创建、实例删除、实例重置系统 所需的最低用户等级。

配置文件

默认的系统配置已经足够轻度使用了,如果需要高级自定义则需要修改配置文件,或初始化后在管理员界面进行修改。

https://github.com/oneclickvirt/oneclickvirt/blob/main/server/config.yaml

这里是完整的初始化的配置文件,下面将讲解具体的配置项目:

auth 认证配置

yaml
auth:
+    
Skip to content
- + stacktrace-key: stacktrace

系统日志记录的详细配置,基于zap日志库。

  • compress-logs: 是否压缩归档的日志文件
  • director: 日志文件存储目录
  • encode-level: 日志级别编码方式,可选LowercaseLevelEncoder(小写)、CapitalLevelEncoder(大写)
  • format: 日志输出格式,可选console(控制台格式)、json(JSON格式)
  • level: 日志级别,可选debuginfowarnerror。开发调试时建议使用debug,生产环境使用infowarn
  • log-in-console: 是否同时输出日志到控制台
  • max-array-elements: 数组类型字段最大记录元素数
  • max-backups: 保留的历史日志文件最大数量
  • max-file-size: 单个日志文件最大大小,单位为MB
  • max-log-length: 单条日志最大长度,超出部分会被截断
  • max-string-length: 字符串字段最大记录长度
  • prefix: 日志前缀标识
  • retention-day: 日志文件保留天数,过期自动删除
  • show-line: 是否显示日志调用的文件名和行号
  • stacktrace-key: 堆栈跟踪信息的键名

注意:调试问题时应将level设置为debug以获取详细日志信息。

+ \ No newline at end of file diff --git a/guide/podman/podman_build.html b/guide/podman/podman_build.html index c5b4414e28..0c9a23828d 100644 --- a/guide/podman/podman_build.html +++ b/guide/podman/podman_build.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,20 +22,20 @@ -
Skip to content

前言

两种开设方式

单独开设

  • 只生成一个 Podman 容器,自动判断国际服务器还是国内服务器
  • 可配置绑定独立的 IPV6 地址(需安装时宿主机已有公网 IPV6 且安装脚本已配置 podman-ipv6 网络)
  • 支持 x86_64 和 ARM64 架构的服务器

下载脚本

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

国内

shell
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/onepodman.sh
-chmod +x onepodman.sh

示例

运行支持的变量如下

bash
./onepodman.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]

目前 system 仅支持选择:

  • debian
  • ubuntu
  • alpine
  • almalinux
  • rockylinux
  • openeuler

默认不填则是 debian

shell
./onepodman.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0

以下为开设的示例容器的信息:

属性
容器名字ct1
SSH 登录的用户名root
SSH 登录的密码MyPassword
CPU 核数1
内存大小512MB
SSH 端口25000
内外网映射端口一致的区间34975 到 35000
系统debian
是否绑定独立的 IPV6 地址N
硬盘大小不限制

相关操作

查看所有容器

shell
podman ps -a

进入容器

shell
podman exec -it ct1 bash

进入 Alpine 容器

shell
podman exec -it ct1 sh

要退出容器就执行 exit 退出。

删除示例

shell
podman rm -f ct1

查看容器日志

shell
podman logs ct1

批量开设

  • 批量多次运行继承配置生成
  • 自动递增容器名(ct1, ct2, ...)、SSH 端口、公网端口
  • 容器信息记录到 ctlog 文件
  • 生成多个时为避免 SSH 连接中断建议在 screen 中执行
  • 支持 x86_64 和 ARM64 架构的服务器

运行

国际

shell
wget -q https://raw.githubusercontent.com/oneclickvirt/podman/main/scripts/create_podman.sh
+    
Skip to content
- +systemctl enable container-ct1

或者手动启动所有已停止的容器:

shell
podman ps -aq -f status=exited | xargs -r podman start
+ \ No newline at end of file diff --git a/guide/podman/podman_install.html b/guide/podman/podman_install.html index fb2de0e579..1bd5d9cf12 100644 --- a/guide/podman/podman_install.html +++ b/guide/podman/podman_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

安装 Podman 环境,包含 podman + 网络配置 + DNS 保活服务全套组件

开设虚拟内存

TIP

内存开点 swap 免得机器炸了

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

建议只开实际内存大小两倍大小的虚拟内存

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

环境安装

  • 支持系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 通过各发行版官方软件包安装 Podman(daemonless 架构,无需 Docker daemon)
  • 自动配置 Podman 网络(podman-net:172.21.0.0/16)
  • 检测公网 IPv6 地址,若存在则自动创建 podman-ipv6 网络并启动 NDP Responder
  • 安装 DNS 保活服务(check-dns-podman.service),持续检测 DNS 可用性
  • 支持 x86_64 和 ARM64 架构的服务器

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

TIP

安装完成后建议执行 podman ps -a 验证 Podman 环境是否正常运行

卸载 Podman 环境

一键卸载 Podman 全套环境,包括所有容器、镜像、网络、辅助文件:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)

WARNING

脚本会在执行前要求输入 yes 确认,操作不可逆。删除内容包括所有容器、镜像、Podman 网络配置。 复测流程:先执行卸载,再执行安装,即可从零验证整个安装流程。

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/podman/podman_precheck.html b/guide/podman/podman_precheck.html index 605b3556de..1546c1f6ef 100644 --- a/guide/podman/podman_precheck.html +++ b/guide/podman/podman_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果你的宿主机本身没有IPV6的子网又想给容器分配IPV6地址,需要宿主机本身已有公网IPV6地址,安装脚本会自动检测并配置

WARNING

Podman 方案不支持 KVM/QEMU 虚拟机,仅支持 Linux 容器(LXC),适用于无 KVM 硬件虚拟化支持的环境。

欢迎给项目一个 Star 进行免费的支持-->https://github.com/oneclickvirt/podman

项目特点

基于 Podman(daemonless 架构)运行时,通过批量或单独开设 NAT 服务器

  • 使用各发行版官方软件包安装 Podman(无守护进程,daemonless 架构)
  • 使用本仓库自编译的基础镜像(存储在 GitHub Releases),优先离线加载,无法获取时回退到 ghcr.io 镜像
  • 每个容器自带 1 个外网 SSH 端口,25 个内外网一致端口,可选择是否绑定独立 IPV6 地址
  • 支持 lxcfs 挂载(若宿主机安装了 lxcfs),提供容器内真实 /proc 视图
  • 原生支持 rootless(本方案使用 root 运行以简化网络配置)
  • 支持国内 CDN 镜像加速

支持的系统

系统amd64arm64
Ubuntu 22.04
Debian 12
Alpine latest
AlmaLinux 9
RockyLinux 9
OpenEuler 22.03

配置要求

  • 宿主机系统:Ubuntu、Debian、RockyLinux 9+、AlmaLinux 9+、CentOS 9+、Alpine、Arch
  • 架构:x86_64(amd64)或 ARM64
  • 内核需支持 overlay 文件系统
  • 网络能连接 Github 的 raw 界面即可
  • 空闲硬盘有 3G 以上即可
  • 不需要 KVM 硬件支持

与 containerd 和 docker 对比

特性podman(本项目)containerddocker
守护进程无(daemonless)轻量级 containerd重量级 Docker daemon
运行时crun/runcruncrunc
管理命令podmannerdctldocker
rootless 支持原生支持需配置需配置
镜像格式OCIOCIOCI
网络后端netavark/CNICNIDocker bridge
容器支持Linux 容器(LXC)Linux 容器(LXC)Linux 容器 + KVM 虚拟机
安装方式系统包管理器nerdctl-full bundleDocker 官方脚本

推荐在开设 NAT 服务器前先增加部分 SWAP 虚拟内存,避免突发的内存占用导致宿主机卡死

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/podman/podman_qa.html b/guide/podman/podman_qa.html index a217d2b12b..da82f2b22f 100644 --- a/guide/podman/podman_qa.html +++ b/guide/podman/podman_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,15 +22,15 @@ -
Skip to content

常见问题答疑

podman: command not found

Podman 环境未正确安装,请重新执行安装脚本:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

容器无法访问外网(IPv4)

检查 iptables NAT 规则是否存在:

shell
iptables -t nat -L POSTROUTING -n -v | grep 172.21

如果没有,手动添加:

shell
iptables -t nat -A POSTROUTING -s 172.21.0.0/16 ! -d 172.21.0.0/16 -j MASQUERADE
+    
Skip to content
- +ghcr.io/oneclickvirt/podman:<os> # multi-arch manifest

手动拉取镜像示例:

shell
podman pull ghcr.io/oneclickvirt/podman:debian-amd64

如何完全重置 Podman 环境

先卸载,再重新安装:

国际

shell
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

国内

shell
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmanuninstall.sh)
+bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/podman/main/podmaninstall.sh)

Podman 与 containerd 如何选择

  • 如需 daemonless 无守护进程架构,或希望使用系统包管理安装,选 Podman
  • 如需更轻量的守护进程 + nerdctl 命令行体验,选 containerd
  • 如需同时运行 KVM 虚拟机(Windows/macOS/Android),选 dockerPVE/Incus/LXD 方案

DNS 问题

Podman 安装时会配置 check-dns-podman.service 服务,检查是否运行:

shell
systemctl status check-dns-podman

手动修复 DNS:

shell
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
+echo "nameserver 1.1.1.1" >> /etc/resolv.conf
+ \ No newline at end of file diff --git a/guide/podman/podman_thanks.html b/guide/podman/podman_thanks.html index fbd3cb202e..074a7c2db2 100644 --- a/guide/podman/podman_thanks.html +++ b/guide/podman/podman_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/pve/images/readme.html b/guide/pve/images/readme.html index 4b8bc1145b..b81257f52d 100644 --- a/guide/pve/images/readme.html +++ b/guide/pve/images/readme.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

暂存图片

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/pve/pve_android.html b/guide/pve/pve_android.html index 75adf02d62..02d87ef6b1 100644 --- a/guide/pve/pve_android.html +++ b/guide/pve/pve_android.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Android 虚拟机

安卓系统镜像下载

Android系统版本9及以前的镜像下载地址:

国际

https://www.fosshub.com/Android-x86.html

https://sourceforge.net/projects/android-x86/files/

国内

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/

Android系统版本10及以后的新镜像下载地址:

https://blissos.org/index.html#download

https://sourceforge.net/projects/blissos-x86/files/Official/

虚拟机开设

以安卓版本9及以前的镜像开设Android虚拟机

本指南以

https://mirrors.tuna.tsinghua.edu.cn/osdn/android-x86/71931/android-x86_64-9.0-rc2.iso

作为示例进行演示

1

模板设置

开设VMID为100的虚拟机选择对应的存储盘

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

Graphic card选择Vmware compatible,其他选项选择默认如图所示

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面

9

系统安装

进入引导后,选择Installation开头的选项

10

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了

11

选择不使用GPT格式

12

显示空白盘后,选择New

13

选择分区类型Primary

14

然后会提示划分多大的空间,默认回车就行,使用全部的空间

15

然后是选择Flags,移动到Bootable后,按回车,直到Flags下方显示Boot

16

然后移动到Write,回车,进行写入

17

这时候会让你确认是否继续,输入yes后回车继续

18

一段进度条跑过后,回到了最初的菜单,选择Quit退出菜单,一切准备就绪了

19

然后这时候回到了UI界面,使用前面初始化好的盘,选择OK按钮回车

20

文件系统按方向键选择ext4类型,选择OK按钮回车

21

确认进行格式化,选择Yes按钮回车

22

确认GRUB引导安装,选择OK按钮回车

23

确认文件系统可读写,选择OK按钮回车

24

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车

25

然后一段时间后进入安卓LOGO界面

26

镜像移除

然后会进入一段黑屏,大概3~5分钟后仍然黑屏的话,宿主机执行qm stop 100,然后开始移除镜像文件

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

ar

然后宿主机再执行qm start 100,然后应该就会进入安卓系统的初始化界面了

系统初始化

初始化界面选择语言,然后点击确定按钮

27

此时回尝试连接WIFI,由于本项目安装的PVE是完全的静态网络配置,直接跳过,稍后再进行设置

31

点击下一步按钮确认设置时间

32

点击取消屏幕保护,确认仍然跳过

33

然后一段时间黑屏后,会出现主屏幕应用的选择,如果等待3~5分钟这个界面仍然没有出现,那么像之前那样重启虚拟机,再进入VNC应该就会显示了

选择Quickstep

34

网络设置

进入桌面,此时需要开始设置网络,左上角点击设置图标

35

出现下拉框,点击按住下拉

36

点击齿轮按钮

37

进入网络和互联网设置

38

左键双击WIFI

39

修改目前识别到的VirtWIFI,右键点击出现选择框后,点击修改网络

40

出现高级选项,点击打开隐藏的选项

41

如图进行对应的网络设置

IP地址 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码 24

默认网关 172.16.1.1

DNS 8.8.8.8144.144.144.144

然后点击保存按钮

42

此时出来后可能仍然未应用设置,点击关闭WIFI后,再启用WIFI,应该就会显示已连接

43

然后退出到主界面,点击谷歌浏览器,尝试打开一个网页

44

可以看到打开本指南的网址无问题,证明网络已联通

45

以安卓版本10及以后的新镜像开设Android虚拟机

本指南以

https://psychz.dl.sourceforge.net/project/blissos-x86/Official/BlissOS15/Gapps/Generic/Bliss-v15.9.2-x86_64-OFFICIAL-gapps-20241012.iso?viasf=1

作为示例进行演示

1

模板设置

宿主机需要先执行以下命令安装图形环境依赖

shell
apt install libgl1 libegl1 -y

然后开始创建虚拟机,点击右上角的Create VM按钮,填写VMIDNameResource Pool

2

选择安卓镜像,然后Type选择LinuxVersion选择含2.6版本的选项

3

如果宿主机本身携带有GPU,那么Graphic card选择VirGL GPU

如果宿主机本身不携带GPU,那么Graphic card选择VirtIOVmware compatible

Machine选择q35BIOS选择OVMF (UEFI)启动,EFI Storage选择local

4

磁盘格式选择SATA,具体需要分配多大的磁盘自选,推荐至少30G

5

CPU数量至少2核

如果你的宿主机支持嵌套虚拟化,CPU的类型请选择host(经验证无问题)

如果你的宿主机不支持嵌套虚拟化,CPU的类型请选择qemu64,同时在模板设置成功后,需要在Options中点击KVM hardware virtualization取消勾选后再启动虚拟机(不保证后面系统初始化无问题)

6

内存至少4G内存,填写至少4096

7

绑定的网桥选择vmbr1Model选择VirtIO (paravirtualized),取消Firewall的勾选

8

后续点击continue按钮后,模板成功创建出来,需要手动点击启动并进入VNC界面。

系统安装

进入引导后,选择Installation结尾的选项

9

然后需要创建分区写入,这块如果选择不了的话按键盘按钮c,就能选中了。

10

选择不使用GPT格式,依然使用cfdisk格式。

11

显示格式选择框,选择gpt

12

显示空白盘后,选择New

13

因为要划分EFI分区,这个盘需要修改大小,不能使用默认大小,数字改成1就行,分配1G硬盘,然后按回车。

14

然后回到了菜单栏,按方向键选择Type,然后回车,给分区选择格式类型

15

按方向键选择第一个选项EFI System,然后回车

16

此时回到菜单栏,页面上半部分就能看到具体的分区大小和格式

17

然后按下方向键,选择下一行空白的分区

18

菜单栏选择New,然后回车

19

这块需要填写分区大小,此时对照右上角选中的空白分区大小一致即可,然后回车。

20

回到菜单栏,选择Write,回车,写入分区。

21

会提示你输入yes进行确认,输入后回车。

22

然后一段进度条跑过,应该会回到菜单栏,选择Quit退出菜单,一切准备就绪了

23

然后这时候回到了UI界面,使用前面初始化好的1GB大小的盘,选择OK按钮回车。

24

文件系统按方向键选择fat32类型,选择OK按钮回车

25

确认不修改名字,选择OK按钮回车

26

确认进行格式化,选择Yes按钮回车

27

然后回到最初的UI栏,选择第二块不是1GB大小的分区,选择OK按钮回车

28

文件系统按方向键选择ext4类型,选择OK按钮回车

29

确认不修改名字,选择OK按钮回车

30

确认进行格式化,选择Yes按钮回车

31

默认不使用额外空间更新,选择No按钮回车

32

确认GRUB2 EFI BootLoader,选择OK按钮回车

33

跑了一段时间进度条后,显示安装成功,此时选择Reboot,选择OK按钮回车。

34

系统初始化

然后一段时间后进入LOGO界面。

35

再过一段时间,应该就会进入初始的安卓界面了,能看到弹窗和时间,按住左键上划

36

会出现主屏幕应用的选择,选择Quickstep

如果等待3~5分钟这个界面仍然没有出现,那么就重启虚拟机,再进入VNC应该就会显示了

37

镜像移除

出现了安卓的界面后,宿主机执行qm stop 100,然后开始移除镜像文件。

移除已经按照完毕的ISO文件,在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]

br

然后宿主机再执行qm start 100,然后应该就会进入系统的初始界面了。

网络设置

进入桌面,此时需要开始设置网络,图示位置按住左键,上划

38

弹出一堆应用,在里面找到那个叫做Bliss Ethernet Manager的应用,点击并打开

39

IP Assignment点击打开,选择Static类型,点击OK按钮确认

40

IP Address点击打开,填入172.16.1.xxx/24(xxx我写的100,因为这里我的虚拟机VMID是100方便区分),点击OK按钮确认

41

Gateway Address点击打开,填入172.16.1.1,点击OK按钮确认

42

DNS Address点击打开,填入8.8.8.8,点击OK按钮确认

43

然后在应用界面中,点击Interface UpRefresh,然后键盘按exit键退出程序

44

主界面中打开浏览器,验证网络是否畅通

45

可以看到打开本指南无问题,网络畅通

46

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/pve/pve_custom.html b/guide/pve/pve_custom.html index 5418c14597..539046506a 100644 --- a/guide/pve/pve_custom.html +++ b/guide/pve/pve_custom.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,41 +22,41 @@ -
Skip to content

自定义分区

在非Debian系统上安装 Proxmox VE 7

本机硬件配置的最低要求同先前正常安装的要求一致

需要先安装docker

curl -sSL https://get.docker.com/ | sh
+    
Skip to content
- +2a01:4f8:1c1c:94de::6

这种方式可用于宿主机未完整分配/80以上大小的子网的时候,仅带几个IPV6的时候,又需要开设独立的IPV6地址的实例

+ \ No newline at end of file diff --git a/guide/pve/pve_install.html b/guide/pve/pve_install.html index f8a71e3933..e6e89743e6 100644 --- a/guide/pve/pve_install.html +++ b/guide/pve/pve_install.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,9 +22,9 @@ -
Skip to content

PVE主体安装

安装过程中遇到选项不会选的可无脑按回车,本项目所有脚本内置国内外IP自动判断,使用的是不同的安装源与配置文件,有使用CDN加速镜像下载

TIP

低配置的宿主机,建议所有内容安装完毕后,查看自定义分区的内容,进行内存调优,减少内存占用。

在非物理机器上进行安装

本方法安装的Proxmox可后续使用本项目的所有脚本。

一键安装PVE

TIP

建议debian12+,实测部分独立服务器的debian11系统会出现一重启网络就失联的情况,debian12没有这种问题

  • 安装的是当下apt源最新的PVE
  • 比如debian10则是pve6.4,debian11则是pve7.x,debian12则是pve8.x,debian13则是pve9.x
  • /etc/hosts文件修改(修正商家hostname设置错误以及新增PVE所需的内容)
  • /etc/cloud/cloud.cfg文件修改(避免覆写已修改的hostname等配置)
  • /etc/network/interfaces文件修改(修复auto、dhcp类型为static、增加vmbr0网关)
  • 检测是否为中国IP,如果为中国IP使用清华镜像源,否则使用官方源,同时处理apt的源和对应的nameserver,避免断网
  • 创建vmbr0(独立IP网关),宿主机允许addr和gateway为内网IP或外网IP,已自动识别
  • vmbr0创建支持开设纯IPV4、纯IPV6、双栈虚拟机,自动识别IPV4地址和IPV6地址,自动识别对应的IP区间
  • 安装PVE开虚拟机需要的必备工具包
  • x86_64的替换apt源中的企业订阅为社区源,arm的使用第三方修复的补丁构建的源
  • 打印查询Linux系统内核和PVE内核是否已安装
  • 设置DNS检测8.8.8.8的开机自启添加DNS的systemd服务
  • 新增PVE的APT源链接后,下载PVE并打印输出登陆信息

所有修改过的文件均已设置为只读模式,避免重启后文件被覆写,如需修改请使用chattr -i 文件路径取消只读锁定,修改完毕请执行chattr +i 文件路径进行只读锁定

执行过程中会提示重启系统一次,重启后务必等待起码20秒确保系统未再次自动重启,因为原始环境可能缺失ifupdownifupdown2环境,有加载安装的守护进程进行安装,安装后会再次自动重启系统,等待20秒未自重启确保这个安装已运行完毕.

如果你需要将新安装的PVE纳管进入已有的集群,那么这块安装的时候,名字就不能回车默认使用pve,需要换一个名字避免和集群内的pve本身的hostname冲突.

若宿主机本身存在SLAAC分配的IPV6地址,将可选择是否使用最大的IPV6子网范围,默认回车不使用最大的IPV6子网范围仅使用本机IPV6,若后续需要给虚拟机/容器附加独立的IPV6地址,该选项务必选择y.

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_pve.sh -o install_pve.sh && chmod +x install_pve.sh && bash install_pve.sh

shell
bash install_pve.sh

TIP

安装成功后打开网页可能提示不安全,点击高级或更多选项,坚持访问即可

登录的信息是你SSH的账户和密码

预配置环境

  • 创建资源池mypool(local)
  • 移除订阅弹窗
  • 尝试开启硬件直通
  • 对AppArmor模块检测和自动安装
  • 重启系统前推荐挂上nezha探针方便在后台不通过SSH使用命令行,避免SSH可能因为商家奇葩的预设可能导致重启后root密码丢失
  • 执行reboot前需要等待后台任务执行完毕,一些宿主机的系统apt命令执行很慢,得等一会才能执行完毕,当然大部分的机器没这么烂,如果很久都起不来ssh无法连接,那么尝试通过控制面板重启一下服务器

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_backend.sh)

自动配置宿主机的网关

WARNING

使用前请保证重启过服务器且此时PVE能正常登录进WEB端再执行,重启机器后不要立即执行此命令,待WEB端启动并可登录成功后至少等1分钟再执行本命令 如果WEB端起不来,执行systemctl status pveproxy查看是否启动,如果卡住未启动,执行systemctl start pveproxy启动WEB端。

TIP

这一步是最容易造成SSH断开的,原因是未等待PVE内核启动就修改网络会造成设置冲突,所以至少等几分钟待内核启动也就是WEB端启动成功后再执行。

TIP

在执行本命令前如果宿主机需要附加IPV6隧道(给没有IPV6地址的宿主机添加IPV6子网),请查看IPV6免费子网附加部分的内容附加到对应的配置文件中,但请忽略<初始环境修改>的操作,直接进行附加,附加后验证有IPV6地址了再执行下面的一键配置网关的命令。

  • 如果vmbr0未创建,则自动创建,逻辑同主体安装一致
  • 创建vmbr1(NAT网关),支持开设NAT的IPV6网络的NAT的IPV4的服务器
  • 创建vmbr2(独立IPV6网关),使用ndppd解决宿主机对IPV6地址进行MAC校验的问题,支持开设带独立IPV6网络的服务器
  • 想查看完整设置可以执行cat /etc/network/interfaces查看,如需修改网关需要修改该文件,web端已经无法修改
  • 加载iptables并设置回源且允许NAT端口转发

简单的说,vmbr0负责v4的独立IP,vmbr1负责复杂v4/v6的NAT,vmbr2负责v6的独立IP

开独立IPV4的虚拟机时使用的vmbr0,gateway同宿主机,IPV4/CIDR使用同一网段的地址和相同的子网掩码,使用宿主机未绑定的IPV4地址做IPV4/CIDR,当然如果后续使用本套脚本无需关注这点细枝末节的东西

开NAT的IPV4的虚拟机时使用vmbr1,gateway使用172.16.1.1,IPV4/CIDR使用172.16.1.x/24,这里的x不能是1,当然如果后续使用本套脚本无需关注这点细枝末节的东西

国际

shell
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

国内

shell
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/build_nat_network.sh)

TIP

这一步是可能需要你执行成功几分钟后重启系统,详见脚本最后执行完毕的提示,但重启可以保证部分隐藏设置加载成功,有条件务必重启一次服务器

到这一步主体安装完毕。

在物理机器上进行安装

本方法安装的Proxmox不可后续使用本项目的所有脚本。

本方法未大规模测试和适配,仅本人在本地机器上安装了PVE8.4,路由器本身使用的不是自动获取IP地址而是固定IP地址连接的方式,如有问题对应仓库开issues.

U盘刻录官方ISO

官方ISO下载地址:

https://www.proxmox.com/en/downloads/proxmox-virtual-environment/iso

需要提前下载到本地

同时还需要一个读写速率比较好的U盘,用于制作启动盘,由于启动盘需要使用rufus进行启动盘制作,所以需要U盘格式化,需要确保U盘制作前为空U盘

rufus下载地址(下载到你的本地,不是U盘中):

https://rufus.ie/zh/

https://github.com/pbatard/rufus

刻录需要使用DD方式进行刻录,刻录完毕后U盘原数据会被完全擦除。

PVE主体安装

查找宿主机本身如何进入BIOS,进入BIOS后修改两处地方

  1. 安全启动需要关闭

  2. Boot的顺序需要将USB的顺序移动到第一位

然后保存设置,然后插入U盘,重新启动系统,选择使用图形界面进行安装

FQDN需要填写一个网址,可以填写类似 pve.spiritlhl.net 这样的网址,最好是你拥有的域名的一个子域名,不是实际的域名的话写成类似 pve.localsite.com 也行,后续不一定用得到

安装完毕后会自动关机重启,重启黑屏后可以拔掉USB,避免又从U盘重启安装了,当然如果忘了又重启到安装页面了,关闭机器后拔掉U盘再启动也行

无线网络配置

下载所需的压缩文件和shell脚本

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.zip

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/wireless.sh

下载完成后,解压压缩包,将wireless的文件夹拖入一个新的U盘的根目录,同时wireless.sh文件也得放到根目录。

U盘插到物理机器后,需要挂载U盘,这里的sdx1是第一条命令查询到的U盘的实际路径,需要自行修改

shell
fdisk -l
-mount /dev/sdx1 /mnt

U盘内的wireless.zip需要确保已解压,打开可见其中的deb文件

此时直接执行一键配置

shell
bash /mnt/wireless.sh

配置完毕会自动重启系统,重启后会有公共网络

配置脚本执行过程中会提示输入WIFI的名字和密码,由于纯CI环境无中文输入法,WIFI的名字必须仅英文数字组成,密码也是

其他相关默认配置

下载脚本,类似上面一步那样导入文件

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/refs/heads/main/extra_scripts/wireless/default.sh

使用前务必确保curl ip.sb无问题

shell
bash default.sh

执行会非常耗时,但装完后会自带xfce的桌面环境,且换源阿里云,且去除无效订阅,且设置合并local和loacl-lvm,且设置清华镜像容器源

注意事项

物理机安装无限模块后不可使用NAT直接连接虚拟机接入网络,所以本项目后续的教程不支持该方法接入的网桥,本项目后续脚本不支持本方法安装的Proxmox.

目前可行的无线模块在PVE上使用的成功案例,都要求WIFI路由器接入网络的方式是自动获取IP地址(DHCP)(后续使用openwrt或ikuai或直接nat后虚拟机内网络可用),或可在路由器上修改静态路由表,如果WIFI路由器使用固定IP地址连接网络,暂时未找到成功案例。

- +
Skip to content
+ \ No newline at end of file diff --git a/guide/pve/pve_kvm.html b/guide/pve/pve_kvm.html index 0ccc707bc2..4910745e1f 100644 --- a/guide/pve/pve_kvm.html +++ b/guide/pve/pve_kvm.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

Linux虚拟机(KVM/TCG)

SSH登录说明

开设出的虚拟机,默认生成的用户名可以不是root,此时你需要执行sudo -i切换为root用户

默认设置的用户名不是root时,未经过设置的默认的root密码是passwordoneclickvirt

登录SSH切换为root权限后,一定要修改root密码,可以使用以下命令修改

国际

bash
bash <(curl -sSL https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

国内

bash
bash <(curl -sSL https://cdn.spiritlhl.net/https://raw.githubusercontent.com/fscarmen/tools/main/root.sh) [PASSWORD]

开设带IPV6地址的虚拟机的注意事项

由于长期闲置IPV6不使用可能导致NDP广播缓存失效重置,一般闲置50分钟左右就会出现IPV6不可用的情况,俗称“IPV6断流”,此时需要设置一个定时任务

shell
echo '*/1 * * * * curl -m 6 -s ipv6.ip.sb || curl -m 6 -s ipv6.ip.sb' | crontab -

在开设出的虚拟机中执行上述命令,可保证IPV6网络一直被使用,不会失效断流

开设虚拟机可使用的镜像

  • 已预安装开启cloudinit
  • 开启SSH登陆
  • 预设置SSH监听V4和V6的22端口
  • 开启允许密码验证登陆
  • 开启允许root登陆
  • 部分预安装Qemu-guest-agent
  • 系统支持:
    • x86_64架构的详见 pve_kvm_imageskvm_images 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种
    • arm架构的详见 ubuntudebian 中列出的系统,使用时只需要写系统名字+系统版本号,如ubuntu20、ubutnu22、debian11、debian12这种

单独开设NAT的虚拟化的虚拟机

  • 自动开设NAT服务器,默认使用Debian10镜像,因为该镜像占用最小
  • 可在命令中自定义需要使用的镜像,这里有给出配置好的镜像,镜像自带空间设置是2~10G硬盘,日常使用至少10G以上即可,除非某些镜像开不起来再增加硬盘大小
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 自定义内存大小推荐512MB内存
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloud-init配置好网络以及登陆信息,大概需要5分钟
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是/64的子网

使用方法

TIP

注意这里的用户名不能是纯数字,会造成cloudinit出问题,最好是纯英文或英文开头

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm.sh -o buildvm.sh && chmod +x buildvm.sh

各参数含义

shell
# ./buildvm.sh VMID 用户名 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6地址(留空默认N)

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

测试示例

shell
./buildvm.sh 111 root oneclick123 1 512 10 40001 40002 40003 50000 50025 debian11 local N

开设完毕可执行cat vm111查看信息,或到WEB端对应VM的NOTES中查看

以下为开设的示例VM的信息:

属性
VMID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小10G
SSH端口40001
80端口40002
443端口40003
内外网映射端口一致的区间50000到50025
系统debian11
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

删除指定虚拟机

  • 停止VM
  • 删除VM
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应VMID的虚拟机,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个VMID即可,可一次性删除多个

批量开设NAT的虚拟化的虚拟机

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成VM
  • 自动开设NAT服务器,选项留空默认使用debian11镜像,可自定义使用镜像名字,支持的系统名字详见上文支持的镜像列表
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部的cloudinit配置好网络以及登陆信息,大概需要5分钟,每个虚拟机创建之间有间隔等待60秒避免突发性能不足
  • 默认批量开设的虚拟机网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 虚拟机的相关信息将会存储到WEB端对应VM的NOTES中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_vm.sh -o create_vm.sh && chmod +x create_vm.sh && bash create_vm.sh

开设完毕可执行cat vmlog查看信息,或到WEB端对应VM的NOTES中查看

删除所有虚拟机

  • 删除所有VM
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
for vmid in $(qm list | awk '{if(NR>1) print $1}'); do qm stop $vmid; qm destroy $vmid; rm -rf /var/lib/vz/images/$vmid*; done
+    
Skip to content
- +service netfilter-persistent restart

即可,但这会导致宿主机丧失开设非独立IPV4地址的NAT的虚拟机/容器的能力,慎重执行

执行后你只能开设独立IPV4地址的虚拟机了。

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际虚拟机仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应虚拟机编号的V6地址绑定到虚拟机上
  • 系统的相关信息将会存储到对应的虚拟机的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_onlyv6.sh -o buildvm_onlyv6.sh && chmod +x buildvm_onlyv6.sh

各参数含义

shell
# ./buildvm_onlyv6.sh VMID 用户名 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

TIP

注意这里的密码最好仅英文与数字混合,且以英文开头,避免密码在设置过程中因为特殊字符被转义而设置失败

创建示例

shell
./buildvm_onlyv6.sh 152 root oneclick123 1 1024 10 debian12 local

上述命令意义为开设一个纯IPV6地址的虚拟机

参数
VMID152
用户名root
密码oneclick123
CPU1核
内存1024MB
硬盘10G
系统debian12
存储盘local

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

+ \ No newline at end of file diff --git a/guide/pve/pve_lxc.html b/guide/pve/pve_lxc.html index f33365cc29..fcec0f1455 100644 --- a/guide/pve/pve_lxc.html +++ b/guide/pve/pve_lxc.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,7 +22,7 @@ -
Skip to content

LXC容器

WARNING

如果你需要在一台服务器上开启超过200个LXC容器,那么不推荐你使用本项目,可能会出现lxcfs访问漂移的问题,产生IO占用无法释放。(系lxc原生问题无法修复)

开设LXC容器可使用的镜像

x86_64:

自动修补镜像:https://github.com/oneclickvirt/lxc_amd64_images/blob/main/all_images.txt

TIP

每日自动拉取进行编译和修补

手动修补镜像: https://github.com/oneclickvirt/pve_lxc_images/blob/main/all_images.txt

TIP

其中的部分镜像有缺陷,不保证所有PVE可用,名字为 ubuntu16.04debian6centos7opensuse42.2opensuse42.3 非必要不要使用。

执行pveam available --section system查看官方可用的系统名字和版本号

优先级:自修补镜像(Proxmox-VE 5及其以下版本不支持) > 官方默认镜像(都支持)

已通过脚本自动识别版本使用对应镜像

arm:

https://github.com/oneclickvirt/lxc_arm_images/blob/main/all_images.txt

可在上面的文件中查看支持的系统,其中列出的debian和ubuntu系统不要使用里面的别名,使用数字代号即可。

TIP

系统参数一律是小写的系统名字拼接版本号,如:debian11,ubuntu22等。 (自修补镜像支持一些偏门系统,如 centos6、centos7、debian8、debian9 等)

所有系统的CT默认用户名是root

TIP

当然有时候会存在特殊情况,version可能是current/base,此时系统参数仅使用英文系统名字即可,如 archlinux、gentoo、kali。

单独开设LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 自动开设NAT服务器,默认使用Debian11镜像,也可自定义系统
  • 自动进行内外网端口映射,含22,80,443端口以及其他25个内外网端口号一样的端口
  • 生成后需要等待一段时间虚拟机内部配置好网络以及登陆信息,大概需要3分钟
  • 默认开设的网络配置为:22,80,443端口及一个25个端口区间的内外网映射
  • 可自定义开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 可在命令中指定存储盘位置,默认不指定时为local盘即系统盘,可指定为PVE中显示的挂载盘
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct.sh -o buildct.sh && chmod +x buildct.sh

各参数含义

shell
# ./buildct.sh CTID 密码 CPU核数 内存 硬盘 SSH端口 80端口 443端口 外网端口起 外网端口止 系统 存储盘 独立IPV6(默认为N)

测试示例

shell
./buildct.sh 111 oneclick123 1 512 5 20001 20002 20003 30000 30025 debian11 local N

开设完毕可执行cat ct111查看信息,或在web端的NOTES查看

以下为开设的示例CT的信息:

属性
CTID111
SSH登录的用户名root
SSH登录的密码oneclick123
CPU核数1
内存大小512MB
磁盘大小5G
SSH端口20001
80端口20002
443端口20003
内外网映射端口一致的区间30000到30025
系统debian11
宿主机的存储盘local
IPV6

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

自定义删除指定容器

  • 停止CT
  • 删除CT
  • 删除端口映射
  • 重启网络
  • 删除log文件

下载脚本

国际

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

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/pve_delete.sh -o pve_delete.sh && chmod +x pve_delete.sh

使用方法

可以删除对应CTID的容器,这里用上文中的示例111做演示

shell
./pve_delete.sh 111

实际删除数量不固定,空格分隔每个CTID即可,可一次性删除多个

批量开设NAT的LXC虚拟化的CT

WARNING

初次使用前需要保证当前PVE纯净且宿主机未进行过任何端口映射,否则设置冲突可能出现BUG

TIP

开设前请使用screen挂起执行,避免批量开设时间过长,SSH不稳定导致中间执行中断

  • 可多次运行批量生成CT容器,但需要注意的是宿主机内存记得开点swap免得机器炸了开SWAP点我跳转
  • 每个容器创建之间有间隔等待60秒避免突发性能不足
  • 可自定义批量开设的核心数,内存大小,硬盘大小,使用宿主机哪个存储盘,记得自己计算好空闲资源开设
  • 开设的CT默认已启用SSH且允许root登陆,且已设置支持使用docker的嵌套虚拟化
  • 容器的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看
  • 如果宿主机自带IPV6子网将自动附加上IPV6网络,但无公网IPV6地址
  • 可选择是否开启独立IPV6,需要宿主机至少有一个/104的子网,最好是一个/64子网

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/create_ct.sh -o create_ct.sh && chmod +x create_ct.sh && bash create_ct.sh

开设完毕可执行cat ctlog查看信息,或在web端的NOTES查看

删除所有CT

  • 删除所有CT
  • 删除所有nat的端口映射
  • 重启网络
  • 删除log文件
shell
pct list | awk 'NR>1{print $1}' | xargs -I {} sh -c 'pct stop {}; pct destroy {}'
+    
Skip to content
- +iptables-save > /etc/iptables/rules.v4

开设纯IPV6地址的虚拟机

前提是宿主机给的是IPV6子网而不是单独一个IPV6地址,且宿主机未开启MAC地址校验

自动选择IPV6地址无需手动指定

  • 纯IPV6指绑定的公共IPV6地址,实际容器仍旧有宿主机的IPV4网络但无外网IPV4端口
  • 自动检测可用的IPV6区间,对应容器编号的V6地址绑定到容器上
  • 系统的相关信息将会存储到对应的容器的NOTE中,可在WEB端查看

使用方法

下载脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildct_onlyv6.sh -o buildct_onlyv6.sh && chmod +x buildct_onlyv6.sh

各参数含义

shell
# ./buildct_onlyv6.sh CTID 密码 CPU核数 内存大小以MB计算 硬盘大小以GB计算 系统 存储盘

创建示例

shell
./buildct_onlyv6.sh 152 oneclick123 1 1024 10 debian13 local

上述命令意义为开设一个纯IPV6地址的容器

属性
容器类型CT
CTID152
用户名root
密码oneclick123
CPU核心数1
内存1024MB
硬盘10G
系统debian13
存储盘local盘 (系统盘)

TIP

注意这里的CTID仅可使用100到256,其他数字不可用

+ \ No newline at end of file diff --git a/guide/pve/pve_macos.html b/guide/pve/pve_macos.html index 8637d428f9..352ebfe073 100644 --- a/guide/pve/pve_macos.html +++ b/guide/pve/pve_macos.html @@ -9,12 +9,12 @@ - + - - + + - + @@ -23,7 +23,7 @@ -
Skip to content

开设MacOS虚拟机

前置需求

系统和硬件配置要求 --> 检测环境

只有检测环境检测出宿主机支持KVM嵌套虚拟化时,才可以开设MACOS虚拟机,否则会被硬件识别无法开设。

前置环境设置

  • 自动识别 CPU 类型(AMD 或 Intel),并根据类型设置嵌套虚拟化参数。
  • 修改 GRUB 启动参数,启用 IOMMU 和禁用默认 framebuffer。
  • 添加 VFIO 模块支持,便于直通硬件设备。
  • 黑名单声卡和显卡驱动模块,避免与 macOS 冲突。
  • 配置 KVM 相关内核参数,忽略 MSR 错误,提高兼容性。
  • 修补 Proxmox 前端状态检测逻辑,绕过状态限制。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/extra_scripts/configure_macos.sh -o configure_macos.sh && chmod +x configure_macos.sh && bash configure_macos.sh

执行成功后会显示15秒后重启本机,这是正常的流程,不重启无法使得内核参数生效。

系统镜像下载

  • 所有镜像已预装组件,体积较大(最小约4.9GB),下载与解压任务将后台挂起执行。
  • 镜像为完整系统含所有组件,无需联网即可引导使用。
  • 若系统盘空闲空间不足镜像大小的2倍,将拒绝下载。
  • 镜像为7z压缩格式,下载后需解压才能使用。
  • 可随时查看当前下载与解压任务状态,完成后方可创建虚拟机。

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/install_macos_images.sh -o install_macos_images.sh && chmod +x install_macos_images.sh && bash install_macos_images.sh

shell
bash install_macos_images.sh

后台下载任务挂起执行后,可关闭SSH窗口,等待半小时到3个小时(具体等待时间取决于你的服务器带宽大小和连通性),下载iso的7z压缩包。

下载任务执行完毕后,查询显示当前下载任务为空时,就可以选择解压任务执行了,解压挂起执行等待的时间取决于你的服务器CPU性能。

当解压任务执行完毕,查询显示当前解压任务为空时,一切准备工作就算准备好了。

相同类型的任务可以并发,也可以随时取消某个任务,取消时需要输入PID的值。

通过 https://github.com/oneclickvirt/macos 制作的目前支持的镜像压缩包:

# 按系统发布时间从旧到新
+    
Skip to content
- +sequoia.iso.7z (大小: 15.02GB)

MACOS虚拟机模板设置

  • 系统high-sierramojavecatalina需要至少2核4G内存40G硬盘进行开设
  • big‑sur及更新版本的MACOS系统需要至少6核6G内存50G硬盘进行开设
  • 系统版本越新(下载的序号越靠后)所需的硬件就越多
  • 所有镜像均为启动盘镜像,未设置任何个人数据,所以关于硬盘分配,登录信息设置,网络设置都需要后续按照说明手动设置
  • 需要手动在web端启动虚拟机,启动前可以查看所有模板是否符合预期再启动

下载模板脚本

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/buildvm_macos.sh -o buildvm_macos.sh && chmod +x buildvm_macos.sh

参数含义

shell
# ./buildvm_macos.sh VMID CPU核数 内存 硬盘 SSH端口 VNC端口 系统 存储盘 独立IPV6(留空默认N)

TIP

这块的硬盘大小只是你开设的虚拟机的硬盘大小,实际开设过程中,程序还会挂载引导盘和系统镜像,所以实际开设一个虚拟机的硬盘需求是 虚拟机硬盘大小+镜像本体大小+引导盘大小(500MB) 请时刻注意你的硬盘空间是否足够开设虚拟机

示例命令

以最旧的版本(high-sierra)为例,实验支持的配置如下(非常卡顿)

shell
./buildvm_macos.sh 100 2 4096 45 44022 45901 high-sierra local N

模板开设完毕可执行cat vm100查看信息,或到WEB端对应VM的NOTES中查看

TIP

如果你不是通过本项目在Debian上安装的PVE,而是直接使用的官方ISO安装的PVE,且没有合并local和local-lvm分区,或者local分区未启用支持虚拟机磁盘类型,那么上面的一键命令中的local请改成local-lvm,需要使用支持虚拟机磁盘的分区进行虚拟机创建

以下为开设的示例VM的信息:

属性
VMID100
CPU核数2
内存大小4096MB
磁盘大小45G
SSH端口44022
VNC端口45901
系统high-sierra
宿主机的存储盘local
绑定独立IPV6(留空默认N)N

TIP

注意这里的VMID仅可使用100到256,其他数字不可用

MACOS系统引导和安装

前面的流程走完后,面板端可以看到一个灰色的虚拟机待启动

mac0

点击启动后,进入VNC面板,左侧选择框有一个全屏按钮,实际操作时建议全屏操作,避免分辨率问题

mac00

经过大概3分钟的引导盘加载后,屏幕中央靠左侧会显示有一个启动盘可用,直接点击或回车

然后又是大概3~5分钟的启动盘加载后,会出现四个选择框,选择Disk Utility点击进入

mac1

进入后可以看到有三个盘和一个镜像,找到那个盘大小大于40G且名字叫QEMU HARDDISK Media的盘,点击Erase

mac2

此时会出现一个弹窗,需要给name重命名为macos方便后续识别使用,然后点击Erase继续初始化

mac3

初始化完毕后,点击Done

mac4

此时需要退出Disk Utility界面,右上角点击Disk Utility选择Quit Disk Utility退出当前选择框

mac5

然后回到了之前那四个选择框那里,选择Install macOS XXXX(由于我在以Big Sur为示例安装,所以XXXX为Big Sur系统),点击continue

mac6

后续就是继续点击continue,然后点击Agree,然后又是点击Agree

mac7

mac8

mac9

直到又出现那三个盘,但在这块可以那个盘大小大于40G且名字叫macos的盘,选择它,然后点击continue

mac10

一段时间的文件复制硬盘加载(大概跑个12分钟)后,正式进入系统安装环节,这块看你宿主机在哪个地区选哪个

mac11

选择完地区后一路点击continue

mac12

mac13

直到出现数据迁移选项Migration Assistant,选择左下角的Not Now不导入用户数据

mac14

然后就会提示你创建用户,填写用户名和账户名,还有登录所需的密码,设置完毕后点击continue

mac15

然后后面就会一路畅通点击continue,直到系统安装完毕了

网络配置

由于是离线环境进行的系统安装,所以这块需要手动配置静态网络连接宿主机的网桥

右上角点击WIFI按钮,关闭WIFI后,点击Network Preferences ...

mac16

进入设置界面后,点击Advanced按钮,进入高级设置界面

mac17

TCP/IP这一栏填写静态网络配置

Configure IPV4: Manually

IPV4 Address: 172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

Subnet Mask: 255.255.255.0

Router: 172.16.1.1

如果你需要配置IPV6网络,类比上面的IPV4设置,需要填写的会是虚拟机绑定的公网IPV6地址(PVE面板中的Note框有写),子网掩码填128,默认网关填写cat /usr/local/bin/pve_check_ipv6在宿主机执行后显示的地址。

mac18

DNS这一栏填写静态网络的DNS配置

一般加入8.8.8.81.1.1.1足够了,中国境内使用114.114.114.114即可。

mac19

填写完毕且apply后,设置的左上角会显示网络已连通

mac20

此时打开默认的浏览器,随便打开一个网址,都是可访问公网资源的,证明网络已配置成功

mac21

卸载iso镜像

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

Macos系统就是卸载opencore.isoxxxx(安装使用的系统镜像).iso,类似上面示例图片的Windows系统卸载win镜像和virtio镜像一样。

+ \ No newline at end of file diff --git a/guide/pve/pve_precheck.html b/guide/pve/pve_precheck.html index 9eb7cb719e..5267e50be3 100644 --- a/guide/pve/pve_precheck.html +++ b/guide/pve/pve_precheck.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,10 +22,10 @@ -
Skip to content

前言

以下为非自定义部分的介绍,自定义部分有自己对应的介绍,勿弄混了

如果有未适配的商家或机器欢迎联系@spiritlhl_bot,有空会尝试支持一下

WARNING

会改变宿主机的网络结构,请保证宿主机随时可重置系统,且运行前无重要数据在宿主机上。

欢迎给项目一个Star进行免费的支持-->https://github.com/oneclickvirt/pve

各种要求

建议debian在使用前尽量使用最新的稳定版本的系统

警告:一键安装PVE仅支持具有独立公网IPv4地址的服务器

本项目依赖固定的 IPV4 地址进行网络分配,不支持以下情况:

  • 动态 IPV4 的环境(如机器重启后 IP 会变更的服务器)
  • 无独立的公网 IPV4 的环境(如通过家庭路由器 NAT 上网,需 DHCP 获取地址的情况)

如您的服务器不具备可分配的公网固定 IPv4 地址,请勿使用本项目。

本项目的一键安装脚本只适配Debian系统,非Debian无法通过APT源安装,官方只给了Debian的镜像,其他系统只能使用ISO安装,或使用自定义分区和常见问题分区中的其他方式解决问题。

  • 系统要求:Debian 8+

TIP

建议debian12+而不是debian11,debian11在部分独立服务器上有网络重启的BUG。

  • 硬件要求:2核2G内存x86_64arm架构服务器硬盘至少20G
  • 可开KVM的硬件要求:VM-X或AMD-V支持 (部分VPS和全部独服支持)
  • 如果硬件或系统需求不满足,可使用incus批量开LXC容器跳转

如果使用IPV6隧道进行宿主机的IPV6子网附加,务必在PVE安装成功但网关未自动设置时在对应文件添加内容,不要在一开始(未安装PVE)就进行IPV6隧道的添加。

警告:如果宿主机是独立服务器无IPMI自己无法重装系统的,不要使用本脚本,请直接委托技术人员手动ISO安装PVE,不要使用本项目,否则可能造成失联(部分独立服务器的网络设置不支持热插拔)

开设虚拟内存(SWAP)(非必须的可选项)

TIP

内存开点swap免得机器炸了,如果你的宿主机内存不够用硬盘又很多空闲的话

单位换算:输入 1024 产生 1G SWAP-虚拟内存,虚拟内存占用硬盘空间,当实际内存不够用时将自动使用虚拟内存做内存使用,但随之带来IO高占用以及CPU性能占用

参考本组织相关项目的说明 跳转 这块开设虚拟内存的大小

物理内存大小推荐 SWAP 大小
≤ 2G内存的 2 倍
2G < 内存 ≤ 8G等于物理内存大小
≥ 8G约 8G 即可
需要休眠 (hibernation)至少等于物理内存大小

以上数值仅为推荐设置,实际数值请按照自身需求来,不要盲目照抄数值

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh

检测环境

  • 本项目相关脚本执行前务必执行本脚本检测环境,如果不符合安装PVE的要求则无法使用后续的脚本
  • 检测本机IPV6的网络配置情况(有无IPV6都可安装,只是查询一下罢了)
  • 检测硬件配置是否满足最低要求
  • 检测硬件环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 检测系统环境是否可嵌套虚拟化KVM类型的服务器,不可嵌套虚拟化KVM的也可以开QEMU的TCG的服务器,性能较差
  • 不可嵌套虚拟化KVM的服务器不推荐安装PVE,不如使用incus性能更好

国际

bash
bash <(wget -qO- --no-check-certificate https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

国内

bash
bash <(wget -qO- --no-check-certificate https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh)

如果你需要更新IPV6信息再查询,那么执行以下命令后再查询

bash
rm -rf /usr/local/bin/pve_ipv6*
+    
Skip to content
- +rm -rf /usr/local/bin/pve_last_ipv6*

执行本项目的检测环境的命令,展示如下

图片

查询如上的只需使用下面的一键脚本自动创建虚拟机即可,无需手动再修改WEB端设置

图片

查询如上的在使用后续脚本创建了虚拟机后,可能需要手动修改WEB端设置,需要关闭对应每个虚拟机的硬件嵌套虚拟化,如下图

图片

先停止虚拟机再修改,修改完后再开机才能使用NOVNC,不关闭可能导致这个虚拟机有BUG无法使用

如果强行安装PVE开KVM,启动不了的也可以关闭这个选项试试能不能启动虚拟机,导致这些问题的原因就是上面说的,宿主机不支持嵌套虚拟化KVM进行加速

TIP

开设虚拟机前请使用screen挂起执行,避免开设时间过长,SSH不稳定导致中间执行中断



+ \ No newline at end of file diff --git a/guide/pve/pve_qa.html b/guide/pve/pve_qa.html index 94fdbe8ea5..c67dc7721d 100644 --- a/guide/pve/pve_qa.html +++ b/guide/pve/pve_qa.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,21 +22,21 @@ -
Skip to content

解惑

执行脚本不到30秒机器就掉线了

原装系统执行

systemctl restart networking

看看是不是直接掉线,如果是那就是机器原生有问题,热插拔或者dhcp导致的网络无法自重启,此时建议更换宿主机的系统或DD一个新系统尝试

一般来说这种情况都是出现在独服的Debian11系统上,切换为Debian12系统就没问题了

安装PVE失败且报错显示某些安装包不存在

执行下述命令查询apt的源

shell
grep -r "deb " /etc/apt/sources.list /etc/apt/sources.list.d/

如果看到

deb file://
-deb cdrom:[

这种开头的行,那么证明宿主机使用的是本地源而不是网络源,需要替换/etc/apt/sources.list的源,如

图片

一样替换为网络源才可使用PVE一键安装脚本进行安装。

替换网络源

国内服务器可使用

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

国外服务器可使用

bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh) --abroad

进行apt源的替换

安装PVE成功但重启后失联

如果什么机器安装PVE成功后WEB可用,但重启失联,请安装成功PVE后,重启前执行以下命令再重启

bash
auto_interface=$(grep '^auto ' /etc/network/interfaces | grep -v '^auto lo' | awk '{print $2}' | head -n 1)
+    
Skip to content
- +cat /etc/iptables/rules.v4 | iptables-restore

检测是不是商家虚标IPV6子网大小导致无法开设独立IPV6地址的虚拟机/容器

使用以下命令在纯净的未安装ProxmoxVE的机器上测试实际的子网掩码大小

国际

shell
curl -L https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/ecs/main/archive/eo6s.sh -o eo6s.sh && chmod +x eo6s.sh && bash eo6s.sh

如果检测结果为128证明商家虚标子网大小,仅一个IPV6地址无法额外分配给虚拟机/容器。

还有一种情况,就是商家只给了权限附加,实际上没有给完整的IPV6子网到机器上,典型的如 virtfusion 这种阿三面板,需要后台一个个加IPV6的IP进去,这种情况下也无法开设。

virtfusion的客服对于这种情况的说明:

您获得的所有IPv6地址块均为1个/64,但您需要自行将它们一个个添加并路由到VPS。
+添加1个IPv6地址后,您需要ping网关(在控制面板的网络设置下),然后ping该IPv6地址,之后对添加的每个IPv6地址重复此操作。

宿主机的IPV6网段更换需要对应更新配置

需要更新三个地方:

/etc/network/interfaces

/etc/systemd/system/ndpresponder.service

/usr/local/bin/ 中的带ipv6的文件

更新完毕后,重启宿主机再进行开设,应该就可以使用新的网段了

在现有的 PVE 中纳管新的 PVE(创建 / 加入集群)

为了将两个独立的 Proxmox VE 实例组成一个集群,需满足以下前提条件:

集群前提条件

  1. 主机名唯一
    两个节点的 hostname 不可相同,避免命名冲突。建议使用诸如 pve1pve2 等命名方式。

  2. VMID 唯一
    两台 PVE 上不能存在相同 VMID 的虚拟机或容器。若存在冲突,请调整 VMID 以避免合并时发生冲突。

  3. 网络互通、延迟低
    两台主机之间必须能互相 ping 通,建议网络延迟低(局域网或高速公网),以保障集群通信质量。

创建集群(在任意节点执行)

  1. 登录主节点(如 pve1)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Create Cluster
  3. 输入集群名称(Cluster Name)。
  4. 选择要用于集群通信的网卡(如仅有公网 IP,可选择此网卡)。
  5. 点击 Create 创建集群。
  6. 创建成功后,点击 Join Information,复制该页面显示的信息备用。

PS: 在哪个节点上创建集群都可以,集群中不分主从节点。

加入集群(在第二个节点执行)

  1. 登录待加入节点(如 pve2)Web 管理界面。
  2. 依次点击:Datacenter → Cluster → Join Cluster
  3. pve1Join Information 粘贴到输入框中。
  4. 填入 pve1 上具的 root 用户密码到 Peer Password
  5. 点击 Join 开始加入过程。
  6. 等待页面提示成功后,刷新页面或重新登录,即可看到两个节点已组成集群。

集群优势

  • 集群节点间可共享资源、迁移虚拟机。
  • 互传 ISO 镜像或模板更加便捷。

目前已验证的VPS商家

可开设KVM虚拟化的NAT的商家

spartanhost 中的独立服务器的Debian12(Debian11有问题)

interserver 中的VPS或独立服务器

frantech 中的拉斯维加斯第二档

eugamehost 中的美国凤凰城黑五促销款

amhost 中的测试款

digitalocean 中的 Perminu Intel 和 Regular 4核款

skrime 中的 AMD Ryzen KVM Server 最低配款

webdock 中的 AMD KVM Server

4vps 中的 俄罗斯和希腊 测试款

adtaq 中的最低配存储KVM服务器

nocix 中的独立服务器

online.net 中的低配独立服务器的Debian12(Debian11有问题)

OVH 中的 Public Cloud 服务器 需要使用以下命令dd为纯净系统后安装

shell
bash <(curl -sSL https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh) -debian 12 -pwd 'oneclickvirt139' --network "static"

此时dd后的系统用户名为root,密码为oneclickvirt139

如果不成功,请查看 https://github.com/leitbogioro/Tools 中的issues和说明。一个常见的问题是OVH独立服务器进行dd,需要源系统默认重装为raid1的debian12,然后用参数指定dd为raid0,才能成功,使用如下命令

shell
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh && bash InstallNET.sh -debian 12  -mirror "http://ftp.debian.org/debian/" -pwd oneclickvirt139 -raid 0

只可开设LXC虚拟化的NAT的商家

腾讯云 中的无忧款和特惠款(学生机)

spectraip 中的KVM服务器

Linode 中美国专用CPU的最低配

hosthatch 中的特价高配服务器

hetzner 的cloud服务器

rackdog 的浮动IP的服务器

vultr 的Cloud普通服务器

azure 的普通机器

scaleway 中的ARM架构的服务器

aws 中的ec2实例

Google cloud platform - GCP 的 AMD 服务器

+ \ No newline at end of file diff --git a/guide/pve/pve_thanks.html b/guide/pve/pve_thanks.html index f65ea2c62a..da70459824 100644 --- a/guide/pve/pve_thanks.html +++ b/guide/pve/pve_thanks.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guide/pve/pve_windows.html b/guide/pve/pve_windows.html index 392b81dedd..68a8952965 100644 --- a/guide/pve/pve_windows.html +++ b/guide/pve/pve_windows.html @@ -9,12 +9,12 @@ - + - - + + - + @@ -23,9 +23,9 @@ -
Skip to content

通过PVE开设Windows虚拟机

开设时选择KVM虚拟化还是QEMU的TCG仿真

宿主机本身如果支持嵌套虚拟化,那么就可用hostkvm64qemu64类型的CPU

从性能上来说,host > kvm64 > qemu64

qemu类型虚拟化性能损耗很多

如果本身不支持嵌套虚拟化,那么只能用qemu64类型的CPU,且需要在启动虚拟机前修改Options[选项]中的KVM hardware virtualization[KVM硬件虚拟化]

设置为no取消Enabled[启用]的勾选

kvm

如果你实在不清楚本机是否支持嵌套虚拟化,那么查看 系统与硬件配置要求 --> 检测环境 检测确保可用(含尝试性启用功能)

它的主体逻辑在

https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pve/main/scripts/check_kernal.sh

推荐直接使用本教程中的PVE的 系统和硬件配置要求 --> 环境检测 进行一键检测,或者如下检测逻辑:

egrep -c '(vmx|svm)' /proc/cpuinfo 检测是否为1

cat /sys/module/kvm_intel/parameters/nested是否存在且为1

lsmod | grep -q kvm检测是否已加载

这些都支持的时候,选host类型才100%无问题,其他情况下使用可能存在未知报错自行尝试。

使用带virtio的iso镜像文件开设

1.下载镜像

安装需要提前下载镜像文件local(pve) --> ISO images --> Download from URL

下载链接URL:可使用

https://github.com/ILLKX/Windows-VirtIO

中的文件链接,文件名字File Name:win.iso

download

点击下载Download,下载完成后当前的页面可见win.iso的文件大小,可见格式为iso。

downloaded

2.设置模板

页面顶部右上角点击Create VM

General窗口中,Resource Pool:勾选mypoolName填写win,然后点击Next

general

OS窗口中,ISO image勾选win.isoGuest OS勾选TypeMicrosoft Windows类型,Version选择当前ISOwin的版本,示例下载是2022,就选11/2022类型,然后点击Next

OS

System窗口中,Graphic card勾选VirtIO-GPU类型,Machine勾选q35类型,SCSI Controller勾选VirtIO SCSI类型,BIOS勾选Default (SeaBIOS)类型,然后点击Next

system

Disk窗口中,Cache勾选Write Back类型,Disk size (GiB)填写你要分配的硬盘大小,一般不小于20Storage选择存储在哪个盘,示例只有系统盘local所以就选loacl,然后点击Next

disk

CPU窗口中,Cores填写所需核数,CPU类型按照前面描述的方法选择,然后点击Next

cpu

Memory窗口中,Memory (MiB)填写所需内存大小,然后点击Next

memory

Network窗口中,Bridge勾选vmbr1类型,Model勾选VirtIO (paravirtualized)类型,Firewall取消勾选,然后点击Next

Network

Confirm窗口中,点击Finish

finish

3.图形化配置安装

左侧点击设置好的模板,右上角点击Start启动虚拟机,然后点击Console进入VNC界面,等待操作系统启动。

console

然后在VNC中点击下一页,然后点击现在安装,然后点击我没有产品密钥,然后勾选接受许可,点击下一页,然后勾选自定义安装

win0

win1

win2

win3

win4

然后如果镜像本身带virtio,那么应该可见可选系统存储的硬盘及其大小,选中后点击下一页

win5

win6

然后等待系统安装,应该会自动重启几次,大概耗时10分钟以上。

win7

安装完成后首次登录会要求设置密码,正常设置即可

win8

设置完成后,NOVNC页面左侧有一个弹出框,点击第一个按钮,然后根据登录提示,点击Ctrl+Alt+最后一个按钮,进入登录页面。

4.初始化网络

由于通过本项目设置的PVE是静态网络,所以登陆后需要手动修改绑定的IP地址,不通过DHCP

在桌面右下角右击点出打开 网络和Internet设置,点击后,在弹出的设置页面中点击更改适配器设置

win9

然后在网络链接中勾选以太网,点击更改此连接的设置

win10

在弹出框中点击Internet协议版本4(TCP/IPV4)选中后点击属性

win11

在新弹出的弹出框中,选择并点击使用下面的IP地址(s),然后分别填入

IP地址(I):172.16.1.xxx(xxx换成你想绑定的ip,我的vmid是100,为了方便写了100)

子网掩码(U):255.255.255.0

默认网关(D):172.16.1.1

然后选择点击使用下面的DNS服务器地址(E),分别填入

8.8.8.8
-144.144.144.144

然后右下角点击确定,注意不要勾选退出时验证

win12

然后其他弹出框都选确定就行了,然后本虚拟机就有网络了。

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用不带virtio的iso镜像开设

1.下载镜像

无virtio的win镜像下载可使用

https://github.com/ILLKX/Windows

这块的镜像

virtio的iso镜像可使用

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/

下载

virtio也可以只下载msi包,本地用软件打包成iso压缩格式再本地上传到ProxmoxVE中也可以

这样的话包小一些,前者官方的是包含所有WIN镜像支持的包总计500MB左右,后者自己打包5MB左右

2.virtio导入

注意这里的导入在ProxmoxVE的8.x及之后的版本中,OS这一栏默认可选择virtio启动加载,如图所示

virtio

而在更低版本的ProxmoxVE中,比如7.x和6.x的版本,OS这一栏默认无法选择virtio启动加载

lower

需要手动在Hardware[硬件]中点击Add[添加]添加CD/DVD Drive选择下载好的virtioISO文件

lower

然后其他的一切照常,直到

nodisk

这块找不到硬盘,需要选择加载驱动程序

nodisk

然后选择驱动盘virtio的,点击打开,从amd64那导入对应系统名字的驱动

nodisk

我的是windows server 2019的镜像所以导入的是2k19的驱动,导入完毕后选择导入的驱动,点击下一页

nodisk

nodisk

这样就能看得到硬盘了,选中后继续后续的安装步骤,选中后继续后续的安装步骤如同前面的教程,直到系统安装完毕,进入桌面。

3.通过virtio-win-guest-tools安装驱动

此时安装成功,出现桌面后,还需要手动安装驱动

打开VirtIO驱动所在的CD光驱目录,最下面有一个virtio-win-guest-tools程序,会安装用到的virtio驱动,这个驱动也会包含virtio的网卡驱动

wk

wk

wk

点击安装完毕后就安装上网卡驱动了,后续网络设置参考前面的初始化网络的教程

4.安装网卡驱动(备选)

此时安装成功,出现桌面后,还需要手动安装网卡驱动才能连通网络:

  1. 打开 控制面板设备管理器
  2. 找到 以太网控制器,右键选择 更新驱动程序
  3. 选择 浏览我的计算机以查找驱动程序软件 (R)
  4. 浏览到VirtIO驱动所在的CD光驱目录
  5. 打开其中的 NetKVM 文件夹
  6. 根据当前系统版本选择对应的驱动文件夹(和上面相同的操作,我会选择2k19文件夹,里面的amd64驱动)
  7. 确认安装,完成后即可成功加载VirtIO的网卡驱动

wk

wk

wk

后续网络设置参考前面的初始化网络的教程

5.取消CD盘挂载

在ProxmoxVE的web端手动在Hardware[硬件]中点击对应的CD选择Remove[删除]然后再重启虚拟机,这样就能直接使用了

wk

使用的旧的win镜像只有IE浏览器

自行在IE浏览器中输入

https://www.microsoft.com/zh-cn/edge/download

进行下载

由于IE浏览器不默认添加证书白名单,会有一系列弹窗,点击添加域名,添加后保存,才能真正进入对应的页面显示下载按钮点击下载

又由于默认老系统没有webview2组件,提示下载需要额外下载安装组件后才能正常使用现代浏览器

https://learn.microsoft.com/zh-cn/answers/questions/3866296/msvcp140-dll

某些旧镜像无法运行程序,提示报错MSVCP140这个dll缺失,需要访问上述地址下载安装相应的C++运行时依赖

- +
Skip to content
+ \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 7463547178..928c678310 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"case_case1.md":"BkNyEjyq","case_case2.md":"D7kWT-NZ","case_case3.md":"BGFYk11b","case_case4.md":"BKl5HH1A","case_case5.md":"C9Hkf8fm","case_case6.md":"DJPhPJrF","case_case7.md":"DVSYzN_4","case_index.md":"VmbMjto7","developer_index.md":"Hpvd8MTL","developer_l10n.md":"BE5vrtKH","en_developer_index.md":"DA-GdzIh","en_developer_l10n.md":"D910-W63","en_guide_block_block_docker.md":"BsVLR5tO","en_guide_block_block_incus.md":"5Wn3yArP","en_guide_block_block_iptables.md":"wCBeHSMT","en_guide_block_block_lxd.md":"WTGwz_VC","en_guide_block_block_pve.md":"BHDS8Khx","en_guide_containerd_containerd_build.md":"DQwxZG0R","en_guide_containerd_containerd_install.md":"DdY95TOF","en_guide_containerd_containerd_precheck.md":"0wSyDPbw","en_guide_containerd_containerd_qa.md":"D42OkEJX","en_guide_containerd_containerd_thanks.md":"BtZSrBbC","en_guide_dashboard.md":"Dj9blBWx","en_guide_dashboardq.md":"DDyuylV5","en_guide_docker_docker_android.md":"DkafNdh_","en_guide_docker_docker_build.md":"CCbKzKAh","en_guide_docker_docker_custom.md":"CLqEZu-z","en_guide_docker_docker_install.md":"Dg0jEf_z","en_guide_docker_docker_macos.md":"BW5cJ7CP","en_guide_docker_docker_precheck.md":"_EARYSlQ","en_guide_docker_docker_qa.md":"84Eubfu_","en_guide_docker_docker_thanks.md":"CercwUPI","en_guide_docker_docker_windows.md":"DOkUGTOv","en_guide_incus_incus_custom.md":"BvOwR9yS","en_guide_incus_incus_extra_config.md":"Dp3fBZKT","en_guide_incus_incus_install.md":"B8Wed1_H","en_guide_incus_incus_lxc.md":"DrEuefPO","en_guide_incus_incus_precheck.md":"Ckl7PFsr","en_guide_incus_incus_qa.md":"P4UmWQEI","en_guide_incus_incus_qemu.md":"BqEmO0PA","en_guide_incus_incus_thanks.md":"BWXAYkPF","en_guide_incus_incus_windows.md":"CG6RVzg2","en_guide_lxd_lxd_custom.md":"DVmNiIau","en_guide_lxd_lxd_extra_config.md":"Ddc8nbud","en_guide_lxd_lxd_install.md":"yduQKhy1","en_guide_lxd_lxd_lxc.md":"BY8Stcml","en_guide_lxd_lxd_precheck.md":"DSjNf6kH","en_guide_lxd_lxd_qa.md":"DqghSlNz","en_guide_lxd_lxd_qemu.md":"Cks1_4zJ","en_guide_lxd_lxd_thanks.md":"D8uhyy3i","en_guide_lxd_lxd_windows.md":"wAMCEdnx","en_guide_oneclickvirt_oneclickvirt_install.md":"CxoE6wYv","en_guide_oneclickvirt_oneclickvirt_precheck.md":"DkRfggVQ","en_guide_oneclickvirt_oneclickvirt_qa.md":"DGrQtLLQ","en_guide_oneclickvirt_oneclickvirt_thanks.md":"BZDqTjl9","en_guide_oneclickvirt_oneclickvirt_usage.md":"DOrER2az","en_guide_podman_podman_build.md":"C_43Orab","en_guide_podman_podman_install.md":"B9wNVd_o","en_guide_podman_podman_precheck.md":"Bq_n2Sge","en_guide_podman_podman_qa.md":"BPJJEAHk","en_guide_podman_podman_thanks.md":"CImpy_u-","en_guide_pve_images_readme.md":"97RFG-CG","en_guide_pve_pve_android.md":"yoFL8Xty","en_guide_pve_pve_custom.md":"DMTzM6ai","en_guide_pve_pve_install.md":"CYQ4ijbc","en_guide_pve_pve_kvm.md":"aJ5jU-2g","en_guide_pve_pve_lxc.md":"DDRD6LMP","en_guide_pve_pve_macos.md":"BqWDs-pN","en_guide_pve_pve_precheck.md":"D-gVsGB_","en_guide_pve_pve_qa.md":"CZudjDP3","en_guide_pve_pve_thanks.md":"BYc4eCgn","en_guide_pve_pve_windows.md":"nzEI2uVe","en_incomplete_bashvm.md":"B7Y_cvFp","en_incomplete_cockpit.md":"DCpKTS7w","en_incomplete_convoy.md":"Uri2ipsZ","en_incomplete_index.md":"ROTpedW8","en_incomplete_pterodactyl.md":"DfF3WZHL","en_incomplete_virtfusion.md":"CVteYwBX","en_incomplete_virtualizor-docker.md":"DHYC54sl","en_incomplete_webvirtcloud.md":"DVqrZ1Rb","en_incomplete_webvirtcloud_retspen.md":"BdNwnRZf","en_incomplete_webvirtmgr.md":"ByGC7MIC","en_index.md":"5EfnhCNh","guide_block_block_docker.md":"DO91YDdH","guide_block_block_incus.md":"D0lVhDxA","guide_block_block_iptables.md":"ChFFJPHH","guide_block_block_lxd.md":"CX2Rj6-w","guide_block_block_pve.md":"DEJAOrSy","guide_containerd_containerd_build.md":"DAYV_IX6","guide_containerd_containerd_install.md":"DfvdP_aC","guide_containerd_containerd_precheck.md":"NHg5HVsg","guide_containerd_containerd_qa.md":"CeB3tJNK","guide_containerd_containerd_thanks.md":"CDt96ddx","guide_dashboard.md":"BbordXN5","guide_dashboardq.md":"NJNDlMTa","guide_docker_docker_android.md":"7oUVq29z","guide_docker_docker_build.md":"CaFusQnP","guide_docker_docker_custom.md":"DLz-IfHe","guide_docker_docker_install.md":"CvJp_NTo","guide_docker_docker_macos.md":"BxM3fUyM","guide_docker_docker_precheck.md":"Bnjd4dU1","guide_docker_docker_qa.md":"PKDeHpSh","guide_docker_docker_thanks.md":"BEt3j9gt","guide_docker_docker_windows.md":"BYgcyuZP","guide_incus_incus_custom.md":"DdIqjxSp","guide_incus_incus_extra_config.md":"CEtpHMfg","guide_incus_incus_install.md":"_wqLKMk5","guide_incus_incus_lxc.md":"CnWeIYpK","guide_incus_incus_precheck.md":"D8FB1RBW","guide_incus_incus_qa.md":"CDlLCI-6","guide_incus_incus_qemu.md":"BymVD1NU","guide_incus_incus_thanks.md":"hlzQRbAc","guide_incus_incus_windows.md":"Ct9ZgWYg","guide_lxd_lxd_custom.md":"Ci349BaV","guide_lxd_lxd_extra_config.md":"U4TsTE-I","guide_lxd_lxd_install.md":"DDEoppyq","guide_lxd_lxd_lxc.md":"CLJgXlcU","guide_lxd_lxd_precheck.md":"d0sZIJx8","guide_lxd_lxd_qa.md":"BTzSmiCi","guide_lxd_lxd_qemu.md":"RzoK4CxT","guide_lxd_lxd_thanks.md":"DH4WyT9B","guide_lxd_lxd_windows.md":"CB_XKM1R","guide_oneclickvirt_oneclickvirt_install.md":"COWAtmAH","guide_oneclickvirt_oneclickvirt_precheck.md":"BKt58UQ_","guide_oneclickvirt_oneclickvirt_qa.md":"Cs-XDd8O","guide_oneclickvirt_oneclickvirt_thanks.md":"BvqDP_nw","guide_oneclickvirt_oneclickvirt_usage.md":"DfHVt8es","guide_podman_podman_build.md":"Cw7teaxy","guide_podman_podman_install.md":"p7akONFc","guide_podman_podman_precheck.md":"Cdi5RKA1","guide_podman_podman_qa.md":"DOOZDURs","guide_podman_podman_thanks.md":"C3rMnx4s","guide_pve_images_readme.md":"Bn6mge_l","guide_pve_pve_android.md":"CM7MUU9_","guide_pve_pve_custom.md":"BXaUK71V","guide_pve_pve_install.md":"aNT2nlcA","guide_pve_pve_kvm.md":"C0lcBrsp","guide_pve_pve_lxc.md":"-aGVp3t6","guide_pve_pve_macos.md":"Biskf-FQ","guide_pve_pve_precheck.md":"DrQssrQR","guide_pve_pve_qa.md":"CE0i3bgE","guide_pve_pve_thanks.md":"CYx9bTZM","guide_pve_pve_windows.md":"DtZLGn1u","incomplete_bashvm.md":"BPKxitFB","incomplete_cockpit.md":"ESBqMLK9","incomplete_convoy.md":"ibyG8Sy2","incomplete_index.md":"B0rxzu5o","incomplete_pterodactyl.md":"FLSCdFrT","incomplete_virtfusion.md":"C7dpycXa","incomplete_virtualizor-docker.md":"C37UUw8m","incomplete_webvirtcloud.md":"C1K19L75","incomplete_webvirtcloud_retspen.md":"B87r6Z-E","incomplete_webvirtmgr.md":"pI65os4S","index.md":"Dy439T9m"} +{"case_case1.md":"B_L677aD","case_case2.md":"Bi2RYIdT","case_case3.md":"BvrVU5SJ","case_case4.md":"4Hf1xsK2","case_case5.md":"UbZQYOkk","case_case6.md":"C5orQXMk","case_case7.md":"agWU4t_A","case_index.md":"D4MQty_c","developer_index.md":"r3kwPi_t","developer_l10n.md":"G35yAdba","en_developer_index.md":"CR5JSB6R","en_developer_l10n.md":"CspEyVLR","en_guide_block_block_docker.md":"BcUATIGh","en_guide_block_block_incus.md":"wjJR3ro3","en_guide_block_block_iptables.md":"CQh9FfY4","en_guide_block_block_lxd.md":"DXvdC2Cg","en_guide_block_block_pve.md":"0KCUf4KK","en_guide_containerd_containerd_build.md":"DdPaINrC","en_guide_containerd_containerd_install.md":"DGtKJnx8","en_guide_containerd_containerd_precheck.md":"ClTA4zal","en_guide_containerd_containerd_qa.md":"BHimqcWr","en_guide_containerd_containerd_thanks.md":"Bz27py1Y","en_guide_dashboard.md":"COXDfcrB","en_guide_dashboardq.md":"D4VkqjRF","en_guide_docker_docker_android.md":"D36suc1j","en_guide_docker_docker_build.md":"4AU7pDL9","en_guide_docker_docker_custom.md":"CW9sFVv_","en_guide_docker_docker_install.md":"yeDlAOS5","en_guide_docker_docker_macos.md":"B-27DPbM","en_guide_docker_docker_precheck.md":"_chG0wUt","en_guide_docker_docker_qa.md":"974S2wwI","en_guide_docker_docker_thanks.md":"Cn6VZq0S","en_guide_docker_docker_windows.md":"3PfgRvse","en_guide_incus_incus_custom.md":"CsWNjjxG","en_guide_incus_incus_extra_config.md":"Dr1qTPcl","en_guide_incus_incus_install.md":"hdIbk1po","en_guide_incus_incus_lxc.md":"_bTip1Ub","en_guide_incus_incus_precheck.md":"DBBM44YS","en_guide_incus_incus_qa.md":"GseGoNjL","en_guide_incus_incus_qemu.md":"BgVQYDz-","en_guide_incus_incus_thanks.md":"BOhT9kDv","en_guide_incus_incus_windows.md":"CB-MXhl2","en_guide_lxd_lxd_custom.md":"BuoYFyrL","en_guide_lxd_lxd_extra_config.md":"DilF79sp","en_guide_lxd_lxd_install.md":"Dm-AP6iw","en_guide_lxd_lxd_lxc.md":"Df4IkzL_","en_guide_lxd_lxd_precheck.md":"FBOBo4eE","en_guide_lxd_lxd_qa.md":"CoAwiIE5","en_guide_lxd_lxd_qemu.md":"CWB-pXl7","en_guide_lxd_lxd_thanks.md":"DZe-0H6X","en_guide_lxd_lxd_windows.md":"D7f4OoQI","en_guide_oneclickvirt_oneclickvirt_install.md":"CpP4Nxv_","en_guide_oneclickvirt_oneclickvirt_precheck.md":"CTP4Q8vT","en_guide_oneclickvirt_oneclickvirt_qa.md":"Dq5O4kXg","en_guide_oneclickvirt_oneclickvirt_thanks.md":"DfA7zu-W","en_guide_oneclickvirt_oneclickvirt_usage.md":"CSQ0IE81","en_guide_podman_podman_build.md":"BStFWgWW","en_guide_podman_podman_install.md":"Lkx1-Z0c","en_guide_podman_podman_precheck.md":"BLEI_OBX","en_guide_podman_podman_qa.md":"Ccq4IBpf","en_guide_podman_podman_thanks.md":"Czg7rcqs","en_guide_pve_images_readme.md":"CdhBxXXN","en_guide_pve_pve_android.md":"ChwUrQct","en_guide_pve_pve_custom.md":"CQtl_dNW","en_guide_pve_pve_install.md":"B28IFOVT","en_guide_pve_pve_kvm.md":"EedGwoAp","en_guide_pve_pve_lxc.md":"A4xPAQIV","en_guide_pve_pve_macos.md":"C-ydY8bK","en_guide_pve_pve_precheck.md":"ctexfw-q","en_guide_pve_pve_qa.md":"DgIBo7yj","en_guide_pve_pve_thanks.md":"y42sMaye","en_guide_pve_pve_windows.md":"BnnPOUCS","en_incomplete_bashvm.md":"7tk-ZEu5","en_incomplete_cockpit.md":"aU_2U-XH","en_incomplete_convoy.md":"BnLEXvtr","en_incomplete_index.md":"CMWZwnav","en_incomplete_pterodactyl.md":"DuCiAjw4","en_incomplete_virtfusion.md":"7zslYcjH","en_incomplete_virtualizor-docker.md":"CYmV5ays","en_incomplete_webvirtcloud.md":"6vLBPYN0","en_incomplete_webvirtcloud_retspen.md":"NfY8LdF5","en_incomplete_webvirtmgr.md":"DdlBuLO9","en_index.md":"BrEPoFob","guide_block_block_docker.md":"Ch6FJWSI","guide_block_block_incus.md":"DrzhoJQy","guide_block_block_iptables.md":"Dx4FHQiC","guide_block_block_lxd.md":"bAOyt_Yn","guide_block_block_pve.md":"D9jjCIrc","guide_containerd_containerd_build.md":"DeyNG5NW","guide_containerd_containerd_install.md":"DpBuC67s","guide_containerd_containerd_precheck.md":"DQrDdUYj","guide_containerd_containerd_qa.md":"DweiiNoU","guide_containerd_containerd_thanks.md":"B8ocld4Z","guide_dashboard.md":"5DkCRi2q","guide_dashboardq.md":"Dywt66cz","guide_docker_docker_android.md":"DaSSuPZa","guide_docker_docker_build.md":"Bqjx65p4","guide_docker_docker_custom.md":"MBT0wSpc","guide_docker_docker_install.md":"BLH4X-Np","guide_docker_docker_macos.md":"H8XECkrb","guide_docker_docker_precheck.md":"FwVDrBjS","guide_docker_docker_qa.md":"B8nIoB11","guide_docker_docker_thanks.md":"BRma5Ogy","guide_docker_docker_windows.md":"CyUC6-x6","guide_incus_incus_custom.md":"CwQ9DXPv","guide_incus_incus_extra_config.md":"CJzw0Jvq","guide_incus_incus_install.md":"Dzu8xto4","guide_incus_incus_lxc.md":"B9bz-wqX","guide_incus_incus_precheck.md":"B7EicS4v","guide_incus_incus_qa.md":"CQnLz1cg","guide_incus_incus_qemu.md":"DEvirL6X","guide_incus_incus_thanks.md":"D1W1P5MD","guide_incus_incus_windows.md":"DDdBCbEm","guide_lxd_lxd_custom.md":"D7SlIu6J","guide_lxd_lxd_extra_config.md":"BUIC4UCD","guide_lxd_lxd_install.md":"lF46ja40","guide_lxd_lxd_lxc.md":"3TiBQZB0","guide_lxd_lxd_precheck.md":"CWp5sTOR","guide_lxd_lxd_qa.md":"457JFcFy","guide_lxd_lxd_qemu.md":"BNQDW1qK","guide_lxd_lxd_thanks.md":"BuXAtsXG","guide_lxd_lxd_windows.md":"BU1xap_h","guide_oneclickvirt_oneclickvirt_install.md":"DvvKispM","guide_oneclickvirt_oneclickvirt_precheck.md":"RfnnTBIh","guide_oneclickvirt_oneclickvirt_qa.md":"0XSO40vD","guide_oneclickvirt_oneclickvirt_thanks.md":"C42YDVKE","guide_oneclickvirt_oneclickvirt_usage.md":"8MvNCVKk","guide_podman_podman_build.md":"Ca6jlQVY","guide_podman_podman_install.md":"BmGKzJEO","guide_podman_podman_precheck.md":"Cyl5FMaw","guide_podman_podman_qa.md":"CpNEmPSh","guide_podman_podman_thanks.md":"BIq_rBaL","guide_pve_images_readme.md":"DzT8DeZh","guide_pve_pve_android.md":"BYa7TTTG","guide_pve_pve_custom.md":"DIveMndF","guide_pve_pve_install.md":"DMVLl-nh","guide_pve_pve_kvm.md":"B2IGxG-S","guide_pve_pve_lxc.md":"BSeih7FS","guide_pve_pve_macos.md":"BKxiSjd3","guide_pve_pve_precheck.md":"BzrRoC6D","guide_pve_pve_qa.md":"Cb_sHsYT","guide_pve_pve_thanks.md":"OEVM-z7H","guide_pve_pve_windows.md":"CgcOlWEK","incomplete_bashvm.md":"ulBcWfGK","incomplete_cockpit.md":"BJoO4w05","incomplete_convoy.md":"7Wc1m7po","incomplete_index.md":"DLyUERmz","incomplete_pterodactyl.md":"DJBeL-tc","incomplete_virtfusion.md":"QYJAyYWd","incomplete_virtualizor-docker.md":"BjoBN8Nn","incomplete_webvirtcloud.md":"Ce7iEahO","incomplete_webvirtcloud_retspen.md":"yiTxty3Z","incomplete_webvirtmgr.md":"XecR36zI","index.md":"Cfr7VjVV"} diff --git a/incomplete/bashvm.html b/incomplete/bashvm.html index a49e91389e..cf61235f58 100644 --- a/incomplete/bashvm.html +++ b/incomplete/bashvm.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ - - + + \ No newline at end of file diff --git a/incomplete/cockpit.html b/incomplete/cockpit.html index 60bb7a4332..0e88134709 100644 --- a/incomplete/cockpit.html +++ b/incomplete/cockpit.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

hits

https://github.com/oneclickvirt/cockpit

安装

支持的系统:Debian,Ubuntu,Almalinux,Rockylinux,Fedora,Centos,Arch

国际

shell
curl -L https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/cockpit/refs/heads/main/scripts/install.sh -o install.sh && chmod +x install.sh

只安装带容器的

shell
bash install.sh --ct

只安装带虚拟机的

shell
bash install.sh --vm

仅安装面板

shell
bash install.sh

容器和虚拟机依赖都进行安装

shell
bash install.sh --all

缺点

网络自行配置,镜像自行导入,端口自行映射,只是比纯命令行多了一个GUI界面罢了

致谢

https://cockpit-project.org/running.html

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/convoy.html b/incomplete/convoy.html index eb3efe5f13..536994d4fc 100644 --- a/incomplete/convoy.html +++ b/incomplete/convoy.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/oneclickvirt/convoypanel-scripts

hits

convoypanel-scripts

安装前提条件:

  • 已安装 PVE,但不能是同一节点(不能是同一台机器)
  • 系统为 Debian 11
  • CPU 至少 2 核,硬盘至少 20G,内存至少 4G(内存包含 swap)

我不保证这个脚本没有错误,本项目未完整

国际

shell
curl -L https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

国内

shell
curl -L https://cdn.spiritlhl.net/https://github.com/oneclickvirt/convoypanel-scripts/raw/main/installconvoy.sh -o installconvoy.sh && chmod +x installconvoy.sh && bash installconvoy.sh

Thanks

Base on https://github.com/oneclickvirt/pve

Base on https://docs.convoypanel.com/guide/deployment/#installation

Base on https://github.com/ConvoyPanel/panel

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/index.html b/incomplete/index.html index fb24263bc1..297f3e1328 100644 --- a/incomplete/index.html +++ b/incomplete/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

其他虚拟化项目一些不完整的虚拟化项目

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/pterodactyl.html b/incomplete/pterodactyl.html index 5dada4f0ba..2b9ef82d44 100644 --- a/incomplete/pterodactyl.html +++ b/incomplete/pterodactyl.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

Repo

https://github.com/oneclickvirt/pterodactyl

hits

pterodactyl-scripts

进一步调研发现开设servers和绑定用户极麻烦,不如原生直接docker方便,故而暂不做后续开发了

说明

目前支持的系统

系统类型版本范围备注
Ubuntu20.04(推荐), 22.04, 24.04已支持
Debian11(Bullseye), 12(Bookworm)已支持

Panel

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_pterodactyl.sh -o install_pterodactyl.sh && chmod 777 install_pterodactyl.sh && bash install_pterodactyl.sh

Wings

wings端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/install_wings.sh -o install_wings.sh && chmod 777 install_wings.sh && bash install_wings.sh

Import

panel端执行:

国际

shell
curl -slk https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

国内

shell
curl -slk https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/pterodactyl/main/scripts/import_node.sh -o import_node.sh && chmod 777 import_node.sh && bash import_node.sh

会生成需要在wings端执行的命令

生成的命令执行完毕后等待20秒以上,避免一些初始化流程未走完,然后wings端再执行:

shell
bash install_wings.sh

然后在http://<your_ip>/admin/nodes就能看到你的节点已经被自动添加纳管,心跳是绿色的

Thanks

https://pterodactyl.io/

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/virtfusion.html b/incomplete/virtfusion.html index 3446d3d581..aedfc72f7e 100644 --- a/incomplete/virtfusion.html +++ b/incomplete/virtfusion.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,14 +22,14 @@ -
Skip to content

官方文档

https://docs.virtfusion.com/next/installation/control-server/#activating-a-license

一键安装

debian11

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-11.sh | sh -s -- --verbose

debian12

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-debian-12.sh | sh -s -- --verbose

RHEL8

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-8.sh | sh -s -- --verbose

RHEL9

shell
dnf install curl -y
-curl https://install.virtfusion.net/install-control-rhel-9.sh | sh -s -- --verbose

Ubuntu22.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-22.04.sh | sh -s -- --verbose

Ubuntu24.04

shell
apt install curl -y
-curl https://install.virtfusion.net/install-control-ubuntu-24.04.sh | sh -s -- --verbose

缺点

每台服务器每个邮箱只有一次30天试用的证书,无永久的免费的证书

仅支持 amd64/x86_64 架构

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/virtualizor-docker.html b/incomplete/virtualizor-docker.html index 832595d1db..707bbb0188 100644 --- a/incomplete/virtualizor-docker.html +++ b/incomplete/virtualizor-docker.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

仓库

https://github.com/ivstiv/virtualizor-docker

说明

在docker中开设的 virtualizor

证书用的是试用的证书,有效期一天,且默认只安装了OpenVZ的虚拟化方式

缺点

毫无社区,一切自行摸索

admin面板的端口不要看脚本的提示信息,以仓库说明为准。

- +
Skip to content
+ \ No newline at end of file diff --git a/incomplete/webvirtcloud.html b/incomplete/webvirtcloud.html index beb411842c..792084c15a 100644 --- a/incomplete/webvirtcloud.html +++ b/incomplete/webvirtcloud.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,29 +22,29 @@ -
Skip to content

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原官方删除了项目不再维护了,这里只能用我个人修复和更改后的代码进行部署。

效果图展示

admin

user

1. 控制端安装

系统要求

最低配置要求:

  • CPU: 1 核
  • 内存: 1 GB RAM
  • 硬盘: 空余 10 GB
  • 系统:Debian11+,Ubuntu20.04+, Centos8+, AlmaLinux8+, RockyLinux8+

默认登录信息

  • 用户名: admin@spiritlhl.net
  • 密码: admin

面板地址

  • 用户面板: https://192-168-0-114.nip.io
  • 管理后台: https://192-168-0-114.nip.io/admin

注意: 请将 192.168.0.114 替换为你的公网 IP,以获取真实可访问地址。

安装命令

国际版本:

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud.sh -o install_webvirt_cloud.sh \
+    
Skip to content
- +docker logs webvirtcloud-backend -f

然后前端去触发错误的位置,这块日志实时加载就会看到对应的报错了。

Controller 重启后 Docker 容器不自重启

如果 Docker 容器在系统重启后没有自动重启,执行以下命令:

bash
docker start $(docker ps -a -q)

5. 缺点

系统镜像是写死的,没法使用自己制作的自定义镜像,也没办法导出使用。

目前系统镜像是本人推送到Github仓库的那些镜像,具体自定义的镜像可导入PVE的qcow2格式的镜像,但需要在配置中填写哈希码。

https://github.com/retspen/webvirtcloud 不是同一个项目,不要搞混淆了。

webvirtcloud

+ \ No newline at end of file diff --git a/incomplete/webvirtcloud_retspen.html b/incomplete/webvirtcloud_retspen.html index 7d7fa86fe7..f68efba6c8 100644 --- a/incomplete/webvirtcloud_retspen.html +++ b/incomplete/webvirtcloud_retspen.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,15 +22,15 @@ -
Skip to content

WebVirtCloud 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/oneclickvirt/webvirtcloud_retspen

控制节点和计算节点同时安装

  • 支持系统:Debian10+, Ubuntu18.04+, Centos8+, AlmaLinux8+, RockyLinux8+
  • 推荐系统:Debian12+,Ubuntu22.04+
  • 低版本系统会自动编译python新版本的安装包后再进行部署,所以推荐使用新系统不必编译直接安装

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirt_cloud_retspen.sh -o install_webvirt_cloud_retspen.sh \
+    
Skip to content
- +chmod 777 debian12.qcow2

回到实例页面创建实例

vcr6

计算节点选择local

vcr7

芯片组使用默认的就行,换不换都没问题

vcr8

创建虚拟机可以使用预定义的配置大小,也可以自行使用自定义大小,看你的选择。

vcr9

注意这块填写的实例名字不能和刚刚下载的镜像的文件名字重复,比如示例中就不能填写debian12

vcr10

创建成功后不能立即点击开机。

vcr11

需要修改磁盘设置。

vcr12

这块修改qcow2文件为debian12.qcow2,对应之前下载的qcow2的文件的名字,使用镜像。

vcr13

修改确认后会在原来的计算节点的存储的local卷里看到有一个多余的盘,比如这里的test.qcow2,最好删除,避免占用磁盘

deadimage

修改完成确认无误后,才可回到电源页面开机。

vcr14

镜像的默认登录的用户名是root,密码是password或者是 oneclickvirt

开机后,你会发现硬盘只有原始镜像的大小,此时需要调整硬盘大小,需要再次关机,此时能见到下图页面的按钮可用且硬盘大小也识别出来了。

没有经过首次开机,硬盘的大小是识别不出来的,识别不出来就不能进行修改,所以首次开关机是必须的。

resize

修改后重启虚拟机,会发现有新的盘空间未分配,此时需要按照下面的方法扩容硬盘。

查看盘路径和剩余空白空间未分配的:

shell
lsblk

然后使用下述命令阔盘

shell
fdisk /dev/vda

按以下顺序操作:

输入d删除旧的分区(是的,需要删除旧的 vda1,数据不会丢失,因为后面不会格式化)。

输入n后回车新建一个分区。

类型选 primary(默认 p),直接回车就行

分区号同样选1

起始位置必须和旧分区一样(默认是对的)按回车就行

显示是否需要擦除指纹,输入Y回车

结束位置直接按回车,使用全部剩余空间

输入w保存并退出。

此时再使用lsblk可确认新的空闲硬盘被分配成功了。

缺点

网络还是没有自动配置,不如上一个项目智能,还得手动配置一下。

需要在已经开好的虚拟机的VNC中,登录后执行

shell
systemctl enable cloud-init
+reboot

手动启用配置为重启后自启动,然后重启服务器,就有网了。

+ \ No newline at end of file diff --git a/incomplete/webvirtmgr.html b/incomplete/webvirtmgr.html index 3144e97a81..b0ab8e1470 100644 --- a/incomplete/webvirtmgr.html +++ b/incomplete/webvirtmgr.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,12 +22,12 @@ -
Skip to content

WebVirtMgr 安装指南

hits

仓库地址: https://github.com/oneclickvirt/webvirtcloud

原项目对应仓库:https://github.com/retspen/webvirtmgr

控制节点和计算节点同时安装

  • 支持系统:Debian[8,9,10],Ubuntu[16.04,18.04,20.04]
  • 系统会自动编译python的2.7的安装包后再进行部署,编译过程中会有报错提示但不用理会,只要脚本还在跑就说明一切正常

国际

bash
curl -slk https://raw.githubusercontent.com/oneclickvirt/webvirtcloud/main/scripts/install_webvirtmgr.sh -o install_webvirtmgr.sh \
+    
Skip to content
- +&& bash install_webvirtmgr.sh

缺点

原项目已经不再有维护,完全不推荐使用。

+ \ No newline at end of file diff --git a/index.html b/index.html index 40cbbdf218..931bcf78fb 100644 --- a/index.html +++ b/index.html @@ -9,11 +9,11 @@ - + - - - + + + @@ -22,8 +22,8 @@ -
Skip to content

一键虚拟化项目开源、易于使用的服务器虚拟化项目

- +
Skip to content
+ \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index dde5759e58..285a407c8a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://www.spiritlhl.net/case/case1.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/developer/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case3.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case4.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case2.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case5.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case6.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/case7.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/case/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/developer/l10n.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/block/block_docker.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/developer/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/images/readme.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_android.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/developer/l10n.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/block/block_incus.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/block/block_iptables.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/block/block_lxd.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/block/block_pve.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/dashboard.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/dashboardq.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_macos.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_extra_config.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_qemu.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_extra_config.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_qemu.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_usage.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_android.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/bashvm.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_kvm.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/cockpit.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/convoy.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/pterodactyl.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/virtfusion.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/virtualizor-docker.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtcloud.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtcloud_retspen.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/dashboard.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_android.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_extra_config.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtmgr.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/dashboardq.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_macos.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_qemu.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/docker/docker_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/incus/incus_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_extra_config.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_qemu.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_macos.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_usage.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/block/block_docker.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/block/block_incus.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/block/block_iptables.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/block/block_lxd.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/block/block_pve.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/podman/podman_build.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_android.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/images/readme.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/podman/podman_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/podman/podman_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/podman/podman_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/podman/podman_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_custom.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/bashvm.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_install.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_kvm.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_lxc.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_qa.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_precheck.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_thanks.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/cockpit.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/convoy.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/pterodactyl.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/virtfusion.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/virtualizor-docker.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/webvirtcloud.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/webvirtmgr.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/incomplete/webvirtcloud_retspen.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/index.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_windows.html2026-03-02T03:30:14.000Zhttps://www.spiritlhl.net/guide/pve/pve_macos.html2026-03-02T03:30:14.000Z \ No newline at end of file +https://www.spiritlhl.net/case/case1.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/developer/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case3.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case4.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case2.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case5.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case7.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/case6.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/case/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/developer/l10n.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/developer/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/block/block_docker.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/images/readme.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_android.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_extra_config.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/block/block_incus.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/block/block_iptables.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/block/block_lxd.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/block/block_pve.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/containerd/containerd_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/dashboardq.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/dashboard.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_macos.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/docker/docker_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_qemu.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/incus/incus_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_extra_config.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_qemu.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/lxd/lxd_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_usage.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/oneclickvirt/oneclickvirt_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/podman/podman_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_android.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/developer/l10n.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/bashvm.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_kvm.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/cockpit.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/convoy.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/pterodactyl.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/virtfusion.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/virtualizor-docker.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtcloud.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/dashboard.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_android.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_extra_config.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtcloud_retspen.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/incomplete/webvirtmgr.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/dashboardq.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_macos.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/docker/docker_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_qemu.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_extra_config.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/incus/incus_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_qemu.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/lxd/lxd_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/oneclickvirt/oneclickvirt_usage.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_macos.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/en/guide/pve/pve_windows.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/block/block_docker.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/block/block_incus.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/block/block_lxd.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/block/block_pve.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/containerd/containerd_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/block/block_iptables.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/podman/podman_build.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_android.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/podman/podman_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/podman/podman_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/podman/podman_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/podman/podman_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_custom.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_install.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_lxc.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_kvm.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_precheck.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_qa.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/bashvm.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/images/readme.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_thanks.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/cockpit.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/convoy.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/pterodactyl.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/virtfusion.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/webvirtcloud.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/virtualizor-docker.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/webvirtcloud_retspen.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/incomplete/webvirtmgr.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/index.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_macos.html2026-03-02T04:08:45.000Zhttps://www.spiritlhl.net/guide/pve/pve_windows.html2026-03-02T04:08:45.000Z \ No newline at end of file