首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Proxmox中带有Debian模板的CT :重新启动后无法保存接口文件

Proxmox中带有Debian模板的CT :重新启动后无法保存接口文件
EN

Stack Overflow用户
提问于 2014-09-02 14:31:54
回答 1查看 1.3K关注 0票数 1

我已经在ProxmoxVE 3(安装在Windows4.3.12的Virtualbox中的图像)中设置了一个CT,使用的模板是Debian-7-交键灯_13.0-1_amd64.tar.gz。在将这两个I添加到容器: 192.168.56.138和10.0.2.20之后,我启动容器。/etc/network/interfaces文件显示如下:

代码语言:javascript
复制
# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 127.0.0.2
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down

iface venet0 inet6 manual
up route -A inet6 add default dev venet0
down route -A inet6 del default dev venet0

auto venet0:0
iface venet0:0 inet static
address 192.168.56.138
netmask 255.255.255.255

auto venet0:1
iface venet0:1 inet static
address 10.0.2.20
netmask 255.255.255.255

通过这种配置,可以通过192.168.56.138从主机访问它,但它不能访问Internet。

经过多次试验和错误之后,我想出了一种方法,使它能够访问互联网。我只需要删除最后四行:

代码语言:javascript
复制
auto venet0:1
iface venet0:1 inet static
address 10.0.2.20
netmask 255.255.255.255

然后运行服务网络重新启动,仅此而已:因特网可供客人CT使用。

但是当我重新启动时,原始的/etc/network/interfaces文件回来了,更改消失了,互联网又无法访问了。

因此,我的问题是:如何使对接口文件所做的更改持久?

提前谢谢你,

EN

回答 1

Stack Overflow用户

发布于 2014-11-24 10:18:32

因此,我的问题是:如何使对接口文件所做的更改持久?

您的问题的答案在文件的标题中。

代码语言:javascript
复制
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25625920

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档