Access to a server on a Parallels VM - networking

I've installed Parallels with an Ubuntu VM. In the Ubuntu VM I've installed an Oracle lite database and other services on other ports.
Now from OS X, I want to access to my Linux VM.
Can I use 'shared network'?
What IP address I have to use? What port?

You can check your IP using ifconfig both in your Linux or Mac boxes.

Related

Accessing VirtualBOX Machine's server from host OS

My host machine is a Windows 10 OS.
My Virtual Box guest machine is a Ubuntu OS.
I launch a server and a gateway in my virtual machine in the following addresses:
https://127.0.0.1:8089/
https://127.0.0.1:18443/
I dont have any problem to access them from the guest machine. However, I would like to have access to those addresses from my windows host. How can I get it?
In order to access services hosted on your virtual machine from your host you need to configure your virtualbox network settings for that machine to bridged network, which will allow it to have an IP inside your LAN. You can find more information on virtualbox network types here.
Another option would be port forwarding with a NAT network configuration, where your host port would be a port over 1024 and the guest port would be your virtual machine ports (8089 and 18443).

How to do port forwarding on VMWare Player 14.1.2 (Ubuntu 18.04 guest, Windows 10 host)?

I have a VMWare Player (14.1.2 build-8497320) running a Ubuntu 18.04 guest on a Windows 10 host. The Ubuntu guest has a LAMP stack that runs a few web applications. I am using NAT to connect the Ubuntu guest to the Windows host's network.
I can access these applications by using the local IP address of the guest (e.g., http://192.168.80.128/mediawiki) from my Windows host. But I want to access it like so from my Windows host: http://localhost/mediawiki. I think this should be possible if I can forward the port 80 of my Ubuntu guest to that of the Windows host.
How do I make this happen please? I don't have access to VMWare Workstation and its Virtual Network Editor.
Edit: I should probably add the motivation for wanting to do this. Basically, I want to avoid figuring out the IP address of the virtual machine everytime I access the web applications.
The (further) reason is that the local IP address of the Ubuntu guest might (I suspect) change, and that will affect quite a few things, such as the base URLs configured in the webapps' configuration files (e.g., the $wgServer variable in LocalSettings.php of MediaWiki).
VMWare Player supports port forwarding over NAT natively:
In the file C:\ProgramData\VMware\vmnetnat.conf put under section [incomingtcp] a line like:
80 = 192.168.80.128:80
Then restart the VMWare NAT Service :
net stop "VMWare NAT Service"
net start "VMWare NAT Service"
Source/credits: https://hitchhikingtheweb.wordpress.com/2014/09/02/portforwarding-with-vmware-player-and-nat/
Also: VMWare documentation of this
You can do it using SSH Tunneling for example.
From windows you open a tunnel from the windows port 80 to the ubuntu port 80.
You can do it using Putty on Windows and having the ssh deamon running on ubuntu, which I guess you should already have.
There are many tutorials on how to do this.
I'll add just one link, but you can always google it and find one that suites you.
Portforwarding with SSH (Putty)
For the possible changes in the guest’s ip:
If you can’t fix the ip in settings then perhaps you can edit the windows hosts file and add a host name for the current Ubuntu ip. Then build the urls using the host name. If the ip changes you change it in the hosts file.

openstack: unable to ping and ssh from host network to guest network

i have centos 7 linux machine. I have openstack installed on it. In openstack i have installed cirros os image. I am unable to ping and ssh from centos to cirros os image.
To access the guest machine from the host machine:
Option-1: You need to use the provider network or external network for creating the guest machine.
Option-2: If you use internal network for the guest machine which is internal to particular openstack tenant/project then you have to create a floating IP pool and attach one floating IP to that guest instance
Using one of the above options you can access the guest machine from host machine

Setup serial port on Virtualbox for working with Pyserial

My host machine's running Ubuntu with Windows XP guest via Virtualbox.
My Ubuntu host have one serial port(/dev/ttyS0), and now I want to use hyperterminal inside XP guest to send & recieve data via serial port(COM0) to my Ubuntu host
On the Ubuntu host I use pyserial to read & write data to XP guest.
How to setup Virtualbox for this case?
Thanks!
I think you are using the same serial port on your host and guest OS's.
If yes, you can't.
Or you bind the guest OS serial port to the real serial port and use another serial port on your host (connected by a null modem cable), or you have to use sockets on the host. This socket is created by VirtualBox ( http://www.virtualbox.org/manual/ch03.html#serialports):
On a Mac, Linux or Solaris host, a local domain socket is used
instead. The socket filename must be chosen such that the user running
VirtualBox has sufficient privileges to create and write to it. The
/tmp directory is often a good candidate.
On Linux there are various tools which can connect to a local domain
socket or create one in server mode. The most flexible tool is socat
and is available as part of many distributions.
In this case, for on the Linux host, you won't be able to use PySerial.
But on the guest OS, PySerial will work fine, as to the guest OS the virtual serial port will look like a real one.

How Can I access to my virtual machine with ip?

I have Oracle Virtual Box installed on Ubuntu 10.10. I want to gain access to my script that runs on local. My virtual operating system connects via network and takes an ip address, but how would someone access my script that runs on local? Which ip address can be used?
If you use bridged network and your VM is on Ubuntu 10.10. One easy way is to use ssh. By default ssh is installed and configured in Ubuntu 10.10. You can connect to it by :
ssh you_virtual_machine_ip
ssh is a powerful tool and your can run scripts when connected to the host.
If you are in Windows System, Putty is a great tool of ssh client.
type this from your host os
and you have to open the port 80 from guest OS (Ubuntu)
http://you_virtual_machine_ip

Resources