[one-users] onevm - program flow - need more information

Ruben S. Montero rubensm at dacya.ucm.es
Fri Jan 23 06:24:59 PST 2009


HI Marimuthu,
	It basically works as follows:

1.- The onevm command send the submnit request to the OpenNebula core. It uses 
an XML-RPC method for this.

2.- OpenNebula (RequestManager component) receives the request and adds a new 
VM to the database. It performs some sanity checks in this step and get a MAC 
lease from a network if needed. The VM is now in a pending state with a valid 
ID assigned to it.

3.- The result of this process is sent back to the onevm program and it exits 
its execution (showing the ID if you used onevm -v)

4.- There is another process, the scheduler that periodically checks the 
database. When it discovers a new pending VM the scheduler makes a placement 
decision  (i.e. deploy the VM with id 7 in host A); and sends this request to 
the core through the deploy method. You can use the simple match-making 
scheduler in OpenNebula to do this. Or you can use Haizea if you want some 
more functionality like advance reservations 
(http://haizea.cs.uchicago.edu/documentation.html). Or even you could do it by 
hand with no scheduler, and using the onevm deploy command.

5.- When OpenNebula gets the deployment plan from the scheduler (or the user) 
it then orchestrate the VM lilfe-cyle, see the state diagram in 
http://www.opennebula.org/doku.php?id=documentation:rel1.2:ug
From pending state the VM goes to the Prolog state and there the 
TransferManager.cc is used. It basically compiles a transfer script (e.g. the 
transfer.0 file) and then invokes  the TM drivers specified in the configuration 
(oned.conf) file to do the actual job.

6.- If every thing went OK then the VM goes to the Running state using the 
VirtualMachineManager.cc module, and so on...

Hope that know it a little bit clearer.
Cheers 

Ruben


On Tuesday 20 January 2009 19:31:25 marimuthu.balasubramanian at wipro.com wrote:
> I would like to know onevm command execution flow(for ex: onevm submit) for
> the better understanding. I know little bit. please find my understanding
> for onevm "submit". Please give me information apart from my understanding.
>
> For onevm submit <vm template>
> The execution start from
> 1. case command
> when "submit", "create"
>     check_parameters("create", 1)
>     result=vm.allocate(*ARGV)
>     if result[0]
>         puts "ID: " + result[1].to_s if ops[:verbose]
>         command_exit 0
>     end
>
> 2. then it invokes allocate method of one.rb script
> allocate method is ........
>        def allocate(*args)
>             begin
>                 f=open(args[0], "r")
>                 template=f.read
>                 f.close
>             rescue
>                 return [false, "Can not read template"]
>             end
>
>             self.allocate_(template)
>         end
>
> My doubt is after self.allocate how "submit" got scheduled.
> I believe the openNEbula has scheduler to handle all the commands
>
> When schduler invokes the submit command. it invokes the tm_clone.sh and
> tm_mkswap.sh.
>
> I have very little knowladge on your C++ source code.
>
> I believe RequestManager::register_xml_methods()(RequestManager.cc)
> registers the all the commands with xmlrpc.
>
> Further RequestManager::VirtualMachineAllocate::execute()
> (RequestManagerAllocate.cc) method got invoked
>
> I don't have any idea when TranferManager.cc got used.
>
>
> Regards
> Marimuthu
> Wipro Technologies
> Bangalore
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com

-- 
+---------------------------------------------------------------+
 Dr. Ruben Santiago Montero
 Associate Professor
 Distributed System Architecture Group (http://dsa-research.org)

 URL:    http://dsa-research.org/doku.php?id=people:ruben
 Weblog: http://blog.dsa-research.org/?author=7
             
 GridWay, http://www.gridway.org
 OpenNEbula, http://www.opennebula.org
+---------------------------------------------------------------+




More information about the Users mailing list