How to duplicate a virtual service
Using the Windows command line, you can duplicate a virtual service.
Duplicate Virtual Services or Projects
You can clone a virtual service located in the file system using the command line, without having to open the Designer.
To prepare for running the command, do one of the following:
- On the Service Virtualization Server, open a command prompt. Navigate to the \bin folder under the Service Virtualization Server installation folder. By default, C:\Program Files\Micro Focus\Service Virtualization Server\Server\bin.
- On the Service Virtualization Designer machine, open a command prompt. Navigate to the \bin folder under the Service Virtualization Designer installation folder. By default, C:\Program Files\Micro Focus\Service Virtualization Designer\Designer\bin.
Run the Duplication Command
Run ResourceManager.exe -duplicate at the command line, using the following options:
Note: If an argument contains spaces, it must be enclosed in quotation marks. For example, "Resources\My Project".
Option | Description |
---|---|
General Options |
|
/f [source_path] |
Source path. The path to the project file (.vproj) or project archive file (.vproja). For example, Resources\MyVirtualProject\VirtualProject1.vproj |
/sn [service_name] | Service name. The name of the original service which you want to duplicate. The service_name must be the name of a service that already exists in the specified project. |
/nsn [new_service_name] |
New service name. A name for the duplicated service (optional). If you do not provide a name for the new service, it will be generated automatically using the original service’s name and an index. |
/ppw [encryption password] | Project encryption password. The project encryption password required to deploy an encrypted project. For details about encryption, see Password encryption. |
Example
The following example clones the MyVirtualProject service and creates a new service called My New Service.
ResourceManager.exe -duplicate /f "Resources\MyVirtualProject.vproj" /s "MemberAccounts" /nsn "My New Service"