You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Musayev, Ilya" <im...@webmd.net> on 2013/02/14 00:29:04 UTC

RE: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?

Mice

Have you been able to confirm that it works with the build option systemvm?

In my case it generates the iso file - but injectkeys.sh fails because it perms are set to 644.

2013-02-13 18:07:59,190 WARN  [cloud.server.ConfigurationServerImpl] (main:null) Failed to inject generated public key into systemvm iso java.io.IOException: Cannot run program "/usr/local/cloudstack/incubator-cloudstack-4.1/client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/classes/scripts/vm/systemvm/injectkeys.sh": java.io.IOException: error=13, Permission denied

The fix is simple, to chmod 755 injectkeys.sh

Does anyone else see this issue?

Thanks
Ilya


-----Original Message-----
From: Mice Xia [mailto:mice_xia@tcloudcomputing.com] 
Sent: Monday, January 28, 2013 1:44 AM
To: cloudstack-dev@incubator.apache.org
Subject: RE: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?

Hi Prasanna,

Thanks for your hint, I should have read the wiki carefully. 'mvn -Dnonoss -DskipTests=true -Psystemvm clean install', this generates systemvm.iso

-Mice

-----Original Message-----
From: Prasanna Santhanam [mailto:Prasanna.Santhanam@citrix.com]
Sent: Monday, January 28, 2013 2:17 PM
To: 'cloudstack-dev@incubator.apache.org'
Subject: Re: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?

Is this happening with the systemvm profile enabled when compiling?

I use mvn -Pdeveloper, systemvm clean install



----- Original Message -----
From: Mice Xia [mailto:weiran.xia1@gmail.com]
Sent: Monday, January 28, 2013 11:39 AM
To: cloudstack-dev@incubator.apache.org <cl...@incubator.apache.org>
Subject: Re: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?

I ran into the same problem on the dev environment. Maven does not package systemvm.iso at this moment.
For a workaround, I copied authorized_keys, cloud-scripts.tgz and systemvm.zip to a directory and run mkisofs -o systemvm.iso <directory>, then copy the systemvm.iso to the folder CS asks for.

-Mice

2013/1/26 Rajesh Battala <ra...@citrix.com>:
> I remember Saksham had got into the issue, workaround he had followed is copy the systemvm.iso from another machine to the host. After that it was working fine.
>
> -----Original Message-----
> From: Vijayendra Bhamidipati
> [mailto:vijayendra.bhamidipati@citrix.com]
> Sent: Saturday, January 26, 2013 6:02 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?
>
> Hi,
>
> Has anyone run into permission issues with the injectkeys.sh script when enabling a zone in a nonoss deployment (vmware) on the mgmt. server? I'm also seeing exceptions thrown because the mgmt. server cannot find the systemvm.iso file. Pasting the stack trace below. Would be very helpful if someone already knows of these issues and/or the resolution. I'm following the instructions on https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch to build/start the mgmt. server.
>
> Regards,
> Vijay
>
> Stack trace
> =========
>
>
> INFO  [vmware.mo.HypervisorHostHelper] (DirectAgent-20:10.223.74.132) 
> Blank VM: v-2-VM is ready for use INFO 
> [vmware.manager.VmwareManagerImpl] (DirectAgent-20:10.223.74.132) 
> Inject SSH key pairs before copying systemvm.iso into secondary 
> storage INFO  [cloud.server.ConfigurationServerImpl]
> (DirectAgent-20:10.223.74.132) Processing updateKeyPairs INFO 
> [cloud.server.ConfigurationServerImpl] (DirectAgent-20:10.223.74.132) 
> Keypairs already in database INFO 
> [cloud.server.ConfigurationServerImpl] (DirectAgent-20:10.223.74.132) 
> Keypairs already in database, skip updating local copy (not running as 
> cloud user) INFO  [cloud.server.ConfigurationServerImpl]
> (DirectAgent-20:10.223.74.132) Going to update systemvm iso with 
> generated keypairs if needed ERROR [vmware.manager.VmwareManagerImpl]
> (DirectAgent-20:10.223.74.132) Unexpected exception
> java.io.FileNotFoundException: /usr/lib/cloud/common/vms/systemvm.iso (No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:137)
>         at com.cloud.utils.FileUtil.copyfile(FileUtil.java:68)
>         at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.prepareSecondaryStorageStore(VmwareManagerImpl.java:628)
>         at com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:2051)
>         at com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:416)
>         at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:679)
> ERROR [vmware.manager.VmwareManagerImpl]
> (DirectAgent-20:10.223.74.132) Unable to copy systemvm ISO on 
> secondary storage. src location:
> /usr/lib/cloud/common/vms/systemvm.iso, dest location: 
> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
> WARN  [vmware.resource.VmwareResource] (DirectAgent-20:10.223.74.132) 
> StartCommand failed due to Exception:
> com.cloud.utils.exception.CloudRuntimeException
> Message: Unable to copy systemvm ISO on secondary storage. src
> location: /usr/lib/cloud/common/vms/systemvm.iso, dest location: 
> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
>
> com.cloud.utils.exception.CloudRuntimeException: Unable to copy systemvm ISO on secondary storage. src location: /usr/lib/cloud/common/vms/systemvm.iso, dest location: /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
>         at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.prepareSecondaryStorageStore(VmwareManagerImpl.java:634)
>         at com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:2051)
>         at com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:416)
>         at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:679)
> INFO  [cloud.vm.VirtualMachineManagerImpl] (consoleproxy-1:) Unable to 
> start VM on Host[-1-Routing] due to StartCommand failed due to
> Exception: com.cloud.utils.exception.CloudRuntimeException
> Message: Unable to copy systemvm ISO on secondary storage. src
> location: /usr/lib/cloud/common/vms/systemvm.iso, dest location: 
> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso

