Description of problem:
If there are more DCs in the engine and new VM with a disk is created and if the VM DC is changed after the create new disk dialog is closed, then new disk for new VM failed to be created since it is being created in DC other than the VM ones.
Version-Release number of selected component (if applicable):
4.2 master, commit 461eb97
Steps to Reproduce:
1. Let's have 2 DCs with clusters, hosts and storage domains, let's refer to them as A and B
2. Open New VM dialog
3. Fill in some name
4. Select DC A
5. Click "Create" button in General subtab to create new disk for the VM. Make sure that the disk will be created in storage domain corresponding to DC A (as the VM has selected). Confirm the new virtual disk dialog
6. Change the selected DC for VM to B
7. Confirm the New VM dialog
New VM dialog is closed. Error message pops up:
"Cannot add Virtual Disk. The target Data Center does not contain the Virtual Machine."
Both disk and VM are created in the same DC or the problem is validated and user in notified before whole settings of new VM is lost.
Solution for this one would be to forbid changing the DC/Cluster once a disk or NIC has been added to the VM.
Maybe also some 2-screen wizard that does have a screen for selecting DC and Cluster first before moving on to the next screen for defining the VM.
We didn't get to this bug for more than 2 years, and it's not being considered for the upcoming 4.4. It's unlikely that it will ever be addressed so I'm suggesting to close it.
If you feel this needs to be addressed and want to work on it please remove cond nack and target accordingly.
ok, closing. Please reopen if still relevant/you want to work on it.