jl0815 opened a new issue, #227:
URL: https://github.com/apache/cloudstack-cloudmonkey/issues/227

   Hi.
   
   I am trying to use cmk to upload VM templates from a bash script but it 
results in a runtime error.
   The same command in cmk interactive mode is working fine.
   
   My command:
   ```bash
   ./cmk.linux.x86-64 get uploadparamsfortemplate format=qcow2 name=w2k22 \
   ostypeid=<id of "Windows PV"> \
   filepath=</path/to/qcow2/image> \
   hypervisor=KVM passwordenabled=true templatetype=USER \
   zoneid=<id of my zone> \
   isdynamicallyscalable=true ispublic=true \
   details[0].UEFI=SECURE details[0].video.hardware=virtio 
details[0].video.ram=16384 \
   details[0].skip.force.disk.controller=true details[0].nicAdapter=virtio \
   details[0].rootDiskController=virtio details[0].dataDiskController=virtio`
   ```
   The error is:
   ```bash
   Uploading files for getUploadParamsForTemplate : [/path/to/qcow2/image]
   panic: runtime error: invalid memory address or nil pointer dereference
   [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x6ab405]
   
   goroutine 1 [running]:
   github.com/apache/cloudstack-cloudmonkey/cmd.UploadFiles(0xc000fa2570, 
{0xc00026f8c0, 0x1a}, 0x0?, {0xc001018ba0, 0x1, 0x1})
           
/Users/borisstoyanov/Documents/cloudstack-cloudmonkey/cmd/fileupload.go:116 
+0x665
   github.com/apache/cloudstack-cloudmonkey/cmd.init.0.func1(0xc000fa2570)
           /Users/borisstoyanov/Documents/cloudstack-cloudmonkey/cmd/api.go:129 
+0xd2c
   github.com/apache/cloudstack-cloudmonkey/cli.ExecCmd({0xc000122010?, 0x13, 
0x13}, 0x0)
           /Users/borisstoyanov/Documents/cloudstack-cloudmonkey/cli/exec.go:68 
+0x27b
   main.main()
           /Users/borisstoyanov/Documents/cloudstack-cloudmonkey/cmk.go:121 
+0xbe6
   ```
   Is there something I can do to get this working?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to