Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
57ac27dd
Commit
57ac27dd
authored
Sep 27, 2017
by
fv3rdugo
Browse files
[#344] To fix remove disk
Now add a new volume works
parent
dc5fd9d4
Changes
1
Show whitespace changes
Inline
Side-by-side
bin/rvd_back.pl
View file @
57ac27dd
...
...
@@ -242,27 +242,25 @@ sub import_vbox {
my
$name
=
<
STDIN
>
;
chomp
$name
;
my
$p
ath
=
$vm
->
dir_img
.
"
/
"
.
$name
.
"
.qcow2
";
my
$p
ool
=
$vm
->
dir_img
.
"
/
"
.
$name
.
"
.qcow2
";
if
(
$name
&&
-
e
$file_vdi
)
{
my
@cmd
=
("
qemu-img convert -p -f vdi -O qcow2
$file_vdi
$p
ath
");
my
@cmd
=
("
qemu-img convert -p -f vdi -O qcow2
$file_vdi
$p
ool
");
system
(
@cmd
);
print
"
Save image in default storage pool:
$p
ath
\n
";
print
"
Save image in default storage pool:
$p
ool
\n
";
#new machine xml change source file
my
$id_iso
;
my
$id_owner
=
2
;
my
$id_base
=
"
NULL
";
my
$id_iso
=
1
;
my
$id_owner
=
1
;
#1 root or admin
my
$domain
=
$vm
->
create_domain
(
name
=>
$name
,
id_iso
=>
$id_iso
,
file_iso
=>
'
<NONE>
'
,
id_owner
=>
$id_owner
,
is
_base
=>
0
,
id_base
=>
$id_base
);
,
is
o_file
=>
'
<NONE>
'
);
#remove cdrom
$domain
->
remove_disks
();
#add new path
$domain
->
add_volume
(
path
=>
$p
ath
);
$domain
->
add_volume
(
path
=>
$p
ool
);
exit
;
}
print
"
Warning: Missing args or no such file!
\n
";
...
...
Write
Preview
Supports
Markdown
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