{"action":"created","issue":{"url":"https://api.github.com/repos/cloudius-systems/osv/issues/903","repository_url":"https://api.github.com/repos/cloudius-systems/osv","labels_url":"https://api.github.com/repos/cloudius-systems/osv/issues/903/labels{/name}","comments_url":"https://api.github.com/repos/cloudius-systems/osv/issues/903/comments","events_url":"https://api.github.com/repos/cloudius-systems/osv/issues/903/events","html_url":"https://github.com/cloudius-systems/osv/issues/903","id":251246059,"number":903,"title":"Boot OSv with cdrom","user":{"login":"miha-plesko","id":8102426,"avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-08-18T13:31:25Z","updated_at":"2017-09-20T08:34:04Z","closed_at":"2017-09-20T08:34:04Z","author_association":"NONE","body":"I'm trying to boot OSv unikernel with ISO attached as a cdrom. But when adding following XML element to my libvirt xml:\r\n```xml\r\n<disk type='file' device='cdrom'>\r\n      <driver name='qemu' type='raw'/>\r\n      <source file='/home/miha/virtlet_data/data/nocloud.iso'/>\r\n      <backingStore/>\r\n      <target dev='sdb' bus='scsi'/>\r\n      <readonly/>\r\n      <alias name='scsi0-0-0-1'/>\r\n      <address type='drive' controller='0' bus='0' target='0' unit='1'/>\r\n</disk>\r\n```\r\nthen OSv crashes really hard:\r\n```\r\nOSv v0.24-424-g3e34265\r\npage fault outside application, addr: 0x0000000000000000\r\n[registers]\r\nRIP: 0x0000000000437401 <read_partition_table+49>\r\nRFL: 0x0000000000010202  CS:  0x0000000000000008  SS:  0x0000000000000010\r\nRAX: 0x0000000000000000  RBX: 0xffffa00001546600  RCX: 0xffff800001ab0200  RDX: 0x0000000000be3960\r\nRSI: 0x0000000000000100  RDI: 0x0000000000be3d60  RBP: 0x00002000000ff810  R8:  0xfffffffffffff858\r\nR9:  0x0000000000bb5600  R10: 0xffff8000013e8170  R11: 0xffff800001b2afac  R12: 0x0000000000000001\r\nR13: 0x0000000000bb5600  R14: 0xffff8000013e8170  R15: 0xffff800001b2afac  RSP: 0x00002000000ff7b0\r\nAborted\r\n\r\n[backtrace]\r\n0x000000000032f94f <???+3340623>\r\n0x0000000000330b0a <mmu::vm_fault(unsigned long, exception_frame*)+282>\r\n0x0000000000395e07 <page_fault+119>\r\n0x0000000000394c56 <???+3755094>\r\n0x0000000000371bec <virtio::scsi::add_lun(unsigned short, unsigned short)+268>\r\n0x000000000038150f <scsi_common::scan()+95>\r\n0x000000000037119e <virtio::scsi::scsi(pci::device&)+862>\r\n0x0000000000371f20 <hw::hw_driver* virtio::probe<virtio::scsi, (unsigned short)4100>(hw::hw_device*)+96>\r\n0x000000000035885c <???+3508316>\r\n0x0000000000355f93 <hw::device_manager::for_each_device(std::function<void (hw::hw_device*)>)+51>\r\n0x00000000003585de <hw::driver_manager::load_all()+78>\r\n0x0000000000383a69 <arch_init_drivers()+633>\r\n0x0000000000212e7c <do_main_thread(void*)+92>\r\n0x000000000044d185 <???+4510085>\r\n0x00000000003f5547 <thread_main_c+39>\r\n0x0000000000395bd5 <???+3759061>\r\n0x5a327e4b79d85bff <???+2044222463>\r\n0x00000000003f4c3f <???+4148287>\r\n0xfb89485354415540 <???+1413567808>\r\n```\r\n\r\nI understand cloud-init is already supported in OSv (looking at [this](https://github.com/cloudius-systems/osv/commit/4141e81d76ff76e194841a62de725a625b709c75) commit). So I'm wondering - how did we attach the ISO then?\r\n\r\n/cc @nyh @justinc1 @gberginc "},"comment":{"url":"https://api.github.com/repos/cloudius-systems/osv/issues/comments/330783860","html_url":"https://github.com/cloudius-systems/osv/issues/903#issuecomment-330783860","issue_url":"https://api.github.com/repos/cloudius-systems/osv/issues/903","id":330783860,"user":{"login":"miha-plesko","id":8102426,"avatar_url":"https://avatars1.githubusercontent.com/u/8102426?v=4","gravatar_id":"","url":"https://api.github.com/users/miha-plesko","html_url":"https://github.com/miha-plesko","followers_url":"https://api.github.com/users/miha-plesko/followers","following_url":"https://api.github.com/users/miha-plesko/following{/other_user}","gists_url":"https://api.github.com/users/miha-plesko/gists{/gist_id}","starred_url":"https://api.github.com/users/miha-plesko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miha-plesko/subscriptions","organizations_url":"https://api.github.com/users/miha-plesko/orgs","repos_url":"https://api.github.com/users/miha-plesko/repos","events_url":"https://api.github.com/users/miha-plesko/events{/privacy}","received_events_url":"https://api.github.com/users/miha-plesko/received_events","type":"User","site_admin":false},"created_at":"2017-09-20T08:34:04Z","updated_at":"2017-09-20T08:34:04Z","author_association":"NONE","body":"@nyh I've tested the [patch](https://groups.google.com/forum/#!topic/osv-dev/K0Tt-RY3oOw) that you sent and the output seems to be notably improved:\r\n\r\n```\r\n2017-09-20T08:10:13Z OSv v0.24-445-gd47424b\r\n2017-09-20T08:10:13Z eth0: 10.192.2.7\r\n2017-09-20T08:10:14Z **ERROR: fread (): I/O error\r\n2017-09-20T08:10:14Z ++ WARN: error reading PVD sector (16)\r\n2017-09-20T08:10:14Z iso-read.so: Sorry, couldn't open ISO-9660 image file '/user-data'.\r\n2017-09-20T08:10:16Z cloud-init failed: Failed getting cloud-init information No data source matched\r\n2017-09-20T08:10:16Z Running keyvaluestore on port:  9000\r\n2017-09-20T08:10:16Z server is listening on 9000\r\n```\r\nI'd kindly ask you to merge the patch to upstream.\r\n\r\nPatch aside, with your help, we made cloud-init work like a charm. All we had to do is to not use `SCSI` for the `cdrom` device, but rather a normal `virtio`. Thank you so much for you advise!"}}
{"actor":{"display_login":"miha-plesko"}}