Skip to content

Register iso template get "Stream closed" error. Can not register self build iso template. #3792

@wqmeng

Description

@wqmeng
ISSUE TYPE
  • Bug Report
COMPONENT NAME
TEMPLATE
CLOUDSTACK VERSION
4.13.0
CONFIGURATION

Advanced networking

OS / ENVIRONMENT

CentOS 7.7

SUMMARY

I have create a iso base on the windows system iso setup image, the new iso file had build with VirtIO windows drive which added by DISM.exe command.
When I register the new virtio.iso template file to cloudstack, I have check the Zones, and the template status shows Stream closed, Ready No.

I tested download the self-build iso via wget, and no errors.

But I test the original iso file downloaded from Microsoft, and there is no problem to successfully register the iso to CloudStack.

STEPS TO REPRODUCE
Use dism tool to add virtio win drive to the system setup iso file from MS. 
Create a new iso file from UltraISO with the replaced install.wim and boot.wim. 
I use the UltraISO 9.7.1.3519 .
Upload the iso file to web server.
Open the cloudstack templates page.  Select ISO,  register ISO.
Type name, description, URL, un-check Direct Download, All zones, check Bootable, OS Type: Windows PV, Public, Feature.
![Snipaste_2020-01-02_19-12-22](https://user-images.githubusercontent.com/216289/71664440-f01b8800-2d93-11ea-8dfa-ab5a42ef2c35.png)
Then OK button. 
Go to Zones, check the template status, Shows Stream closed,  Ready No.

Error logs. 
tail -n 100 /var/log/cloudstack/management/management-server.log

2020-01-01 22:05:07,225 DEBUG [c.c.a.ApiServlet] (qtp504527234-17:ctx-18f90ecb) (logid:6754cbdf) ===START===  119.181.121.208 -- GET  command=registerIso&response=json&name=W2008R2EN_PV&displayText=Windows%202008%20R2%20EN%20VirtIO&url=http%3A%2F%2F[URI]%2Fiso%2Fvirtio%2Fen_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403_virtio.iso&zoneid=-1&isextractable=false&bootable=true&directdownload=false&osTypeId=c46ab375-27ed-11ea-98e2-00259047a58c&ispublic=true&isfeatured=true&_=1577940969173
2020-01-01 22:05:07,238 DEBUG [c.c.a.ApiServer] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) CIDRs from which account 'Acct[d5793fba-27ed-11ea-98e2-00259047a58c-admin]' is allowed to perform API calls: 0.0.0.0/0,::/0
2020-01-01 22:05:07,269 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) template 213 is not in store:1, type:Image
2020-01-01 22:05:07,273 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) template 213 is already in store:1, type:Image
2020-01-01 22:05:07,275 DEBUG [o.a.c.s.i.BaseImageStoreDriverImpl] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) Downloading template to data store 1
2020-01-01 22:05:07,281 DEBUG [o.a.c.s.i.BaseImageStoreDriverImpl] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) Performing image store createTemplate async callback
2020-01-01 22:05:07,284 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) getCommandHostDelegation: class org.apache.cloudstack.storage.command.DownloadCommand
2020-01-01 22:05:07,285 DEBUG [c.c.h.XenServerGuru] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) We are returning the default host to execute commands because the command is not of Copy type.
2020-01-01 22:05:07,285 DEBUG [o.a.c.s.RemoteHostEndPoint] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) Sending command org.apache.cloudstack.storage.command.DownloadCommand to host: 3
2020-01-01 22:05:07,286 DEBUG [c.c.a.t.Request] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) Seq 3-6442962216906925465: Sending  { Cmd , MgmtId: 161334404492, via: 3(s-3-VM), Ver: v1, Flags: 100011, [{"org.apache.cloudstack.storage.command.DownloadCommand":{"hvm":true,"description":"Windows 2008 R2 EN VirtIO","maxDownloadSizeInBytes":53687091200,"id":213,"resourceType":"TEMPLATE","installPath":"template/tmpl/2/213","_store":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://nfs.133.202/home/export/secondary","_role":"Image"}},"url":"http://[URI]/iso/virtio/en_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403_virtio.iso","format":"ISO","accountId":2,"name":"213-2-92853e30-5996-383c-a53f-7c2d7a6b4e68","secUrl":"nfs://nfs.133.202/home/export/secondary","wait":0}}] }
2020-01-01 22:05:07,286 DEBUG [c.c.r.ResourceLimitManagerImpl] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) Updating resource Type = template count for Account = 2 Operation = increasing Amount = 1
2020-01-01 22:05:07,294 DEBUG [c.c.a.ApiServlet] (qtp504527234-17:ctx-18f90ecb ctx-55174da4) (logid:6754cbdf) ===END===  119.181.121.208 -- GET  command=registerIso&response=json&name=W2008R2EN_PV&displayText=Windows%202008%20R2%20EN%20VirtIO&url=http%3A%2F%2F[URI]%2Fiso%2Fvirtio%2Fen_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403_virtio.iso&zoneid=-1&isextractable=false&bootable=true&directdownload=false&osTypeId=c46ab375-27ed-11ea-98e2-00259047a58c&ispublic=true&isfeatured=true&_=1577940969173
2020-01-01 22:05:07,904 DEBUG [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-12:null) (logid:) Ping from 3(s-3-VM)
2020-01-01 22:05:11,723 DEBUG [c.c.a.m.AgentManagerImpl] (AgentManager-Handler-7:null) (logid:) Ping from 2(v-1-VM)
2020-01-01 22:05:15,469 DEBUG [c.c.a.t.Request] (AgentManager-Handler-14:null) (logid:) Seq 3-6442962216906925465: Processing:  { Ans: , MgmtId: 161334404492, via: 3, Ver: v1, Flags: 10, [{"com.cloud.agent.api.storage.DownloadAnswer":{"jobId":"cf6deaf5-5c98-4524-8710-a82d4ba6aabc","downloadPct":0,"errorString":"Stream closed","downloadStatus":"DOWNLOAD_ERROR","downloadPath":"/mnt/SecStorage/85684c4e-5e7e-31f3-a9c4-d374747c3071/template/tmpl/2/213/dnld4723093890073855299tmp_","installPath":"template/tmpl/2/213","templateSize":0,"templatePhySicalSize":0,"result":true,"details":"Stream closed","wait":0}}] }
2020-01-01 22:05:15,472 DEBUG [o.a.c.s.i.BaseImageStoreDriverImpl] (RemoteHostEndPoint-9:ctx-d7bdc44a) (logid:1d17e810) Performing image store createTemplate async callback
2020-01-01 22:05:15,487 WARN  [c.c.a.AlertManagerImpl] (RemoteHostEndPoint-9:ctx-d7bdc44a) (logid:1d17e810) AlertType:: 28 | dataCenterId:: 1 | podId:: null | clusterId:: null | message:: Failed to register template: 988c78c1-c3b1-4771-8395-1a08c9801036 with error: Stream closed
2020-01-01 22:05:15,490 ERROR [o.a.c.s.i.BaseImageStoreDriverImpl] (RemoteHostEndPoint-9:ctx-d7bdc44a) (logid:1d17e810) Failed to register template: 988c78c1-c3b1-4771-8395-1a08c9801036 with error: Stream closed
EXPECTED RESULTS

Status: Successfully Installed
Ready: Yes


ACTUAL RESULTS
Status: Stream closed
Ready: No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions