{"action":"created","issue":{"url":"https://api.github.com/repos/kata-containers/runtime/issues/843","repository_url":"https://api.github.com/repos/kata-containers/runtime","labels_url":"https://api.github.com/repos/kata-containers/runtime/issues/843/labels{/name}","comments_url":"https://api.github.com/repos/kata-containers/runtime/issues/843/comments","events_url":"https://api.github.com/repos/kata-containers/runtime/issues/843/events","html_url":"https://github.com/kata-containers/runtime/issues/843","id":371866458,"node_id":"MDU6SXNzdWUzNzE4NjY0NTg=","number":843,"title":"Run multiple kata-container instances on one host will failed on Arm64","user":{"login":"Weichen81","id":25216491,"node_id":"MDQ6VXNlcjI1MjE2NDkx","avatar_url":"https://avatars3.githubusercontent.com/u/25216491?v=4","gravatar_id":"","url":"https://api.github.com/users/Weichen81","html_url":"https://github.com/Weichen81","followers_url":"https://api.github.com/users/Weichen81/followers","following_url":"https://api.github.com/users/Weichen81/following{/other_user}","gists_url":"https://api.github.com/users/Weichen81/gists{/gist_id}","starred_url":"https://api.github.com/users/Weichen81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Weichen81/subscriptions","organizations_url":"https://api.github.com/users/Weichen81/orgs","repos_url":"https://api.github.com/users/Weichen81/repos","events_url":"https://api.github.com/users/Weichen81/events{/privacy}","received_events_url":"https://api.github.com/users/Weichen81/received_events","type":"User","site_admin":false},"labels":[{"id":748862369,"node_id":"MDU6TGFiZWw3NDg4NjIzNjk=","url":"https://api.github.com/repos/kata-containers/runtime/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-10-19T08:58:43Z","updated_at":"2018-12-10T02:49:56Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# Description of problem\r\n\r\nAs Arm64 is using the block device as the rootfs in guest. If we run two or more kata-container instances\r\non  one host, we will get following error:\r\n\r\n```\r\nroot@entos-thunderx2-desktop:~# docker run -dt --runtime kata-runtime ubuntu\r\n7baf2c0f26100b0e642ad4122ce9ea1cb556fb3ed6cfcb454cb0586cbbe6194d\r\nroot@entos-thunderx2-desktop:~# docker run -dt --runtime kata-runtime ubuntu\r\n2065fcf560c136091b5e69b6a12c95de94308309bb7fd5309df852503752203a\r\ndocker: Error response from daemon: OCI runtime create failed: qemu-system-aarch64: -device virtio-blk,drive=image-9f100592ac95eec6,scsi=off,config-wce=off: Failed to get \"write\" lock\r\nIs another process using the image?: unknown.\r\n```\r\nThis is because all kata-container instances are sharing the same rootfs image. And all instances\r\nwant to open this file with `RW` permission. But this file has been locked by the first instance already.\r\nBecause we're using the `RAW` format for rootfs image.\r\n\r\nWe have tried to change the `RAW` format to `QCOW` or `QCOW2` format. Yes, with 'COPY-ON-WRITE'\r\nfeature, we can run two or three instances at the same time. But, as the number of instances is inceasing,\r\nthe speed of creating instance becomes more and more slow. I think this may be caused by `QCOW/QCOW2` itself. Because `QCOW/QCOW2` haven't been used massively on cloud. Most cloud platforms are using network block device for virtual machines.\r\n\r\nMy question is that:\r\n**can we use  NBD for kata-container instances to bypass this issue?**\r\n\r\nI know x86_64 is using persist memory, so it doesn't have similar issue @jodh-intel @gnawux @Pennyzct \r\n\r\n---\r\n\r\n(replace this text with the output of the `kata-collect-data.sh` script, after\r\nyou have reviewed its content to ensure it does not contain any private\r\ninformation).\r\n"},"comment":{"url":"https://api.github.com/repos/kata-containers/runtime/issues/comments/445641010","html_url":"https://github.com/kata-containers/runtime/issues/843#issuecomment-445641010","issue_url":"https://api.github.com/repos/kata-containers/runtime/issues/843","id":445641010,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTY0MTAxMA==","user":{"login":"Weichen81","id":25216491,"node_id":"MDQ6VXNlcjI1MjE2NDkx","avatar_url":"https://avatars3.githubusercontent.com/u/25216491?v=4","gravatar_id":"","url":"https://api.github.com/users/Weichen81","html_url":"https://github.com/Weichen81","followers_url":"https://api.github.com/users/Weichen81/followers","following_url":"https://api.github.com/users/Weichen81/following{/other_user}","gists_url":"https://api.github.com/users/Weichen81/gists{/gist_id}","starred_url":"https://api.github.com/users/Weichen81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Weichen81/subscriptions","organizations_url":"https://api.github.com/users/Weichen81/orgs","repos_url":"https://api.github.com/users/Weichen81/repos","events_url":"https://api.github.com/users/Weichen81/events{/privacy}","received_events_url":"https://api.github.com/users/Weichen81/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T02:49:56Z","updated_at":"2018-12-10T02:49:56Z","author_association":"CONTRIBUTOR","body":"@amshinde We had tried the shared flag before,  but when we ran more than 3 kata-containers, the start up speed would be slower and slower. This is why we wanted to try nvdimm for Arm64"}}
{"actor":{"display_login":"Weichen81"}}