Changes between Version 1 and Version 2 of Internal/WiMAX/AggMgr/ogs_wimaxvm


Ignore:
Timestamp:
Nov 15, 2009, 7:07:58 PM (14 years ago)
Author:
Gautam D. Bhanage
Comment:

updated information on sample usage.

Legend:

Unmodified
Added
Removed
Modified
  • Internal/WiMAX/AggMgr/ogs_wimaxvm

    v1 v2  
    88
    99{{{
     10root@cons-wm-02:/usr/lib/ruby/1.8/omf-aggmgr/ogs_wimaxvm
     11
    1012<?xml version='1.0'?>
    11 <services><serviceGroup name='wimaxcl' prefix='/wimaxcl'>
    12 <info>Service to start,stop and create a Virtual machine</info>
     13<services><serviceGroup name='wimaxvm' prefix='/wimaxvm'><info>Service to control virtual machines</info>
    1314
    14 <service name='addclient'><info>Service to Add a wimax client</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg><arg name='clientmac' isRequired='true' value='clientmac'><info>MAC address of the client</info></arg></args></service>
     15<service name='addclient'>
     16<info>Service to Add a wimax client</info><args><arg name='clientmac' isRequired='true' value='clientmac'><info>MAC address of the client</info></arg><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service>
    1517
    16 <service name='create'><info>Service to create a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg><arg name='mac' isRequired='true' value='mac'><info>MAC address of the vm</info></arg><arg name='ip' isRequired='true' value='ip'><info>IP address of the vm</info></arg></args></service>
     18<service name='create'>
     19<info>Service to create a VM</info><args><arg name='mac' isRequired='true' value='mac'><info>MAC address of the vm</info></arg><arg name='ip' isRequired='true' value='ip'><info>IP address of the vm</info></arg><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service>
    1720
    18 <service name='init'/><service name='start'><info>Service to start a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service>
     21<service name='initvms'/><service name='start'><info>Service to start a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service><service name='startshaping'><info>Service to start vnts controller</info>
     22</service>
    1923
    20 <service name='stop'><info>Service to stop a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service>
     24<service name='stop'>
     25<info>Service to stop a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args>
     26</service><service name='stopshaping'><info>Stop shaping scrip
     27t</info></service><service name='vmlist'><info>List all  VMs</info></service>
    2128
    22 <service name='vmlist'><info>List all  VMs</info></service>
    2329
    24 <service name='vmstat'><info>Service to query info from a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service>
     30<service name='vmstat'>
     31<info>Service to query info from a VM</info><args><arg name='vmname' isRequired='true' value='vmname'><info>Name of the virtual machine</info></arg></args></service></serviceGroup></services>
    2532
    26 </serviceGroup></services>
    2733}}}
    2834
    29 === Example Outputs ===
     35=== Sample Queries and corresponding outputs ===
    3036
     371) To initialize the service.
     38   - Checks for the number of running VMs, populates MAC list and also 
     39     assigns VLAN ids.
     40   - Is also supposed  to send the VLAN information to the server on ASN-GW
     41{{{
     42
     43wget http://wm-asngw-02:5012/wimaxvm/initvms
     44
     45
     46vm30 VLANid  7         mac address='52:52:52:52:52:52'/
     47vm7 VLANid  2         mac address='52:54:00:1c:00:cb'/
     48vm10 VLANid  6         mac address='54:52:00:2c:05:7a'/
     49vm55 VLANid  3         mac address='01:23:45:67:89:ab'/
     50vm57 VLANid  4         mac address='01:32:54:67:98:ba'/
     51vm58 VLANid  5         mac address='01:65:23:67:98:ba'/
     52vm5 VLANid  0         mac address='52:54:00:2a:85:b6'/
     53vm6 VLANid  1         mac address='52:54:00:34:aa:a3'/
     54}}}
     55
     56
     572) Start VM
     58    - Start vm, assign vlan tag and send info to server on ASNGW
     59    - Socket part is yet to be integrated
     60{{{
     61 http://wm-asngw-02:5012/wimaxvm/start/?vmname=vm30
     62Domain vm30 started  with vlan tag 9
     63}}}
     64
     65
     663) Stop VM
     67   - Similar to start VM, but does exactly the opposite
     68{{{
     69 http://wm-asngw-02:5012/wimaxvm/stop/?vmname=vm8
     70Domain vm8 destroyed
     71}}}
     72
     734) Get statistics about a VM
     74   - Gets all relavent information for a particular VM name
     75{{{
     76http://wm-asngw-02:5012/wimaxvm/vmstat/?vmname=vm8
     77<domain type='kvm' id='40'>
     78  <name>vm30</name>
     79  <uuid>94c79efa-01b1-64e7-3bd7-2baedd3cfb1a</uuid>
     80  <memory>262144</memory>
     81  <currentMemory>262144</currentMemory>
     82  <vcpu>1</vcpu>
     83  <os>
     84    <type arch='i686' machine='pc'>hvm</type>
     85    <boot dev='hd'/>
     86  </os>
     87  <features>
     88    <acpi/>
     89  </features>
     90  <clock offset='utc'/>
     91  <on_poweroff>destroy</on_poweroff>
     92  <on_reboot>restart</on_reboot>
     93  <on_crash>destroy</on_crash>
     94  <devices>
     95    <emulator>/usr/bin/kvm</emulator>
     96    <disk type='file' device='disk'>
     97      <source file='/home/native/vm30/disk0.qcow2'/>
     98      <target dev='hda' bus='ide'/>
     99    </disk>
     100    <interface type='network'>
     101      <mac address='52:52:52:52:52:52'/>
     102      <source network='default'/>
     103      <target dev='vnet6'/>
     104      <model type='virtio'/>
     105    </interface>
     106    <input type='mouse' bus='ps2'/>
     107    <graphics type='vnc' port='5905' autoport='yes' listen='127.0.0.1'/>
     108  </devices>
     109</domain>
     110}}}
     111
     1125) Get VM list
     113   - Useful for an admin and gives a list of all VMs.
     114   - Format is vmname, Vlanid, vm-mac-addr.
     115{{{
     116 http://wm-asngw-02:5012/wimaxvm/vmlist
     117
     118vm30 VLANid  7         mac address='52:52:52:52:52:52'/
     119vm7 VLANid  2         mac address='52:54:00:1c:00:cb'/
     120vm10 VLANid  6         mac address='54:52:00:2c:05:7a'/
     121vm55 VLANid  3         mac address='01:23:45:67:89:ab'/
     122vm57 VLANid  4         mac address='01:32:54:67:98:ba'/
     123vm58 VLANid  5         mac address='01:65:23:67:98:ba'/
     124vm5 VLANid  0         mac address='52:54:00:2a:85:b6'/
     125vm6 VLANid  1         mac address='52:54:00:34:aa:a3'/
     126}}}