Change CentOS 7 from Automatic Networking to Manual Networking

Remove the IPv4 auto-config stanza block from the file at /usr/bin/virtpanel-vm-config or at /etc/init.d/virtpanel (depending on your version of the Operating System template)


Create the file /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
HWADDR="XX:XX:XX:XX:XX:XX"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=YYY.YYY.YYY.YYY
NETMASK=255.255.255.255

(replace XX:XX:XX:XX:XX:XX with your server's MAC address)
(replace YYY.YYY.YYY.YYY with your server's primary Public IPv4 Address)




Edit file file /sbin/ifup-local to be the following contents

#!/bin/bash
if [[ "$1" == "eth0" ]]
then
  ip route add 169.254.1.1 dev $1
  ip route add default via 169.254.1.1
fi


chmod +x /sbin/ifup-local


Next: VPS » Inject Missing VirtIO Drivers into Windows (INACCESSIBLE_BOOT_DEVICE)
Previous: VPS » Reset the Administrator password (Windows)