oneclickvirt / lxd Goto Github PK
View Code? Open in Web Editor NEW通过LXD命令批量或单独开设NAT服务器以及维护(简称母鸡开小鸡)(Bulk or individual NAT server provisioning and maintenance via LXD commands)
Home Page: https://t.me/VPS_spiders
License: The Unlicense
通过LXD命令批量或单独开设NAT服务器以及维护(简称母鸡开小鸡)(Bulk or individual NAT server provisioning and maintenance via LXD commands)
Home Page: https://t.me/VPS_spiders
License: The Unlicense
输入无效,请输入一个存在的系统
LXC小鸡如何使用宿主机的网络代理配置?
你好,例如我生成了test1、test2、test3,能否把test2改名成build1?
1)开centos7小鸡的SSH无法连接问题
如果率先支持centos6.x和centos7.x就最好了
命令:./buildone.sh niubi 128 1 60066 0 0 200 200
报错:root@kuroit:~# ./buildone.sh niubi 128 1 60066 0 0 50 50
Creating niubi
Device root overridden for niubi
Device eth0 overridden for niubi
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
sudo: unable to resolve host distrobuilder-aa0a95d3-28a7-4de5-8c82-5eb0df946d48: Temporary failure in name resolution
sudo: unable to resolve host distrobuilder-aa0a95d3-28a7-4de5-8c82-5eb0df946d48: Temporary failure in name resolution
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
sudo: unable to resolve host distrobuilder-aa0a95d3-28a7-4de5-8c82-5eb0df946d48: Temporary failure in name resolution
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
ca-certificates libbrotli1 libcurl4 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 openssl publicsuffix
Suggested packages:
libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql
The following NEW packages will be installed:
ca-certificates curl dos2unix libbrotli1 libcurl4 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1
openssl publicsuffix
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 3385 kB of archives.
After this operation, 7608 kB of additional disk space will be used.
Err:1 http://deb.debian.org/debian-security bullseye-security/main amd64 openssl amd64 1.1.1n-0+deb11u5
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bullseye/main amd64 ca-certificates all 20210119
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye/main amd64 libbrotli1 amd64 1.0.9-2+b2
Temporary failure resolving 'deb.debian.org'
Ign:4 http://deb.debian.org/debian bullseye/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-2.1+deb11u1
Ign:5 http://deb.debian.org/debian bullseye/main amd64 libsasl2-2 amd64 2.1.27+dfsg-2.1+deb11u1
Ign:6 http://deb.debian.org/debian bullseye/main amd64 libldap-2.4-2 amd64 2.4.57+dfsg-3+deb11u1
Err:7 http://deb.debian.org/debian bullseye/main amd64 libnghttp2-14 amd64 1.43.0-1
Temporary failure resolving 'deb.debian.org'
Err:8 http://deb.debian.org/debian bullseye/main amd64 libpsl5 amd64 0.21.0-1.2
Temporary failure resolving 'deb.debian.org'
Err:9 http://deb.debian.org/debian bullseye/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2+b2
Temporary failure resolving 'deb.debian.org'
Err:10 http://deb.debian.org/debian bullseye/main amd64 libssh2-1 amd64 1.9.0-2
Temporary failure resolving 'deb.debian.org'
Ign:11 http://deb.debian.org/debian bullseye/main amd64 libcurl4 amd64 7.74.0-1.3+deb11u7
Ign:12 http://deb.debian.org/debian bullseye/main amd64 curl amd64 7.74.0-1.3+deb11u7
Err:13 http://deb.debian.org/debian bullseye/main amd64 dos2unix amd64 7.4.1-1
Temporary failure resolving 'deb.debian.org'
Ign:14 http://deb.debian.org/debian bullseye/main amd64 libldap-common all 2.4.57+dfsg-3+deb11u1
Ign:15 http://deb.debian.org/debian bullseye/main amd64 libsasl2-modules amd64 2.1.27+dfsg-2.1+deb11u1
Err:16 http://deb.debian.org/debian bullseye/main amd64 publicsuffix all 20220811.1734-0+deb11u1
Temporary failure resolving 'deb.debian.org'
Err:4 http://deb.debian.org/debian bullseye/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-2.1+deb11u1
Temporary failure resolving 'deb.debian.org'
Err:5 http://deb.debian.org/debian bullseye/main amd64 libsasl2-2 amd64 2.1.27+dfsg-2.1+deb11u1
Temporary failure resolving 'deb.debian.org'
Err:6 http://deb.debian.org/debian bullseye/main amd64 libldap-2.4-2 amd64 2.4.57+dfsg-3+deb11u1
Temporary failure resolving 'deb.debian.org'
Err:11 http://deb.debian.org/debian bullseye/main amd64 libcurl4 amd64 7.74.0-1.3+deb11u7
Temporary failure resolving 'deb.debian.org'
Err:12 http://deb.debian.org/debian bullseye/main amd64 curl amd64 7.74.0-1.3+deb11u7
Temporary failure resolving 'deb.debian.org'
Err:14 http://deb.debian.org/debian bullseye/main amd64 libldap-common all 2.4.57+dfsg-3+deb11u1
Temporary failure resolving 'deb.debian.org'
Err:15 http://deb.debian.org/debian bullseye/main amd64 libsasl2-modules amd64 2.1.27+dfsg-2.1+deb11u1
Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/o/openssl/openssl_1.1.1n-0%2bdeb11u5_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20210119_all.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/b/brotli/libbrotli1_1.0.9-2%2bb2_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/c/cyrus-sasl2/libsasl2-modules-db_2.1.27%2bdfsg-2.1%2bdeb11u1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/c/cyrus-sasl2/libsasl2-2_2.1.27%2bdfsg-2.1%2bdeb11u1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/o/openldap/libldap-2.4-2_2.4.57%2bdfsg-3%2bdeb11u1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/nghttp2/libnghttp2-14_1.43.0-1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/libp/libpsl/libpsl5_0.21.0-1.2_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/r/rtmpdump/librtmp1_2.4%2b20151223.gitfa8646d.1-2%2bb2_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/libs/libssh2/libssh2-1_1.9.0-2_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/c/curl/libcurl4_7.74.0-1.3%2bdeb11u7_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/c/curl/curl_7.74.0-1.3%2bdeb11u7_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/d/dos2unix/dos2unix_7.4.1-1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/o/openldap/libldap-common_2.4.57%2bdfsg-3%2bdeb11u1_all.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/c/cyrus-sasl2/libsasl2-modules_2.1.27%2bdfsg-2.1%2bdeb11u1_amd64.deb Temporary failure resolving 'deb.debian.org'
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/publicsuffix/publicsuffix_20220811.1734-0%2bdeb11u1_all.deb Temporary failure resolving 'deb.debian.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Command not found
sudo: unable to resolve host distrobuilder-aa0a95d3-28a7-4de5-8c82-5eb0df946d48: Temporary failure in name resolution
sudo: unable to execute ./ssh.sh: No such file or directory
sudo: unable to resolve host distrobuilder-aa0a95d3-28a7-4de5-8c82-5eb0df946d48: Temporary failure in name resolution
Package: zmap nmap masscan medusa
Pin: release *
Pin-Priority: -1
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Error: Command not found
Device ssh-port added to niubi
niubi 60066 4275f6b72
Error: Failed to handle idmapped storage: Failed to change ownership of: /var/snap/lxd/common/lxd/storage-pools/default/containers/ex2/rootfs/usr/lib/terminfo/w/wsvt25m
您好,我发现在LXC中对ipv6的分配,貌似只可以默认网卡的ipv6 /64
我希望可以添加更多的可自定义,比如自定义网卡(比如说默认是eth0,但我ipv6在eth1上面)
和自定义ipv6类型,比如说支持/48的支持,及其他的支持(不只局限于/64)
希望可以采纳。
有可能实现限制小鸡的流量吗,用到一定量之后断网或者限速
请问''自定义版本批量生成''什么时候支持alpine?我目前貌似无法使用
问题如下:
每个小鸡的系统是什么?(注意传入参数为系统名字+版本号,如:debian11、ubuntu20、centos7):alpine3.16
匹配的镜像存在
未找到匹配的镜像,请执行
lxc image list images:系统/版本号
查询是否存在对应镜像
cat: ex1: No such file or directory
母鸡debian11环境,软件finalshell
1)开设小鸡debian,alpine,内存设定无效,cpu默认1c没测2c3c(也测不了,建议模板位置增设cpu设定),母鸡内存多少小鸡内存仍然是多少,stream8正常,估计stream9也正常,ubuntu18正常,估计20和22也正常 。
2)端口区间应该不是仅设定的25个,取决于输入的数值区间,实测超过100个,正常。
3)期待debian8/debian9的低内存适配加入
母鸡是甲骨文arm,系统是dd过的Ubuntu20.04,用自动lxd安装后开小鸡就会导致母鸡无法解析dns,请问是哪里出问题了
Error: Storage has already been configured
zfs compilation failed, trying to use another storage type ......
zfs编译失败,尝试使用其他存储类型......
单盘环境。
现在的批量脚本不能设置硬盘,内存,cpu,网速,系统等信息了吗?
LXC的系统有alpine吗?
我发现每一次开小鸡,开到100的时候,就不能再往下开了,是什么原因呢?每一次都是正好100。好奇。。。
创建LXC小鸡的网络限速不起作用
例如:
./buildone.sh test 1 256 2 20001 20002 20025 20 20 N
其中 设置为限制20Mbit的上传带宽和下载带宽不起作用,实际测速并没有限制,重启主机网络和小鸡网络后测试依然没有限速
另外:这个脚本非常的丝滑好用,目前就发现这一个问题,作者大佬牛比
如题
curl -L https://github.com/spiritLHLS/lxc/raw/main/scripts/add_more.sh -o add_more.sh && chmod +x add_more.sh && bash add_more.sh
用的这个脚本
ssh显示connection refused
母鸡lxc可以内部连接,可能是NAT转发问题
端口检测后小鸡ssh端口关闭,其他端口正常
1>centos6等待加入
2>centos7 缺少openssh-server安装写入和没有设置转发,导致开设c7 小鸡后无法启动并且连接,通过/bin/bash也无法进入
3>stream8默认是密钥登陆,随机生成的密码无法登陆,进入/bin/bash修改成密码登陆就行了,https://www.jianshu.com/p/330882fd50f9
4>端口区间范围,例如:./buildone.sh jiguangpanel 512 5 22 1 65535 300 300 Y centos7 , 1~65535 开设后安装极光,并且iptables添加8000后重启网卡再reboot还是失败无法访问, 查询端口:https://tool.chinaz.com/port 为关闭状态. (ip未被墙)
5>开了alpine3.15,alpine3.16,alpine3.17,alpine3.18 ssh无法连接,可能是ssh端口转发没有写入和ssh未安装
6>ubuntu18 可以安装,但是在连接ssh时候和alpine系列一样,直接无法连接,不会出现输入密码
ubuntu20 ubuntu22 提示命令版本不对,无法提取镜像
7>https://img.cs.montana.edu/linux/centos/
https://vault.centos.org/6.9/
https://vault.centos.org/8.0.1905/
包含了centos6.x centos7.x stream8 centos8.x
默认1G的空间,怎么增加呢
我发现使用脚本配置ipv6时一切正常,当重启后,ipv6无法使用,nat-ipv4仍然正常。
我发现问题的系统:乌班图22
写了一个转发lxc容器内网端口的脚本项目地址
https://github.com/SevenSevenE/Lxc_nat
发现个新问题,就是小鸡的v6连接ssh不稳定啊,这相比之前一点都没有之前的v6稳定,每次都要通过exec进入小鸡reboot等一会才能连接上,v4加指定端口没问题
刚刚查看了小鸡的eth0配置,发现用的dhcp不是static的,没有自动加子网也没有dns。
请检查一下,小鸡是centos7,openssh 也安装过了,iptables也安装过了,默认含22,也restart了network,也reboot过了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.