Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
10c58602
Commit
10c58602
authored
May 14, 2013
by
Srikanth Raju
Committed by
Leigh B Stoller
Jul 23, 2013
Browse files
Oops. xvda*, not sd*
parent
0adf77f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/xen/import-image.pl
View file @
10c58602
...
...
@@ -126,11 +126,11 @@ if (system("tar -xvzf $infile -C $workdir")){
goto
cleanup
;
}
# TODO: Proper
s
da size based on image size?
# TODO: Proper
xv
da
1
size based on image size?
# TODO: Maybe handle bootopts
# Create the "special" xm.conf
my
$heredoc
=
<<XMCONF;
disksizes = '
sdb
:2.00g,
s
da:12.00g'
disksizes = '
xvda2
:2.00g,
xv
da
1
:12.00g'
memory = '256'
disk = ['phy:/dev/xen-vg/pcvm666-1,xvda1,w','phy:/dev/xen-vg/pcvm666.swap,xvda2,w']
kernel = 'kernel'
...
...
@@ -147,14 +147,14 @@ print FH $heredoc;
close
(
FH
);
# Image zip the raw image
if
(
system
("
$zipper
-o -l
$workdir
/image
$workdir
/
s
da
"))
{
if
(
system
("
$zipper
-o -l
$workdir
/image
$workdir
/
xv
da
1
"))
{
print
STDERR
"
*** Failed to greate image!
\n
";
print
STDERR
"
command:
$zipper
-o -l
$workdir
/image
$workdir
/
s
da
\n
";
print
STDERR
"
command:
$zipper
-o -l
$workdir
/image
$workdir
/
xv
da
1
\n
";
}
# Tar everything up and then imagezip
my
$cmd
=
"
$TAR
zcf - -C
$workdir
s
da xm.conf kernel initrd |
$zipper
-f -
$osid
.ndz
";
my
$cmd
=
"
$TAR
zcf - -C
$workdir
xv
da
1
xm.conf kernel initrd |
$zipper
-f -
$osid
.ndz
";
if
(
system
("
$cmd
"))
{
print
STDERR
"
*** Failed to create image!
\n
";
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment