You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/09/22 21:44:47 UTC

[48/50] git commit: updated refs/heads/master to 1290e10

CLOUDSTACK-7143: work on vagrant box export

Running --export creates the .ovf and the .vmdk files referenced
from that .ovf in one go. Guessing/predicting the names of the .vmdk
files is not fool-proof.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d56e950e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d56e950e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d56e950e

Branch: refs/heads/master
Commit: d56e950e8591f02e0dca29fea2630b3872b73f5c
Parents: cab4dd8
Author: Leo Simons <ls...@schubergphilis.com>
Authored: Tue Jul 29 10:12:00 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Sep 22 21:38:17 2014 +0200

----------------------------------------------------------------------
 tools/appliance/build.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d56e950e/tools/appliance/build.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index 12f5f89..e3197e8 100755
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -459,20 +459,24 @@ function vmware_export() {
 
 function vagrant_export() {
   log INFO "creating vagrant export"
+  local machine_uuid="${1}"
   # this is based on veewee export logic, but, we don't want to use veewee export,
   # since it makes optimistic assumptions about VM shutdown/halt leading to available
   # disks and the like
-  disk="${appliance_build_name}-vmware.ovf"
-  image="${appliance_build_name}-vmware-disk1.vmdk"
+  # predicting VBoxManage disk naming seems problematic
+  #   disk="${appliance_build_name}-vmware.ovf"
+  #   image="${appliance_build_name}-vmware-disk1.vmdk"
   mkdir -p "box/${appliance_build_name}"
-  cp "${disk}" "box/${appliance_build_name}/box.ovf"
-  cp "${image}" "box/${appliance_build_name}/box-disk1.vmdk"
+  #   cp "${disk}" "box/${appliance_build_name}/box.ovf"
+  #   cp "${image}" "box/${appliance_build_name}/box-disk1.vmdk"
   cat >box/${appliance_build_name}/Vagrantfile <<END
 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 = "${mac_address}"
+  # This is not enough config to be able to use the systemvm .box
+  # See ../vagrant/systemvm/Vagrantfile for the trickery needed
 end
 
 # Load include vagrant file if it exists after the auto-generated
@@ -480,6 +484,7 @@ end
 include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
 load include_vagrantfile if File.exist?(include_vagrantfile)
 END
+  vboxmanage export "${machine_uuid}" --output "box/${appliance_build_name}/box.ovf"
   ( cd box/${appliance_build_name}; tar cf "../${appliance_build_name}.box" . )
   mv "box/${appliance_build_name}.box" dist/
   log INFO "${appliance} exported for vagrant: dist/${appliance_build_name}.box"
@@ -530,7 +535,7 @@ function main() {
   xen_server_export "${hdd_path}"
   kvm_export "${hdd_path}"
   vmware_export "${machine_uuid}" "${hdd_uuid}"
-  vagrant_export "${machine_uuid}" "${hdd_uuid}"
+  vagrant_export "${machine_uuid}"
   hyperv_export "${hdd_uuid}"
   add_on_exit log INFO "BUILD SUCCESSFUL"
 }