forked from cloudius-systems/osv
-
Notifications
You must be signed in to change notification settings - Fork 0
Configure a static IP address
Takuya ASADA edited this page Aug 25, 2014
·
6 revisions
OSv assigns IP address using DHCP by default, but there's a interface to configure IP address manually. There are three cmdline parameter:
--ip=<nic>,<ip>,<netmask>
--defaultgw=<ip>
--nameserver=<ip>
To use these parameters, you'll need to modify cmdline.
If you are using scripts/run.py for executing OSv VM, you can configure IP like this:
./scripts/run.py -n -e "--ip=eth0,10.0.0.2,255.255.255.0 \
--defaultgw=10.0.0.1 --nameserver=10.0.0.1 `cat build/release/cmdline`"
If you are not using ./scripts/run.py, but using VMware image instead, you can configure IP like this:
./scripts/imgedit.py setargs build/release/osv.vmdk \
"--ip=eth0,10.0.0.2,255.255.255.0 --defaultgw=10.0.0.1 --nameserver=10.0.0.1 \
`cat build/release/cmdline`"