LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 06-03-2012, 05:53 AM   #1
guardian1
LQ Newbie
 
Registered: May 2012
Posts: 19

Rep: Reputation: Disabled
Running a script in VM (from hypervisor)


Hi guys,

I was wondering whether it is possible to execute a script or a process in a virtual machine from a hypervisor such as Xen.

My thinking is along these lines - a particular event is triggered - the hypervisor (configured to look for this sort of thing) catches this event (through VM introspection, for example), and then wishes to execute something in response to this event.

Is there anything which might allow a developer to implement something like this?
 
Old 06-04-2012, 10:31 PM   #2
r0h1t
LQ Newbie
 
Registered: Sep 2008
Distribution: Fedora 17 x86_64
Posts: 5

Rep: Reputation: 2
Lightbulb Use hypercalls?

Sorry I dont have a concrete solution for you but I read about this in a book.
Try checking this out : http://wiki.xen.org/wiki/Hypercall

EDIT:
Or maybe a 'cheaper' way to do it is for the host to automatically SSH into the guest VMs and execute a script? Just my 2 cents

Last edited by r0h1t; 06-04-2012 at 10:33 PM. Reason: update
 
Old 06-05-2012, 05:09 AM   #3
guardian1
LQ Newbie
 
Registered: May 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
r0h1t, thanks for your response. the hypercall you mention is actually in the opposite direction to what i was thinking of, since the calls to the processor of course have to pass through the hypervisor as a matter of course.

I would like to send a command direct to the operating system of a virtual machine, from the hypervisor, if possible.

Last edited by guardian1; 06-05-2012 at 05:59 AM.
 
Old 06-05-2012, 05:43 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
ssh should work anyway. have you tried?
 
Old 06-05-2012, 05:59 AM   #5
guardian1
LQ Newbie
 
Registered: May 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
I think you are correct that SSH would work, but the work I am trying to do is intended to rely on utilising the abilities of a hypervisor (which SSH is not using).
 
Old 06-05-2012, 02:45 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
I wish I knew more about xen. Just kind of talking out loud here.

My thinking is that you want (Domain0) to watch for an event where I'd be more inclined to let the base OS do that. Then any means to access a system would do. This may also be affected on the exact hardware. I'd think a fully supported hardware install would be perfect for using the host to monitor.

I did find this kind of useful. http://cosi.clarkson.edu/docs/instal..._Xen_Class.pdf

Last edited by jefro; 06-05-2012 at 02:47 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script to start a program either not running or kill if running avataratar Linux - Newbie 1 03-29-2012 02:45 AM
Difference between running script (.sh) from .bash_profile and running from login dsimha Linux - General 4 01-17-2012 10:06 AM
Shell Script: Getting signal handlers to work when running an application by script pkjss Programming 4 09-14-2011 04:23 AM
[SOLVED] CLI HyperVisor running GUI VM? computer_freak_8 Linux - Security 16 08-26-2009 10:54 PM
i get an error message running php script inside a cgi script. repolona Linux - Software 0 02-22-2007 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration