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
fd40b714
Commit
fd40b714
authored
Jun 18, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2118 from vtolstov/image
remove image format from image name in qemu builder
parents
40cb558f
3d94462e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
builder/qemu/step_copy_disk.go
builder/qemu/step_copy_disk.go
+3
-4
builder/qemu/step_create_disk.go
builder/qemu/step_create_disk.go
+3
-3
builder/qemu/step_resize_disk.go
builder/qemu/step_resize_disk.go
+3
-4
builder/qemu/step_run.go
builder/qemu/step_run.go
+1
-2
No files found.
builder/qemu/step_copy_disk.go
View file @
fd40b714
...
...
@@ -3,7 +3,6 @@ package qemu
import
(
"fmt"
"path/filepath"
"strings"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
...
...
@@ -18,13 +17,13 @@ func (s *stepCopyDisk) Run(state multistep.StateBag) multistep.StepAction {
driver
:=
state
.
Get
(
"driver"
)
.
(
Driver
)
isoPath
:=
state
.
Get
(
"iso_path"
)
.
(
string
)
ui
:=
state
.
Get
(
"ui"
)
.
(
packer
.
Ui
)
path
:=
filepath
.
Join
(
config
.
OutputDir
,
fmt
.
Sprintf
(
"%s.%s"
,
config
.
VMName
,
strings
.
ToLower
(
config
.
Format
)))
name
:=
config
.
VMName
+
"."
+
strings
.
ToLower
(
config
.
Format
)
path
:=
filepath
.
Join
(
config
.
OutputDir
,
fmt
.
Sprintf
(
"%s"
,
config
.
VMName
))
name
:=
config
.
VMName
command
:=
[]
string
{
"convert"
,
"-f"
,
config
.
Format
,
"-O"
,
config
.
Format
,
isoPath
,
path
,
}
...
...
builder/qemu/step_create_disk.go
View file @
fd40b714
...
...
@@ -2,10 +2,10 @@ package qemu
import
(
"fmt"
"path/filepath"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"path/filepath"
"strings"
)
// This step creates the virtual disk that will be used as the
...
...
@@ -16,7 +16,7 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction {
config
:=
state
.
Get
(
"config"
)
.
(
*
Config
)
driver
:=
state
.
Get
(
"driver"
)
.
(
Driver
)
ui
:=
state
.
Get
(
"ui"
)
.
(
packer
.
Ui
)
name
:=
config
.
VMName
+
"."
+
strings
.
ToLower
(
config
.
Format
)
name
:=
config
.
VMName
path
:=
filepath
.
Join
(
config
.
OutputDir
,
name
)
command
:=
[]
string
{
...
...
builder/qemu/step_resize_disk.go
View file @
fd40b714
...
...
@@ -2,10 +2,10 @@ package qemu
import
(
"fmt"
"path/filepath"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"path/filepath"
"strings"
)
// This step resizes the virtual disk that will be used as the
...
...
@@ -16,8 +16,7 @@ func (s *stepResizeDisk) Run(state multistep.StateBag) multistep.StepAction {
config
:=
state
.
Get
(
"config"
)
.
(
*
Config
)
driver
:=
state
.
Get
(
"driver"
)
.
(
Driver
)
ui
:=
state
.
Get
(
"ui"
)
.
(
packer
.
Ui
)
path
:=
filepath
.
Join
(
config
.
OutputDir
,
fmt
.
Sprintf
(
"%s.%s"
,
config
.
VMName
,
strings
.
ToLower
(
config
.
Format
)))
path
:=
filepath
.
Join
(
config
.
OutputDir
,
config
.
VMName
)
command
:=
[]
string
{
"resize"
,
...
...
builder/qemu/step_run.go
View file @
fd40b714
...
...
@@ -65,8 +65,7 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
vnc
:=
fmt
.
Sprintf
(
"0.0.0.0:%d"
,
vncPort
-
5900
)
vmName
:=
config
.
VMName
imgPath
:=
filepath
.
Join
(
config
.
OutputDir
,
fmt
.
Sprintf
(
"%s.%s"
,
vmName
,
strings
.
ToLower
(
config
.
Format
)))
imgPath
:=
filepath
.
Join
(
config
.
OutputDir
,
vmName
)
defaultArgs
:=
make
(
map
[
string
]
string
)
...
...
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