Mininet VM Setup Notes

Source: Internet
Author: User
Tags vmware fusion

Mininet VMs are designed to speed up mininet installations and can be easily run on Linux platforms. VMs run on Windows,mac,linux, through VMware, Virtualbox,qemu, and KVM.

After you download the virtual machine, you will run several steps to customize your settings. It won't take a long time. Virtual machine settings Download Mininet VM

Download Mininet VM https://github.com/mininet/mininet/wiki/Mininet-VM-Images.

VMs come out with 1 GB of compression and uncompressed ~ 2 GB. This is an OVF (Open virtualization Format) Virtual machine image that can be imported by most virtual machine monitors.

Download and install virtualization projects such as: VMware workstations for Windows or Linux, VMware Fusion such as Apple Computers, VirtualBox ( free! , GPL) any platform or qemu ( free! ) LINUX,GPL). If you already have VMware, we find it runs a little faster than VirtualBox mininet. However, VirtualBox is free to download and distribute, which is a clear advantage! Start a virtual machine

Add the virtual machine and start, in the virtualization project of your choice:

VirtualBox :

    1. Usually you can double-click the . ovf file and import it.

    2. If you get the wrong import . ovf file, you can simply create a new virtual machine with the appropriate type (for example, Linux,ubuntu 64-bit) and use .vmdk the virtual hard disk file as the new VM.

    3. Select "Settings" and add an additional your network adapter that you can use to log on to the virtual machine image. Start the virtual machine.

    4. For more information on setting up network VirtualBox, you may want to look at these VirtualBox specific instructions

VMware : Import the OVF file and start the VM.

VMware VMS may require you to install VMware Tools-if it is required, down. All graphics tutorials are forwarded through X via SSH (in fact, the virtual machine does not have Desktop Manager installed), therefore, VMware tools are not necessary unless you want to install a x11/gnome/ET. In your virtual machine environment.

QEMU/KVM :

For QEMU, the following work is similar:

qemu-system-i386 -m 2048 mininet-vm-disk1.vmdk -net nic,model=virtio -net user,net=192.168.101.0/24,hostfwd=tcp::8022-:22

KVM:

sudo qemu-system-i386 -machine accel=kvm -m 2048 mininet-vm-disk1.vmdk -net nic,model=virtio -net user,net=192.168.101.0/24,hostfwd=tcp::8022-:22

The above command will be set to ssh forward from the 8022 VM host port.

similarities : Using a transport plane similar .vmdk files can be .hdd used in an image similarity, and then create a new virtual machine using the .hdd image as its virtual drive. Start the virtual machine. Log on to the virtual machine

Log on to the virtual machine using the following user name and password:

mininet-vm login: mininetPassword: mininet

(Some older virtual machine images can be used openflow / openflow reversed) without enabling account logons, which you can use sudo to run a command with Superuser privileges. SSH to a virtual machine

First, discover the IP address of the virtual machine, which may be a 192.168.x.y range for VMware. In the virtual machine console:

ifconfig eth0

Note: VirtualBox users to set up your network eth1 should use

sudo dhclient eth1   # make sure that eth1 has an IP addressifconfig eth1

You may want to add the address to your host computer's/etc/hosts file to be able to access the name via SSH, if it is Unix-like. For example, add an OS X line like this:

192.168.x.y mininet-vm

192.168.x of the place. Instead, the IP address of the virtual machine.

SSH to the VM. We assume that additional precautions are not necessary to run the VMs locally ssh - x . ssh - yThere is also no validation of the default timeout.

ssh -Y [email protected]

If you run VMS in QEMU/KVM net users and hostfwd Select the recommended above, the IP address of the virtual machine is irrelevant. Instead you tell SSH to connect to the host on port 8022:

ssh -Y -p 8022 [email protected]
Optional VM Customization

These commands are optional and may be useful for your settings: Setting up SSH automatic login

These steps allow you to login ssh without entering a password. If you use the console from on-premises virtualization software, then you don't need this step.

Check ~ / . ssh / id_rsa or ~ / . ssh / id_dsa . If you cannot find these files, then you will want to generate an SSH key.

On Unix-like systems (OS x and Linux-you need other instructions for Windows)--on the host, not the virtual machine:

ssh-keygen -t rsa

To speed up future SSH connections, add your host's public key to the new virtual machine. Still on the host, not the virtual machine:

scp ~/.ssh/id_rsa.pub [email protected]:~/

Now, in the VM (SSH first):

cd ~/ && mkdir -p .ssh && chmod 700 .ssh && cd .ssh && touch authorized_keys2 && chmod 600 authorized_keys2 && cat ../id_rsa.pub >> authorized_keys2 && rm ../id_rsa.pub && cd ..

Now you should be able to login without entering a password.

Mininet VM Setup Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.