VM

Getting static addresses in a Linux client under NAT and VMware Fusion

I had a client working fine enough with DHCP, but I really want to be able to
consistently ssh into it.

I looked at:

/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

and determined that I did not have to modify it to get a static address:

allow unknown-clients;
default-lease-time 1800;                # default is 30 minutes
max-lease-time 7200;                    # default is 2 hours

subnet 172.16.249.0 netmask 255.255.255.0 {
        range 172.16.249.128 172.16.249.254;
        option broadcast-address 172.16.249.255;
        option domain-name-servers 172.16.249.2;
        option domain-name localdomain;
        default-lease-time 1800;                # default is 30 minutes
        max-lease-time 7200;                    # default is 2 hours
        option netbios-name-servers 172.16.249.2;
        option routers 172.16.249.2;
}
host vmnet8 {
        hardware ethernet 00:50:56:C0:00:08;
        fixed-address 172.16.249.1;
        option domain-name-servers 0.0.0.0;
        option domain-name "";
        option routers 0.0.0.0;
}

I.e., I could use addresses 172.16.249.2 -> 172.16.249.127 for static assignment. (There is a bug in that statement, which is why I am writing this down.)

I always skip the first 20 addresses, so I assigned:

KinSlayer:flexfiles loghyr$ more /private/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0     localhost
172.16.249.1    kinslayer
172.16.249.21   skull
172.16.249.22   kitty

skull to be 172.16.249.21.

I modified skull’s /etc/sysconfig/network:

[root@skull linux]# more /etc/sysconfig/network
# Created by anaconda
HOSTNAME=skull

and /etc/sysconfig/network-scripts/ifcfg-eno16777736

[root@skull linux]# more /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16777736"
UUID="3e93f225-d48a-4de0-919a-5ef5d1f428e7"
ONBOOT="yes"
HWADDR="00:0C:29:98:83:E7"
PEERDNS="yes"
PEERROUTES="yes"
DEVICE=eno16777736
NM_CONTROLLED=no
IPADDR=172.16.249.21
NETMASK=255.255.255.0
GATEWAY=172.16.249.1
DNS1=172.16.249.1

Disabled Network Mangler and turned on network:

service NetworkManager stop
chkconfig NetworkManager off
yum erase NetworkManager
service network start
chkconfig network on

I tested that I could ssh into and out of skull to my laptop. Fine, job done.

Only DNS wasn’t working the next day:

[root@skull linux]# more /etc/resolv.conf
# Generated by NetworkManager
domain localdomain
search localdomain
nameserver 172.16.249.1

I checked online, and found I should be using 172.16.249.2. Fine, job done.

Well then I couldn’t get to github.com port 22 to get a project update.

Push comes to shove, I should have not assumed that 172.16.249.1 is special
with this NAT. It is not the laptop as far as a DNS server and gateway is concerned.

So I changed this line in /etc/sysconfig/network-scripts/ifcfg-eno16777736:

GATEWAY=172.16.249.2

And restarted the network – now my DNS change was gone (why does service network restart add in the line about “# Generated by NetworkManager” to /etc/resolv.conf ??).

Fine, fixed this line as well:

DNS1=172.16.249.2

And restarted.

Now it all works, I think. 🙂

Adding more memory to Simulate ONTAP™

Just like anything else, your Simulate ONTAP™ will run faster if you give it more memory. And while you should not decrease this value, you can increase it. Edit this file:


loghyr:nsim-1.vmware thomas$ vi DataONTAP.vmx

to bump it, e.g.,


loghyr:nsim-1.vmware thomas$ diff DataONTAP.vmx ../DataONTAP.vmx | grep memsize
< memsize = "4000" > memsize = "1600"

Note that as you are running a cluster, you will have at least two of these running and your upper limit is the amount of RAM available to your host computer.

Network bridge on device VMnet0 is not running

Kept banging my head against this VMware Fusion 4.0 error message on trying to bring up a Simulate ONTAP™ vsim: Network bridge on device VMnet0 is not running

I kept on thinking it was my network config.

It was much simpler than I realized, I was running a VPN and once I turned that off, my devices started working!

VMware upgrade might blow away your networking

If you have customized your Fusion networking, be sure to make a copy of /Library/Application\ Support/VMware\ Fusion/networking to your home directory before upgrading.

And then copy it back and before you start up a VM, do sudo ./boot.sh –start in that directory.

Configuring Fedora Core 14 network interfaces in a dual-hosted VM

I’ve got several VMs running with eth0 being bridged and eth1 being host only. I see the routes:

[thomas@mage ~]$ ip route
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.21 
172.16.1.0/24 dev eth1  proto kernel  scope link  src 172.16.1.3 
default via 172.16.1.1 dev eth1

The problem being that is flipped from what I want for the default route. I suspect the issue is that eth0 is set up to be configured via DHCP.

I read a bit and it was suggested that not only does /etc/sysconfig/network-scripts/ifcfg-eth0 have to have:

DEFROUTE=yes

But /etc/sysconfig/network-scripts/ifcfg-eth1 should have:

DEFROUTE=no

I made that change and cleared that hurdle:

[thomas@mage ~]$ ip route
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.21 
172.16.1.0/24 dev eth1  proto kernel  scope link  src 172.16.1.3 
default via 192.168.1.1 dev eth0 

FWIW, here are my config files:

[thomas@mage ~]$ more /etc/sysconfig/network-scripts/ifcfg-eth?
::::::::::::::
/etc/sysconfig/network-scripts/ifcfg-eth0
::::::::::::::
DEVICE="eth0"
NM_CONTROLLED="no"
ONBOOT=yes
HWADDR=00:50:56:2E:52:F0
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERROUTES=yes
IPV6INIT=no
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
::::::::::::::
/etc/sysconfig/network-scripts/ifcfg-eth1
::::::::::::::
DEVICE=eth1
HWADDR=00:0C:29:97:74:DB
TYPE=Ethernet
BOOTPROTO=none
IPADDR=172.16.1.3
PREFIX=24
GATEWAY=172.16.1.1
DNS1=172.16.1.2
DOMAIN=internal.loghyr.com
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
UUID=539d9802-fe1a-4b44-8d80-8a03f35aa844
ONBOOT=yes
DEFROUTE=no