Skip to content

Commit

Permalink
Release v1.2.0.rc2
Browse files Browse the repository at this point in the history
* master:
  action/import: Added 'regen_box_uuid' customization option.
  Forwarded ports: enabled collision repair
  Forwarded ports: clear before suspend, repair before resume.
  • Loading branch information
legal90 committed Aug 5, 2014
2 parents 64e25e5 + 3c6709c commit 1f2224b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
5 changes: 2 additions & 3 deletions lib/vagrant-parallels/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def self.action_boot
b.use SetName
b.use ClearForwardedPorts
b.use Provision
b.use EnvSet, port_collision_repair: true
b.use PrepareForwardedPortCollisionParams
b.use HandleForwardedPortCollisions
b.use PrepareNFSValidIds
Expand Down Expand Up @@ -104,7 +103,6 @@ def self.action_package

b1.use SetupPackageFiles
b1.use action_halt
b1.use ClearForwardedPorts
b1.use PrepareNFSValidIds
b1.use SyncedFolderCleanup
b1.use Package
Expand Down Expand Up @@ -165,9 +163,9 @@ def self.action_resume
next
end

b1.use EnvSet, port_collision_repair: false
b1.use PrepareForwardedPortCollisionParams
b1.use HandleForwardedPortCollisions
b1.use ForwardPorts
b1.use Resume
b1.use WaitForCommunicator, [:resuming, :running]
end
Expand Down Expand Up @@ -256,6 +254,7 @@ def self.action_suspend
next
end

b1.use ClearForwardedPorts
b1.use Suspend
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/vagrant-parallels/action/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def recover(env)
def register_template
if !@env[:machine].provider.driver.read_vms_paths.has_key?(@template_path)
@logger.info("Register the box template: '#{@template_path}'")
# We should also regenerate 'SourceVmUuid' to make sure that
# SMBIOS UUID is unique [GH-113]
@env[:machine].provider.driver.register(@template_path, regen_src_uuid=true)
regen_uuid = @env[:machine].provider_config.regen_box_uuid

@env[:machine].provider.driver.register(@template_path, regen_uuid)
end

# Return the uuid of registered template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def call(env)
env[:port_collision_extra_in_use] =
env[:machine].provider.driver.read_used_ports

# We can always repair the collision because port forwarding
# are configured globally, not per each VM.
env[:port_collision_repair] = true

# Build the remap for any existing collision detections
remap = {}
env[:port_collision_remap] = remap
Expand Down
5 changes: 4 additions & 1 deletion lib/vagrant-parallels/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class Config < Vagrant.plugin("2", :config)
attr_accessor :optimize_power_consumption
attr_accessor :name
attr_reader :network_adapters
attr_accessor :regen_box_uuid
attr_accessor :update_guest_tools


# Compatibility with virtualbox provider's syntax
alias :check_guest_additions= :check_guest_tools=

Expand All @@ -22,6 +22,7 @@ def initialize
@network_adapters = {}
@name = UNSET_VALUE
@optimize_power_consumption = UNSET_VALUE
@regen_box_uuid = UNSET_VALUE
@update_guest_tools = UNSET_VALUE

network_adapter(0, :shared)
Expand Down Expand Up @@ -73,6 +74,8 @@ def finalize!

@name = nil if @name == UNSET_VALUE

@regen_box_uuid = true if @regen_box_uuid == UNSET_VALUE

if @update_guest_tools == UNSET_VALUE
@update_guest_tools = false
end
Expand Down
5 changes: 3 additions & 2 deletions lib/vagrant-parallels/driver/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ def read_vms
# Registers the virtual machine
#
# @param [String] pvm_file Path to the machine image (*.pvm)
# @param [Boolean] regen_src_uuid Regenerate SourceVmUuid to avoid
# SMBIOS UUID collision
# @param [Boolean] regen_src_uuid Regenerate 'SourceVmUuid' to avoid
# SMBIOS UUID collision, or let it unchanged to keep activation status
# for Windows-based guests [GH-113]
def register(pvm_file, regen_src_uuid)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-parallels/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module Parallels
VERSION = "1.2.0.rc1"
VERSION = "1.2.0.rc2"
end
end

0 comments on commit 1f2224b

Please sign in to comment.