does anybody know an API that allows to send and receive data to/from a VMWare guest system without using an IP network?
I have to communicate with a program inside a VMWare guest but the guest is not allowed to have an IP network. As file transfers into the VM via Drag&Drop are possible I assume that there is an API - I just need to know if this API is open to 3rd party programmers or if it is only available fro the VMWare Player itself.
Sure, you can access those with the VIX API.
More specificely, the Drag&Drop is implemented with following functions:
VixVM_CopyFileFromGuestToHost
VixVM_CopyFileFromHostoGuest
Basically all VixVM functions may be relevant for your tasks. They are all documented in the official VIX API reference.
It turns out that there is a solution for my problem:
Virtual Serial Port
VM-Ware allows to create virtual serial ports for the guest that are connected on host side to a named pipe.
I therefore created two helper programs, one on host side which listens on a TCP port and a specific named pipe and transfers all the incoming data between them.
A second helper program runs in the guest VM and does the same between the serial port and the TCP port I want to access.
The only draw-back is that the serial speed is limited to 128kBit/sec. May be that can be increased by using multiple virtual serial ports...
Virtual Machine Communication Interface (VMCI)
Using VMCI there is an API for creating a shared memory region that is accessible from both hast and guest system.
Related
I am connecting my controller PC to a Pica8 white switch via the Management port. I can SSH into the switch and ping the controller PC, however I cant ping the hosts through the standard ports. I have created a bridge of the first four ports and have successfully pinged from host to host after I installed a flow that allowed it.
My question is, is there some kind of mechanism separating the controller port from all of the data ports, I would think I should be able to ping from the switch to the hosts.
I'm not sure this answers your question, but before pinging the management port I believe you need to set an IP for it via the console port.
I use minicom per the instructions located here. However, I am using the RJ45 to DB9 adapter cable -> USB Serial port connection. That looks like so.
Unfortunately, that creates a problem with minicom, since the instructions tell you to simply power up the switch and observe the received data. There is actually a little more to it than that. You have to configure minicom's serial port. Fortunately, there is a tech blog that I found very helpful. If you follow the provided instructions, it will walk you through changing ports. Once you modify the port that minicom is listening on (For me it is Port /dev/ttyUSB0), you should be able to configure your management port.
I have developed an IOT module which can connect to the Wi-Fi and send data to the internet, the module can send data (string) to specific IP address on the specific port.
The internet server should store that information to the data base and display that information to the user via HTTP (web page).
When I set the port to the 9081 (any random number) and my local computer IP address as IP address that module should send data to, I can see data on my local computer terminal.
My question is that how can I send that data to the internet?
What I have in mind is that I can purchase domain name, host and develop a web site (HTTP) which by default listen to port 80. The service provider only give me a basic services such as HTTP, HTTPS and FTP which make it possible to upload website and I don’t have access to other protocols and ports.
Should I purchase virtual private server or I should use any specific cloud services or the module can send data to the server on port 80 without getting conflict with web pages and web contents?
Please give me some suggestion.
I did something similar with an IoT module. There are two options that I also considered. Before we describe, there is no need to buy a domain name. You can comfortably use the IP address to connect to. If you have some spare cash go for it.
Send everything to the web server on your local computer. To have access to the local computer you must enable port 80 to be accessible over the internet. You do this on a router. This is called port forwarding. You setup a rule such that all the requests made to your IP address on port 80 should be redirected to your local computer on whatever port the web server is listening to. This is the cheapest method available. Also, there is an important limitation: you're local computer needs to be switched on all the time if you want to access the data.
Buy a droplet (virtual private server). The workflow is the same as 1, but you don't need to port forwarding anything. These are usually setup and ready to use. However, this is usually expensive. Most of these providers offer pay-as-you-go services (e.g., Digital Ocean is the one that I used). There are other providers which offer free but limited versions. These are usually developer trial versions. If you go over a number of transactions, or space, you will have to pay (have a look at Parse).
I'm trying to workaround a DHCP issue by configuring my guest VM to use DHCP (to avoid having to configure it manually with a static IP) but defining a static IP in the XML.
This would enable setting an IP upon creation while not requiring configuring the virtual machines operating system to a static IP (making it sort of "independent").
I should point out:
Guests are Windows/Linux mixed
Must use a bridge setup (not NAT)
Is this a reasonable solution? any recommendations to the actual XML markup of the guest?
When saying static ip configuration instead of DHCP, it's not a libvirt thing but a configuration of guest OS. refer to this maillist for example.
So you can make it via a custom DHCP server that listens on your bridge network instead of default NAT. it only assigns specific ips to specific mac addresses. It's very easy to make it via dnsmasq.
If you do want to exclude any DHCP broadcast in your bridge network, think about bootstrap processes inside your guest OS. The config drive is a good choice where it allows you creating a disk file and attach to the VM, then the cloud-init daemon on guest OS will pick it up to replace network configuration. But it's just too many if you just want static ips.
I have a proprietary application running in my PC that listens to a specific IP address broadcasts in the NIC I bind him to.
I did an application to generate this UDP broadcast packet but the other application doesn't 'see' this packet when I have it running on the same PC. If my application is run in other PC within the same physical network it does detect.
I tried the following configurations none of them worked:
Proprietary app bound to Local Interface main IP.
My application bound to Local Interface 2nd IP.
and
Proprietary app bound to Local Interface main IP.
My application bound to Microsoft Loopback Adapter IP.
All communication is happening per Wireshark debugging, all applications send the right packets, except the Proprietary application never 'recognizes' my application.
The platform is Windows 7, and my application was done with QT, it mainly binds to the network IP with sharedaddress and writedatagram to the broadcast address.
Thanks
In order to notify all computers within the same LAN about my existence, I want to broadcast my hostname and IP address.
How do I go about doing so without sending them as a string?
Avik, this is what DNS is meant to be used for. While "regular" DNS is meant to hold names and IP addresses for each machine (statically configured), there is a dynamic DNS protocol which allows machines to update their DNS entries in real time.
This sort of capability is used in some of the office environments for my clients where printers on a machine are shared but the machines they're attached to use DHCP (meaning their IP address can change).
See here and here for details and the Windows implementation with DHCP.
Lets call your machine that wants to advertise itself the SERVER and all the machines that can use it, the CLIENTS.
Of course, dynamic DNS only notifies DNS itself of the name/IP mapping and is useful if the CLIENTS are already aware of your SERVER so they can get the IP address from DNS. If you have no way for CLIENTS to discover that your SERVER has just been added, you'll still need to broadcast a packet occasionally indicating that your SERVER exists (this will only need the SERVER name since CLIENTS will use DNS to get the IP address).
This broadcast packet should be picked up by all CLIENTS and kept in a local table. If the communications from a CLIENT to your SERVER fails, the local table entry for your SERVER should be removed (it'll be re-added when your SERVER broadcasts again).
Basically re-inventing NetBIOS or ZeroConf, as popular with small embedded devices for discovery by a Windows or OS X based installer or setup utility.
You can try to use UPnP Discovery.