Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried rapidxen once.

They provided a web-based ajax terminal webpage, which displays tty0 on the webpage and you can type command on that webpage. It interactive with domU in ajax way, the webpage sends POST request every few seconds to a URL ended with "ajaxConsoleProxy", a little like "KVM over IP"

Is there any opensource project which can do the same thing?

UPDATE: I tried AjaxTerm, but it needs to be run on every domU. Is there any better solution? Can I just install some program on dom0 and then use it to connect to domU?

UPDATE AGAIN: I figured out myself. Please read the answer below.

share|improve this question

3 Answers 3

the way that it works is that each dom0 has a management service which exposes peek and poke API calls on the console device, the ajaxConsoleProxy servlet runs on manage.systeminplace.net and translates ajaxterm-like requests into the appropriate peek and poke calls that can be processed by the management service.

if you want, i can send you the code, but it probably won't do you much good because it is verymuch tied to our design.

i was thinking about posting it on our bitbucket as it's mainly ancillary in nature. i believe openstack has a similar feature too.

the management service also handles all of the other requests, like shutting down, starting the VM with a different kernel profile and reimaging.

share|improve this answer
    
I'd like to know details about how to expose API calls to dom0, and if it's possible, can you send your code to me? My email is cnyegle AT gmail, thanks ahead :-) –  yegle May 23 '11 at 14:35
    
hi, basically, it works something like this: nenolod.net/~nenolod/xen-pty.txt this will make xend give you a character device you can read/write characters from. it's basically what 'xm con' does. –  user81644 Jun 3 '11 at 3:35

Answer from myself.

I didn't search much. There were people asking this question already.

Here's some link to them:
http://stackoverflow.com/questions/1469917/build-a-web-console-for-xen-domu-instances
Xen console access from the web

And a deep into RapidXen's code gives me this: https://manage.systeminplace.net/assets/ajaxconsole.js

So I need to figure out how to run ajaxterm in dom0 then connect to domU.

After a simple test I found a nasty solution ./ajaxterm.py -c "xm con 1"

If you need to connect to any domU on this dom0, you probably need to write a ncurse program which do xm con in the background, then start ajaxterm with this ncurse program, thus you can choose between different domU servers when you accessing ajaxterm

UPDATE:
And also, you need to avoid connecting to the same domU from ajaxterm or you'll get something unpredictable. This can be done by adding a simple lock mechanism in your ncurse program.

share|improve this answer

You're probably looking for Ajaxterm, Anyterm or similar?

share|improve this answer
    
Not exactly. The web-based ajax terminal rapidxen uses doesn't need to be installed on domU server. –  yegle Apr 27 '11 at 9:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.