OVH Community, your new community space.

CentOS 7 VM - kernel boot options to set IP and allow install via kickstart file


alvaroag
18-05-2016, 15:47
The usual problem in cases like this one is the gateway outside of the subnet, which makes things more difficult, because you can't just set the gateway as gateway, but as two routes: one to reach the gateway, and another one to reach the internet through the gateway.

The best option for your case would be to change the network structure of your vm environment. Instead of using a eth0 bridge with vmacs, use eth0 alone for the host internet access, and a bridge where vms connect with the host. Then, you have two options: use proxyarp so each vm uses it's own public ip address; or use one to one nat, so each vm has a private ip which is translated into an exclusive public one. In both cases, you can setup a dhcp server which offers the ip configuration to the vm.

zenithteq
18-05-2016, 11:52
Can anyone shed some light or provide guidance on if it is possible and how to correctly launch a CentOS 7 VM and at the boot screen invoke the kernel boot options to set the IP and networking settings that will establish connectivity for the VM so it can get the kickstart file from another host (kickstart file could be hosted anywhere...)

For example:

IP: 51.255.103.172
vMAC: 00:50:56:0b:4a:82
Subnet: 255.255.255.255
Gateway: 94.23.47.254
DNS: 213.186.33.99
Kickstart location: http://abc.com/centos7minimal.cfg

I tried the following boot options without any success:
Code:
> vmlinuz initrd.initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet inst.ks=http://abc.com/centos7minimal.cfg ip=51.255.103.172::94.23.47.254:255.255.255.255:host.abc.com:eth0:none nameserver=213.186.33.99