Active IQ Unified Manager Discussions

workflow for cloning a complete directory with file contents

scheckel
2,475 Views

Hi,

has somebody done a cloning (flexclone) workflow for a complete directory.

In my requirement its about VMware folders from o non writable qsm relation which should be cloned to a active filesystem. There is a structure VMs

e.g.:

/vol/data/qt1

                    directory:

                    vm1

                         content:

PS C:\Windows\system32> Read-NaDirectory "/vol/vol_vf_infrastructure_data1/SWDF046"

Name                                     Type            Size      Created     Modified Owner Group   Perm Empty

----                                     ----            ----      -------     -------- ----- -----   ---- -----

.                                        directory       4 KB   06.02.2014   06.02.2014     0     0    755 False

..                                       directory       4 KB   03.04.2013   06.02.2014     0     0    755 False

.lck-0e66000000000000                    file           84 B    06.02.2014   06.02.2014     0     0   1077

.lck-1166000000000000                    file           84 B    06.02.2014   06.02.2014     0     0   1077

.lck-1666000000000000                    file           84 B    06.02.2014   06.02.2014     0     0   1077

.lck-ae56000000000000                    file           84 B    06.02.2014   06.02.2014     0     0   1077

SWDF046.nvram                            file            8 KB   06.02.2014   06.02.2014     0     0   1060

SWDF046.vmdk                             file          544 B    06.02.2014   06.02.2014     0     0   1060

SWDF046.vmsd                             file               0   06.02.2014   06.02.2014     0     0   1064

SWDF046.vmx                              file            3 KB   06.02.2014   06.02.2014     0     0   1075

SWDF046.vmx.lck                          file               0   06.02.2014   06.02.2014     0     0   1060

SWDF046.vmxf                             file          262 B    06.02.2014   06.02.2014     0     0   1064

SWDF046-fdc6ad39.vswp                    file            4 GB   06.02.2014   06.02.2014     0     0   1060

SWDF046-flat.vmdk                        file           50 GB   06.02.2014   06.02.2014     0     0   1060

vmware.log                               file          425 KB   06.02.2014   06.02.2014     0     0   1064

vmx-SWDF046-4257656121-1.vswp            file          108 MB   06.02.2014   06.02.2014     0     0   1060

VM2

.

.

.

VM3

.

.

.

Maybe more than one VM, the customer want to have a checkbox or a selection of all toplevel directories which stands for one VM and then be able to select it.

Then when selecting specify a  new name or a suffix for that VMs and a clone destination. ( of course in the same volume to a different qtree.

It would be also required to select a source snapshot.

So i don't kmow itf its neccessary to create a new datasource to capture all filecontent and fill up the playground database to make a better selection.

Or just run a workflow in looping mode for all containing files.

Highlevel user Input:

  • storage controller
  • snapshot name
  • folder selection to clone (supercool would be the VMware name could be captured with via Read-NaFile "/vol/vol_vf_infrastructure_data1/SWDF046/SWDF046.vmx" and know the display name" ***
  • destination qtree
  • optional name suffix

I think there are missing commands

  • Read Directory
  • Read File
  • clone file

Would be very happy if somebody can support me with writing this workflow. I think this could be als very interesting for other use cases.

I am thinking of software development and engineering environment can also provit of such a feature. But for this we need a deeper directory structure

Many thanks,

Best wishes,

Markus.

***

PS C:\Windows\system32> Read-NaFile "/vol/vol_vf_infrastructure_data1/SWDF046/SWDF046.vmx"

.encoding = "UTF-8"

config.version = "8"

virtualHW.version = "8"

pciBridge0.present = "true"

pciBridge4.present = "true"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "true"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "true"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "true"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "true"

hpet0.present = "true"

nvram = "SWDF046.nvram"

virtualHW.productCompatibility = "hosted"

powerType.powerOff = "soft"

powerType.powerOn = "hard"

powerType.suspend = "hard"

powerType.reset = "soft"

displayName = "SWDF046"

extendedConfigFile = "SWDF046.vmxf"

1 REPLY 1

scheckel
2,475 Views

A bit disapointing that nobody replied even with a hint.

Here is a command i wrote to clone files to a new dir

Public