network setings for my virtual os

This is for discussing general topics about how to use VirtualBox.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

network setings for my virtual os

Post by miavi »

Team,

For some one it looks like its repeated question. But I am a new to virtualization. Plz help me on this.

My Host os: windows 7, on this I installed linux 5

I am able to connect to net with network settings: "Bridged".

But my requirement is that I need to connect linux5 from windows with putty (not able to connect, ping also not working), but i am not able to do so. Plz let me know what info/resolution needed to go.

Appreciate your help on this without hesitation.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

Please post these things:

See Minimum info needed

On the Windows PC, the output of this command:
ipconfig /all

On the Linux guest, the output of this command:
ifconfig

The guest's .vbox file, in a zip folder.

All of this will tell us how your guest's network is configured, and if you are getting a valid IP address in your guest.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

My Host os: windows 7, on this I installed linux 5 as guest

V. box version: 5.1.5

Plz find the attachment:

1. linux-2016-09-09-22-34-34.log ----virtual box log file
2. linux ipconfig.PNG---guest os (linux) o/p for ifconfig
3. windows ipconfig.txt--- host os (windows) o/p for ipconfig all.

Thanks for your support on this.

Regards.
Attachments
issue.zip
(35.07 KiB) Downloaded 14 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

Thanks for the info!

The host's wired adapter seems to be disconnected. And it looks like your Linux guest is getting an IP address in the same range as the wi-fi adapter on the host. The log mentions that the network is attached to "HostInterfaceNetworking-Intel(R) Dual Band Wireless-AC 7265", which is the name of the wi-fi adapter in the Windows ipconfig file. Bridged is known to not always work with wi-fi, due to poorly-written wi-fi adapter drivers and/or wireless access point firmware. If you chose to Bridge to the wi-fi adapter, you could try connecting to the network via the wired port for a bit and Bridge to that and see if the connection from host to guest starts.

There's a Cisco AnyConnect Secure Mobility Client, maybe a VPN? That might mess things up when it's active.

if you do not need your guest to talk to any other PCs on your host's network you can try Host=Only instead of Bridged. The guest should get a default IP address of 192.168.56.101, and the host should be 192.168.56.1. If you aso need internet in such a Host-Only guest, add another adapter to the guest's settings and set the second adapter to NAT.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

Thanks for your input.. i will try as said for network setting.

My requirement is "i dont need net connection in guest o/s...but If i install another guest linux in this host, I need both linux machines talk each other and both should be able to ping to host windows machine'.

Regards.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

host is not able to ping guest with network "host-only adapter'.

Plz help me here.

Regards.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

If you can get the Host-Only situation worked out, you can attach all the guests to it and the host and guests can all talk to each other.

Let's see those command outputs and log again, and please include the guest's .vbox in this zip.

I'll be heading out in a few minutes, may be some time before I can reply. Anyone feel welcome to chime in!
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

can you let me know the location of .vbox file location.

Thanks.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

Try searching your computer for it, I would need to be sitting in front of your computer to tell you.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

Plz find the content here

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-windows">
<Machine uuid="{06aac09b-822f-4cdb-9ce5-dd8919a6a263}" name="linux" OSType="Linux_64" snapshotFolder="Snapshots" lastStateChange="2016-09-09T19:24:21Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{b7a130c5-f173-4e4d-8338-820781742f93}" location="linux.vdi" format="VDI" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{9ae8a801-53b7-4da6-8569-3a87800c9353}" location="D:/LINUX sw/V15099-01/Enterprise-R5-U2-Server-x86_64-dvd.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="511,31,800,642"/>
<ExtraDataItem name="GUI/RestrictedRuntimeDevicesMenuActions" value="HardDrives"/>
<ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/>
<ExtraDataItem name="GUI/StatusBar/IndicatorOrder" value="HardDisks,OpticalDisks,FloppyDisks,Network,USB,SharedFolders,Display,VideoCapture,Features,Mouse,Keyboard"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="true"/>
<X2APIC enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="1024"/>
<HID Pointing="USBTablet"/>
<Display VRAMSize="16"/>
<BIOS>
<IOAPIC enabled="true"/>
</BIOS>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="0800279CBCF0" promiscuousModePolicy="AllowAll" type="82540EM">
<DisabledModes>
<BridgedInterface name="Intel(R) Dual Band Wireless-AC 7265"/>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<InternalNetwork name="intnet"/>
</Adapter>
<Adapter slot="1" type="82540EM"/>
<Adapter slot="2" type="82540EM"/>
<Adapter slot="3" type="82540EM"/>
<Adapter slot="4" type="82540EM"/>
<Adapter slot="5" type="82540EM"/>
<Adapter slot="6" type="82540EM"/>
<Adapter slot="7" type="82540EM"/>
</Network>
<LPT>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
</LPT>
<AudioAdapter driver="DirectSound" enabled="true"/>
<RTC localOrUTC="UTC"/>
<SharedFolders>
<SharedFolder name="1225software" hostPath="D:\122 software\1225software" writable="true" autoMount="true"/>
</SharedFolders>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1473448774734608000" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{b7a130c5-f173-4e4d-8338-820781742f93}"/>
</AttachedDevice>
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

The pertinent part of the .vbox file is this:
<Network>
<Adapter slot="0" enabled="true" MACAddress="0800279CBCF0" promiscuousModePolicy="AllowAll" type="82540EM">
<DisabledModes>
<BridgedInterface name="Intel(R) Dual Band Wireless-AC 7265"/>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<InternalNetwork name="intnet"/>
</Adapter>
Between <DisabledModes> and </DisabledModes> are the kinds of network you have tried, and are not using now. Just after </DisabledModes>, and before </Adapter> is the kind of network you are using now.

You are using an Internal network. Internal will not connect with the host or the host network.

Your requirements are:
miavi wrote:I need both linux machines talk each other and both should be able to ping to host windows machine'
You need to choose Host-Only for the network type. All guests need to be on the one Host-Only network, then they will all be able to talk to each other and the host. If you have set anything in the guest OS to alter the guest-s IP address, reset these settings back to getting an IP address from the DHCP server on the network the guest is attached to. Host-Only has the ability to run a DHCP server. Be sure it is turned on, see the main Virtualbox window, File menu, Preferences, Network, Host-Only Networks tab, double-click the host-only ethernet adapter in the list. The adapter tab shows the IP address of the host adapter in the Host-Only network, and the DHCP server tab allows turning on and setting up the ranges on the Host Only DHCP server.

Host-Only defaults to a host address of 192.168.56.1, network mask 255.255.255.0, and the DHCP server is at 192.168.56.100, server mask 255.255.255.0, serving addresses from 192.168.56.101 upward.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

This worked.....THANKS A TUN.

Next problem occurred is:

I was able to ping to guest ip from host, but host name was not able resolvable. Can you plz help me here....and I was not able to connect to winscp to linux from my host windows os.

In host os:
C:\Users\lsowjany>ping 192.168.56.101

Pinging 192.168.56.101 with 32 bytes of data:
Reply from 192.168.56.101: bytes=32 time<1ms TTL=64
Reply from 192.168.56.101: bytes=32 time<1ms TTL=64

In guest o/s:

[root@abc1 ~]# ping abc1.group.com
PING abc1.group.com (192.168.56.101) 56(84) bytes of data
64 bytes from abc1.group.com (192.168.56.101): icmp_seq=1 ttl=64 time=0.073
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

I see the ping from the host to the guest working. But in the guest pinging abc1.group.com resolves back to the guest's address 192.168.56.101. Maybe an issue or configuration problem in the guest OS?

I am not familiar almost at all with Linux, so how to get the host's name into the guest would be beyond me.

To be sure the network between the host and guest is working, share a folder in the host and see if the guest can read and write files to it via the host's Host-Only IP address 192.168.56.1. You could also try the other way: can the host read and write to a guest shared folder via the guest's Host-Only IP address 192.168.56.101. (Use real shared folders, not anything provided by Virtualbox through Guest Additions.) If host and guest can each use the other's shared folders using the IP addresses then the network is working well. After that any connection or name-resolving issues would be handled as if Virtualbox was not present and your guest was another PC sitting next to your host.
miavi
Posts: 11
Joined: 7. Sep 2016, 05:13

Re: network setings for my virtual os

Post by miavi »

I created shared folder and attached to guest as given in screenshot. I was not able to see folder in guest either in /mnt or /media.

As said in Virtual box manulas:

With Linux guests, auto-mounted shared folders are mounted into the /media directory, along with the prefix sf_. For example, the shared folder myfiles would be mounted to /media/sf_myfiles on Linux and /mnt/sf_myfiles on Solaris.
Attachments
Capture.PNG
Capture.PNG (20.68 KiB) Viewed 3750 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: network setings for my virtual os

Post by scottgus1 »

Those are Guest Additions shared folders, which don't use any network. They will not test your network connection between host and guest. Please notice,
Scottgus1 wrote:Use real shared folders, not anything provided by Virtualbox through Guest Additions.
Post Reply