Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Error 1041 when deploying to test machine

Created: 21 Mar 2014 • Updated: 03 Apr 2014 | 12 comments
This issue has been solved. See solution.

Testing SWV that comes with CMS 7.5 to see if its worth utilising. I have created a package and installed the agent on the client.

when I deploy package to client (win7x64)  I get Failure -retrun code 1041

If I run the command manully I get the following

C:\Windows\system32>SVSCMD.EXE 9dae1373-db2c-4383-a6b8-a4c881b553f6 IMPORT -PATH
 "program.xpf" ACTIVATE
Importing: program.xpf

File IO error encountered.
Error: 1050
SVSCMD failed: IMPORT

No layer with the specified GUID or Name exists in the database.
Error: 1041
SVSCMD failed: ACTIVATE

C:\Windows\system32>

Any ideas ?

Operating Systems:

Comments 12 CommentsJump to latest comment

EdT's picture

Please can you detail how you created the package, and whether you created it on a Win 7x64 machine.

Please also specify what software you have packaged and the version of the SWV client you are working with.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

JannasTo's picture

It's on a clean Win7 X64 machines. I used the X64 SVW admin tool (v7.5) to package the software. I created new layer and then exported it into CMS. The application is a fairly old x86 app we use. If I activate it on the machine it was built on all the icons appear as they should!

Joseph_Carson's picture

Hello JannasTo,

Did you use a global capture and is the platform the package was captured on the same platform as the target?  I would recommed using Symantec Virtual Composer instead and prior to compiling to start the application at least once of the machine.

Kind Regards,

JannasTo's picture

Hi, I didnt use Global capture. I will try that. Yes platform where captured is same as target.

ateamrh's picture

Hi JannasTo,

When you do an import of package do not use the GUID, since the agent do not contain the package in its cache it do not know the GUID of the package/layer.

To import a new package using svscmd.exe use the following command:

svscmd.exe IMPORT -PATH "program.xpf" ACTIVATE

If the package/layer is already on the client and you want to overwrite it, then you can use this command:

svscmd.exe 9dae1373-db2c-4383-a6b8-a4c881b553f6  DELETE -F IMPORT -PATH "program.xpf" ACTIVATE

This command will also work if the package do not exist on the client already, since it will first fail on the delete part and then success on the import and activate part.

It is possible to sequence commands to the svscmd.exe as done in the second command. See the valid commands by typing svscmd.exe /? on the client.

Kind Regards

Martin

JannasTo's picture

Still getting the error - even

Capture_20.PNG

! any ideas I'm tempted to give up on this.

delvalled's picture

If the layer already exists, you will get the first error where it says "Multiple layers exist with the same name," followed by the error activating (since it failed to import). I reproduced this on my machine by creating an empty layer, exporting it, then attempting to import it and activate while the original layer still existed.

error_importing_activating.png

You can use the following command to list all the layers present on the machine:

svscmd enum -v

enum_command.png

Try removing the layer first, then import and activate the layer. We can string these along in one command line as mentioned in a previous comment, or you can carry them out individually.

  1. svscmd "Empty Layer" d
  2. svscmd "Empty Layer" del
  3. svscmd import -path "Empty layer.xpf"
  4. svscmd "Empty Layer" a

Here's the output when I tested on my machine:

deact-del-imp-act.png

Alternatively, you can install the SWV admin tool from the add/remove programs control panel applet.

swvadmin-install.png

You can use the admin tool to manipulate the layers without having to use the command line.

swvadmin.png

Let me know if this helps! If you need live interactive support, please don't hesistate to open a case with our technical support teams. We would be more than happy to take your call and help you resolve these concerns.

SOLUTION
JannasTo's picture

Hi, That helpded a great deal, thanks. I now see that if i use the default "Import and Activate" command in software management it imports it OK but comes with an error on activation. If I run the "Import" command only for the software deployment its successful. I then run the software virtualization task Activate on the machine and it activates successfully. At least thats me getting forward and a workaround. Dont know why the import & activate command doesnt work

Thanks

ateamrh's picture

Hi JannasTo,

As I stated in my post you need to use the below command if the layer already exist on the client computer.

[Quote]

If the package/layer is already on the client and you want to overwrite it, then you can use this command:

svscmd.exe 9dae1373-db2c-4383-a6b8-a4c881b553f6  DELETE -F IMPORT -PATH "program.xpf" ACTIVATE

This command will also work if the package do not exist on the client already, since it will first fail on the delete part and then success on the import and activate part.

[/Quote]

The reason you get the error is because as delvalled stats, the layer already existed on the client and you used the command to do an import on a fresh machine.

Kind Regards

Martin

delvalled's picture

I'm not a CMS expert, but I wanted to test your scenario.

  1. Deployed an CMS virtual kit from our lab simulator.
  2. From the software panel:
    1. Import software
    2. Choose a previously created .xpf file
    3. Finish creating the software resource
  3. From Jobs/Tasks panel:
    1. Create a quick delivery task
    2. Command line: Import and activate
    3. Quick run: chose target client box
  4. Verify task completed successfully from the client's point of view.
    1. Symantec Management Agent shows task completed successfully.
    2. Symantec Workspace Virtualization admin tool shows the layer was imported and activated.
    3. svscmd enum -v shows the layer was imported and activated.

Image 3-1. Quick delivery task

quickdel-bblayer.PNG

Image 4-1. SMA task complete

SMA-BB-successful.png

Image 4-2. SWV admin

swvadmin-layer-imported.png

Image 4-3. SWV command line

svscmd-enum-v.png

I was able to start from scratch using a clean environment, then import a new software resource into the software catalog, create a quick delivery task, do a quick run, and then verify it made to the client successfully. I tried running the task again and it exit successfully (error code 0). 

I think your original problem has to do with the very first error you encountered:

File IO error encountered.
Error: 1050
SVSCMD failed: IMPORT

This error appears to be the result of a corrupted file. I bet there is something wrong with it. Can you provide that file: program.xpf? What was the application you were trying to virtualize? Maybe I can create my own virtual layer using the same software and check the result.

SOLUTION
JannasTo's picture

Sorry for the late response guys. Thanks a lot for your help. I eventually got it going. Think it was an issue to do with a space in the name of the file/plus a lack of understanding on this stuff on my part. Great responses and help from all. appreciate it.

ateamrh's picture

Hi JannasTo,

Please mark the post that you find most relevante to your question as answer.

God luck with CMS and SWS.

Kind Regards

Martin