Page 1 of 1

Setup Azure storage on VTL Free

Posted: Sat Sep 14, 2024 6:34 am
by Matt_NZ
Hi there,

I'm trying to configure VTL Free to replicate to Azure storage via the sample VTLReplicationSettings.ps1 file. I've configured the parameters as follows:

Code: Select all

param($addr="127.0.0.1", $port=3261, $user="root", $password="starwind",
	$deviceName="vtl",
	$target=16,
	$accessKey="Access Key Copied From Azure Portal",
	$secretAccessKey="",
	$regionName="Public",
	$containerName="backup", (Container name I created in Azure Storage Account)
	$keepLocal=0, # -1 never delete local copy, 0 delete immediatelly after upload, N delete after N days
	$keepInCloud=7, # -1 never delete from cloud, N>0 delete after N days
	$keepInStorage1=-1, #S3 move to glacier interval, AZure move to cool interval in days (-1 never)
	$keepInStorage2=-1, #Azure only, move from cool to archieve interval in days (-1 never)
	$delayBeforeStart=0,# -1 never upload to cloud, 0 upload immediate after export, N>0 after N days
	$serviceUrl="", # S3 Generic clouds only
	$createTapeOnExport=0 # create new tape on export: 1-Yes, 0-No
)
However, this doesn't work and I get a 410 error code with the following in the CloudReplicator log file:
2024/09/14 18:14:30.777 [47] Current request information:
POST http://localhost/api/v2/AzureReplicator ... tesettings HTTP/1.1
Content-Type : application/json
Accept : */*
Host : localhost
User-Agent : StarWind Service
Content-Length : 253
{"AccountName":*******,"AccountKey":*******,"ContainerName":"backup","Region":"Public"}

2024/09/14 18:14:33.741 [60] Error: AzureNoInternetConnectionOrInvalidStorageAccount. Message: No internet connection or invalid storage account. Error code: 410
2024/09/14 18:14:33.741 [60] Validate settings for container: backup. Result: AzureNoInternetConnectionOrInvalidStorageAccount
To me, it looks like I need to also specify the Storage Account Name (AccountName in that error log?) but it doesn't seem like there's a parameter for that in the object "$settings = new-object -ComObject StarWindX.VTLReplicationSettings"

In the paid version of VTL that has a UI it does look like there is an option to specify this:
Image
(Screenshot taken from this video https://youtu.be/UFr37c7J6eM?t=1030)

I assume there's something I'm not understanding here as I see others have been able to configure this via Powershell but I'm struggling to find any Azure example configs that people have used.

Re: Setup Azure storage on VTL Free

Posted: Sat Sep 14, 2024 10:44 am
by yaroslav (staff)
Hi,

Please make sure you specify the credentials and the storage account is created. See this post viewtopic.php?f=25&t=6015&p=33877&hilit ... ame#p33877.
Please also try a different region name.

Re: Setup Azure storage on VTL Free

Posted: Sun Sep 15, 2024 12:40 am
by Matt_NZ
Thanks for the reply,
For the region name I also tried "australiasoutheast" which is the region name that it's located in.

I did see that thread you've linked but it doesn't really help with my issue as I don't see where I enter the Storage Account Name? This is where I'm getting the Access Key from:
Image

Re: Setup Azure storage on VTL Free

Posted: Sun Sep 15, 2024 2:07 pm
by yaroslav (staff)
Yes, that's where you take the key from.
Your target name is VTL1, not VTL. Please also comment the text after coma in containername.

Re: Setup Azure storage on VTL Free

Posted: Mon Sep 16, 2024 2:27 am
by Matt_NZ
My question then is, where do I specific the Storage Account Name like you can in the UI as this seems to be required based on the error I'm seeing in the logs?

The comments I've put in this post next to the arguments are only in this post for the sake of explaining what I've done. They don't exist in the script I'm running so aren't an issue. I have both a "vtl" and "vtl1" device so I've tried switching to vtl1 as suggested but seeing the same issue:
2024/09/16 14:15:08.627 [45] Current request information:
POST http://localhost/api/v2/AzureReplicator ... tesettings HTTP/1.1
Content-Type : application/json
Accept : */*
Host : localhost
User-Agent : StarWind Service
Content-Length : 177
{"AccountName":*******,"AccountKey":*******,"ContainerName":"backup","Region":"australiasoutheast"}

2024/09/16 14:15:11.316 [44] Error: AzureNoInternetConnectionOrInvalidStorageAccount. Message: No internet connection or invalid storage account. Error code: 410
2024/09/16 14:15:11.316 [44] Validate settings for container: backup. Result: AzureNoInternetConnectionOrInvalidStorageAccount

Re: Setup Azure storage on VTL Free

Posted: Mon Sep 16, 2024 11:56 am
by yaroslav (staff)
Greetings,

I will discuss this with my team.

Re: Setup Azure storage on VTL Free

Posted: Mon Sep 16, 2024 10:00 pm
by yaroslav (staff)
Hi,

$accessKey stands for Storage Account
$secretAccessKey stands for Key

Let me know if that helps.

Re: Setup Azure storage on VTL Free

Posted: Tue Sep 17, 2024 10:59 pm
by Matt_NZ
Thanks, that's done the trick! Maybe that needs to be added to the documentation/sample scripts in future updates to make that a little clearer?

Re: Setup Azure storage on VTL Free

Posted: Wed Sep 18, 2024 5:36 am
by yaroslav (staff)
Hi,

I raised the feature request. Thanks for your cooperation!