Hi, I'm not sure if this is a CentOS-7 or SmartOS issue and it is driving me batty.
I've installed three KVM CentOS-7 images (using image
d8e65ea2-1f3e-11e5-8557-6b43e0a88b38) but I
can't get them configured with fixed IPv4 address in the guest.
My understanding is that to assign a static IP within the guest itself (i.e. no
DHCP magic from QEMU
- all networking to be configured in the guest), I should set the guest's JSON
"ip" property to
"dhcp" and configure the network in the guest. I have tried this and it fails,
clobbering my network
configs in the guest.
For example, the nics are configured in JSON like this:
vmadm get 58a4e021-bc65-4eb8-8f2f-d12b82c3946d | json nics
[
{
"interface": "net0",
"mac": "62:3c:de:b7:52:76",
"nic_tag": "vswitch6",
"ip": "dhcp",
"model": "virtio",
"primary": true
}
]
And in the guest I've configured the /etc/sysconfig/network-scripts/ifcfg-eth0
file with a fixed IP
setting:
DEVICE=eth0
TYPE=Ethernet
HWADDR=62:3c:de:b7:52:76
ONBOOT=yes
BOOTPROTO=static
IPADDR=x.x.x.x
NETMASK=x.x.x.x
Now, every time I start/reboot the guest it clobbers the ifcfg-eth0 file
reverting it to just three
lines the guest:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
Has anyone experienced this before? Is it a CentOS-7/SmartOS issue or just my
own ignorance?
Any help is appreciated.
Kind regards,
Tom
--
Tom Robinson
IT Manager/System Administrator
MoTeC Pty Ltd
121 Merrindale Drive
Croydon South
3136 Victoria
Australia
T: +61 3 9761 5050
F: +61 3 9761 5051
E: [email protected]
signature.asc
Description: OpenPGP digital signature
------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
