resize stemcell

2014/11/12 14:44
阅读数 104

size=5000 wget https://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-stemcell/aws/bosh-stemcell-2641-aws-xen-ubuntu-trusty-go_agent.tgz rm -rf newsc mkdir -p newsc cd newsc tar xf ../bosh-stemcell-2641-aws-xen-ubuntu-trusty-go_agent.tgz tar xf image dd if=/dev/null of=new.img bs=1M seek=$size sudo virt-resize root.img new.img --expend /dev/sda1 rm -f image root.img mv new.img root.img tar czf image root.img rm -f root.img echo " disk: ${size}" >> stemcell.MF sha=shasum -a 1 image |cut -f1 -d ' ' sed -i -e "s/^sha1.*/sha1: $sha/" stemcell.MF sed -i -e "s/bosh-aws-xen-ubuntu-trusty-go_agent/bosh-aws-xen-ubuntu-trusty-go_agent-jumpbox/" stemcell.MF tar czf ../newsc.tgz * cd ..

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部