Update the expunging state to expunged and make sure the removed field is not 
null (enter today's date/time). 

That should do the trick. 

Regards, Remi 

> On 09 Aug 2015, at 06:36, Amir Abbasi <[email protected]> wrote:
> 
> There is no null record for that zone, also state of all VM's are "Expunging" 
> and "Destroyed"!!
> 
> -----Original Message-----
> From: Kiran manohar Chavala [mailto:[email protected]] 
> Sent: Saturday, August 8, 2015 10:18 PM
> To: [email protected]
> Subject: Re: How to delete a zone in database
> 
> Hi Amir
> 
> Pleas check  if there are any instances which ar
> 
> 
> mysql>select id name,state from vm_instances where removed is null;
> 
> If you get any id which is not removed, update the database
> 
> mysql>update vm_instances set removed=now() where id in (select id from
> vm_instances where removed is null);
> 
> Regards
> Kiran
> 
> 
> 
>> On Sat, Aug 8, 2015 at 1:05 PM, Amir Abbasi <[email protected]> wrote:
>> 
>> Thanks, but I get the following error after removing the secondary storage:
>> The zone is not deletable because there are virtual machines running 
>> in this zone
>> 
>> in  vm_instance table there are some instances in "Expunging" status, 
>> does it caused the problem?
>> -----Original Message-----
>> From: Kiran manohar Chavala [mailto:[email protected]]
>> Sent: Wednesday, August 5, 2015 4:35 PM
>> To: [email protected]
>> Subject: Re: How to delete a zone in database
>> 
>> Hi Amir
>> 
>> You can delete the templates present in secondary storage from the 
>> database
>> 
>> mysql > select  * from image_store where name="<replace the name of 
>> the secondary storage";
>> 
>> note down the id
>> 
>> 
>> mysql> select * from template_store_ref where store_id=<replace the id
>> here>;
>> 
>> 
>> mysql> delete from template_store_ref where store_id=<replace the id
>> mysql> here>;
>> 
>> 
>> Then try to remove the secondary storage
>> 
>> 
>> Regards
>> 
>> Kiran Manohar
>> 
>> Citrix systems
>>> On Aug 5, 2015 5:03 PM, "Amir Abbasi" <[email protected]> wrote:
>>> 
>>> Hi All,
>>> 
>>> 
>>> 
>>> All accounts, Domains and then hosts, clusters, pods, Primary 
>>> Storage have been removed but secondary storage could not be removed 
>>> and I face the following error:
>>> 
>>> 
>>> 
>>> Cannot delete image store with active templates backup!
>>> 
>>> 
>>> 
>>> I can see old templates of deleted accounts. How can I delete them 
>>> off from cloud database and then remove old zone?
>>> 
>>> 
>>> 
>>> Thanks in advance
> 

Reply via email to