Re: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?

Posted by Rohit Yadav <bh...@apache.org>.
So, scripts/vm/systemvm/injectkeys.sh is 755, but when it's copied to
client/target/* the permissions are changed to 644. This is not
honoured by the ant run plugin, we could have used the maven assembly
plugin. A quick fix is indeed to chmod +x the files, or explicitly
chmod the file within client/pom.xml. !patch welcome

Regards.

On Thu, Feb 14, 2013 at 4:59 AM, Musayev, Ilya <im...@webmd.net> wrote:
> Mice
>
> Have you been able to confirm that it works with the build option systemvm?
>
> In my case it generates the iso file - but injectkeys.sh fails because it perms are set to 644.
>
> 2013-02-13 18:07:59,190 WARN  [cloud.server.ConfigurationServerImpl] (main:null) Failed to inject generated public key into systemvm iso java.io.IOException: Cannot run program "/usr/local/cloudstack/incubator-cloudstack-4.1/client/target/cloud-client-ui-4.1.0-SNAPSHOT/WEB-INF/classes/scripts/vm/systemvm/injectkeys.sh": java.io.IOException: error=13, Permission denied
>
> The fix is simple, to chmod 755 injectkeys.sh
>
> Does anyone else see this issue?
>
> Thanks
> Ilya
>
>
> -----Original Message-----
> From: Mice Xia [mailto:mice_xia@tcloudcomputing.com]
> Sent: Monday, January 28, 2013 1:44 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?
>
> Hi Prasanna,
>
> Thanks for your hint, I should have read the wiki carefully. 'mvn -Dnonoss -DskipTests=true -Psystemvm clean install', this generates systemvm.iso
>
> -Mice
>
> -----Original Message-----
> From: Prasanna Santhanam [mailto:Prasanna.Santhanam@citrix.com]
> Sent: Monday, January 28, 2013 2:17 PM
> To: 'cloudstack-dev@incubator.apache.org'
> Subject: Re: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?
>
> Is this happening with the systemvm profile enabled when compiling?
>
> I use mvn -Pdeveloper, systemvm clean install
>
>
>
> ----- Original Message -----
> From: Mice Xia [mailto:weiran.xia1@gmail.com]
> Sent: Monday, January 28, 2013 11:39 AM
> To: cloudstack-dev@incubator.apache.org <cl...@incubator.apache.org>
> Subject: Re: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?
>
> I ran into the same problem on the dev environment. Maven does not package systemvm.iso at this moment.
> For a workaround, I copied authorized_keys, cloud-scripts.tgz and systemvm.zip to a directory and run mkisofs -o systemvm.iso <directory>, then copy the systemvm.iso to the folder CS asks for.
>
> -Mice
>
> 2013/1/26 Rajesh Battala <ra...@citrix.com>:
>> I remember Saksham had got into the issue, workaround he had followed is copy the systemvm.iso from another machine to the host. After that it was working fine.
>>
>> -----Original Message-----
>> From: Vijayendra Bhamidipati
>> [mailto:vijayendra.bhamidipati@citrix.com]
>> Sent: Saturday, January 26, 2013 6:02 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: systemvm.iso and injectkeys.sh issue in nonoss mgmt server?
>>
>> Hi,
>>
>> Has anyone run into permission issues with the injectkeys.sh script when enabling a zone in a nonoss deployment (vmware) on the mgmt. server? I'm also seeing exceptions thrown because the mgmt. server cannot find the systemvm.iso file. Pasting the stack trace below. Would be very helpful if someone already knows of these issues and/or the resolution. I'm following the instructions on https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+on+master+branch to build/start the mgmt. server.
>>
>> Regards,
>> Vijay
>>
>> Stack trace
>> =========
>>
>>
>> INFO  [vmware.mo.HypervisorHostHelper] (DirectAgent-20:10.223.74.132)
>> Blank VM: v-2-VM is ready for use INFO
>> [vmware.manager.VmwareManagerImpl] (DirectAgent-20:10.223.74.132)
>> Inject SSH key pairs before copying systemvm.iso into secondary
>> storage INFO  [cloud.server.ConfigurationServerImpl]
>> (DirectAgent-20:10.223.74.132) Processing updateKeyPairs INFO
>> [cloud.server.ConfigurationServerImpl] (DirectAgent-20:10.223.74.132)
>> Keypairs already in database INFO
>> [cloud.server.ConfigurationServerImpl] (DirectAgent-20:10.223.74.132)
>> Keypairs already in database, skip updating local copy (not running as
>> cloud user) INFO  [cloud.server.ConfigurationServerImpl]
>> (DirectAgent-20:10.223.74.132) Going to update systemvm iso with
>> generated keypairs if needed ERROR [vmware.manager.VmwareManagerImpl]
>> (DirectAgent-20:10.223.74.132) Unexpected exception
>> java.io.FileNotFoundException: /usr/lib/cloud/common/vms/systemvm.iso (No such file or directory)
>>         at java.io.FileInputStream.open(Native Method)
>>         at java.io.FileInputStream.<init>(FileInputStream.java:137)
>>         at com.cloud.utils.FileUtil.copyfile(FileUtil.java:68)
>>         at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.prepareSecondaryStorageStore(VmwareManagerImpl.java:628)
>>         at com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:2051)
>>         at com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:416)
>>         at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
>>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>         at java.lang.Thread.run(Thread.java:679)
>> ERROR [vmware.manager.VmwareManagerImpl]
>> (DirectAgent-20:10.223.74.132) Unable to copy systemvm ISO on
>> secondary storage. src location:
>> /usr/lib/cloud/common/vms/systemvm.iso, dest location:
>> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
>> WARN  [vmware.resource.VmwareResource] (DirectAgent-20:10.223.74.132)
>> StartCommand failed due to Exception:
>> com.cloud.utils.exception.CloudRuntimeException
>> Message: Unable to copy systemvm ISO on secondary storage. src
>> location: /usr/lib/cloud/common/vms/systemvm.iso, dest location:
>> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
>>
>> com.cloud.utils.exception.CloudRuntimeException: Unable to copy systemvm ISO on secondary storage. src location: /usr/lib/cloud/common/vms/systemvm.iso, dest location: /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso
>>         at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.prepareSecondaryStorageStore(VmwareManagerImpl.java:634)
>>         at com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:2051)
>>         at com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:416)
>>         at com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
>>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
>>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>>         at java.lang.Thread.run(Thread.java:679)
>> INFO  [cloud.vm.VirtualMachineManagerImpl] (consoleproxy-1:) Unable to
>> start VM on Host[-1-Routing] due to StartCommand failed due to
>> Exception: com.cloud.utils.exception.CloudRuntimeException
>> Message: Unable to copy systemvm ISO on secondary storage. src
>> location: /usr/lib/cloud/common/vms/systemvm.iso, dest location:
>> /mnt/VM/7064181016283.658878fe/systemvm/systemvm-4.1.0-SNAPSHOT.iso