-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mig6] Listener Service (/Flight Control) #13
Comments
As pointed out in issue #9 there exists one interface to start VMMs outside from sigma0, maybe you don't need an additional interface here. |
I didn't know about this interface, yet. I will look into it and try to use it. |
Ok, starting new VMM instances with specific configuration strings is now done with the However, i also need an interface for the source VMM to obtain its own configuration string. My initial implementation emitted a The problem i'm facing here is that i need to get a pointer to the right When entering Sigma0 via the portal function of |
Haven't had a look at that code in a while. Perhaps, @alex-ab can help out? |
👍
The service_config interface wasn't developed/meant to be used by the child (VMM) which got started. The pid you refer of the service_config to hasn't anything common with the internal pid you get from the do_request call, they are two different interfaces. A parent using the service_config just starts some child (VMM) and gets back the internal id (which should be actually a cap but there was no time to do it right) which it has to remember, in order to suspend and to kill the child, if wanted. So the idea here was, that the parent actually knows exactly the configuration of the child it started, no need to ask it back ... Just out of curiosity, why should it be permitted to a VM to decide by its own (or the user inside the VM connected to) to migrate somewhere else and additionally be able to choose the place to go ? Shouldn't this be triggered/controlled by the parent who started it, whether a VM may migrate to another host and if yes, where to go? I'm just asking, because if the design would be that the parent (using this service_config) interface is in control over all childs (VMMs) than you would have all the information you need, the configuration how you started the VM and the control whether and where to let the VM to migrate to. |
closing this as it is a little bit outdated in the meanwhile. :) |
The task of the listener service is to listen on a fixed port and start VMMs on request which will act as migration destination end points. Currently the protocol works like the following (With LST, SRC and DST as listener service, source VMM and destination VMM):
retrieve_guest:<port>
argument for the new Vancouver instance. Then it tries to start DST with this command line string. (port
is a running number)It turned out to be very handy to have a listener service because this way a running machine is always ready for migration requests. Furthermore it is easy to start VMM instances with the same configuration string like the source VMM.
Cutting off the binaries out of a configuration string
The listener service receives a string like the following:
…and transforms it to the following…
Obtaining the source VMM's configuration string
The source VMM has to obtain its own configuration string before being able to send it to the listener service.
Because only sigma0 knows the full configuration string of each running application, i gave
MessageConsole
some additional semantics: If the newread
bit in a message of typeMessageConsole::TYPE_START
is set, sigma0 will copy the desired configuration string (of the requesting application) into the memory pointed to bycmdline
.The application provides information about the length of the given string memory area in the
mem
field. If this number is not sufficient for storing the whole configuration, sigma0 returns the message with the first bit of the configuration string set to'\0'
and the actual configuration length in themem
field. The application can then try another request with a sufficient number of bytes allocated.Launching the new VMM
The listener service has to start the destination VMM from a configuration string. Since only sigma0 can start applications, i added another interface for this. The same semantics like for obtaining the configuration string are used with the message type
MessageConsole::TYPE_START
, but this time theread
bit is set to false andmem
contains the value 0xdeadbeef. Sigma0 will try to launch the new application and accordingly reply into theres
field of the message and return.Launching an application this way will typically look like this:
The text was updated successfully, but these errors were encountered: