Network between VM and Mac without internet

Discussion in 'Linux Virtual Machine' started by TorstenF, Jan 6, 2012.

  1. TorstenF

    TorstenF Bit poster

    Messages:
    2
    Hi there, i'm searching for a solution how to access on my debian vm, when i have no internet / network connection (for example on travel).
    Ich have two debian vm's on my macbook pro. At my office i use a dhcp server to distribute the ip's for the vm. But from that Moment, when i have no network access (on travel) i cannot connect to my vm anymore. No connection via terminal / ssh. I try to write a dedicated ip entry on my hosts.conf on my macbook, but isn't work. What kind of network adapter have i to configure to use my vm's only between my mac and the vm's?

    Kind regards
    Torsten
     
  2. Dasha.L

    Dasha.L Bit poster

    Messages:
    8
    Hi
    These are 3 modes of network access: Bridged, Shared or Host-Only

    Host-Only Networking is recommended if you don’t want the VM to be able to access the external network. When in Host-Only Networking mode, the VM can see only the host system (Mac OS X) on the special internal network. However, you can set up the Apple Internet Sharing service in such a way that Mac OS X will share its connection with the VM (as described in the previous question of this FAQ section). In this case the VM networking will be similar to the Shared Networking mode. (for more info read http://kb.parallels.com/4948)

    You can find settings in the User Guide
    http://download.parallels.com/desktop/v7/update2/docs/en/Parallels Desktop User's Guide/33342.htm

    you can also use Shared Network.
    Troubleshooting network problems http://kb.parallels.com/5664
     
  3. TorstenF

    TorstenF Bit poster

    Messages:
    2
    Ok, i will give it a try ;-) Thnx!
     
  4. SakibS

    SakibS Hunter

    Messages:
    102
    In this case you can change network adapter mode as Bridge. After change the mode you have to configure IP address in you host Debian machine like this...run this command in suduers mode..

    # vi /etc/network/interface/eth0

    Change the IP address as you network IP block.

    ____________

    SakibS [​IMG]
     
  5. diatom

    diatom Bit poster

    Messages:
    3
    Just so I can clarify this in my mind. I have a similar issue as the OP:
    MBP which moves with me.
    Two network configs, 'home' which has static class b IP for integrating with my home network, and 'out' which is a DHCP set up.

    I am setting up a MySQL Cluster so am installing 3 debian parallels VMs and need to give them static IPs so they work together during the DB cluster testing.

    Problem 1 - VMs set to Shared Networking
    I'm home and I set the IPs to match my class b home net. all fine. breaks when I go out as I don't know what IP range I'll get allocated when I switch the networking to DHCP (with the VMs still static so Destination host unreachable messages result)

    Problem 2 - VMs set to bridge mode
    The manual says that'll expose them to the outside world. I don't want that either, but even ignoring that the same problem with the change in the host IP range when I leave the house exists.

    Problem 3 - host only
    In this situation, my MBP and VMs can talk but again, but the VMs cannot see the internet to reach out to install and patch etc.

    I think the closest to fix is prob 2. If I set bridge mode, then my VMs can stay static, I can presumably change my IP range of the host MBP, but two questions:
    1) If my VM is 192.168.x.x, and my MBP get's DHCP'd a 10.101.x.x net will the bridge mode be enough for the VMs to see the Internet?
    2) In my VM set up hardware > network1 > type dropdown I can see the following interfaces:
    Bridged Network:
    Default adapter
    Ethernet
    WIFI
    p2p0
    vnic0
    vnci1

    which one should I use?
     
  6. diatom

    diatom Bit poster

    Messages:
    3
    Right, I've done a load of config and experimentation.
    In bridge mode > default adapter, I set up the IPs in my VMs as on the same network as my host WIFI was configured. I could see all machines, all VMs and the host.
    I then switched my MBP host WIFI network to a different IP range. The VMs could still see each other.

    I imagine it would be the same using an Ethernet adapter rather than the WIFI one in the Mac network prefs. Once they're all in bridge using the default adapter - looks like the adapter does the switching.

    I'll reboot to see if that does anything. No additional post assumes not.
     
  7. diatom

    diatom Bit poster

    Messages:
    3
    OK, it works across reboot, but separate from that, the host interface has to be up (green dot) for the packets to flow. Somewhat logically.
     
  8. SakibS

    SakibS Hunter

    Messages:
    102
    In order to connect your VM you have to have a connection either local connection or Internet. Outside office better Internet connection. Connection through internet you have a public IP address in your vm server. Then you can connect to your server otherwise not possible.

    Thanks 1.gif
     

Share This Page