[one-users] Network for the VMs

Ruben S. Montero rubensm at dacya.ucm.es
Tue Jan 25 14:11:12 PST 2011


Hi,

*(step 1) *You can define network related parameters for each virtual
network. In the template just add them like


NAME = "Red LAN"
TYPE = RANGED
PUBLIC = NO

BRIDGE = vbr0

NETWORK_SIZE    = C
NETWORK_ADDRESS = 192.168.0.0

*#You can add any custom attribute*
DNS = 192.168.0.9
*GATEWAY* = 192.168.0.1


*(step 2) *The custom attributes can be then used in the CONTEXT section of
the VM. So you can pass the attributes you want to the VM at boot time, e.g.

CONTEXT = [
  hostname   = "MAINHOST",
  gateway    = "$NETWORK[*GATEWAY*, NAME=\"Red LAN\"]",
  files      = "/service/init.sh /service/certificates
/service/service.conf"
]


*(step 3) *The context script of your VM MUST get the gateway at boot time
and configure the NIC according to that value. This last step depends on the
OS of your VM

Alternatively, you can set up a DHCP server on the private LAN of the VMs to
provide some of this values.

Cheers

Ruben

On Fri, Jan 21, 2011 at 10:20 AM, Taylor Tay <tknight83 at gmail.com> wrote:

> Hi all, the ttylinux vm which i'm running is getting the correct IP address
> based on my onevnet template
> but the gateway is different from my cluster node. Do i need to add in the
> gateway configuration on the network template
> so that it will be able to get the correct gateway and is there any guide
> on how to configure it?. Thanks
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Dr. Ruben Santiago Montero
Associate Professor (Profesor Titular), Complutense University of Madrid

URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110125/f3b5919b/attachment-0003.htm>


More information about the Users mailing list