Setup Azure storage on VTL Free

StarWind VTL, VTL Free, VTL Appliance

Moderators: anton (staff), art (staff), Anatoly (staff), Max (staff)

Post Reply
Matt_NZ
Posts: 4
Joined: Sat Sep 14, 2024 6:19 am

Sat Sep 14, 2024 6:34 am

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.
yaroslav (staff)
Staff
Posts: 2744
Joined: Mon Nov 18, 2019 11:11 am

Sat Sep 14, 2024 10:44 am

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.
Matt_NZ
Posts: 4
Joined: Sat Sep 14, 2024 6:19 am

Sun Sep 15, 2024 12:40 am

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
yaroslav (staff)
Staff
Posts: 2744
Joined: Mon Nov 18, 2019 11:11 am

Sun Sep 15, 2024 2:07 pm

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.
Matt_NZ
Posts: 4
Joined: Sat Sep 14, 2024 6:19 am

Mon Sep 16, 2024 2:27 am

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
yaroslav (staff)
Staff
Posts: 2744
Joined: Mon Nov 18, 2019 11:11 am

Mon Sep 16, 2024 11:56 am

Greetings,

I will discuss this with my team.
yaroslav (staff)
Staff
Posts: 2744
Joined: Mon Nov 18, 2019 11:11 am

Mon Sep 16, 2024 10:00 pm

Hi,

$accessKey stands for Storage Account
$secretAccessKey stands for Key

Let me know if that helps.
Matt_NZ
Posts: 4
Joined: Sat Sep 14, 2024 6:19 am

Tue Sep 17, 2024 10:59 pm

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?
yaroslav (staff)
Staff
Posts: 2744
Joined: Mon Nov 18, 2019 11:11 am

Wed Sep 18, 2024 5:36 am

Hi,

I raised the feature request. Thanks for your cooperation!
Post Reply