disconnected machine with virtual machines.. how to?

I have OpenSuse 11.3 with VirtualBox on it, and with installed Oracle DB (on host OS)…

but, sometimes this computer is disconnected, without it’s gateway (adsl router)… and in that case, I cannot ping from virtual OS to host OS, or another virtual OS.
I tried to use ‘Host only’ option within VirtualBox, but it doesn’t work.

What should I do?
It seems that virtual machines requires some kind of gateway/router, but since machine is disconnected, it’s not working… how could I fix it?

If you try to connect to the IP assigned to the Ethernet interface (either by name or by IP) it will fail when your machine gets no lease from the router. However I think you will find that the host OS has the address and the first guest OS has the address in VirtualBox. The guest OS addresses are assigned by the built-in DHCP server in VirtualBox and are not dependent on the IP address assigned to the real Ethernet interface.

no, it’s not working…

when I try to ping (host) or, I got ‘destination host unreachable’…
I’ve changed virtual machine to be ‘host only adapter’

I don’t use host only adapter. I use the normal NAT setup you get by default.

This might help: Chapter

I would use bridged or host only. But if so, I believe you will need to manually IP the VM interface and put it on the same subnet as your host - - in those modes VirtualBox is not going to provide dhcp and routing for you.

In the VM

ifconfig eth0 netmask
route add default gw

This guide might help as for manually configuring your interfaces: 1.3. Changing IP Addresses and Routes

Lews Therin