Я хочу создать виртуальную машину Ubuntu 14.04 с настройкой virt-install и preseed. Я предоставил:
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
Но в любом случае у меня есть другой ip в гостевой ВМ. Нужна ваша помощь
Чтобы отключить dhcp, вам необходимо иметь disable_autoconfig
и не disable_dhcp
:
d-i netcfg/disable_autoconfig boolean true
Объявление сетевой маски тоже выглядит неверным. Попробуйте вместо этого:
d-i netcfg/get_netmask string 255.255.255.0
Проверьте здесь полную ссылку: В.4. Содержимое файла предварительной конфигурации (для доверенных лиц)
# 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