Skip to navigation

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.

All things Linux and Open Source

Moderators: greemble, TimDanton, graham_epu, Bluespider, Barry_Collins, StuartTurton, timark_uk, gullyg, PCPro Moderators

How to autostart virtual computer

Postby imant1 » Thu Mar 08, 2012 12:53 pm

Hi, I am in a project that required to auto-start virtual PC ( must be Windows Based) on Linux VPS. The virtual PC must automatically run my exe file (for my company web service).

Illustration:
My public IP is 123.456.7.89
My virtual PC IP must be : 123.456.7.90 (how to do this this?)

What is your recommended software to do this? VMware? Any other recommended tools?

Thank you.
imant1
 
Posts: 2
Joined: Thu Mar 08, 2012 12:37 pm

Re: How to autostart virtual computer

Postby Burn_IT » Tue Mar 13, 2012 6:28 am

Why are you trying to do this? It seems to me that you are making it more difficult than you need to.

Define the problem you are trying to solve (and why) in English rather that what you think is the solution.

There may be easier ways of solving the problem - for instance using Wine under Linux

You will need an extra Windows licence for the one you thing will be running in the Virtual Machine (if you haven't already got it).

Autostart of programs are easy in both Linux and Windows.

I have a USB disk that boots into Puppy Linux and that autostarts Virtualbox and runs a VirtualXP.vdi . The XP then autoruns a lot of programs. It is what I use when 'on the road' at clients sites.
Dave

I cannot remember the last time I forgot something. ;)
User avatar
Burn_IT
 
Posts: 790
Joined: Thu May 07, 2009 1:39 pm

Re: How to autostart virtual computer

Postby imant1 » Wed Apr 18, 2012 4:06 pm

Hi, thank you for your reply.

I want Fedora to autostart "Windows based" program which I made by myself (let's called it "prog.exe"). Since the extension is .exe, I must run it from Windows OS, right?

This prog.exe has function to manage MySQL request from my website (online booking) which will pull data from MYSQL database which stored at Fedora. Then prog.exe will return the value to my website. I currently run this prog.exe at one of my PC in my network.

The problem is: when my staff restart the PC due to some Windows issue, I need "prog.exe" to autostart and runs in background.

I am tired to start the prog.exe manually when my staff restart the PC.

I've written .bat in Windows but can't figure out how to simulate "enter" when auto-run "prog.exe".

I am thinking to use VMware or other virtual machine on my Fedora and connect them. I need the new virtual machine on Fedora to have Local IP address, ie 192.168.1.12 instead of its private IP (169.254.48.30) with Fedora. I need it to have Local IP address since I use mikrotik and forward incoming request via specific port from Public IP Address.

Current flow when there is data request are:
my web-->Public IP-->mikrotik+port-->local PC (192.168.1.12)-->my Fedora server(192.168.1.254)-->local PC(192.168.1.12)-->mikrotik+port-->Public IP-->my web

I need to change "local PC" to virtual machine on Fedora and autorun it when Fedora boot/start-up. Or I need .bat script in Windows to autorun prog.exe.

BTW, I store "prog.exe" at Fedora to avoid Windows virus.

I hope my explanation is clear. Do you have any solution for this? Thank you in advance.
imant1
 
Posts: 2
Joined: Thu Mar 08, 2012 12:37 pm

Re: How to autostart virtual computer

Postby Burn_IT » Wed Apr 18, 2012 4:58 pm

On what Operating System and version are you currently running your program?
If it is Windows, and that is the machine that is getting restarted, it is easy (provided you have authority) to add your program to the Windows Start up list so it is automatically started when Windows is restarted. Then if think your problem would be solved

If we can do that it will be simpler and more robust than trying to get layers of emulation/virtual machines working with the address translations.
Dave

I cannot remember the last time I forgot something. ;)
User avatar
Burn_IT
 
Posts: 790
Joined: Thu May 07, 2009 1:39 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2010