-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add troubleshooting issue when VM does not show an IP #658
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -414,3 +414,37 @@ Node level operation, node by node: | |||||||||||||||||||||||||||||
https://github.com/harvester/harvester/issues/5109 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
https://github.com/longhorn/longhorn/issues/8009 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## VM does not show an IP address | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Issue Description | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The VM does not show an IP address on the **Virtual Machines** page on the Harvester UI. This issue might apply to newly created or imported VMs. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Issue Analysis | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
If no IP address is displayed for a VM, this is usually because the **qemu-guest-agent** package is not installed in the VM. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
You can check this by looking at the status of the **VirtualMachineInstance** object. | ||||||||||||||||||||||||||||||
Comment on lines
+426
to
+428
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||
$ kubectl get vmi -n <NAMESPACE> <NAME> -ojsonpath='{.status.interfaces[0].infoSource}' | ||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
If no **qemu-guest-agent** package is installed, then the output will not contain the string **guest-agent**. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Workaround | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
To solve the problem, you can select the **Install guest agent** checkbox in the VM settings under **Advanced Options**. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The problem with this is that cloud-init is only executed once when the VM is started for the first time. To apply the settings specified under **Cloud Configuration** again when the VM is restarted the next time, the cloud-init directory in the VM must be deleted with the command | ||||||||||||||||||||||||||||||
Comment on lines
+438
to
+440
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
```shell | ||||||||||||||||||||||||||||||
$ sudo rm -rf /var/lib/cloud/* | ||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The VM must then be restarted so that cloud-init is executed again and the **qemu-guest-agent** package is installed. | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Related Issue | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
https://github.com/harvester/harvester/issues/6644 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.