Hi, Dag:

Thanks for the quick reply.

Yea, that is it!. The custom attribute "cloud.zone" was set to true for the 
datacenter in vCenter.  Once I delete that attribute, or change its value to 
"false",  I could re-associate the datacenter with new CloudStack zone.  If I 
delete the VMware datacenter from zone in web UI, its value will be set to 
false.

Regarding the ansible modules,  I am wondering why did you choose to generate a 
shell script to deploy a CloudStack env, instead of directly do it with 
Ansible?  Is it because the Ansible module for CloudStack is still incomplete 
to fulfill all tasks or for some other historic reasons?  For example, I could 
have missed it,  but I could not find a module to add a VMware datacenter to a 
zone.

Yiping

On 5/22/19, 1:49 AM, "Dag Sonstebo" <[email protected]> wrote:

    Hi Yiping,
    
    See 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.vmware.com%2Fen%2FVMware-vSphere%2F6.5%2Fcom.vmware.vsphere.vcenterhost.doc%2FGUID-EC0F7308-96AE-4089-9DD4-B42AF50AABDC.html&amp;data=02%7C01%7Cyipzhang%40adobe.com%7C205d61533fba49494a6408d6de9261c2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636941117627901428&amp;sdata=sf4At4YVoG957qgbjzBHBSlXNCbX%2BQrP62RUZqExgJQ%3D&amp;reserved=0
    
    You should find a custom attribute to your virtual DC called something like 
"cloud.zone" which I believe you have to wipe before you can re-add it to a new 
CloudStack instance. If the above doesn't work you may have to drop to command 
line and do it with something like PowerCLI.
    
    With regards to deploying a full zone this is part of what Trillian 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshapeblue%2FTrillian&amp;data=02%7C01%7Cyipzhang%40adobe.com%7C205d61533fba49494a6408d6de9261c2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636941117627901428&amp;sdata=wL65BH1bbJdG54fOlkRE5F1iRcSyT24p1aj0VqPUBFg%3D&amp;reserved=0
 does in it's cloudstack-config role - but please be aware this role simply 
populates a "deployzone.sh" jinja template with the right options before 
running this as a normal bash script.
    
    Regards,
    Dag Sonstebo
    Cloud Architect
    ShapeBlue
     
    
    On 22/05/2019, 06:31, "Yiping Zhang" <[email protected]> wrote:
    
        Hi, all:
        
        I am creating a new CloudStack 4.11.2.0 instance with VMware 
hypervisors.   I have some general questions regarding such a set up:
        
        My first attempt had some errors, so I decided to blow away the 
CloudStack database and start from scratch again.  Now when I try to add VMware 
datacenter to the zone, I receive an error message saying that: “Failed to add 
VMware DC to zone due to : This DC is being managed by other CloudStack 
deployment. Cannot add this DC to zone”
        
        This sounds like my last try has left something on the datacenter in 
vCenter so that I can’t associate it to another zone any more. If this is true, 
do I have to blow away the datacenter in vCenter as well to start over again? 
Is there any way to clean up on the vCenter side without rebuilding the 
datacenter?  In hindsight, I should have deleted all CloudStack objects from 
web GUI instead of taking the nuclear option of blowing away the database!
        
        A related question,  has anyone used CloudStack ansible module to 
deploy a complete zone (including all necessary objects zone/pod/physical 
networks/cluster/host/primary_storage/secondary_storage etc)?  If so, would you 
mind sharing your ansible playbook(s)?
        
        Thanks,
        
        Yiping
        
    
    
    [email protected] 
    
https://nam04.safelinks.protection.outlook.com/?url=www.shapeblue.com&amp;data=02%7C01%7Cyipzhang%40adobe.com%7C205d61533fba49494a6408d6de9261c2%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636941117627901428&amp;sdata=WnFWm4stluvC%2FpxXgB2nJZ1OiUDZz8XVooSxESC%2Bz70%3D&amp;reserved=0
    Amadeus House, Floral Street, London  WC2E 9DPUK
    @shapeblue
      
     
    
    

Reply via email to