| 内容 | PS> vagrant package --base VMName --output Custom.box
==> VMName: Attempting graceful shutdown of VM...
VMName: Guest communication could not be established! This is usually because
VMName: SSH is not running, the authenticationinformation was changed,
VMName: or some other networking issue. Vagrant will force halt, if
VMName: capable.
==> VMName: Forcing shutdown of VM...
==> VMName: Clearing any previously set forwarded p
orts...
==> VMName: Exporting VM...
==> VMName: Compressing package to: Custom.box
--base はVirtualBox上の名前
--output は新しいboxの名前
--outputが未指定だと、package.boxになる
PS> vagrant box add NewBox Custom.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'NewBox' (v0) for provider:
box: Unpacking necessary files from: file://Custom.box
box: Progress: 100% (Rate: 461M/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'NewBox' (v0) for 'virtualbox'!
PS> vagrant box list
NewBox (virtualbox, 0)
bento/centos-7.1 (virtualbox, 2.2.2)
|