Created
August 9, 2017 11:03
-
-
Save phoracek/0022434b1f105fa0466ed04576b6d7f4 to your computer and use it in GitHub Desktop.
setup ovirtmgmt network with static ip via vdsm-client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '{"bondings": {}, "networks": {"ovirtmgmt": {"nic": "eth0", "netmask": "255.255.255.0", "ipaddr": "1.1.1.2", "gateway": "1.1.1.1", "defaultRoute": true}}, "options": {"connectivityCheck": false}}' | vdsm-client -f - Host setupNetworks | |
vdsm-client Host setSafeNetworkConfig |
Sorry, I don't understand what you are asking. When you apply the JSON you shared above, does it fail?
Sorry, I was busy with other things these days, so I couldn't reply to you in time.
I am binding the network configuration of the ovirt host to make the ens192 interface and ens224 interface bonding1, but it is actually bonding0. Did I make a mistake in my json?
English is not my native language, so it may not be accurate enough. Please see shell below
[root@node-1 ~]# echo '{
"bondings": {
"bond1": {
"nics": ["ens192", "ens224"],
"mode": 1
}
},
"networks": {
"mgmtnet": {
"bonding": "bond1",
"bootproto": "static",
"ipaddr": "10.17.35.52",
"netmask": "255.255.255.0",
"gateway": "10.17.35.1",
"defaultRoute": true
}
},
"options": {
"connectivityCheck": false
}
}' | vdsm-client -f - Host setupNetworks
[root@node-1 ~]# vdsm-client Host setSafeNetworkConfig
[root@node-1 ~]#
[root@node-1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1
# Generated by VDSM version 4.20.32-1.el7
DEVICE=bond1
BONDING_OPTS=mode=0
BRIDGE=mgmtnet
ONBOOT=yes
MTU=1500
DEFROUTE=no
NM_CONTROLLED=no
IPV6INIT=no
[root@node-1 ~]#
[root@node-1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens192
# Generated by VDSM version 4.20.32-1.el7
DEVICE=ens192
MASTER=bond1
SLAVE=yes
ONBOOT=yes
MTU=1500
DEFROUTE=no
NM_CONTROLLED=no
IPV6INIT=no
[root@node-1 ~]#
[root@node-1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens224
# Generated by VDSM version 4.20.32-1.el7
DEVICE=ens224
MASTER=bond1
SLAVE=yes
ONBOOT=yes
MTU=1500
DEFROUTE=no
NM_CONTROLLED=no
IPV6INIT=no
[root@node-1 ~]#
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, I don't understand what you are asking. When you apply the JSON you shared above, does it fail?