我想用virt-install和preseedconfiguration来创buildUbuntu 14.04 VM。 我提供了:
di netcfg/enable boolean true di netcfg/choose_interface select auto di netcfg/disable_dhcp boolean true di netcfg/get_ipaddress string 192.168.1.210 di netcfg/get_netmask string /24 di netcfg/get_gateway string 192.168.1.254 di netcfg/get_hostname string ubuntu.com di netcfg/get_nameservers string 8.8.8.8 di netcfg/confirm_static boolean true
但无论如何,我有另一个客户虚拟机IP。 需要你的帮助
要禁用DHCP你需要有disable_autoconfig而不是 disable_dhcp :
di netcfg/disable_autoconfig boolean true
networking掩码声明看起来也是错误的。 试试这个:
di netcfg/get_netmask string 255.255.255.0
在这里查看完整的参考: B.4。 预configuration文件的内容(对于可信)
# If you prefer to configure the network manually, uncomment this line and # the static network configuration below. #di netcfg/disable_autoconfig boolean true # Static network configuration. #di netcfg/get_nameservers string 192.168.1.1 #di netcfg/get_ipaddress string 192.168.1.42 #di netcfg/get_netmask string 255.255.255.0 #di netcfg/get_gateway string 192.168.1.1 #di netcfg/confirm_static boolean true