Why won't Fedora 21 Workstation VM on Win 10 machine connect to Win Server 2012 R2

Discussion in 'General Software' started by scharfshutze009, Mar 23, 2016.

  1. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Does anybody know why my Fedora 21 Workstation Virtual Machine on a Win 10 machine won't connect to Win Server 2012 R2 machine when using Hyper-V and a virtual switch with an external interface as well as with it using ethernet connection?

    If so please let me know as soon as you can.
     
  2. rezerekted

    rezerekted 2[H]4U

    Messages:
    3,040
    Joined:
    Apr 6, 2015
    Ask in the Linux OS form, will get more responses there. It is a sub forum of the OS forum.
     
  3. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Thanks, but I kinda already figured it out by calling TWC (Time Warner Cable). They told me that my modem is not performing routing functions and is just set to breach, so I need a router to perform NAT and possibly port forwarding because I thought my modem was performing routering as well as switching with the the modem functions considering it has for ports. However, it wasn't for the reason previously stated and the modem/Router/switch or whatever does not provide port forwarding. Your right though this question belongs in either Linux OS or Windows OS sub forums. Perhaps the moderator can move it there for me, which would make transferring this thread exactly as is easier.
     
  4. gimp

    gimp Pound Me Too

    Messages:
    9,749
    Joined:
    Jul 25, 2008
    port forwarding is completely irrelevant to what you're trying to do in your OP, assuming all the equipment is in your home lab.
     
  5. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I don't know if your right about this yet because my router/switch combo hasn't arrived yet, but I do need the computers to see each other on a network and possibly connect to the internet for updates. Also, the reason I can't SMB fileshare or print share is because my modem is not acting as a router and a switch, so it's why I can't see them on the network either no matter how I try to view them either through the GUI or command-line.
     
  6. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    Simple question. On your windows 10 system, what is your IP address? (Opening up network and sharing center, and looking at the vEthernet adapter that is bridged for hyperV)
     
  7. gimp

    gimp Pound Me Too

    Messages:
    9,749
    Joined:
    Jul 25, 2008
    The router part, yes I can see.
    Port forwarding is only so you can expose a machine to the internet, and make a service accessible from the internet. Port forwarding is only for inbound connectivity. It is irrelevant to LAN and outbound connectivity.
     
  8. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Ok thanks for clearing that up and saving me the time of having to find the answer myself else where.
     
  9. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Um, I'm not telling you this because you don't need to know, but lets just say their not on the same subnet because the public is a 174.100.x.x and the private is a 192.168.x.x.
     
  10. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    I don't really care what the entire IP length is, but are you saying that you have both the 174.100 address and the 192.168 address on your Windows 10 pc?

    What I'm trying to determine is how information plays into the network layout. I assume the windows 10 pc is plugged into the modem, but want to know if the 174.100 address is being used by the Windows 10 pc.
     
    Last edited: Apr 4, 2016
  11. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I fixed that problem because I got a router for this network to do NAT and assign private IP addresses to the network. I also had to turn on Network sharing by going to This PC > Network > and clicking the pop-up message that said Network Sharing is turned off a to select turn on network sharing for private network on both the server and the client. However, my Fedora Hyper-V Virtual Machine still can't see the Server or connect to it because it has no ipv4 address inside the virtual machine and in the Host Operating System has APIPA (Automatic Private IP Address) for the virtual switch. I have the Virtual Switch set to share with the management operating system, but it still doesn't work. However, I don't know if I'm using a virtual network adapter with the same IP address as the host OS and I don't know what else to do, so I get back to it later, but the host OS can connect to the server.
     
  12. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I know, but it's not. It was, but it's not now and the server was using a 192.168.x.x and was the reason they couldn't communicate. Now there both a 192.168.x.x becuase their connected to a router providing DHCP and NAT for private IP addressing instead of Public, but the server is using a static ip and the client is using DHCP. Read my other reply because that's my problem now.
     
  13. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    So if you open up HyperV manager, on the right side of the window there is a button for Virtual Switch Manager. If you open that up it should list some virtual switches. Find the one for your internet connection. It might be Intel something or Realtek something. When you click on that vswitch, verify that on the virtual switch properties it is setup for Connection type "External Network" and that the correct network adapter is listed there, and that the "allow management operating system to share this network adapter" checkbox is checked. If that's all setup, then you will have a bridge between the host OS and the VMs. So the VM should be able to receive DHCP directly from your router regardless of anything that is configured in Windows 10. If that all looks good simply verify that the settings of VM has a Network adapter that is setup to use the virtual switch you are trying to use. If the VM settings network adapter simply says "Network Adapter", it is using a newer type of adapter that may or may not be recognized out of the box by your VM. You can try to add hardware and add a "Legacy Network Adapter" which I know will show up under most Operating Systems. You'd see the difference in your virtual machine as you wouldn't have an eth0 if it couldn't find the virtual network adapter.

    If it's good up to that point, then I'd look for directions on fedora to verify that DHCP is enabled, or maybe try a static IP instead.
     
  14. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I did everything up to legacy network adapter, so I did that and restarted my computer because it won't let me renew the dhcp lease without doing that. However, should I delete the non-legacy network adapter. Fedora 21 is only giving me an ipv6 address when I run the ifconfig command, so maybe that's the problem. The legacy network adapter with the non-legacy is not working, so I need to change something.
     
  15. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    You certainly can remove the non-legacy adapter. If everything is working correctly you should actually be able to use both at the same time, so it shouldn't matter. For troubleshooting it's easy enough to remove the non-legacy while testing to see if we can get it working with the legacy adapter.

    When you have an IPv6 address, does it start with FE80? If so that would be a loopback and not an actual address coming from a system. I don't know if you're using a terminal or a GUI, but I'd probably just try configuring a static IP and see if that gets you online. That way we at least know the connectivity is all setup correctly. How to change IP address in Fedora 21 - FedoraForum.org
     
  16. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I tried this and got the following:

    cannot access when attempting to list the path to system-config-network

    and

    cannot retrieve metalink for repository when attempting to install system-config-network with the yum command.

    I would have pasted the exact output, but Hyper-V won't let me copy and paste text from inside the VM like VM because it doesn't have VMware tools or anything like it that I can find.

    I know there's a way to work around this because I found a similar solution for BSD Unix, but I don't remember exactly what it was and were to find it.
     
  17. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    Yea you're running into the best part about trying to fix a broken pc with with no internet. You need a network connection to fix the network connection. Didn't even cross my mind that yum install wasn't going to work...

    I'm not super familiar with Fedora as I think the last time I used it, they were on version 3. But it does sound like you might be able to just manually edit a text file to set the IP address. (There was some docs about letting the network manager handle this, but since you don't have network manager it shouldn't overwrite your changes)

    How to setup Static Ip in Fedora 19

    if you're in /etc/sysconfig/network-scripts there should be either a ifcfg-eth0 or ifcfg-eth1 file. if you type ifconfig at the terminal window it should show what adapter is currently available. Then just edit the file much like their suggestion and just to a simple ping test to see if you can go anywhere at all.
     
  18. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Nevermind, because the pkgng command and clean installation don't apply to Fedora and doesn't appear to have anything like it in the documentation that I can find.
     
  19. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I tried editing this file, but I don't know what to change. However, I did put the HWADDR line back in by copying my backup over the one being used, but that didn't help because I still don't have an IPv4 address and I still have a loopback starting with FE80:: and a 127.0.0.1. I originally removed the HWADDR line during installation, so I could use the VM or installation with another computer, but I don't really need to since I'll never be doing that with a Hyper-V VM or the drive carrier from the mobile rack.
     
    Last edited: Apr 5, 2016
  20. bman212121

    bman212121 [H]ard|Gawd

    Messages:
    1,520
    Joined:
    Aug 18, 2011
    I'm going to bump this to see if you were able to get it sorted. About all you need for the static IP entry is to just copy what they had, and change the 192.168.8.x information to your IP info.


    NM_CONTROLLED="yes"
    BOOTPROTO=static
    DEVICE=eth1
    ONBOOT=yes
    IPADDR=192.168.8.248
    NETMASK=255.255.255.0
    GATEWAY=192.168.8.1
    TYPE=Ethernet
    PEERDNS=no

    That should be good enough, you don't really need to have the broadcast and network in there. Change the IP and the gateway and that's about the extent of it. the Device will depend on if you have an eth0, eth1, or other, which you should be able to see with ifconfig.

    I've been glancing back a few times but haven't seen you on at any times that I've been online. It might be easier to see what's going on and maybe I could have a better guess at what's not working.
     
  21. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Thanks, but I shouldn't need a static IP because the goal for now is to make the workstation work with DHCP and the server with a static and it is. However, the Fedora Virtual Machine created though Hyper- V can not connect to the folder share or share a printer with the WIndows Server 2012 R2 server, which is really frustrating. I really need a good book for this because the internet is giving me nothing, but crappy solutions and the free trial book for WIndows 10 I got doesn't tell me much of anything useful or relevant to this problem or any other problem for that matter. That same goes for the WIndows Server 2012 R2 pocket consultant. I created the virtual switch as told to and made sure ipconfig is seeing the right virtual switch, which it is. However, the Fedora 21 VM does not have an IPv4 address because dhcp isn't giving it one and the ipv6 address it's giving it is a loopback, so I don't know what the problem is. My guess is that maybe dhcp isn't even enabled on the Fedora 21 WS, but I think it is and I'm still getting this error. I know the IP address needs to be in the same subnet, which it is at least for the Windows 10 and Win Server 2012 R2 because the server has an IP in 192.168.1.x and so does the Windows 10 Client, but the Fedora only has a loopback of FE80:: and so on.

    BOOTPROTO=dhcp

    and

    IPV6PEERDNS=yes

    in the /etc/sysconfig/network-scripts/ifcfg-eth0

    However the Fedora VM cannot see the Local Server, so doesn't work. I don't think your 192.168.8.1 would be in the same subnet as 192.168.1.x anyway.
     
  22. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I need my Linux Networking book by Roderick W. Smith, but I don't have it with me and it's not available on kindle.
     
  23. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Here's roughly what the file contains:

    TYPE=Ethernet
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    NAME=eth0
    UUID=UUID xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx something
    ONBOOT=no
    HWADDR=Hardware Mac Address xx:xx:xx:xx:xx:xx something
    PEERDNS=yes
    PEERROUTE=yes
    IPV6_PEERDNS=yes
    IPV6_PEERROUTE=yes
     
  24. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    None of this matters because I was told I needed to recreate the vm and the virtual switch at the same time, but I was also told that I could just remove the virtual switch and recreate it. However, recreating just the virtual switch didn't work and I don't want to recreate the vm, so I'm not. However, I don't know how I'm going to make it work otherwise and I think virtual switches as well as Hyper-V are stupid.
     
  25. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Ok I guess maybe I can get this to work because I disabled "Enable virtual LAN identification for the host operating system" under Virtual Switch settings and under the network adapter settings for both legacy and network adapter. Now I have an IPv4 address when I run the ipconfig command under windows under the Virtual Switch output section for ipconfig and for the network adapter. Both are in the same subnet because the network adapter is 192.168.1.102 and the virtual switch is 192.168.1.101. However, the Fedora Hyper-V VM still doesn't have an IPv4 address because it only has an IPv6 address starting with fc00 and cannot get out to the internet. Now what do I do because the icon in the top right of the Hyper-V VM says they are connected, but the Fedora VM has no IPv4 and cannot access the internet or the windows folder share.
     
  26. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    I found the final solution, which applies to the this quote and the suggestion to make a virtual switch if not more, which is to run the following commands:

    $ sudo dhclient -v -r eth0
    $ sudo dhclient eth0

    This at least gave me internet access if not access to the fileshare, which I will check later.
     
  27. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Ok I tried to connect to the fileshare and it can't connect, so I'm not sure what the problem is anymore. I tried pinging the server, which was successful. Then pinging the virtual switch which was successful. However, the Fedora VM cannot ping the Windows 10 host OS, so I'm not sure why or what the problem is or if that matters. I don't know what else to do for now, so I'll reply later with the solution if I find it.
     
  28. scharfshutze009

    scharfshutze009 [H]ard|Gawd

    Messages:
    1,861
    Joined:
    May 22, 2010
    Apparently enabling more vlans under "Enable virtual LAN identification for the host operating system" checkbox doesn't help either at least not with 4 vlans.