VMware Cloud Community
AmandaM
Contributor
Contributor
Jump to solution

vCloud Director cannot deploy vApp sysprep related error

I had been having errors with deploying WinServer 2003 in our test environment, I didn't realize I had missed the sysprep package. I have now installed the sysprep package per KB Article: 1026313. I downloaded the files from the Microsoft website and extracted them etc then moved them into the vCloud linux host. Now I'm getting a new error:

Internal Server Error
- Unable to start vApp "vApp_administrator_9".
- Unable to start virtual machines in resource pool "0047960730-InternDevvDC".
- HTTP NFC Error. Cannot deploy package from /opt/vmware/cloud-director/guestcustomization/windows_deployment_package_sysprep.cab to [Cloud_DS3] 0728198015-WinServer03R2/windows_deployment_package_sysprep.cab./opt/vmware/cloud-director/guestcustomization/windows_deployment_package_sysprep.cab (Permission denied)

I hadn't seen an answer on the forums for this so far, if there is please point me in that direction. We're just doing a trial but I'd like to see this up and working.The excerpt of the error in the vcloud debug log file is:

2011-03-24 09:23:48,431 | ERROR    | akimbitask-0              | DRSClusterDeploymentBucket     | --- DRS deployment failed in Async section |
com.vmware.ssdc.util.LMException: HTTP NFC Error. Cannot deploy package from /opt/vmware/cloud-director/guestcustomization/windows_deployment_package_sysprep.cab to [Cloud_DS3] 0728198015-WinServer03R2/windows_deployment_package_sysprep.cab.
       at com.vmware.vcloud.val.customization.internal.impl.DeploymentPackage.DeployPackage(DeploymentPackage.java:160)
       at com.vmware.vcloud.val.internal.impl.VC20VirtualServer.pushDeploymentPackage(VC20VirtualServer.java:2679)
       at com.vmware.ssdc.backend.ClusterDeploymentBucket.CustomizeVMs(ClusterDeploymentBucket.java:135)
       at com.vmware.ssdc.backend.DRSClusterDeploymentBucket._AsyncDeploy(DRSClusterDeploymentBucket.java:265)
       at com.vmware.ssdc.backend.DRSClusterDeploymentBucket$2.invoke(DRSClusterDeploymentBucket.java:161)
       at com.vmware.ssdc.backend.CAkimbiTask._invokeChildUnsafe(CAkimbiTask.java:119)
       at com.vmware.ssdc.backend.CAkimbiTask.access$400(CAkimbiTask.java:39)
       at com.vmware.ssdc.backend.CAkimbiTask$InvokeChildThread.innerRun(CAkimbiTask.java:242)
       at com.vmware.ssdc.backend.CAkimbiTask$InvokeChildThread.access$200(CAkimbiTask.java:168)
       at com.vmware.ssdc.backend.CAkimbiTask$InvokeChildThread$1.run(CAkimbiTask.java:183)
       at com.vmware.ssdc.backend.CAkimbiTask$InvokeChildThread$1.run(CAkimbiTask.java:175)
       at com.vmware.vcloud.common.threadpool.ThreadContextExecutor.execute(ThreadContextExecutor.java:36)
       at com.vmware.ssdc.backend.CAkimbiTask$InvokeChildThread.run(CAkimbiTask.java:194)
Caused by: java.io.FileNotFoundException: /opt/vmware/cloud-director/guestcustomization/windows_deployment_package_sysprep.cab (Permission denied)
       at java.io.FileInputStream.open(Native Method)
       at java.io.FileInputStream.<init>(FileInputStream.java:106)
       at org.apache.commons.httpclient.methods.FileRequestEntity.writeRequest(FileRequestEntity.java:73)
       at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
       at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
       at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
       at com.vmware.vcloud.val.nfc.client.impl.HttpNfcClientSession.executeMethod(HttpNfcClientSession.java:200)
       at com.vmware.vcloud.val.nfc.client.impl.HttpNfcClientSession.putFile(HttpNfcClientSession.java:181)
       at com.vmware.vcloud.val.nfc.client.impl.NfcClientFacadeImpl.putFile(NfcClientFacadeImpl.java:61)
       at com.vmware.vcloud.val.customization.internal.impl.DeploymentPackage.DeployPackage(DeploymentPackage.java:158)
       ... 12 more

Thanks in advance for any assistance.

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

vCD creates a non-root user, vcloud, which is what most of the service runs as. There is a small component that runs as root in order to use privileged TCP ports (80, 443), but everything else actually happens in the unprivileged process.

So you may have a permissions problem on the sysprep cab file or the directory it resides in (especially if you've changed your umask from the RHEL default).

As root:

cd $VCLOUD_HOME

chown -R vcloud:vcloud guestcustomization

chmod 550 guestcustomization

chmod 550 guestcustomization/*

If you need to regenerate the sysprep files in the future you may want a mode of 770 instead, but the vcloud user does not need write access to anything in that directory.

No cell restart is needed. Just try customizing another vApp.

View solution in original post

Reply
0 Kudos
4 Replies
admin
Immortal
Immortal
Jump to solution

Does the account under which your vCD cell runs have permissions to access the file /opt/vmware/cloud-director/guestcustomization/windows_deployment_package_sysprep.cab?

Reply
0 Kudos
AmandaM
Contributor
Contributor
Jump to solution

vCD is running and was installed under root, I haven't created any other users since it is in a VM dedicated to vCD so I cannot imagine that it does not have access. That's why this error is confusing.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

vCD creates a non-root user, vcloud, which is what most of the service runs as. There is a small component that runs as root in order to use privileged TCP ports (80, 443), but everything else actually happens in the unprivileged process.

So you may have a permissions problem on the sysprep cab file or the directory it resides in (especially if you've changed your umask from the RHEL default).

As root:

cd $VCLOUD_HOME

chown -R vcloud:vcloud guestcustomization

chmod 550 guestcustomization

chmod 550 guestcustomization/*

If you need to regenerate the sysprep files in the future you may want a mode of 770 instead, but the vcloud user does not need write access to anything in that directory.

No cell restart is needed. Just try customizing another vApp.

Reply
0 Kudos
AmandaM
Contributor
Contributor
Jump to solution

Thank you so much kmsmith, that did the trick and it works perfectly now! I'm not sure if the template that we use has changed anything but this fixed the problem and it runs fine and I tested it creating new VMs without any issues.

Reply
0 Kudos