apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2k stars 1.09k forks source link

Unable to migrate VMWare VM from cloudstack but able to create new VMs #8105

Open yashi4engg opened 11 months ago

yashi4engg commented 11 months ago
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

Created VM in VMWare cluster but when trying to migrate VM its failing. Primary Storage for VMWare cluster is on NFS and added in cloudstack using PreSetup ..Ex- //Datastore .

While Migrating VM getting below Error in cloudstack Resource [Host:xx] is unreachable: Host xx: Unable to prepare for migration due to PrepareForMigrationCommand failed due to [Exception: java.lang.Exception Message: Creation of NFS datastore on vCenter failed. ].

While checking on Vcenter we can see below logs - An error occurred during host configuration. Operation failed, diagnostics report: Mount failed: Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: The NFS server does not support MOUNT version 3 over TCP

And if try to migrate VM with storage it gives below error - The specified key, name, or identifier '/vmfs/volumes/<>xyz id' already exists.

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
yashi4engg commented 11 months ago

Hi Team ,

Anyone look into this and suggest any solution.

DaanHoogland commented 11 months ago

@yashi4engg have you solved this or accidently closed it? While it seems to be more of a vmware/storage problem than a cloudstack problem you might want to try to ask your question on users@cloudstack.apache.org.

yashi4engg commented 11 months ago

@DaanHoogland it was closed accidently and reopened.

yashi4engg commented 10 months ago

Hi Team , Do we have any doc or step to follow and fix that issue.

DaanHoogland commented 9 months ago

@yashi4engg please ask your question on users@cloudstack.apache.org . this seems to be an issue with the vmware installation. Can you verify if the migration from vcenter works?

yashi4engg commented 9 months ago

@DaanHoogland - Yes , Migration from vcn is working fine ... Concern here is if datastore already created on esxi hosts why during migration cloudstack trying to create it again on esxi hypervisors.

DaanHoogland commented 9 months ago
yashi4engg commented 9 months ago

@DaanHoogland

is it in use - Yes , VMs running on that storage . have you tried removing it before starting the migration? - No , as other VMs also on same storage. do other migrations work or is this an installation wide problem? - VM migration not working for any VM from cloudstack UI but same VM we can migrate using vcn.

In Our setup we have already created VMWare infra and now imported VMs and storage to cloudstack. We successfully imported VMs and also created new VMs as well using cloudstack . Only facing issue while migrating VMs using cloudstack UI.

DaanHoogland commented 9 months ago

ok @yashi4engg , one more; so the environment was totally created as a vmware environement and then cloudstack was added and VMs were imported?

yashi4engg commented 9 months ago

@DaanHoogland Yes , correct environment was on VMWare .So we created similar test VMWare setup and created few VM which we imported to cloudstack for testing.

DaanHoogland commented 9 months ago

@yashi4engg , itt seems that this should be a valid scenario. Can you create a VM in CloudStack? And can you then migrate that?

harikrishna-patnala commented 9 months ago

@DaanHoogland @yashi4engg this seems like a case that we need to test. I see that you've prepared and mounted the NFS on vCenter and then added to CS as a presetup storage. Usually in our environments we mount NFS storage during addition of primary storage in CloudStack.

@yashi4engg is it possible for you to remove that primary storage and re-add it as NFS in CS and see if migrations are working ?

yashi4engg commented 9 months ago

@DaanHoogland @harikrishna-patnala -- I tested both use case -

1 - Where data store was already created in VMWare and added same in cloudstack .

2 - We created new NFs datastore on CS .

But in both cases able to create new VMs but unable to migrate VMs from one esxi to another from cloudstack. If we use second scenario where new NFs data store while migrating we see below error.

An error occurred during host configuration. Operation failed, diagnostics report: Mount failed: Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: The NFS server does not support MOUNT version 3 over TCP

harikrishna-patnala commented 9 months ago

@yashi4engg may I know which migration operation it is failing for you. Is it VM migration from one host to another host or volume migration or VM migration along with storage.

I've tried VM migration to a different host and it worked fine. (NFS primary storage is added as presetup in CloudStack)

yashi4engg commented 5 months ago

When we migrate VM it trying to create data store on hypervisor and failed with error that data store already exist.