Check KVM Guest Agent (Linux)
    • PDF

    Check KVM Guest Agent (Linux)

    • PDF

    Article summary

    Available in VPC

    To use the snapshot service in KVM environment, KVM Guest Agent must be installed. If you have problems installing the agent or the service is not working properly, check and reinstall with Ncloud Tool Kit (NTK).

    Note

    This feature is only available for Linux VMs in KVM environment. For more information on NTK, see Ncloud Tool Kit (Linux).

    Run Linux NTK

    Follow these steps to run NTK on a Linux server.

    1. Check that the hypervisor hosting the VM is KVM.
      $ dmesg | grep "Hypervisor detected" | awk -F': ' '{print $2}'
      KVM
      
    2. Go to the path where the NTK file is located.
      $ cd /usr/local/etc
      
    3. Unzip the NTK file.
      $ tar zxvf ntk-kvm.tar.gz
      
    4. Run NTK.
      $ /usr/local/etc/ntk/ntk
      

    KVM Guest Agent version recommendations

    It is recommended to install KVM Guest Agent version 6.2.0 or later on NAVER Cloud for the best use of storage products in KVM environment. OSes currently requiring a KVM Guest Agent version upgrade are CentOS 7 and Ubuntu 20.04.
    Since some OSes are provided without KVM Guest Agent installed, please refer to Install new KVM Guest Agent.

    To check the current KVM Guest Agent version, follow these steps:

    • CentOS 7
      If nothing appears as shown below, see "Install new KVM Guest Agent."
      $ rpm -qa | grep qemu-guest-agent
      $
      or
      $ /usr/bin/qemug-ga -V
      -bash: /usr/bin/qemug-ga: No such file or directory
      
      # If 2.12.0 appears as shown below, see "Reinstall KVM Guest Agent."
      $ rpm -qa | grep qemu-guest-agent
      qemu-guest-agent-2.12.0-3.el7.x86_64
      or
      $ /usr/bin/qemu-ga -V
      QEMU Guest Agent 2.12.0
      
      # If 6.2.0 appears as shown below, reinstallation is not required as it is already upgraded.
      $ rpm -qa | grep qemu-guest-agent
      qemu-guest-agent-6.2.0-0.el7.x86_64
      or
      $ /usr/bin/qemu-ga -V
      QEMU Guest Agent 6.2.0    
      
    • Ubuntu 20.04
      If nothing appears as shown below, see "Install new KVM Guest Agent."
      $ dpkg -l qemu-guest-agent
      dpkg-query: no packages found matching qemu-guest-agent
      or
      $ /usr/sbin/qemu-ga -V
      -bash: /usr/sbin/qemu-ga: No such file or directory
      
      
      # If 4.2.0 appears as shown below, see "Reinstall KVM Guest Agent."
      $ dpkg -l qemu-guest-agent
      ||/ Name             Version           Architecture Description
      +++-================-=================-============-=================================
      ii  qemu-guest-agent 1:4.2-3ubuntu6.30 amd64        Guest-side qemu-system agent
      or
      $ /usr/sbin/qemu-ga -V
      QEMU Guest Agent 4.2.1
      
      
      # If 6.2.0 appears as shown below, reinstallation is not required as it is already upgraded.
      $ dpkg -l qemu-guest-agent
      ||/ Name             Version      Architecture Description
      +++-================-============-============-==================================================
      ii  qemu-guest-agent 6.2-ubuntu20 amd64        Guest-side qemu-system agent v6.2 for Ubuntu 20.04
      or
      $ /usr/sbin/qemu-ga -V
      QEMU Guest Agent 6.2.0
      

    Install new KVM Guest Agent

    If KVM Guest Agent is not present in the VM, install a new agent.

    1. Check if KVM Guest Agent is installed in the VM.
      If not installed, proceed with the following steps. If already installed, see Check KVM Guest Agent status or Reinstall KVM Guest Agent guide.
      # If KVM Guest Agent is installed
      $ systemctl list-unit-files | grep "qemu-guest-agent"
      qemu-guest-agent.service                  enabled
      
      # If KVM Guest Agent is not installed
      $ systemctl list-unit-files | grep "qemu-guest-agent"
      $
      
    2. Select (E) EXECUTE - << Run System Apps >>.
      kvm-guest-agent-ntk-linux01
    3. Select (K) KVM GUEST AGENT - KVM AGENT INSTALL >>.
      kvm-guest-agent-ntk-linux02
    4. Select Yes.
      kvm-guest-agent-ntk-linux03
    5. Click Enter to complete the reinstallation.

    Check KVM Guest Agent status

    Check the status of KVM Guest Agent service.

    1. Select (E) EXECUTE - << Run System Apps >>.
      kvm-guest-agent-ntk-linux01
    2. Select (K) KVM GUEST AGENT - KVM AGENT INSTALL >>.
      kvm-guest-agent-ntk-linux02
    3. Select (R) RE-INSTALL KVM GUEST AGENT >>.
      kvm-guest-agent-ntk-linux04
    4. Verify that KVM Guest Agent service is in active state.
      kvm-guest-agent-ntk-linux05

    Reinstall KVM Guest Agent

    To remove the existing KVM Guest Agent and perform reinstallation, follow these steps:

    1. Select (E) EXECUTE - << Run System Apps >>.
      kvm-guest-agent-ntk-linux01
    2. Select (K) KVM GUEST AGENT - KVM AGENT INSTALL >>.
      kvm-guest-agent-ntk-linux02
    3. Select (R) RE-INSTALL KVM GUEST AGENT >>.
      kvm-guest-agent-ntk-linux08
    4. Select Yes.
      kvm-guest-agent-ntk-linux03
    5. If the installation proceeds successfully, the reinstallation log will display as follows:
      • Stop existing Guest Agent
      • Remove existing Guest Agent
      • Update package information
      • Reinstall Guest Agent
        kvm-guest-agent-ntk-linux06
    6. Click Enter to complete the reinstallation.

    When virtio-serial device required for KVM Guest Agent startup is missing in OS

    If the following message appears in NTK when starting KVM Guest Agent, the issue occurs because the required virtio-serial device does not exist in the OS.
    When you can restart the VM, stop and start it again instead of rebooting.
    kvm-guest-agent-ntk-linux07


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.