mirror of
https://github.com/rancher/os.git
synced 2025-08-31 22:32:14 +00:00
dump the extra NIC
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -x -e
|
||||
|
||||
vboxnet=vboxnet1
|
||||
|
||||
## DOC: create a RancherOS VM for VirtualBox
|
||||
## the VM uses 2 network interfaces: eth0 (NAT) is for Internet access
|
||||
## eth1 (host-only) is for internal virtual network
|
||||
|
||||
## NOTE: host-only NIC ${vboxnet} should already exist!
|
||||
|
||||
cd $(dirname $0)/..
|
||||
: RANCHER_ISO=${RANCHER_ISO:="./dist/artifacts/rancheros.iso"}
|
||||
|
||||
@@ -40,8 +32,5 @@ VBoxManage modifyvm $VM --usb off
|
||||
VBoxManage modifyvm $VM --audio none
|
||||
VBoxManage modifyvm $VM --nic1 nat
|
||||
VBoxManage modifyvm $VM --nictype1 virtio
|
||||
VBoxManage modifyvm $VM --nic2 hostonly
|
||||
VBoxManage modifyvm $VM --nictype2 virtio
|
||||
VBoxManage modifyvm $VM --hostonlyadapter2 ${vboxnet}
|
||||
|
||||
#VBoxManage startvm $VM
|
||||
|
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x -e
|
||||
|
||||
vboxnet=vboxnet1
|
||||
ip_prefix=172.17.7
|
||||
|
||||
## DOC: configure VirtualBox ${vboxnet} host-only virtual network for use with a RancherOS VM cluster
|
||||
|
||||
## NOTE: host-only NIC ${vboxnet} should already exist!
|
||||
|
||||
vboxmanage hostonlyif ipconfig ${vboxnet} --ip ${ip_prefix}.1
|
||||
vboxmanage dhcpserver remove --ifname ${vboxnet} && :
|
||||
vboxmanage dhcpserver add --ifname ${vboxnet} --ip ${ip_prefix}.100 --netmask 255.255.255.0 \
|
||||
--lowerip ${ip_prefix}.101 --upperip ${ip_prefix}.254 --enable
|
Reference in New Issue
Block a user