Skip to content
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

vmware unclustered VM #141

Closed
TaLoN1x opened this issue May 6, 2024 · 10 comments
Closed

vmware unclustered VM #141

TaLoN1x opened this issue May 6, 2024 · 10 comments
Labels
bug Something isn't working released

Comments

@TaLoN1x
Copy link
Contributor

TaLoN1x commented May 6, 2024

If VM is running on a Host that is not a member of any cluster, it is failind to be added to the Netbox:

ERROR (vcenter-test): failed to sync vmware VM some-vm-in-single-node.local: unexpected status code: 400: {"device":["Must specify a cluster when assigning a host device."]}

Either a single node Cluster should be created for this use-case or host device should not be specified for that VM.

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

I have tried to create vm via webui, without assigning a host device to it (just passing its name). And I get a netbox limit of:

A virtual machine must be assigned to a site and/or cluster.

So I guess every vm need a site or cluster assigned to it. So if no cluster is assigned to it, site has to be assigned to it to be able to add it into the netbox.

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

So maybe I could fix this by just assigning the same site to vm as its host device (server)?

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

correct, currently ssot thus is trying to assign device, but it cannot be assigned without cluster as of netbox scheme.

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

So maybe I could fix this by just assigning the same site to vm as its host device (server)?

But then we cannot assign the host device to the VM. If we create a hypothetical Cluster with same name as host device, then we can assign both Site and Host device to it. :) I know it's a bit counter-logical...

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

Yeah, you are right. I think creating hypothetical cluster is the best solution here...

@bl4ko bl4ko added the bug Something isn't working label May 6, 2024
bl4ko added a commit that referenced this issue May 6, 2024
@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

@TaLoN1x could you test this issue against 141-vmware-unclustered-vm branch?

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

The cluster got assigned DefaultSite, no Tenant and no hosts were added to it. Host and tenant can be worked around via mapping, but I think they should be inherited from the host device itself.

ERROR (vc-test): failed to sync vmware VM [TEST-HES-DB.energia.sise](some-vm-in-single-node.local: unexpected status code: 400: {"cluster":["The selected cluster (single-node-cluster.local) is not assigned to this site (DefaultSite)."]}

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

I think this should fix it now.

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

works good now!

@bl4ko bl4ko closed this as completed in 3564cf4 May 6, 2024
@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

🎉 This issue has been resolved in version 0.6.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@bl4ko bl4ko added the released label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants