-
- Novice
- Posts: 8
- Liked: never
- Joined: Nov 26, 2014 1:30 pm
- Contact:
Use Folder for grouping expression
Hi,
In vCenter, all my VMs are in folders structure like :
DATACENTERNAME\Business apps\regioncode\Countrycode\applicationname\DEVorPROD
Exemples:
DC1\business apps\CER\AT\apps1\DEV
DC1\business apps\CER\AT\apps2\DEV
DC1\business apps\MAR\TR\apps1\PROD
I'm try to use grouping expression to create categroies by country, by region and by application name.
When i use "Folder" in the grouping expression, the result is nothing...
I also try with expression :
CASE WHEN Folder = "AT" THEN "match"
ELSE "not match"
END
But result is always "not match".
In fact when I use this expression :
CASE WHEN Folder = "" THEN "match"
ELSE "not match"
END
It's alway match... :s
I guess i'm not using Folder correctly. Any idea ?
Many thanks.
Stéphane
In vCenter, all my VMs are in folders structure like :
DATACENTERNAME\Business apps\regioncode\Countrycode\applicationname\DEVorPROD
Exemples:
DC1\business apps\CER\AT\apps1\DEV
DC1\business apps\CER\AT\apps2\DEV
DC1\business apps\MAR\TR\apps1\PROD
I'm try to use grouping expression to create categroies by country, by region and by application name.
When i use "Folder" in the grouping expression, the result is nothing...
I also try with expression :
CASE WHEN Folder = "AT" THEN "match"
ELSE "not match"
END
But result is always "not match".
In fact when I use this expression :
CASE WHEN Folder = "" THEN "match"
ELSE "not match"
END
It's alway match... :s
I guess i'm not using Folder correctly. Any idea ?
Many thanks.
Stéphane
-
- Veteran
- Posts: 7328
- Liked: 781 times
- Joined: May 21, 2014 11:03 am
- Full Name: Nikita Shestakov
- Location: Prague
- Contact:
Re: Use Folder for grouping expression
Hi Stéphane,
I`ve talked to Veeam One developers and unfortunately, described grouping can not be achieved for now because only the closest to the object folder can be used for grouping.
We have added the issue as feature request in our roadmap.
Thank you for the feedback and sorry for the inconvenience.
I`ve talked to Veeam One developers and unfortunately, described grouping can not be achieved for now because only the closest to the object folder can be used for grouping.
We have added the issue as feature request in our roadmap.
Thank you for the feedback and sorry for the inconvenience.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Use Folder for grouping expression
As a workaround, you can try to use static rules (base them on object location) for this kind of categorization.
-
- Novice
- Posts: 8
- Liked: never
- Joined: Nov 26, 2014 1:30 pm
- Contact:
Re: Use Folder for grouping expression
Thanks for the answer. I will create static rules but I have 70 country to create... :s
Is it possible to use a script for static rules creation ?
Is it possible to use a script for static rules creation ?
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Use Folder for grouping expression
Ouch...! I will ask about this possibility, but I guess it would be quicker to create 70 rules... I would rather push for support this capability in dynamic groups creation in the next update
-
- Novice
- Posts: 8
- Liked: never
- Joined: Nov 26, 2014 1:30 pm
- Contact:
Re: Use Folder for grouping expression
I have try with static rules based on object location. The problem is, all VMs are hosted in the same location : 1 datacenter. I'm using vCenter VM folder architecture to classify by regions, then by countries, then by application name.
My final goal is to rebill VMs to each countries. For that I need a business view grouping all VMs from a specific folder...
Is there any chance to do that ? :/
My final goal is to rebill VMs to each countries. For that I need a business view grouping all VMs from a specific folder...
Is there any chance to do that ? :/
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Use Folder for grouping expression
It seems like you need to create groups AND sub-groups within a single category in order to match your folder structure, correct?
-
- Novice
- Posts: 8
- Liked: never
- Joined: Nov 26, 2014 1:30 pm
- Contact:
Re: Use Folder for grouping expression
It would have been the best, but as far as i know, we cannot create sub-groups.
I need a Category "Countries" with a group for each contries. And the only place where the country information is set in my vCenter, it's in folder in the vCenter VM folder architecture.
But after a long test yesterday, I can see only to way :
1 - create powershell script to read VM folder path and create custom attribute to VM with the country value. Then i will be able to populate my groups with grouping expression based on Custom attribute.
2 - create a first category\groups for application, identified by grouping expression based on VMFolderName. Then add this information as a VM tag in vCenter. Then, create second category\groups for country using this tag to associate application to country...
I will try first one and let you know.
I need a Category "Countries" with a group for each contries. And the only place where the country information is set in my vCenter, it's in folder in the vCenter VM folder architecture.
But after a long test yesterday, I can see only to way :
1 - create powershell script to read VM folder path and create custom attribute to VM with the country value. Then i will be able to populate my groups with grouping expression based on Custom attribute.
2 - create a first category\groups for application, identified by grouping expression based on VMFolderName. Then add this information as a VM tag in vCenter. Then, create second category\groups for country using this tag to associate application to country...
I will try first one and let you know.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Use Folder for grouping expression
Yes, currently creating sub-groups is not possible, however I've already discussed it with our dev team lead and we can potentially implement it in the next updates.
If you're on vSphere 5.5, then I would suggest using Tags in both cases (1-2), to write data and then use it in categorization.
If you're on vSphere 5.5, then I would suggest using Tags in both cases (1-2), to write data and then use it in categorization.
-
- Service Provider
- Posts: 207
- Liked: 42 times
- Joined: Oct 28, 2010 10:55 pm
- Full Name: Ashley Watson
- Contact:
Re: Use Folder for grouping expression
hi, I think our use case is very similar.
We want to use dynamic groups especially as the new Veeam v8 patch 2 allows us to use these tags in back up jobs from what I understand
Currently we have the following structure - we look after many clients in our development space.
We structure our client development VMs into logical work units from a backup perspective for various management and reliability and security issues.
>GeneralClients>ClientsA-E>clientabc>VM1
>GeneralClients>ClientsA-E>clientabc>VM2
>GeneralClients>ClientsA-E>clientbcd>VM3
>GeneralClients>ClientsA-E>clientbcd>VM4
>GeneralClients>ClientsA-E>clientefg
>GeneralClients>ClientsF-J>clientfaa
>GeneralClients>ClientsF-J>clienthbb
>GeneralClients>ClientsK-O>clientkaa
>GeneralClients>ClientsK-O>clientmbb
>GeneralClients>ClientsP-Z>clientPaa
what we want to be able to do is to derive the parent folder name 1 level up, so for example on VM1 we want to know that its part of the ClientsA-E group which we could then use as a logical grouping for our back job.some of our clients may have different project phases in progress so we sometimes use different sub client projects folders (eg. clientaaa>phase1>vm6, client aaa>phase2>vm7).
is there a way to be able to do this automatically via dynamic groups or some other way which wouldn't create extra work for ourselves?
as a bit of background we are on vsphere 5.5 and have always used custom attributes rather than tags.
We do not want to abandon the vsphere windows client (flash really doesn't work for us in 2015). Is tagging only available only on the web view (what about under vsphere 6 client?) - if its only on the vsphere web client then its going to be a non starter for us.
I did think I could set up an additional attribute and then have a simple powershell script that could automatically populate a categorisation value into the additional attribute depending on the folder structure, but when I looked at the UI for the backup jobs I couldn't see a way to select a backup list based on an additional attribute value - only tags. so it's another non starter.
so close but so far.. oh well back to our old structure for the time being.
We want to use dynamic groups especially as the new Veeam v8 patch 2 allows us to use these tags in back up jobs from what I understand
Currently we have the following structure - we look after many clients in our development space.
We structure our client development VMs into logical work units from a backup perspective for various management and reliability and security issues.
>GeneralClients>ClientsA-E>clientabc>VM1
>GeneralClients>ClientsA-E>clientabc>VM2
>GeneralClients>ClientsA-E>clientbcd>VM3
>GeneralClients>ClientsA-E>clientbcd>VM4
>GeneralClients>ClientsA-E>clientefg
>GeneralClients>ClientsF-J>clientfaa
>GeneralClients>ClientsF-J>clienthbb
>GeneralClients>ClientsK-O>clientkaa
>GeneralClients>ClientsK-O>clientmbb
>GeneralClients>ClientsP-Z>clientPaa
what we want to be able to do is to derive the parent folder name 1 level up, so for example on VM1 we want to know that its part of the ClientsA-E group which we could then use as a logical grouping for our back job.some of our clients may have different project phases in progress so we sometimes use different sub client projects folders (eg. clientaaa>phase1>vm6, client aaa>phase2>vm7).
is there a way to be able to do this automatically via dynamic groups or some other way which wouldn't create extra work for ourselves?
as a bit of background we are on vsphere 5.5 and have always used custom attributes rather than tags.
We do not want to abandon the vsphere windows client (flash really doesn't work for us in 2015). Is tagging only available only on the web view (what about under vsphere 6 client?) - if its only on the vsphere web client then its going to be a non starter for us.
I did think I could set up an additional attribute and then have a simple powershell script that could automatically populate a categorisation value into the additional attribute depending on the folder structure, but when I looked at the UI for the backup jobs I couldn't see a way to select a backup list based on an additional attribute value - only tags. so it's another non starter.
so close but so far.. oh well back to our old structure for the time being.
-
- Service Provider
- Posts: 207
- Liked: 42 times
- Joined: Oct 28, 2010 10:55 pm
- Full Name: Ashley Watson
- Contact:
Re: Use Folder for grouping expression
ok, I've been working a few things out and the only way I can see this working is to tag each VM with the backup job that the VM belongs to - and this is largely dictated in our case by the folder tree the VMs belong to - except in the case of our clients tree where the VM workload is grouped depending on the first letter of the client name - if we created the tag corresponding to the backup job we could use that identifier in the backup to say backup all VMs with the "BackupJob" tag value of "Clients-P-Z".
But then this script would need to be run before each backup workload.
It all gets to the point where the risks of wrong tagging would result in no backups which would be unacceptable.
We did consider applying tags to a folder tree but the bulk of our VMs fall under our client folder so we end up then having to create artificial folder groupings to match our backup splits.
Tagging is a powerful feature, but in our case in just seems to offer very little above that of folders and is funcitonally limited under vsphere as permisisons can't be applied to a tag.
Our vsphee tree is structured something like;
>Orbit>Zone-DMZ
>Orbit>Zone-General>Clients>A-E>A-B
>Orbit>Zone-General>Clients>A-E>C
>Orbit>Zone-General>Clients>A-E>D
>Orbit>Zone-General>Clients>A-E>F-J
>Orbit>Zone-General>Clients>A-E>K-O
>Orbit>Zone-General>Clients>A-E>P-Z
>Orbit>Zone-General>NonClients
>Orbit>Zone-MGMT
>Orbit>Zone-SharedServices
under each of those there are folders representing service types or in the case of the Clients subtree, there are lots of folders representing each client.
The reason we have our jobs split like this is so that we can flood our multiple SANs and backup components through parallel workloads and for security.
I was hoping to move the client tree directly under
>Orbit>Zone-General>Clients>
as it would make things easier for us to navigate but still able to split gorups of clients into specific backup jobs.
The only way I can think of would be to derive the backup job based on the first character of the client name (which I have done below), and then to tag each and every VM appropriately but this significantly adds complexity.
We need to split our entire workload - about 45TB because the de-dupe speed slowed down exponentially on rollups >2TB in previous releases - I expect there are similar constraints in the current path 2 release.
any comments would be appreciated.
But then this script would need to be run before each backup workload.
It all gets to the point where the risks of wrong tagging would result in no backups which would be unacceptable.
We did consider applying tags to a folder tree but the bulk of our VMs fall under our client folder so we end up then having to create artificial folder groupings to match our backup splits.
Tagging is a powerful feature, but in our case in just seems to offer very little above that of folders and is funcitonally limited under vsphere as permisisons can't be applied to a tag.
Our vsphee tree is structured something like;
>Orbit>Zone-DMZ
>Orbit>Zone-General>Clients>A-E>A-B
>Orbit>Zone-General>Clients>A-E>C
>Orbit>Zone-General>Clients>A-E>D
>Orbit>Zone-General>Clients>A-E>F-J
>Orbit>Zone-General>Clients>A-E>K-O
>Orbit>Zone-General>Clients>A-E>P-Z
>Orbit>Zone-General>NonClients
>Orbit>Zone-MGMT
>Orbit>Zone-SharedServices
under each of those there are folders representing service types or in the case of the Clients subtree, there are lots of folders representing each client.
The reason we have our jobs split like this is so that we can flood our multiple SANs and backup components through parallel workloads and for security.
I was hoping to move the client tree directly under
>Orbit>Zone-General>Clients>
as it would make things easier for us to navigate but still able to split gorups of clients into specific backup jobs.
The only way I can think of would be to derive the backup job based on the first character of the client name (which I have done below), and then to tag each and every VM appropriately but this significantly adds complexity.
We need to split our entire workload - about 45TB because the de-dupe speed slowed down exponentially on rollups >2TB in previous releases - I expect there are similar constraints in the current path 2 release.
any comments would be appreciated.
Code: Select all
# https://psvmware.wordpress.com/2012/09/14/get-vmfolderpath-to-check-in-which-vm-folder-our-vm-resides/
function Get-VMFolderPath
{
param(
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[string]$folderid,
[switch]$moref
)
$folderparent=get-view $folderid
if ($folderparent.name -ne 'vm'){
if($moref){$path=$folderparent.moref.toString()+'\'+$path}
else{
$path=$folderparent.name+'\'+$path
}
if ($folderparent.parent){
if($moref){get-vmfolderpath $folderparent.parent.tostring() -moref}
else{
get-vmfolderpath($folderparent.parent.tostring())
}
}
}else {
if ($moref){
return (get-view $folderparent.parent).moref.tostring()+"\"+$folderparent.moref.tostring()+"\"+$path
}else {
return (get-view $folderparent.parent).name.toString()+'\'+$folderparent.name.toString()+'\'+$path
}
}
}
####
add-pssnapin VMware.VIMAutomation.Core
Connect-ViServer a.b.c.d
#$servers= (get-vm | where { ($_.Name -like "A*") } |Get-VMGuest | select vmName )
$servers= (get-vm |Get-VMGuest | select vmName )
foreach ($srv in $servers) {
$SrvName=$srv.VmName
$FolderName=(get-vm $SrvName | get-vmfolderpath)
$Backupjob="ClientsA-E-ignore because of extra nesting"
if ("$FolderName" -match '^Orbit\\vm\\Zone-General\\Clients\\(.*?)\\(.*?)\\' ) {
# ignore A-E as that has an additional level of nesting at the moment
if ($matches[1] -ne 'A-E') {
$FirstLetter=($matches[2].substring(0,1)).toupper()
switch -regex ($FirstLetter)
{
"[A-B]" {$BackupJob="ClientsA-B"}
"[C]" {$BackupJob="ClientsC"}
"[D-E]" {$BackupJob="ClientD-E"}
"[F-J]" {$BackupJob="ClientsF-J"}
"[K-O]" {$BackupJob="ClientsK-O"}
"[P-Z]" {$BackupJob="ClientsP-Z"}
}
}
}
elseif ("$FolderName" -match '^Orbit\\vm\\Zone-General\\ClientsOther\\(.*?)\\' ) {
$BackupJob="ClientsOther"
}
elseif ("$FolderName" -match '^Orbit\\vm\\Zone-DMZ\\(.*?)\\' ) {
$BackupJob="Backup-DMZ"
}
elseif ("$FolderName" -match '^Orbit\\vm\\Zone-MGMT\\(.*?)\\' ) {
$BackupJob="Backup-MGMT"
}
elseif ("$FolderName" -match '^Orbit\\vm\\Zone-SharedServices\\(.*?)\\' ) {
$BackupJob="Backup-SharedServices"
}
#Only tag Orbit VMs
if ("$FolderName" -match '^Orbit\\' ) {
write-host "$SrvName , $FolderName , $BackupJob"
}
}
-
- Service Provider
- Posts: 207
- Liked: 42 times
- Joined: Oct 28, 2010 10:55 pm
- Full Name: Ashley Watson
- Contact:
Re: Use Folder for grouping expression
sorry I made a slight typo above, I meant our client tree looks liel;
>Orbit>Zone-DMZ
>Orbit>Zone-General>Clients>A-E>A-B
>Orbit>Zone-General>Clients>A-E>C
>Orbit>Zone-General>Clients>A-E>D-E
>Orbit>Zone-General>Clients>F-J
>Orbit>Zone-General>Clients>K-O
>Orbit>Zone-General>Clients>P-Z
>Orbit>Zone-General>ClientsOther
>Orbit>Zone-MGMT
>Orbit>Zone-SharedServices
thanks.
>Orbit>Zone-DMZ
>Orbit>Zone-General>Clients>A-E>A-B
>Orbit>Zone-General>Clients>A-E>C
>Orbit>Zone-General>Clients>A-E>D-E
>Orbit>Zone-General>Clients>F-J
>Orbit>Zone-General>Clients>K-O
>Orbit>Zone-General>Clients>P-Z
>Orbit>Zone-General>ClientsOther
>Orbit>Zone-MGMT
>Orbit>Zone-SharedServices
thanks.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Use Folder for grouping expression
Hi Ashley,
Yes, it seems like you need multiple sub-groups to categorize your VMs, which is currently not possible. On the other hand, backup itself supports only one tag for the backup job, check out this topic > Using TAGs in Backup jobs
Can you take a look at categorization rules (not dynamic groups) to see if you can assign the tag you need to VMs based on their location etc?
Thanks!
Yes, it seems like you need multiple sub-groups to categorize your VMs, which is currently not possible. On the other hand, backup itself supports only one tag for the backup job, check out this topic > Using TAGs in Backup jobs
Can you take a look at categorization rules (not dynamic groups) to see if you can assign the tag you need to VMs based on their location etc?
Thanks!
Who is online
Users browsing this forum: No registered users and 4 guests