gnuhub / kiwi_opensuse13.1_vagrant

构建opensuse13.1 vagrant格式的kiwi源码
http://localhost:7070/job/kiwi_opensuse13.1_vagrant/
0 stars 0 forks source link

研究清楚vagrant box格式以及内容 弄清楚本质 #2

Open gnuhub opened 10 years ago

gnuhub commented 10 years ago

1.vagrant package 2.kiwi vagrant支持 https://github.com/openSUSE/kiwi/pull/353/files#diff-1a7ea0fd409ec5b8e08f6e1c518571ddL178 3.vagrant文档关于 如何制作 base box

目标

gnuhub commented 10 years ago

Creating a Base Box

gnuhub commented 10 years ago

检查kiwi生成的box导入文件

cd ~/.vagrant.d/boxes/kiwi_opensuse13.1_vagrant_8/0/virtualbox
ls
Vagrantfile   box.img       metadata.json
gnuhub commented 10 years ago

检查对比Vagrantfile

Vagrant::Config.run do |config|
  config.vm.base_mac = "00163E60919D"
end
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
load include_vagrantfile if File.exist?(include_vagrantfile)
Vagrant::Config.run do |config|
  # This Vagrantfile is auto-generated by `vagrant package` to contain
  # the MAC address of the box. Custom configuration should be placed in
  # the actual `Vagrantfile` in this box.
  config.vm.base_mac = "080027EB433B"
end

# Load include vagrant file if it exists after the auto-generated
# so it can override any of the settings
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
load include_vagrantfile if File.exist?(include_vagrantfile)
gnuhub commented 10 years ago

对比 metadata.json

{
   "provider" : "virtualbox",
   "format" : "vmdk",
   "virtual_size" : "16"
}
{"provider":"virtualbox"}
gnuhub commented 10 years ago
gnuhub commented 10 years ago

Box File Format

file kiwi_opensuse13.1_vagrant_8.box
kiwi_opensuse13.1_vagrant_8.box: gzip compressed data, from Unix, last modified: Wed Jul 23 15:40:51 2014