How to properly set up 2 network interfaces in CentOS (running in VirtualBox)?

I guess the problem is (or: was) that the gateway definition collides with DHCP. Somehow the interface order seems to influence that.

The basic problem is: How shall routing be done with two network cards? As I understand you the host-only card shall be used for connections to the host only. Thus you should not define any gateway for this interface at all. But maybe this works only if the first interface uses DHCP.

In addition you may consider avoiding DHCP completely. The NAT interface works with a static configuration, too.