Search code examples
azurecloud

Directory disappears from azure cloud shell (home)


Scenario

I had a working directory (repo) on azure cloudshell (cloud shell on azure portal) at home which i don't see now. It disappeared couple of days as well but appeared again automatically after couple of hours.

Now again it has disappeared. Not sure how to get it back.


I could find below on microsoft pages which says $Home gets persisted so my directory should have been persisted.

System state and persistence The machine that provides your Cloud Shell session is temporary, and it is recycled after your session is inactive for 20 minutes. Cloud Shell requires an Azure file share to be mounted. As a result, your subscription must be able to set up storage resources to access Cloud Shell. Other considerations include:

With mounted storage, only modifications within the clouddrive directory are persisted. In Bash, your $HOME directory is also persisted. Azure file shares can be mounted only from within your assigned region. In Bash, run env to find your region set as ACC_LOCATION. Azure Files supports only locally redundant storage and geo-redundant storage accounts.


Anyone knows what I am doing wrong ?

I could clone the my repo from azure devOps but I dont want to. This would be my last option.


Solution

  • I restarted the cloud shell and my repo appeared again. It would be still good to know why it disappeared :)