This message was deleted.
# harvester
a
This message was deleted.
a
/sdk
should be right.
/sdk gives 404
When does this happen?
p
If I run a curl to 10.0.3.11/sdk
I added the endpoint with /sdk and the status is blank
a
> If I run a curl to 10.0.3.11/sdk I think this is normal because you're not authenticated in that case. Configure the
VmwareSource
with the endpoint and don't forget to apply the
Secret
p
The secret was already applied
ah wait
it needs to be base64 encoded doesn't it
a
Check the logs of the VM importer pod
p
I haven't started a vm import yet. I only created the source and secret
a
BTW, which Harvester version are we talking about?
p
1.4.0
Not the absolute latest
a
I haven't started a vm import yet. I only created the source and secret
You'll find useful information there even if you do not start the import. There are logs about the validation of the VmwareSource resource as well.
p
Alright, this is what I have for my import target
a
You need to check the logs of the Harvester VM Import Controller pod.
p
I don't have a pod, but I can describe the
Copy code
virtualmachineimport.migration.harvesterhci
.io
Which gives:
Import Status: virtualMachineInvalid
So now that's another can of worms haha
a
You have a pod
harvester-system/harvester-vm-import-controller-xxxxx
p
Ah, in harvester-system
Copy code
time="2025-02-17T11:07:21Z" level=error msg="error syncing 'default/vcsim': handler vmware-migration-change: error generating vmware client for vmware migration: vcsim: error creating vim client: GET \"/sdk\": 404 Not Found, requeuing"
With the following further down the logs
Copy code
time="2025-02-17T11:10:08Z" level=error msg="error syncing 'default/vcsim': handler vmware-migration-change: error generating vmware client for vmware migration: vcsim: error during login :ServerFaultCode: Permission to perform this operation was denied., requeuing"
/rest also has similar
Copy code
error syncing 'default/vcsim': handler vmware-migration-change: error generating vmware client for vmware migration: vcsim: error creating vim client: POST \"/rest\": 404 Not Found, requeuing
a
Can you ping 10.0.3.11 from your Harvester? Theerror message would look different in that case, but i'm still asking.
p
Yes, can reach vsphere
Just to clarify that's the IP of the vsphere UI
Maybe another thing to add is that vsphere uses self-signed certs so when i go to it in my browser I have to "accept the risk and continue" - hence why I have --insecure in the curl
a
Maybe another thing to add is that vsphere uses self-signed certs so when i go to it in my browser I have to "accept the risk and continue"
I think that's no problem, i have to do that on out test system as well. Are you sure you do not have to configure the
dc
in your setup?
Do you have enabled vSphere Web Services SDK API Access?
p
I was just trying that out haha On the downside, I don't know what value dc could have πŸ™„
Ah, that's a thing I have to go enable. Would explain why I get 404 with /sdk then. Going to find out how to enable that
πŸ‘ 1
Hello! So we had login issues on vmware and it took a day or so for the support guys to help. I learnt that a 404 is expected as the /sdk endpoint doesn't serve HTML, but uses SOAP - so normal curl requests will have a not-found error. Either way, I now have access to the VMWare sdk, and the status is not clusterNotReady (which, admittedly, isn't perfect, but it's better than being blank) After finding this issue: https://github.com/harvester/harvester/issues/5525 I assume my DC value is wrong. Do you know what/where that value would be?
Copy code
failed to verfiy client for vmware migration" apiVersion=<http://migration.harvesterhci.io/v1beta1|migration.harvesterhci.io/v1beta1> err="datacenter '/' not found" kind=VmwareSource name=vcsim namespace=default
The migration pod threw the following. Just knowing where to look in the UI would be super helpful
Aha, found it. For reference, in VSphere, it's on the left, in the sidebar with all the VMs. So your VMs are probably all nested under the VM.
So, I am getting closer! Yay. I am still getting clusterNotReady, with the following from the migration pod:
Copy code
handler vmware-migration-change: error generating vmware client for vmware migration: vcsim: error during login :ServerFaultCode: Permission to perform this operation was denied., requeuing
Now I am logged in as root (root creds in the secret), so I'm not sure what permissions (if any) could be missing πŸ˜•
I can also navigate to https://<vsphere>/sdk/vimService.wsdl fine, and get some xml back. So definitely just some sort of permissions
πŸŽ‰ you can't use the root account - needs to be the admin one
and now it works
Okay, minus this: level=error msg="The VM import spec is invalid" name=my-tracker-server namespace=default spec.virtualMa chineName="My Tracker Server"
a
Some lines above this message in the log there must be an explanation what exactly is wrong with the spec, e.g.
error looking up storageclass ...
or
error generating migration in preflight checks ...
or
migration not yet ready. current status is ...
.
p
These are all the logs I have from the pod. It's been on the reconciling stage for 1h30m (I don't know how long that should take anyways)
Copy code
time="2025-02-20T11:35:12Z" level=info msg="Applying CRD <http://vmwaresources.migration.harvesterhci.io|vmwaresources.migration.harvesterhci.io>"
time="2025-02-20T11:35:12Z" level=info msg="Applying CRD <http://openstacksources.migration.harvesterhci.io|openstacksources.migration.harvesterhci.io>"
time="2025-02-20T11:35:13Z" level=info msg="Applying CRD <http://virtualmachineimports.migration.harvesterhci.io|virtualmachineimports.migration.harvesterhci.io>"
time="2025-02-20T11:35:14Z" level=info msg="Starting <http://storage.k8s.io/v1|storage.k8s.io/v1>, Kind=StorageClass controller"
time="2025-02-20T11:35:14Z" level=info msg="Starting <http://migration.harvesterhci.io/v1beta1|migration.harvesterhci.io/v1beta1>, Kind=VmwareSource controller"
time="2025-02-20T11:35:14Z" level=info msg="Starting <http://migration.harvesterhci.io/v1beta1|migration.harvesterhci.io/v1beta1>, Kind=OpenstackSource controller"
time="2025-02-20T11:35:14Z" level=info msg="reoncilling vmware migration default/vcsim"
time="2025-02-20T11:35:14Z" level=info msg="Starting <http://migration.harvesterhci.io/v1beta1|migration.harvesterhci.io/v1beta1>, Kind=VirtualMachineImport controller"
time="2025-02-20T11:35:14Z" level=info msg="Starting <http://harvesterhci.io/v1beta1|harvesterhci.io/v1beta1>, Kind=VirtualMachineImage controller"
time="2025-02-20T11:35:14Z" level=error msg="The VM import spec is invalid" name=my-tracker-svr namespace=default spec.virtualMachineName="My Tracker Server"
time="2025-02-20T11:35:14Z" level=info msg="found dc :Datacenter:datacenter-2 @ /LSL-DTC-01"
time="2025-02-20T11:35:14Z" level=info msg="reoncilling vmware migration default/vcsim"
I guess it's moving data across, or something like that. I found the relevant PVC in Longhorn
Well that PVC is stuck at 4.13GB which definitely is not the size of the VM.
Ahhhh, there was a typo in the yaml which didn't get picked up on by Kubernetes. So now I got a proper explanation for why it's not importing:
Copy code
time="2025-02-20T19:33:00Z" level=error msg="vm migration target Test Tracker Server in VM test-tracker in namespace default is not RFC 1123 compliant"
time="2025-02-20T19:33:00Z" level=error msg="The VM import spec is invalid" name=mantis-bug-tracker namespace=default spec.virtualMachineName="Test Tracker Server"
So "Test Tracker Server" is my VM's name in VMWare. I assume the name doesn't work here πŸ˜•
a
Yes, blanks are not allowed according to RFC 1123.