Run tests in Local VM

In this document you will find instruction to run tests locally. We will use a VM to ensure that the tests do not affect any local distro settings. Follow the steps below to configure your local computer and run LISA tests. The steps can be followed on host machines running either windows or Linux.

  1. Create a virtual machine following the below instructions:

    a. For Linux, start QEMU KVM in a Private Virtual Bridge network configuration. You can follow the instructions given here

    b. For windows, start a VM using Hyper-V. You can follow the instructions given here

  2. Get IP address of the virtual machine

    Connect to VM and obtain the IP address of the guest VM. Run a simple ping test from host to ensure that the guest VM is accessible from the host.

    ping "<guest ip address>"
    
  3. Get/setup the SSH key pair which can access guest VM.

  4. Use ready platform to run tests

    lisa -r ./microsoft/runbook/ready.yml -v "public_address:<guest ip address>" -v "user_name:<user name>" -v "admin_private_key_file:<private key file>"