Documentation

  • 4.0
  • 10/25/2021
  • Public Content

Manage Virtual Machines

Manage Virtual Machines with ESC UI

On the
Virtual Machine
page, you can see a list of icons under
Actions
such as
Power Off/Power On
(based on current status of virtual machine),
Restart
,
Edit
,
Delete
and
View Console
.
To connect to the virtual machine console, click on
Access Virtual Machine
icon. You will get a pop-up window. Log in using the username and password that you entered when you created the virtual machine.
You can view the details of any configured virtual machine by clicking on the respective virtual machine name. Navigate through all the tabs to check the configuration in detail.

Manage Virtual Machines with Third Party Software

You can use any third-party software to manage ESC deployed virtual machines when you don't have access to the ESC UI with libvirt API.
Libvirt supports multiple third-party software packages. In this section, you can see how to establish ESC Libvirt URI connection using third-party software with two examples, including
Libvirt CLI
and
Virt-Manager
.
Virsh - Libvirt CLI
  1. Install virsh:
    sudo -E apt install libvirt-bin
  2. Manage virtual machine using virsh:
    sudo virsh <ESC_Libvirt_URI> <options>
For details, refer to: Managing guests with virsh
Example
  1. List all virtual machines:
    sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client list –all
  2. Start virtual machine:
    sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client start <vm_name>
  3. Stop virtual machine:
    sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client shutdown <vm_name>
  4. Access virtual machine console:
    sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client console <virtual_machine_name>
  5. Add USB device:
    1. Power off your virtual machine:
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client shutdown <virtual_machine_name>
    2. Locate USB device:
      lsusb
    3. Create USB xml file (for example,
      usb_device.xml
      ):
      <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x<replace_with_usb_vendor_id>'/> <product id='0x<replace_with_usb_product_id>'/> </source> </hostdev>
      You can determine your own USB vendor ID and product ID in the previous step.
    4. Allocate USB device to the virtual machine:
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client attach-device <vm_name> --file usb_device.xml –-config
    5. Power on the virtual machine and login to the virtual machine console to verify the assigned USB using the command:
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client start <vm_name>
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client list --all
      lsusb
  6. Remove USB device:
    1. Follow steps 1, 2 and 3 from the previous section.
    2. Remove USB device from the virtual machine:
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client detach-device <vm_name> --file usb_device.xml --config
    3. Power on the virtual machine and login to the virtual machine console to verify the detached USB with the commands:
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client start <vm_name>
      sudo virsh -c qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client start <vm_name>
      lsusb
Virt-Manager
  1. Install virt-manager:
    sudo -E apt install virt-manager
  2. Run virt-manager in host or target system terminal with root privilege:
    sudo -E virt-manager
  3. Add new connection to ESC Libvirt daemon/server in virt-manager:
    1. Click
      File > Add Connection
    2. Select
      Custom URI...
      from
      Hypervisor
      options.
    3. Add ESC Libvirt URI below in custom URI form of virt-manager and click
      Connect
      .
      qemu://localhost/system?pkipath=/opt/esc/vm-agent/libvirt/pki/client
      Be sure that the
      Autoconnect
      option is
      not
      selected.
    4. Once connected, any ESC virtual machine created will be shown.
  4. Accessing the GUI console of the ESC Virtual Machine using virt-manager.
    Double-click on any running virtual machine under QEMU/KVM: localhost and login with its username and password.
    After successful login, you will see the GUI console.
  5. Manage the power cycle of the ESC Virtual Machine using virt-manager.
    To power on the virtual machine:
    To power off the virtual machine:

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.