fix-resume.patch
scripts/onevm-all | ||
---|---|---|
181 | 181 |
vm_pool = VirtualMachinePool.new(client, USERFLAG) |
182 | 182 | |
183 | 183 |
if File.exist?(RUNVMFILE) |
184 |
running_vms = File.open(RUNVMFILE,'r')
|
|
184 |
running_vms = File.readlines(RUNVMFILE)
|
|
185 | 185 |
else |
186 | 186 |
running_vms = [] |
187 | 187 |
end |
... | ... | |
211 | 211 |
when "suspend" |
212 | 212 |
_do_suspend(vm, options[:wait]) |
213 | 213 |
when "resume" |
214 |
force = FALSE |
|
215 |
if running_vms.include?('vm.id') |
|
216 |
force = TRUE |
|
214 |
if running_vms.include?("#{vm.id}\n") |
|
215 |
_do_resume(vm, options[:wait], TRUE) |
|
217 | 216 |
end |
218 |
_do_resume(vm, options[:wait], force) |
|
219 | 217 |
else |
220 | 218 |
puts("#{vm.name}\t#{vm.status}") |
221 | 219 |
end |
222 |
- |