LoginSignup
0
0

More than 5 years have passed since last update.

【vagrant】boxファイルの作成

Last updated at Posted at 2015-09-08

そのままPackageしてもよいが、多少でもboxファイルを圧縮する。

# du -sh /var/cache/yum
# yum clean all
---
# dd if=/dev/zero of=/EMPTY bs=1M
# rm -f /EMPTY

package化する前に仮想マシンはshutdownしておく。
(packageコマンド実行時に立ち上がってても自動でshutdownしてくれるけど。)

BOXファイル作成は>vagrant package --base <仮想マシン名>を実行する。

C:\cms>vagrant package --base cms
==> cms: Exporting VM...
==> cms: Compressing package to: C:/cms/package.box

圧縮前後でだいたい10%くらい削減できる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0