I'm using Ubuntu 14.04 LTS on my laptop to host a Windows 7 VirtualBox instance. What I want to do is connect the laptop to a network (either wired or wireless) then run an app in the Windows VM that connects to an IPv4 multicast. The app is written in Qt 4.8.2 and I'm running it in QtCreator. When I run the app it fails to join the multicast group:
QUdpSocket *udpSocket = new QUdpSocket(this);
bResult = udpSocket->bind(port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
bResult = udpSocket->joinMulticastGroup(address);
If I step into joinMulticastGroup() I can see setsockopt() returns -1. This code works fine in native Windows. I've tried attaching the VM network to NAT or a Bridged Network to eth0 (with Promiscuous Mode set to Allow All) but neither works.
Does VirtualBox just not allow this or is there some setting somewhere I need to adjust, either in the VM or on the Linux host?
Note: I can't run the Qt app in Linux because it depends on third-party libraries that are only built for Windows.
Try setting Promiscious Mode to "Allow All" on the VMs network adapter in Virtualbox.
In the end I fixed it accidentally by following up on a USB problem I was having - thanks to Ramon Suarez for his answer to VirtualBox doesn't recognize USB.
Related
I set up a php file in my raspberry pi so that I can access some files on it from my local network.
Within raspbian, it works well in any browser using localhost/test. I tested it also in a Windows and a Mac computer in the same network, using my.local.ip.address/test in my browsers and it also worked fine.
Now here is the problem: in my linux computer, it does not work. It simply says that "the site cannot be reached". I already tried disabling the firewall (UFW) but it doesn't change anything.
I also tried several browsers in linux and the result is the same.
I think I am overseeing something obvious but I cannot see it.
Could someone give me a pointer on what might be wrong?
ifconfig -a output (Linux machine)
ifconfig -a output (Raspberry Pi machine)
It's possible that your Ubuntu machine is not in the same network. You can try theses steps to confirm :
Ping
Go on your ubuntu machine and type :
ping <rasp.pi.local.ip.address>
Go on your Raspberry Pi and type :
ping <ubuntu.local.ip.address>
If the ping request do not succeed your machines are probably in different networks. Your can use this command to watch the path used by packets between your ubuntu machine and your Raspberry Pi :
traceroute <rasp.pi.local.ip.address>
Change network card settings
Before this step, check if your are able to connect your machines togather (switch, router, vlan...).
ifconfig <interface> down
ifconfig <interface> <ip.network> netmask <netmask.network>
ifconfig <interface> up
After completing theses steps try to ping again and access to your website.
I want to create a Selenium grid hosted in my ubuntu linux 12.04.
My goal is to make this selenium grid communication with a Windows VM with a node role.
My problem is that when i create the selenium grid in the Windows VM i have this error
14:35:00.200 INFO - Registering the node to the hub: http://xxxxx:4444/grid/register
16:35:01.232 INFO - Couldn't register this node: Error sending the registration request: Connect to xxxxx:4444 [IP] failed: Connection refused: connect
My VM is a Windows XP. I try to disable the Firewall.
I'm sure that is a Ubuntu problem, because with an other Windows VM, the problem is the same. I can ping Host to Guest and Guest to Host
In ubuntu, i disable the firewall too, but nothing change.
In ubuntu i declare the hub like this
java -jar selenium-server-standalone-2.52.0.jar -role hub
In the Windows VM i declare the node like this
java -jar selenium-server-standalone-2.52.0.jar -role node
Any ideas about what is blocking the communication ? Thanks for help _
make sure during the virtualization process, the ports 4444 for the grid and 5555 for the nodes are being opened.
Then in your node role, make sure to specify the -hub parameter. when not specifying the hub parameter, it defaults to localhost.
I'm sure my lack of linux knowledge is what's causing this problem. I created a program in C# which uses QuickFix to do various things. I need this program to run on linux so I created an ubuntu virtual machine and recompiled the program with mono. The application starts ok but can't connect to my simulated exchange running on a windows machine. The error log returns Connection failed: Connection refused.
Could it be that I haven't setup linux properly?
Thanks
See if your VM can actually connect to that port (while the windows application is listening) with telnet:
telnet <ip> <port>
If telnet can't connect to the port, then you should probably check your VM network configuration, the interface configuration on ubuntu, and probably the firewall (both on windows and linux). Run ifconfig to see how your network is configured.
I am trying to scan wifi networks via Linux terminal running on a virtual machine. I am running virtual machine on Mac OS. On MAC terminal, I can see all WIFI networks using (airport) command and can connect to one network.
The NetworkAdapter setting for Vistual machine is set to "Share with MAC".
On Linux terminal, When I do ifconfig -a, I get
eth0 & lo
However, when I type : sudo iwlist eht0 scan , I get error message:
sudo iwlist eht0 scan
Can someone help that how I can do that with Linux running on virtual machine ? ? What I am doing wrong . .
On every VM I've ever seen, the virtual machine emulates the WiFi interface of the host OS (Mac) as an ordinary wired interface to the guest OS (Linux). Therefore you can't scan for WiFi networks from the Linux, because as far as it's concerned, it's not a WiFi interface.
The exception to this would be if you attached a USB WiFi adapter and had the guest OS natively recognize it as a USB device (meaning it would be ignored by the host OS). Note this may not work on some virtual machines; VirtualBox is particuarly bad at recongizing network adapters.
well if you:
nmcli dev wifi
it will show you all the wireless access points (ESSID) available then you can
nmcli dev wifi connect $ESSID password $PASSWORD
example
nmcli dev wifi connect "School Hotspot" password "q5w4e3r2t1y0"
That kinda thang :-)
I created a ubuntu server on vmware. I am using it as a file server. I can access it if I am connecting through the machine which hosts the virtual machine. I am not able to do it from other machines which are on the same network. Thanks in advance!
First of all make sure in the setting of the virtual machine that it is in Bridged Adaptor type connectivity.
Give a static ip to the virtual machine using
sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0
the above is an example. You got what I mean.
3.Third, Try pinging the virtual machine with the base machine running the vbox to make sure they are connected.
ping ipaddress-basemachine
4 . Now if everything is working fine from there then connect with this virtual machine with other base machine using Remote Desktop Viewer or any other similar application.
Specify, the ip-address of the vbox and username, password. It will be able to connect with it now.
5 . If it still is not able to then try to check the firewall rules on both the virtual box machine and the base machine running the vbox using the command
iptables -L