No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


CLI-based Configuration Guide - Virtualization

AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R009

This document provides the basic concepts, configuration procedures, and configuration examples in different application scenarios of the virtualization feature supported by the device.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Multiple VMs for a Small Enterprise

Example for Configuring Multiple VMs for a Small Enterprise

Networking Requirements

A small enterprise needs to deploy many office applications. In traditional deployment mode, the enterprise needs to deploy many CT devices and multiple servers for the office applications. As a result, the deployment and maintenance costs are high, and services are inflexible.

Therefore, the enterprise wants to deploy common office applications on multiple VMs of the router to reduce cost on application servers and simplify device management. The VMs provide the same application services as traditional application servers. Figure 5-4 shows the networking.

Figure 5-4  Networking for VM deployment

Configuration Roadmap

To meet the enterprise's requirements, configure virtualization. The configuration roadmap is as follows:
  1. Make a VM installation package online and create two VMs vm1 and vm2.
  2. Configure communication among the routing system, HostOS, and VMs.
  3. Configure VNC and log in to the VMs. Then install the operating system (OS) and applications.


  1. Make a VM installation package online.

    # Configure IP addresses for the routing system virtual interface GE0/0/6 and the HostOS virtual interface veth1.

    <Huawei> system-view
    [Huawei] sysname Router
    [Router] dhcp enable
    [Router] interface gigabitethernet 0/0/6
    [Router-Gigabitethernet0/0/6] ip address 24
    [Router-Gigabitethernet0/0/6] dhcp select interface

    # Configure IP addresses for the physical interface GE0/0/5 and the virtual interface br0.

    [Router-Gigabitethernet0/0/6] quit
    [Router] dhcp server ping packet 10
    [Router] interface gigabitethernet 0/0/5
    [Router-Gigabitethernet0/0/5] ip address 24
    [Router-Gigabitethernet0/0/5] dhcp select interface

    # Check the IP address assigned to the VM.

    [Router-Gigabitethernet0/0/5] return
    <Router> display ip pool interface gigabitethernet0/0/5 used 
      Pool-name        : GigabitEthernet0/0/5
      Pool-No          : 0
      Lease            : 1 Days 0 Hours 0 Minutes
      Domain-name      : -
      DNS-server0      : -               
      NBNS-server0     : -               
      Netbios-type     : -               
      Position         : Interface       
      Status           : Unlocked
      Gateway-0        : -               
      Network          :
      Mask             :
      VPN instance     : --
      Logging          : Disable
      Conflicted address recycle interval: -
      Address Statistic: Total       :254       Used        :1          
                         Idle        :253       Expired     :0          
                         Conflict    :0         Disabled    :0      
      Network section 
             Start           End       Total    Used Idle(Expired) Conflict Disabled
     254      1       253(0)       0       0
     Client-ID format as follows:             
       DHCP  : mac-address                 PPPoE   : mac-address             
       IPSec : user-id/portnumber/vrf      PPP     : interface index             
       L2TP  : cpu-slot/session-id         SSL-VPN : user-id/session-id
      Index              IP             Client-ID      Type       Left   Status     
        143     88cf-9854-183f     DHCP      78567   Used       

    # Download the OS image tinycore.iso.

    <Router> system-view
    [Router] virtual-environment
    [Router-virtual-environment-] download package tinycore.iso ftp user user1 password cipher
    Enter Password(<1-16>):

    # Create two blank disks disk1 and disk2.

    [Router-virtual-environment-] blank-disk name disk1 size 8
    [Router-virtual-environment-] blank-disk name disk2 size 8

    # Make VM installation packages tinycore1.ova and tinycore2.ova.

    [Router-virtual-environment-] ova file tinycore1 iso tinycore.iso disk disk1 cpu 2 memory 1024 network-card 2 network-card-type e1000
    [Router-virtual-environment-] ova file tinycore2 iso tinycore.iso disk disk2 cpu 2 memory 1024 network-card 2 network-card-type e1000

  2. Create two VMs vm1 and vm2.

    # Create the VM vm1.

    [Router-virtual-environment-] install vm vm1 package tinycore1.ova

    # Create the VM vm2.

    [Router-virtual-environment-] install vm vm2 package tinycore2.ova

  3. Configure VNC for VM login.

    # Configure the VNC service port number for vm1.

    [Router-virtual-environment-] vm vm1
    [Router-virtual-environment-vm-vm1] vnc-server port 6 password cipher
    Enter Password(<6-8>):
    [Router-virtual-environment-vm-vm1] vm activate
    [Router-virtual-environment-vm-vm1] vm start
    [Router-virtual-environment-vm-vm1] quit

    # Configure the VNC service port number for vm2.

    [Router-virtual-environment-] vm vm2
    [Router-virtual-environment-vm-vm2] vnc-server port 2 password cipher
    Enter Password(<6-8>):
    [Router-virtual-environment-vm-vm2] vm activate
    [Router-virtual-environment-vm-vm2] vm start
    [Router-virtual-environment-vm-vm2] quit

  4. Configure the routing system, HostOS, and VMs to communicate through a vSwitch.

    # Create HostOS virtual interfaces veth3 and veth4, and create two virtual links between the HostOS and VMs.

    [Router-virtual-environment-] veth veth3
    [Router-virtual-environment-] veth veth4
    [Router-virtual-environment-] link veth veth3 to veth vm1_eth1
    [Router-virtual-environment-] link veth veth4 to veth vm2_eth1

    # Add the HostOS virtual interfaces to a vSwitch.

    [Router-virtual-environment-] ovs bridge br0
    [Router-virtual-environment-ovs-br0] port veth3 link-type access
    [Router-virtual-environment-ovs-br0] port veth4 link-type access
    [Router-virtual-environment-ovs-br0] quit

  5. Log in to vm1 and vm2.

    Perform the same operations to log in to vm2.

    # Open the VNC viewer, enter, as shown in Figure 5-5.

    Figure 5-5  VM login page on the VNC viewer
    Before logging in to the VM, ensure that your PC can communicate with the VM.

    # Click the Options button. On the displayed VNC Viewer-Options page, click the Expert tab page.

    # Set FullColor to True, and click OK. The system returns to Figure 5-5.

    # Click Connect and enter the authentication password in the dialog box that is displayed.

    # Click OK to log in to the VM.

    # Install the OS on the VM in the same way you install an OS on a PC.

    # After installing the OS, install applications in the OS.

Updated: 2019-05-06

Document ID: EDOC1000177806

Views: 8865

Downloads: 38

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next