Workstation 9 Error: Connection activation failed: Device not managed by NetworkManager or unavailable - nat

I have tried to get an answer to this from the people at vmware, but have not received any support.
This is a continuation of the problem I had in this post restoring a CentOS 6 Vitual Machine...
https://communities.vmware.com/thread/459939
As I indicated the Guest OS is up and running after I copied over 015.vdk and did the command line linux check disk. My issue is now the NAT no longer works and I cannot access the outside world from my Guest OS. This may have something to do with the fact that I am not running it from the original Guest OS, but instead am running it from a new Instance tied to the old virtual disk.
When I run ifconfig and ifup eth3 I get the following output:
[root#localhost ~]# ifconfig
eth3 Link encap:Ethernet HWaddr 00:0C:29:F2:F0:F4
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:19 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)
[root#localhost ~]# ifup eth3
Error: Connection activation failed: Device not managed by NetworkManager or unavailable
I have removed all network connection on my Host OS (Windows 7) that were related to the VMWare in hopes it would recreate these connections, but there are now no connections on the HOST related to VMWear. I have confirmed that the VM has a NAT network adapter set up in the Guest OS's settings. Any input would be appreciated.
Thank You

this issue occur because of two reasons:
1#: Your Network Adapter setting issue to check it first remove all your network adapter from device manager and scan to add again, and dont assign static ip set it to obtain auto. repair Network settings and see if these gets ip address. if no IP than is most probably with Vmware Workstation NAT settings.
2#: go to Vmware Workstation--> Edit--> Virtual Network Editor, here you can see different networks which you already created. Remove all Networks here and if you are advance user just delete the NAT network which you are using for your VM.
Now Click on Add Network... Select Any Network Name like VMnet01 or etc than click ok. Now Select Settings which are mentioned below VMnet Information. select NAT than click Connect to host virtual network adapter and than use any Network Setting for your DHCP like 192.168.150.0 and Click Ok. now you have created a New NAT Network.
Now Right Click your Installed VM, go to settings--> Select your Network Adapter, click on Custom:Specific Virtual Network. click ok and start you VM Machine and You are Good to go.

Related

Adding a new NIC to a Docker container in a specific order

I'm trying to have a CentOS container with two network interfaces.
After going through the Docker docs and "googleing" a bit, I found this GitHub issue comment that specifies how to achieve this.
Following it, I created a new network (default type: bridge)
docker network create my-network
Inspecting the new network, I can see that Docker assigned it to the subnetwork 172.18.0.0/16 and the gateway 172.18.0.1/16.
Then, when creating the container, I specifically attach the new network:
docker create -ti --privileged --net=my-network --mac-address 08:00:AA:AA:AA:FF <imageName>
Inside the container, I can check with ifconfig that indeed the interface is present with that IP and mac address:
eth0 Link encap:Ethernet HWaddr 08:00:AA:AA:AA:FF
inet addr:172.18.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::a00:aaff:feaa:aaff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:258 (258.0 b) TX bytes:258 (258.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
The problem comes when I connect the container to the default Docker network (bridge0 a.k.a bridge):
docker network connect bridge <my-container>
Checking now the interfaces in the container:
eth0 Link encap:Ethernet HWaddr 02:42:AC:11:00:02
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2941 (2.8 KiB) TX bytes:508 (508.0 b)
eth1 Link encap:Ethernet HWaddr 08:00:AA:AA:AA:FF
inet addr:172.18.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::a00:aaff:feaa:aaff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2941 (2.8 KiB) TX bytes:508 (508.0 b)
The interface for my new network gets moved onto eth1, meanwhile the interface for the default networks gets eth0.
Also, when checking the configuration file for the interface (/etc/sysconfig/network-scripts/ifcfg-eth0), I can see that the MAC address specified there differs from the one I manually set up when running the container (08:00:AA:AA:AA:FF):
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="52:54:00:85:11:33"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
MTU="1500"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="25016937-1ff9-40d7-b4c3-18e08af0f98d"
In /etc/sysconfig/network-scripts there is only the configuration file for eth0. The file for eth1 (the newly added interface) is missing.
Due to the requirements of the work I'm involved, I need that the first interface has to be always disabled and its MAC address has to be specifically set.
Any other network-related work must go through the new attached NIC.
My question is:
How can I attach a new NIC to the container so eth0 will have the desired MAC address.
Doing this at image level is also fine.
The goal is to have a running container with two NICs: eth0 and eth1.
eth0 will have a specific MAC address (let's say, AA:AA:AA:AA:AA:AA) and will be disabled. All networking will be done through eth1.
I will assume that the Docker image has a user with rights to execute ifdown and/or ifconfig
eth0 is already present in the image and "talks" to the default Docker networ: bridge (created when Docker was installed).
We have to modify the config file for eth0 in the image (/etc/sysconfig/network-scripts/ifcg-eth0) to modify its MAC address: the field called HWADDR in the file.
After this, we have to commit the changes to a new image. Let's call it myImage.
Now, we have to create a new network for the second interface:
docker network create myNetwork
By default it is a bridge network (which is enough in my case).
Since the requirement is to have eth0 with a custom MAC address, we have to create the container without specifying a network; which will connect it to the default bridge network.
docker create -ti --mac-address=AA:AA:AA:AA:AA:AA --privileged --hostname=myHostnane --name=myContainer myImage
It is important to create the container with the --privileged switch so we can take down the eth0 interface.
Now, before starting the container, we connect it to the new network:
docker network connect myNetwork myContainer
Now the container has two interfaces: the original eth0 for the bridge network and the new eth1 for myNetwork network.
At this point, we can start the container:
docker start myContainer
and then execute the order to take down eth0:
docker exec myContainer /bin/bash -c "sudo ifdown eth0"
To take down the interface, we must do this when running a container. The reason is that any changes in the networking files will only persist in its running container, so it's not possible to commit the down interface (old, but still relevant).

IP routing to virtual network interfaces in guest OS

I'm running VirtualBox 5.0.16 r105871 and have an Ubuntu VM running as a guest. VB has created 2 interfaces Adapter 1 (NAT) and Adapter 2 (Host-Only). This seems to correspond with interfaces eth0 & eth1.
My application Docker, has created a new network subnet within the VM which looks like this:
br-9721ebff63d3 Link encap:Ethernet HWaddr 02:42:8E:12:02:02
inet addr:172.20.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:8eff:fe12:202/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:928 (928.0 B) TX bytes:1124 (1.0 KiB)
So my question is, how do I make this network visible outside of the VM ?
did you tried to ping this ip from outside VM?
it should reply. If it's replying than it's visible outside VM.
For example, I have a computer from LAN with Windows_7 (ip: 10.0.255.10). Inside the LAN I also have a linux server (ip 10.0.255.1, not the DNS, just another computer with DHCP). Inside linux server, I also have VirtualBox with an openSuse machine. Both the network cards from VM, are set to bridged.
After VM starts, I can ping the ip of VM and also transfer files without any other settings.
Try and set the interfaces Adapter 1 (bridged adapter), and if needed set an ip your range.
Turns out the solution was really simple in the end.
sudo route -n add 172.17.0.0/16 "boot2docker ip"

cannot connect CentOS VM NAT Connection to actual NIC

I have configured a NAT connection on Centos 6.5 VM and it seems it does not connect to my NIC.
service network restart returns
Bringing up interface eth1: Error: No suitable device found: no device found for connection 'eth1'
ifconfig -a is shown below
eth2 Link encap:Ethernet HWaddr 00:0C:29:90:6C:31
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX Packets:90 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 Base address:0x2024
Well your ifconfig states that you have eth2 device. It is my assumption that you originally had it bridged and changed into NAT.
In /etc/sysconfig/network-scripts/
Create file named ifcfg-eth2
And fill it so it would be configured automatically by DHPC server:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
I am not sure if it should have rights to be executed (chmod +x).

Cannot get ip address on raspberry pi

I'm trying to ssh to my raspberry pi so I wanted to get the ip address as mentioned in the following link using
ifconfig
http://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh/using-ssh-on-a-mac-or-linux
eth0 Link encap:Ethernet HWaddr b8:27:eb:63:40:b8
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27224 errors:0 dropped:0 overruns:0 frame:0
TX packets:733 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2801074 (2.6 MiB) TX bytes:107019 (104.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
I did not get the list that starts with wlan0
I even tried typing sudo ifconfig wlan0 but I got the following error
wlan0 error fetching interface information: Device not found
I'm connected through a wired cable and yes I'm connected to the internet since I can browse websites and for the moment I do not wanna set up any wireless connection I just want to be able to get my ip so I can login to the pi using the ip address
is there anyway I can get my raspberry pi's ip address
I do not know exactly what was the problem but when I was using the ip I was getting from ifconfig I was not able to ssh to my pi when I typed
ip route
I got another ip so I used that and tried to shh to my pi and it is working now
Use
sudo ifconfig -a
if you want to use ifconfig, but as it is deprecated you should use
sudo hostname --ip-address
It doesn't seem to be connected to the network. Although just to double check, connect to your router (usually 192.168.0.1 - if not ipconfig on your machine, then go to your default gateway), login, go to devices and look for the mac address from your pi (b8:27:eb:63:40:b8) You can check the Local IP address from there... If it is connected to the network properly though
Do you have a wlan-card connected to the device? Is it via USB? Did it install correctly?
Do you have a working network connection at all on the device? Try pinging something, for example
ping 8.8.8.8
and see if you get a response. If not, you are not connected to internet, and need to either install a wireless card via USB or connect a network cable.
For ifconfig to work, you have to be connected to the device. Plugging in ethernet cables does not ensure that your computer has recognized the connection. Here is what you can try-
Go to Network Settings -> Edit Connections
Add a new connection
In IPv4 settings, change Method to "Shared with other computers"
If everything goes well, you will see connected notification. Try doing ifconfig again.
Sometimes, the IP address shown in ifconfig might not work. In that case, just use nmap to search the subnet (the last digit of IP address), and try to login on other IPs.
Try this code :
hostname -I
This should show u the IP address of ur RPi if it is set.
If it isn't set, type
sudo nano cmdline.txt
And in this file append the following in the end
IP=192.168.0.4
This should set the IP and by typing the command, you should be able to see it..

Using SSH to connect to virtual box guest machine using IPv6 address

I am using windows, and I'm also running an ubuntu server on virtual box. I've SSH'd into the guest machine countless times in the recent past when the guest machine was connected to a network using IPv4 addresses. This worked back when I was at home and at work. Right now, I'm connected to the university network. Here's the result from ifconfig when executed in my VM.
eth0 Link encap:Ethernet HWaddr 08:00:27:ae:e4:a0
inet6 addr: fe80::a00:27ff:feae:e4a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:65404 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7588239 (7.5 MB) TX bytes:10610 (10.6 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1296 (1.2 KB) TX bytes:1296 (1.2 KB)
I did some research, and found this post on SO.
IPv6 link-local address format
So I ran netsh interface ipv6 show address on my host machine and this is my vbox network info
Interface 208: VirtualBox Host-Only Network
Addr Type DAD State Valid Life Pref. Life Address
--------- ----------- ---------- ---------- ------------------------
Other Preferred infinite infinite fe80::f8cd:e410:b1b1:c081%208
I then tried pinging the address, and it was successful. I then tried to SSH into the server, using the following command
ssh -6 fe80::f8cd:e410:b1b1:c081%208
And I got this error
"no address associated with name"
I don't understand why I'm getting this error - I've ssh'd into machines by specifying their ipv4 addresses before, and I've never gotten this error before. Could anyone tell me what I might be doing wrong?
Thanks for the help!
Try specifying the interface to the ssh client. however ssh does not have a switch for that, you have to use this syntax:
ipv6%eth1
fe80::f8cd:e410:b1b1:c081%eth0

Resources