Closed TaLoN1x closed 2 months ago
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.
So maybe I could fix this by just assigning the same site to vm as its host device (server)?
correct, currently ssot thus is trying to assign device, but it cannot be assigned without cluster as of netbox scheme.
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...
Yeah, you are right. I think creating hypothetical cluster is the best solution here...
@TaLoN1x could you test this issue against 141-vmware-unclustered-vm branch?
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)."]}
I think this should fix it now.
works good now!
:tada: This issue has been resolved in version 0.6.10 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
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.