host only networking for "Crunchbang host" "Arch Linux guest"
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
host only networking for "Crunchbang host" "Arch Linux guest"
Good morning,
I have a “Crunchbang 10“ (Statler) installed as the host, and Arch linux installed in Virtualbox 4.0.6. My goal is to be able to ssh into the the guest from the host. I tried to follow this post http://muffinresearch.co.uk/archives...-linux-guests/
but it is somewhat sketchy.
My questions are as follows:
What changes, if any, are to made to the host’s network configuration, in this case /etc/network/interfaces? What verbiage is to be used?
What changes are to be made to the guest’s network interface, in this case /etc/rc.conf? What verbiage is to be used?
Does one access the host from the guest, and if so, how, host name and ip address of the host?
If one wishes to access the guest from the host, how does one do that?
Is it ssh guest hostname + ip address of the guest?
In short, can someone explain what the author of the post was trying to communicate? I Googled many posts over a period of hours, but they are all incomplete, written for very advanced users and pale besides something like the Arch Linux beginner’s guide, pindarsign.de and most of the Ubuntu’s documentation, hence my problem. Arch Linux on an encrypted LVM jfs is my main system, so respondents, know that your time will not be wasted.
if you use -> settings -> network -> NAT (the default, btw).
Code:
ssh guest_username@192.168.56.101
should work to ssh to the guest
Code:
ssh host_username@192.168.56.1
should work to ssh to the host.
if you got a router use -> settings -> network -> bridged and use `ifconfig` to find out the IP number (which will be assigned by the router). Same command: ssh user@IP.
Other ways to do it i don't know, though there are. Both ways are easy, no need to configure anything.
The extra voodoo to set up Arch in /etc/rc.conf is beyond me. In Debian there is no further configuration required ( might be for Arch too, no clue)
I'm not familiar with the distros you are using but the general principle outlined in my post are to use 2 interfaces for networking on your guest.
1. NAT provides outbound internet access.
2. Host Only network provides a way to communicate between the guest and the host.
You could simply use bridged networking which uses the interface of the host to connect to the network, but given I want my set-up to be rock-solid for travel (This was written with a laptop in mind) I use the two network adaptors approach outlined above so there's no issue when disconnecting from networks and working without being on a network.
Vboxnet0 is set-up by Virtualbox itself - if it isn't visible when running /sbin/ifconfig on the host then check "File -> Preference -> Network" in the VirtualBox Manager. Ensure that DHCP is enabled (worth doing in-case that's how you want to use it).
On the guest all you need to do is configure the 2nd adapter, the first should be automatic, and the 2nd might be too depending on what OS or version of OS you're using.
In the case of the article (I was using JEOS - basically a minimal Ubuntu Server install so I needed to set-up eth1 in /etc/network/interfaces and in the post I detail this using a static address. That said there would be nothing stopping you using DHCP to have an IP address automatically assigned.
Hope this helps to point you in the right direction to get you up and running. Let me know if not!
Perhaps this description of my understaning of the problem will help :)
Thank you J1alu & muffinresearch for replying. Who would think that the author of an article would reply to my host? I am flattered.
What I would like to do is provide you with an overview of my understanding of the whole ssh between VirtualBox guest (VBG) & the host. Perhaps you can correct my understanding of what is supposed to happen.
1) With the VBG off, setup up a host only adaptor.
2) Find the DHCP of the host or create a static ip address on the host as eth1.
3) Start the VBG.
4) From within the VBG, /sbin/ifconfig vboxnet0 up. Note: this command varies from distro to distro.
5) On the crunchbang host create eth1 from vboxnet0. Note: Crunchbang = Minimalist Ubuntu.
6) Ping the host, from the VBG, which will be blocked by the firewall.
7) Ping the VBG from the host. The VBG will respond.
This next part is difficult.
From the guest, is it ssh hostname_of_the_host@192.123.123.X of the host? Or is it ssh your_curent_username@192.123.123.x of the host?
Also, the host rejects vboxnet0 as a valid ethernet device, so should it be dubbed eth1?
As you can see I am lost. However, I have potential. I can manually setup LVM and multiple partitioned flash drives containing multiple bootable kernels with Grub Legacy as the bootloader and custom splash images. Not guru stuff but not too shabby either, so I know I can do this but not without help. Again, thanks for responding so fast. I hope the above can help you to help me while minimizing your loss of time.
Side note:
I've found that I do best when things articles are written with the goal listed first, followed by an overview of the major steps to be taken. After that if each of the major steps becomes a detailed and enumerated series of steps. That is the type of writing that serves me best. I say that not to criticize, but it's works so well for Ubuntu, Arch and a few others. Writing is hard work. However, I feel that constructive criticism that has the potential to benefit the Linux community is always warranted where applicable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.