AmirB201110141
Contributor
Contributor

Import VM to vcloud migrates the vm to another host

Hello,

I have a vcloud managing a vc with a cluster of 2 hosts (for example). both hosts are prepared in the providerVdc.

trying to import a vm into a vapp inside the vcloud I see that during migration into vcloud, the vm is sometimes migrated to a the other host.

I also tried to define the vm drs settings as disabled (in the cluster's drs configuration) but it stll being moved sometimes during import to the vcloud.

why is that? doesn't the import of the vcloud uses the drs mechanism of the vc it handles?

thank you

0 Kudos
6 Replies
sjoglekar
Enthusiast
Enthusiast

Which version of the vCloud Director are you using? In version 1.x, during import of a VM, the datastore with largest available space is choosen as a destination for import. It is possible that such datastore is present on a different host than where the VM is residing.

Is this behavior causing any issues?

Thanks,

Sangeeta

0 Kudos
AmirB201110141
Contributor
Contributor

Thank you for your reply.

I'm using version1.5

And no, the vm is located on a common-datastore shared by all hosts. and the datastore of the vm doesn't change, only the host.

0 Kudos
gettyless
Enthusiast
Enthusiast

aren't you importing vm's into a vapp? so it's another copy, and from the vcenter you see another copy of it.

0 Kudos
AmirB201110141
Contributor
Contributor

Not sure I understand - Yes, I'm importing the vm into a vapp, but I select the option to move it - so at the end I have only one vm (which is inside the vcloud-vapp). The original vm was on a shared datastore and in the end it is still on that datastore. when doing the import I see in the vcenter that the vm is migrated  into the resource-pool of the vcloud, but sometimes it leaves the vm on the original host, and sometimes the vm is being moved to a different host (both hosts are inside a cluster and both are defined and ready in the providerVdc of the vcloud-vapp).

Do you mean that the vcloud always creates a new vm and just migrates the volumes from the original one? (and then removes the original vm)

0 Kudos
gettyless
Enthusiast
Enthusiast

Hmm I misread your post originally.

I've been doing copies (instead of moves) for importing my templates into vCloud Director. So I tried out the move just now, where it now resides on server #2 (out of 2 ESX boxes in that cluster) filed under the corresponding org I'm playing with.

Went I go into vcenter - I no longer see that vm registered as it was originally (it was previously listed outside of the vCloud Director related resource pools) but registered in the cluster. I still see it in the shared mount/LUN/filesystem when I ssh in to take a peek.

So far that sort of seems similar to what you say...up until this part: "but sometimes it leaves the vm on the original host, and sometimes the vm is being moved to a different host "

Are you referring to the imported vm in vCloud? To restate the question: you're wondering why the moved vm sometime is on server X verssus Y for subsequent moves?

Could this be a DRS thing? Like at a point in time, DRS thinks it's better to have the imported vm on server X versus Y?

0 Kudos
AmirB201110141
Contributor
Contributor

Yes - I'm referring  to the imported vm in vcloud.

The thing is that even if I disable the drs for the original vm, when it is moved during import it sometimes changes hosts (and I'm saying the original vm just moved and not copied, cause the migration seems to not change its Id [i.e vm-<number>]).

The thing is that I just don't understand the mechanism - why should the vm move to a different host during import? (even if the vm is powered-off, the drs for it is disabled, it is located on a shared datastore and its host is defined&prepared for the providerVdc of the vapp).

0 Kudos