I found a solution that gets me internet access, but while internet is working, I'm having trouble installing some software that is finicky about subnets, and I'm wondering if the way I did this is the problem. I really don't understand what most of these commands are doing. (Note that the original command on the source link was ip addr add 172.20.0.1/16 dev br0, as well as a corresponding DHCP range. I *need* the VM to be in the same subnet as my server. I've set it so that my router's DHCP won't assign anything higher than 192.168.1.200.)
Basically, I ran these commands:
Code: Select all
ip link add name br0 type bridge
ip addr add 192.168.1.201/27 dev br0
ip link set br0 up
dnsmasq --interface=br0 --bind-interfaces --dhcp-range=192.168.1.202,192.168.1.215
modprobe tun
ip tuntap add dev tap0 mode tap user USERNAME
ip link set tap0 up promisc on
ip link set tap0 master br0
sysctl net.ipv4.ip_forward=1
sysctl net.ipv6.conf.default.forwarding=1
sysctl net.ipv6.conf.all.forwarding=1
iptables -t nat -A POSTROUTING -o wlp6s0 -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i tap0 -o wlp6s0 -j ACCEPT
# now run (as your user):
# $ qemu-system-x86_64 ... -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no
Now, this *could* just be Windows being Windows. I've had similar issues in the past, even without VMs. But the FAQ page lists in the requirement "the client computer is on the same IP subnet as the server that is running Windows Server Essentials."
I've also tried just joining the VM to the domain, rather than installing the connector software, and it tells me it can't reach the active domain controller. The error details there say that the "DNS name does not exist" and says a common cause is "The DNS SRV records required to locate a AD DC for the domain are not registered in DNS. These records are registered with a DNS server automatically when a AD DC is added to a domain. They are updated by the AD DC at set intervals. This computer is configured to use DNS servers with the following IP addresses: 192.168.1.201." (Seems plausible that since my 'real' DNS is something different, that's causing issues, but I'm just speculating) Solved this particular issue; see post 2 for my new issue.
Right now, the subnet mask listed if I run ipconfig /all in the VM is 255.255.255.224. I'm wondering if this is the root of my problems. I'm guessing not, as I can ping the server, but I could ping the server when the VM IP was 172.20.0.X, too.
Is there a way I can tweak the above commands so that Windows thinks it has the typical subnet mask (255.255.255.0)? Trying to manually set it inside Windows broke internet connectivity.
Or any other ideas about what might be wrong?
Thanks!