Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
40dbe8de
Commit
40dbe8de
authored
May 11, 2014
by
Rickard von Essen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1161 from rickard-von-essen/opt_if
builder/parallels: Select which interface to connect to.
parents
fc10c1b1
bd25866e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
builder/parallels/iso/builder.go
builder/parallels/iso/builder.go
+6
-0
builder/parallels/iso/step_type_boot_command.go
builder/parallels/iso/step_type_boot_command.go
+1
-1
website/source/docs/builders/parallels-iso.html.markdown
website/source/docs/builders/parallels-iso.html.markdown
+6
-0
No files found.
builder/parallels/iso/builder.go
View file @
40dbe8de
...
...
@@ -36,6 +36,7 @@ type config struct {
GuestOSType
string
`mapstructure:"guest_os_type"`
GuestOSDistribution
string
`mapstructure:"guest_os_distribution"`
HardDriveInterface
string
`mapstructure:"hard_drive_interface"`
HostInterfaces
[]
string
`mapstructure:"host_interfaces"`
HTTPDir
string
`mapstructure:"http_directory"`
HTTPPortMin
uint
`mapstructure:"http_port_min"`
HTTPPortMax
uint
`mapstructure:"http_port_max"`
...
...
@@ -110,6 +111,11 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
b
.
config
.
HTTPPortMax
=
9000
}
if
len
(
b
.
config
.
HostInterfaces
)
==
0
{
b
.
config
.
HostInterfaces
=
[]
string
{
"en0"
,
"en1"
,
"en2"
,
"en3"
,
"en4"
,
"en5"
,
"en6"
,
"en7"
,
"en8"
,
"en9"
,
"ppp0"
,
"ppp1"
,
"ppp2"
}
}
if
b
.
config
.
VMName
==
""
{
b
.
config
.
VMName
=
fmt
.
Sprintf
(
"packer-%s"
,
b
.
config
.
PackerBuildName
)
}
...
...
builder/parallels/iso/step_type_boot_command.go
View file @
40dbe8de
...
...
@@ -42,7 +42,7 @@ func (s *stepTypeBootCommand) Run(state multistep.StateBag) multistep.StepAction
driver
:=
state
.
Get
(
"driver"
)
.
(
parallelscommon
.
Driver
)
// Determine the host IP
ipFinder
:=
&
IfconfigIPFinder
{
Devices
:
[]
string
{
"en0"
,
"en1"
,
"en2"
,
"en3"
,
"en4"
,
"en5"
,
"en6"
,
"en7"
,
"en8"
,
"en9"
,
"ppp0"
,
"ppp1"
,
"ppp2"
}
}
ipFinder
:=
&
IfconfigIPFinder
{
Devices
:
config
.
HostInterfaces
}
hostIp
,
err
:=
ipFinder
.
HostIP
()
if
err
!=
nil
{
...
...
website/source/docs/builders/parallels-iso.html.markdown
View file @
40dbe8de
...
...
@@ -114,6 +114,12 @@ each category, the available options are alphabetized and described.
hard drives are attached to, defaults to "sata". Valid options are
"sata", "ide", and "scsi".
*
`host_interfaces`
(array of strings) - A list of which interfaces on the
host should be searched for a IP address. The first IP address found on
one of these will be used as
`{{ .HTTPIP }}`
in the
`boot_command`
.
Defaults to ["en0", "en1", "en2", "en3", "en4", "en5", "en6", "en7", "en8",
"en9", "ppp0", "ppp1", "ppp2"].
*
`http_directory`
(string) - Path to a directory to serve using an HTTP
server. The files in this directory will be available over HTTP that will
be requestable from the virtual machine. This is useful for hosting
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment