Setting Up the Virtual Machine Using KVM virt-manager GUI

The virt-manager application, also known as Virtual Machine Manager, is a desktop user interface for creating and managing virtual machines.

Note: The following instructions assume that KVM is installed and set up properly. Installing, setting up and using KVM is beyond the scope of this guide.

Ensure the KVM host is running on a suitable server with proper network configuration. You must have a KVM virtualization environment that is suitably installed and configured before you can start a guest VM.

Pre-requisite: Packet virt-manager must be installed on the host which is running KVM. Also, X-11 must be enabled in SSH configuration.

To create a new virtual machine using virt-manager application, complete the following steps:

  1. Issue the virt-manager command on the KVM host to launch the virtual machine manager GUI.
    The Virtual Machine Manager application user interface gets launched.

    Virtual Machine Manager UI

  2. Click , the Create new virtual machine icon to create new Virtual Machine. The New VM wizard is displayed

    Create a New VM - Wizard Step 1 of 4

  3. Select Import existing disk image to create a new virtual machine and import a disk image that contains pre-installed, bootable operating system. Click Forward to continue. Screen (2 of 4) of the wizard is displayed.

    Create a New VM - Wizard Step 2 of 4

  4. Click Browse to select the location of “RuckusNetworkDirector.qcow2” image. The Choose Storage Volume screen is displayed.

    Choose Storage Volume

  5. Select "RuckusNetworkDirector.qcow2" image and click Choose Volume. The selected storage path is populated in the wizard step 2 of 4. Leave the operating system type and OS version as Generic.

    Storage Path of the Disk Image

  6. Click Forward to continue. Screen (3 of 4) of the wizard that allows you to define RAM and CPU is displayed.

    Create a New VM - Wizard step 3 of 4 RAM and CPU Settings

  7. Configure the number of CPUs and amount of memory to allocate to the virtual machine.
    • Memory (RAM): Specify the RAM that needs to be allocated.
    • CPUs: Specify the required number of CPUs.
    Note: The minimum hardware required for RUCKUS Network Director is 4G RAM and 2 vCPUs.
  8. Click Forward to continue. Screen (4 of 4) of the wizard is displayed.

    Create a New VM - Wizard Step 4 of 4

  9. Enter the name as RuckusNetworkDirector for the virtual machine in the Name field.
  10. Select the Customize configuration before install option to make required changes in the settings to match with end user’s host configuration before completing the installation process as described in step 11 through step 14.
  11. Click Finish to create a new virtual machine. A new window that allows you to initiate the installation is displayed.
  12. Select CPUs settings and enable Copy host CPU configuration option. Click Apply to save the changes.
  13. Select Boot Options settings and enable Start virtual machine on host bootup option. Click Apply to save the changes.
  14. Select IDE Disk 1 settings. Under the Advance options, choose IDE from the Disk bus dropdown list. Click Apply to save the changes.
  15. Select NIC settings and select bridge or dedicated network adapter as per the requirement. Click Apply to save the changes.
  16. Click Begin Installation. After successful installation, the status of the virtual machine is indicated as Running in the console.

    RUCKUS Network Director Running Status

Basic System Settings after VM Install

Some basic system configurations such as changing the root password, adding a user account, and disallowing root logins can be done after the VM install.

Complete the following steps to configure the basic system settings:

  1. Log in using the default credentials (root/root).
  2. Change the password as soon as you log in to the system by providing the new password and confirming it by retyping the password.
     [root@ruckusnetworkdirector ~]# passwd
    Changing password for user root.
    New password: 
    Retype new password: 
    passwd: all authentication tokens updated successfully.
    [root@ruckusnetworkdirector ~]# 
    
  3. Add a user account.
    [root@ruckusnetworkdirector ~]# useradd myname
    [root@ruckusnetworkdirector ~]# passwd myname
    Changing password for user myname.
    New password: 
    Retype new password: 
    passwd: all authentication tokens updated successfully.
    [root@ruckusnetworkdirector ~]# 
    
  4. Add the user to "sudo" privileges.

    Allow root to run any commands anywhere by adding the line "myname" with your username.

    root    ALL=(ALL)       ALL
    myname        ALL=(ALL)       ALL
    
    <escape><write, quit>
    [root@ruckusnetworkdirector ~]# vi /etc/ssh/sshd_config

    Find the following section to disallow root login by uncommenting and changing #PermitRootLogin yes to PermitRootLogin no.

    # Authentication:
    
    #LoginGraceTime 2m
    PermitRootLogin no 
    #StrictModes yes
    #MaxAuthTries 6
    #MaxSessions 10
    

    Find the following section and comment out X11Forwarding yes.

    #AllowAgentForwarding yes
    #AllowTcpForwarding yes
    #GatewayPorts no
    #X11Forwarding yes
    #X11DisplayOffset 10
    #X11UseLocalhost yes
    #PermitTTY yes
    
    <escape><write, quit>
    

  5. Restart the SSH daemon.
    [root@ruckusnetworkdirector ~]#  systemctl restart sshd
    [root@ruckusnetworkdirector ~]# 
    

Setting a static IP address (optional)

  1. Determine the name of your ethernet NIC. In the following example, the name is "ens3".
    [root@ruckusnetworkdirector ~]# ifconfig -a
    ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.0.208  netmask 255.255.255.0  broadcast 192.168.0.255
            inet6 fe80::dd9c:3021:ae23:aed0  prefixlen 64  scopeid 0x20<link>
            ether 52:54:00:3f:00:a6  txqueuelen 1000  (Ethernet)
            RX packets 398  bytes 41448 (40.4 KiB)
            RX errors 0  dropped 8  overruns 0  frame 0
            TX packets 166  bytes 23160 (22.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1  (Local Loopback)
            RX packets 524  bytes 66408 (64.8 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 524  bytes 66408 (64.8 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    [root@ruckusnetworkdirector ~]# 
    
    cd /etc/sysconfig/network-scripts/
    mv ifcfg-ens160 ifcfg-ens3
    
    vi /etc/sysconfig/network-scripts/ifcfg-ens3
    
  2. Restart the networking service.
    service network restart
    Restarting network (via systemctl):               [  OK  ]
    
  3. Verify the static IP address.
    ifconfig -a
    ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.0.95  netmask 255.255.255.0  broadcast 192.168.0.255
            inet6 fe80::5054:ff:fe3f:a6  prefixlen 64  scopeid 0x20<link>
            ether 52:54:00:3f:00:a6  txqueuelen 1000  (Ethernet)
            RX packets 1501  bytes 155067 (151.4 KiB)
            RX errors 0  dropped 88  overruns 0  frame 0
    TX packets 602  bytes 118303 (115.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
  4. Reboot the system.
    reboot
    After the system comes back up, perform the following actions:
    • SSH into the system with your username.
    • Verify that root cannot SSH directly into the system.
    • Verify the static IP address and networking connectivity.