我对Virtual非常陌生,并尝试在虚拟盒中模拟科伯 PXE引导网络安装。
尝试将VM1配置为PXE/DHCP服务器,并使VM2作为客户端,在网络启动时从VM1 DHCP服务器获取IP以进行网络安装。
但是继续从安装虚拟盒的主机上获取IP。因此,VM2无法找到VM1中存在的pxeboot文件。
Listening on LPF/enp0s3/08:00:27:86:b1:c6/192.168.43.0/24
Aug 09 19:03:23 localhost.localdomain dhcpd[3305]: Sending on LPF/enp0s3/08:00:27:86:b1:c6/192.168.43.0/24
Aug 09 19:03:23 localhost.localdomain dhcpd[3305]: Sending on Socket/fallback/fallback-net
Aug 09 19:03:23 localhost.localdomain systemd[1]: Started DHCPv4 Server Daemon.ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
option pxe-system-type code 93 = unsigned integer 16;
subnet 192.168.43.0 netmask 255.255.255.0 {
option routers 192.168.43.1;
option domain-name-servers 192.168.43.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.43.100 192.168.43.254;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.43.146;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
if option pxe-system-type = 00:02 {
filename "ia64/elilo.efi";
} else if option pxe-system-type = 00:06 {
filename "grub/grub-x86.efi";
} else if option pxe-system-type = 00:07 {
filename "grub/grub-x86_64.efi";
} else if option pxe-system-type = 00:09 {
filename "grub/grub-x86_64.efi";
} else {
filename "pxelinux.0";
}
}
}
# group for Cobbler DHCP tag: default
group {
host centostest.mydomain.com-net0 {
hardware ethernet 08:00:27:7f:aa:f1;
fixed-address 192.168.43.120;
option host-name "centostest.mydomain.com";
option subnet-mask 255.255.255.0;
option routers 192.168.43.1;
filename "/pxelinux.0";
next-server 192.168.43.146;
}
}
VM2适配器设置-客户端

中提供的192.168.43.120。

如何解决这个问题?
发布于 2019-08-09 14:39:04
我建议建立一个网络,而不是“桥接”。DHCP通过广播工作,因此子网上的任何DHCP服务器都可以响应。为了防止这种情况,你看到了你自己的子网。
在“文件”>“主机网络管理器”中,您将看到默认的“VirtualBox主机专用以太网适配器”。您可以取消选中"DHCP服务器“框,以打开内置的DHCP服务器。然后,将您的DHCP服务器VM和您正在引导的PXE机器附加到仅用于主机的适配器,而不是桥接的适配器。
https://unix.stackexchange.com/questions/534732
复制相似问题