首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu预置静态IP配置(Virt)

Ubuntu预置静态IP配置(Virt)
EN

Server Fault用户
提问于 2016-03-17 11:20:32
回答 1查看 4.3K关注 0票数 2

我想要创建带有virt和预设配置的Ubuntu14.04VM。我提供了:

代码语言:javascript
复制
d-i netcfg/enable boolean true
d-i netcfg/choose_interface select auto
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_ipaddress string 192.168.1.210
d-i netcfg/get_netmask string /24
d-i netcfg/get_gateway string 192.168.1.254
d-i netcfg/get_hostname string ubuntu.com
d-i netcfg/get_nameservers string 8.8.8.8
d-i netcfg/confirm_static boolean true

但是无论如何,我在来宾VM中有另一个ip。需要你的帮助

EN

回答 1

Server Fault用户

发布于 2016-03-17 14:29:42

要禁用dhcp,需要有disable_autoconfig而不是disable_dhcp

代码语言:javascript
复制
d-i netcfg/disable_autoconfig boolean true

网络掩码声明看起来也是错误的。试一试:

d-i netcfg/get_netmask string 255.255.255.0

查看此处以获得完整的参考资料:B.4.预配置文件的内容(用于信任)

代码语言:javascript
复制
# If you prefer to configure the network manually, uncomment this line and
# the static network configuration below.
#d-i netcfg/disable_autoconfig boolean true

# Static network configuration.
#d-i netcfg/get_nameservers string 192.168.1.1
#d-i netcfg/get_ipaddress string 192.168.1.42
#d-i netcfg/get_netmask string 255.255.255.0
#d-i netcfg/get_gateway string 192.168.1.1
#d-i netcfg/confirm_static boolean true
票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/764337

复制
相关文章

相似问题

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