• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jbenet/ipfs-vbox: boot VMs in virtual box with IPFS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jbenet/ipfs-vbox

开源软件地址:

https://github.com/jbenet/ipfs-vbox

开源编程语言:

Shell 100.0%

开源软件介绍:

ipfs-vbox - boot VMs in virtual box with IPFS

Quick shell script to assist booting VMs with VirtualBox from IPFS. Based on https://github.com/zignig/astralboot

Install

git clone https://github.com/jbenet/ipfs-vbox
cd ipfs-vbox
cp ipfs-vbox /usr/local/bin/ipfs-vbox

You should now have:

> ipfs-vbox
usage: ipfs-vbox [ boot | rm ] <ipfs-path>
boot iso at <ipfs-path>

Usage

# add a vm
> ipfs add -w ipfs.iso
added QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso ipfs.iso

# run ipfs daemon + mount
> ipfs daemon --mount &

# boot a vm
> ipfs-vbox boot /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso

# remove a vm
> ipfs-vbox rm /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso

Example

First, get a vm image and add it to ipfs, like this:

> ipfs add -w ipfs.iso
added QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso ipfs.iso

(That o/ is a valid VM, so you should be able to test this script with it)

Make sure you have VirtualBox installed:

> VBoxManage --version
4.3.20r96996

Run the ipfs daemon mounted:

> ipfs daemon --mount
Initializing daemon...
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080

Check the iso is there, in the mounted /ipfs:

> stat /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso
771751942 17996664729543829149 -r--r--r-- 0 jbenet staff 0 27676672 "Aug 30 14:43:42 1754" "Aug 30 14:43:42 1754" "Aug 30 14:43:42 1754" "Aug 30 14:43:42 1754" 1048576 54056 0 /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso

Now, boot it with this script!

> ipfs-vbox boot /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso
...

You should see it boot like this:

Remove the vm with:

> ipfs-vbox rm /ipfs/QmRtavajASJyHcT4wVZkTS9s1XqtpFDW5jeUzGUzw6RPtb/ipfs.iso
VBoxManage: error: Invalid machine state: PoweredOff (must be Running, Paused or Stuck)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
VBoxManage: error: Context: "PowerDown(progress.asOutParam())" at line 222 of file VBoxManageControlVM.cpp
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
crustio/ipfsscan发布时间:2022-06-22
下一篇:
ipfs/go-jaeger-plugin: A Jaeger plugin for IPFS发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap