@@ -24,7 +24,7 @@ def compact(uuid)
24
24
name . start_with? 'hdd'
25
25
end
26
26
used_drives . each_value do |drive_params |
27
- execute ( 'prl_disk_tool' , 'compact' , '--hdd' , drive_params [ 'image' ] ) do |type , data |
27
+ execute ( @prldisktool_path , 'compact' , '--hdd' , drive_params [ 'image' ] ) do |type , data |
28
28
lines = data . split ( "\r " )
29
29
# The progress of the compact will be in the last line. Do a greedy
30
30
# regular expression to find what we're looking for.
@@ -168,9 +168,9 @@ def export(path, tpl_name)
168
168
end
169
169
170
170
def halt ( force = false )
171
- args = [ 'prlctl' , ' stop', @uuid ]
171
+ args = [ 'stop' , @uuid ]
172
172
args << '--kill' if force
173
- execute ( *args )
173
+ execute_prlctl ( *args )
174
174
end
175
175
176
176
def import ( tpl_name )
@@ -447,7 +447,7 @@ def regenerate_src_uuid
447
447
end
448
448
449
449
def register ( pvm_file )
450
- args = [ 'prlctl' , 'register' , pvm_file ]
450
+ args = [ @prlctl_path , 'register' , pvm_file ]
451
451
452
452
3 . times do
453
453
result = raw ( *args )
@@ -465,7 +465,7 @@ def register(pvm_file)
465
465
# If we reach this point, it means that we consistently got the
466
466
# failure, do a standard execute now. This will raise an
467
467
# exception if it fails again.
468
- execute ( *args )
468
+ execute_prlctl ( *args )
469
469
end
470
470
471
471
def registered? ( uuid )
@@ -516,7 +516,7 @@ def suspend
516
516
end
517
517
518
518
def unregister ( uuid )
519
- args = [ 'prlctl' , 'unregister' , uuid ]
519
+ args = [ @prlctl_path , 'unregister' , uuid ]
520
520
3 . times do
521
521
result = raw ( *args )
522
522
# Exit if everything is OK
@@ -534,7 +534,7 @@ def unregister(uuid)
534
534
# If we reach this point, it means that we consistently got the
535
535
# failure, do a standard execute now. This will raise an
536
536
# exception if it fails again.
537
- execute ( *args )
537
+ execute_prlctl ( *args )
538
538
end
539
539
540
540
def unshare_folders ( names )
@@ -545,7 +545,7 @@ def unshare_folders(names)
545
545
546
546
def vm_exists? ( uuid )
547
547
5 . times do |i |
548
- result = raw ( 'prlctl' , 'list' , uuid )
548
+ result = raw ( @prlctl_path , 'list' , uuid )
549
549
return true if result . exit_code == 0
550
550
551
551
# Sometimes this happens. In this case, retry. If
0 commit comments