I have a situation like, I need to run a program inmy Mac machine from a windows machine. Both are in same network.
If I have written the program as jar executable and located it in Mac ,
Will it be able to execute remotely from a windows machine.
I know this can be achieved by hosting a web service in Mac and accessing this service from windows can be done.
I need to know is there any other way so that I can execute a shell command in windows and trigger this program in Mac
The program will be a command line app. I need to programmatically invoke this app from windows PC
On the Mac, you need to enable Remote Login in the Sharing pane of System Preferences. On the Windows machine, you need an SSH client. You can then use the SSH client to connect to the Mac (with the proper credentials) and issue commands.
Related
If I create a container with windows image on it, is it possible to use a remote connection to actually see the desktop and , for example, play minesweeper?
My use case is this:
I have hundreds of users. Each user need to create their our infrastructure consisting in about 6 machines linked together. After creating, the user will open some desktop gui apps on each one using a remote desktop connection.
No, this isn't something you will be able to do.
There are currently two Windows container images, microsoft/windowsservercore and microsoft/nanoserver
nanoserver
This blog post about TP4 (one of the earlier releases) says
The only option available when logging into console of a virtual machine running Nano Server or connecting a crash cart to a physical Nano Server is this very plain emergency console
This section on managing Nano server also states
Nano Server is managed remotely. There is no local logon capability at all, nor does it support Terminal Services.
There is also this article, admittedly not from Microsoft, about Windows Nano server
Nano Server strips back the operating system further still, dropping things like the GUI stack, 32-bit Win32 support, local logins, and remote desktop support.
Nano Server is designed for two kinds of workload: cloud apps built on runtimes such as .NET, Java, Node.js, or Python, and cloud infrastructure, such as hosting Hyper-V virtual machines.
servercore
Docker blog has a pretty interesting entry
Introducing Docker for Windows Server 2016. This part addresses the question of GUI apps
The Windows Server Core image comes with a mostly complete userland with the processes and DLLs found on a standard Windows Server Core install. With the exception of GUI apps and apps requiring Windows Remote Desktop, most apps that run on Windows Server can be dockerized to run in an image based on microsoft/windowsservercore with minimal effort.
If you wanted to set up that kind of an environment, one option is to use something like Vagrant to orchestrate starting and provisioning regular windows VMs. Though 6 windows VMs will not be easy on memory.
I am trying to run commands on the cmd prompt of my windows xp mode virtual machine from my main computer which is in windows 7. I've tried to look at the name of the windows xp mode computer which is virtualXP-63912, so i tried : "psexec \\virtualXP-63912 cmd" but it doesn't work. Any ideas of how I can get this to work?
As seen here, you need to change your VM from 'NAT' mode, which allows for web access but no local network connectivity (which is what you need to be able to psexec or run remote powershell commands on your XP mode VM, and also to be able to access the \computername\admin$ share, which is what PSExec uses for remoting) to NIC mode, which will bridge your VM to the network, and give it a local routable IP address.
In short, open the Windows XP Mode console, select your XP Mode Vm and go to settings, then change the network setting to bridged, as discussed in this post from Microsoft on the issue.
Finally, if I may suggest it, move off of XP Mode. It's not supported well these days and the new replacement, Hyper-V for Windows 8.0 and above is built-in to the desktop OS and is much, much more feature filled. You can copy and paste from your desktop into a VM, and run machines with Linux, even OSX on your Windows machine.
First, my setup:
Mac OSX 10.8
Windows 7 running in VM (VMWare Fusion)
SQL Server 2008 R2 running in VM
Boatload of Python scripts + my highly customized Python installation on the Mac side.
I'd like to be able to run scripts locally on my laptop against a snapshot of our development database, which exists happily in my VM. I'd also like to not have the PITA that is rebuilding my Python installation in the Windows VM.
So the question: how can I access the SQL Server instance running in my VM from the Mac side? To access the production data, I use pymssql, which is based on FreeTDS.
I am running with this configuration, as follows:
Create an additional network adapter for the VM and set it as
"Private to my Mac". The default network adapter created during the VM set-up will be used by Windows to get to the network to which the Mac is attached (Internet, etc.) and this new one you create will be used for communication between the Mac and VM host.
The Mac IP on the virtual network can be identified using ifconfig. In my case it was named vmnet1 with IP 192.168.23.1
The Windows VM IP will, by default, be dynamically allocated. You should go into the network setup in Windows and set a static IP that is on the same network as that of the Mac IP. In my case the Windows network adapter created by Fusion was named Ethernet1. I set this to 192.168.23.100/255.255.255.0. Do not set a gateway address as you do not want routes down this path
Create an entry in the Mac /etc/hosts file for the Windows IP, e.g. "192.168.23.100 mywinsys.local"
Create an entry in the Windows /windows/system32/drivers/etc/hosts file for the mac IP, e.g. "192.168.23.1 mymacsys.local"
Be sure to turn off Windows firewall or otherwise open up necessary ports
Be sure that SQL Server is configured to accept IP connections
https://technet.microsoft.com/en-us/library/hh231672(v=sql.110).aspx
Processes running on the mac can connect to Windows processes with mywinsys.local. Processes running on Windows can connect to Mac process with mymacsys.local
As I know, I can connect to remote Windows server through SSH from Linux and use Powershell. But how I can connect without ssh from linux? Maybe exists native tools?
If you wanted a remote desktop session, you could use the rdesktop package:
Description: RDP client for Windows NT/2000 Terminal Server
rdesktop is an open source client for Windows NT/2000 Terminal Server, capable
of natively speaking its Remote Desktop Protocol (RDP) in order to present
the user's NT/2000 desktop. Unlike Citrix ICA, no server extensions are
required.
I'm unaware of any other native Windows protocols similar in spirit to ssh.
I guess you could install a VNC daemon on your Windows system so you could use VNC clients on your Linux boxes. Or you could install (well, no, please don't) a Windows telnet daemon, and use telnet to connect. Or you could install Citrix on your Windows server and use the Linux Citrix client. (Not a solution I enjoyed using in the past. I'd recommend sticking with ssh or VNC instead.)
If you want to get a shell you can try winexe
it works quite well on fedora
I need a virtual server for web development, it'll host Apache+Postgres+Ruby+something else.
What's the most effective software to run such a server? (ie with least virtualization overhead)
Is there a way to run Linux as as service?
I use VirtualBox at the moment, but it's inconvenient in some ways, such as it needs an emulator window open which also captures keyboard input when alttabbed into.
(Also, coLinux hangs at boot on my machine, so it's probably not an option)
Check out the features of VMWare Server. It's free, you just have to register.
I've never found VMware to be much of a performance hog unless running 3+ virtual machines.
The latest free server version (VMware Server 2) runs as a service IIRC, so you can set up your dev server to start up and shut down when your PC does, and you can either log on to the VM's console through the web interface, or create a shortcut on your desktop so it's fairly non-obtrusive.
There is a very convenient utility that hides VirtualBox from the foreground completely: vboxctrl. With vboxctrl you can run a Linux server on your Windows machine, make it automatically go to sleep when Windows shuts down or hibernates; then use any SSH client to log in to the server. Or you can use Xming to open graphical windows from the Linux server; I've worked quite a lot of time in GVim open through Xming.
If anyone needs more details, leave a comment, I may write an article about this.