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
3d94462e
Commit
3d94462e
authored
May 17, 2015
by
Vasiliy Tolstov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove image format from image name
Signed-off-by:
Vasiliy Tolstov
<
v.tolstov@selfip.ru
>
parent
350a5f8c
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 @
3d94462e
...
...
@@ -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 @
3d94462e
...
...
@@ -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 @
3d94462e
...
...
@@ -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 @
3d94462e
...
...
@@ -64,8 +64,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