From 4b17bdf16aab7cf72bd01de7f00995b0d585d601 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Mon, 28 Oct 2024 11:05:47 +0100 Subject: [PATCH] Add troubleshooting issue when VM does not show an IP Related to: https://github.com/harvester/harvester/issues/6644 Signed-off-by: Volker Theile Co-authored-by: Jillian <67180770+jillian-maroket@users.noreply.github.com> Signed-off-by: Volker Theile --- docs/troubleshooting/vm.md | 40 +++++++++++++++++++ .../version-v1.3/troubleshooting/vm.md | 40 +++++++++++++++++++ .../version-v1.4/troubleshooting/vm.md | 40 +++++++++++++++++++ 3 files changed, 120 insertions(+) diff --git a/docs/troubleshooting/vm.md b/docs/troubleshooting/vm.md index 2d4f135bb45..73f01baf5d9 100644 --- a/docs/troubleshooting/vm.md +++ b/docs/troubleshooting/vm.md @@ -414,3 +414,43 @@ Node level operation, node by node: https://github.com/harvester/harvester/issues/5109 https://github.com/longhorn/longhorn/issues/8009 + +## Virtual Machine IP Address Not Displayed + +### Issue Description + +The **Virtual Machines** screen on the Harvester UI does not display the IP address of a newly created or imported virtual machine. + +### Issue Analysis + +This issue usually occurs when the `qemu-guest-agent` package is not installed on the virtual machine. To determine if this is the root cause, check the status of the `VirtualMachineInstance` object. + +```shell +$ kubectl get vmi -n -ojsonpath='{.status.interfaces[0].infoSource}' +``` + +The output does not contain the string `guest-agent` when the `qemu-guest-agent` package is not installed. + +### Workaround + +You can [install the QEMU guest agent](../vm/create-vm.md#installing-the-qemu-guest-agent) by editing the virtual machine configuration. + +1. On the Harvester UI, go to **Virtual Machines**. + +1. Locate the affected virtual machine, and then select **⋮ > Edit Config**. + +1. On the **Advanced Options** tab, under **Cloud Config**, select **Install guest agent**. + +1. Click **Save**. + +However, cloud-init is run only once (when the virtual machine is started for the first time). To apply new **Cloud Config** settings, you must delete the cloud-init directory in the virtual machine. + +```shell +$ sudo rm -rf /var/lib/cloud/* +``` + +After deleting the directory, you must restart the virtual machine so that cloud-init is run again and the `qemu-guest-agent` package is installed. + +### Related Issue + +https://github.com/harvester/harvester/issues/6644 diff --git a/versioned_docs/version-v1.3/troubleshooting/vm.md b/versioned_docs/version-v1.3/troubleshooting/vm.md index 149b5c15a37..6d6c2567590 100644 --- a/versioned_docs/version-v1.3/troubleshooting/vm.md +++ b/versioned_docs/version-v1.3/troubleshooting/vm.md @@ -414,3 +414,43 @@ Node level operation, node by node: https://github.com/harvester/harvester/issues/5109 https://github.com/longhorn/longhorn/issues/8009 + +## Virtual Machine IP Address Not Displayed + +### Issue Description + +The **Virtual Machines** screen on the Harvester UI does not display the IP address of a newly created or imported virtual machine. + +### Issue Analysis + +This issue usually occurs when the `qemu-guest-agent` package is not installed on the virtual machine. To determine if this is the root cause, check the status of the `VirtualMachineInstance` object. + +```shell +$ kubectl get vmi -n -ojsonpath='{.status.interfaces[0].infoSource}' +``` + +The output does not contain the string `guest-agent` when the `qemu-guest-agent` package is not installed. + +### Workaround + +You can [install the QEMU guest agent](../vm/create-vm.md#installing-the-qemu-guest-agent) by editing the virtual machine configuration. + +1. On the Harvester UI, go to **Virtual Machines**. + +1. Locate the affected virtual machine, and then select **⋮ > Edit Config**. + +1. On the **Advanced Options** tab, under **Cloud Config**, select **Install guest agent**. + +1. Click **Save**. + +However, cloud-init is run only once (when the virtual machine is started for the first time). To apply new **Cloud Config** settings, you must delete the cloud-init directory in the virtual machine. + +```shell +$ sudo rm -rf /var/lib/cloud/* +``` + +After deleting the directory, you must restart the virtual machine so that cloud-init is run again and the `qemu-guest-agent` package is installed. + +### Related Issue + +https://github.com/harvester/harvester/issues/6644 diff --git a/versioned_docs/version-v1.4/troubleshooting/vm.md b/versioned_docs/version-v1.4/troubleshooting/vm.md index 2d4f135bb45..73f01baf5d9 100644 --- a/versioned_docs/version-v1.4/troubleshooting/vm.md +++ b/versioned_docs/version-v1.4/troubleshooting/vm.md @@ -414,3 +414,43 @@ Node level operation, node by node: https://github.com/harvester/harvester/issues/5109 https://github.com/longhorn/longhorn/issues/8009 + +## Virtual Machine IP Address Not Displayed + +### Issue Description + +The **Virtual Machines** screen on the Harvester UI does not display the IP address of a newly created or imported virtual machine. + +### Issue Analysis + +This issue usually occurs when the `qemu-guest-agent` package is not installed on the virtual machine. To determine if this is the root cause, check the status of the `VirtualMachineInstance` object. + +```shell +$ kubectl get vmi -n -ojsonpath='{.status.interfaces[0].infoSource}' +``` + +The output does not contain the string `guest-agent` when the `qemu-guest-agent` package is not installed. + +### Workaround + +You can [install the QEMU guest agent](../vm/create-vm.md#installing-the-qemu-guest-agent) by editing the virtual machine configuration. + +1. On the Harvester UI, go to **Virtual Machines**. + +1. Locate the affected virtual machine, and then select **⋮ > Edit Config**. + +1. On the **Advanced Options** tab, under **Cloud Config**, select **Install guest agent**. + +1. Click **Save**. + +However, cloud-init is run only once (when the virtual machine is started for the first time). To apply new **Cloud Config** settings, you must delete the cloud-init directory in the virtual machine. + +```shell +$ sudo rm -rf /var/lib/cloud/* +``` + +After deleting the directory, you must restart the virtual machine so that cloud-init is run again and the `qemu-guest-agent` package is installed. + +### Related Issue + +https://github.com/harvester/harvester/issues/6644