VirtualBox

Changes between Initial Version and Version 1 of Testing_Networks


Ignore:
Timestamp:
Mar 19, 2007 4:54:22 PM (17 years ago)
Author:
Michael Thayer
Comment:

Tutorial on creating testbed networks

Legend:

Unmodified
Added
Removed
Modified
  • Testing_Networks

    v1 v1  
     1== Creating testbed networks of virtual machines, host Windows XP, guest Redhat Enterprise Linux ==
     2
     3= Scenario =
     4
     5You have a host Windows XP system and a master Virtual image that is Redhat Enterprise Linux that you are regularly updating and want to create multiple instances and connect them in a private test network. An example would be a testbed MySQL Cluster which has a management node and two data nodes. Since the master image is regularly updated, we need a process for quickly cloning and creating a test environment.
     6 
     7 
     8- Clone the master Virtual image
     9
     10{{{
     11vboxmanage clonevdi Master.vdi node1.vdi
     12vboxmanage clonevdi Master.vdi node2.vdi
     13vboxmanage clonevdi Master.vdi mgmt.vdi
     14}}}
     15 
     16- Attach the vdi's to the already created VMs.
     17
     18{{{
     19vboxmanage modifyvm Node1 -hda node1.vdi
     20vboxmanage modifyvm Node2 -hda node2.vdi
     21vboxmanage modifyvm Mgmt -hda mgmt.vdi
     22}}}
     23 
     24- Create the network
     25
     26Now reset the network for the new VMs to use an internal private network. This will allow the 3 guest VMs to communicate with each other, but not with the host. The intnet network type is not available from the GUI, and is reset by the GUI if any of the VM settings are changed. So this has to be performed from the command line. We choose to use a network name of 'testnet' just for convenience. It is an arbitrary name but must be consistent.
     27 
     28{{{
     29vboxmanage modifyvm Node1 -nic1 intnet
     30vboxmanage modifyvm Node1 -intnet1 testnet
     31vboxmanage modifyvm Node2 -nic1 intnet
     32vboxmanage modifyvm Node2 -intnet1 testnet
     33vboxmanage modifyvm Mgmt -nic1 intnet
     34vboxmanage modifyvm Mgmt -intnet1 testnet
     35}}}
     36 
     37- Customization of individual VMs
     38
     39Since these VMs will be in a private network, each has a fixed IP address. And they should use the host IP address as the gateway IP address. And example of the ifcfg.eth0 file where the host IP address is 192.168.1.101 and the guest IP address is 192.168.10.200 is:
     40 
     41{{{
     42DEVICE=eth0
     43ONBOOT=yes
     44BOOTPROTO=none
     45NETMASK=255.255.255.0
     46IPADDR=192.168.10.200
     47USERCTL=no
     48PEERDNS=yes
     49GATEWAY=192.168.1.101
     50TYPE=Ethernet
     51IPV6INIT=no
     52}}}
     53 
     54Each guest should have a unique IP address.

© 2023 Oracle
ContactPrivacy policyTerms of Use