Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
ad5a0e42
Commit
ad5a0e42
authored
11 years ago
by
Bob Lantz
Committed by
Brian O'Connor
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Explicitly create a qcow2 image
parent
a56e2970
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
util/vm/build.py
+2
-2
2 additions, 2 deletions
util/vm/build.py
with
2 additions
and
2 deletions
util/vm/build.py
+
2
−
2
View file @
ad5a0e42
...
...
@@ -186,7 +186,7 @@ def extractKernel( image, flavor ):
def
findBaseImage
(
flavor
,
size
=
'
8G
'
):
"
Return base VM image and kernel, creating them if needed
"
image
=
path
.
join
(
VMImageDir
,
flavor
+
'
-base.
img
'
)
image
=
path
.
join
(
VMImageDir
,
flavor
+
'
-base.
qcow2
'
)
if
path
.
exists
(
image
):
# Detect race condition with multiple builds
perms
=
stat
(
image
)[
ST_MODE
]
&
0777
...
...
@@ -198,7 +198,7 @@ def findBaseImage( flavor, size='8G' ):
run
(
'
mkdir -p %s
'
%
VMImageDir
)
iso
=
findiso
(
flavor
)
log
(
'
* Creating image file
'
,
image
)
run
(
'
qemu-img create %s %s
'
%
(
image
,
size
)
)
run
(
'
qemu-img create
-f qcow2
%s %s
'
%
(
image
,
size
)
)
installUbuntu
(
iso
,
image
)
# Write-protect image, also signaling it is complete
log
(
'
* Write-protecting image
'
,
image
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment