save
This commit is contained in:
parent
54d4dfcb33
commit
605cfd38f9
8 changed files with 130 additions and 6 deletions
|
|
@ -66,6 +66,14 @@ module VirtualMachine
|
|||
if options[:tpm] == nil
|
||||
options[:tpm] = false
|
||||
end
|
||||
|
||||
unless options[:vars_fd]
|
||||
options[:vars_fd] = File.join(vm_dir(options), "vars.fd")
|
||||
end
|
||||
|
||||
unless options[:code_fd]
|
||||
options[:code_fd] = File.join(vm_dir(options), "code.fd")
|
||||
end
|
||||
end
|
||||
|
||||
def self.archive(options)
|
||||
|
|
@ -97,8 +105,11 @@ module VirtualMachine
|
|||
Qemu.launch(
|
||||
options[:arch],
|
||||
disk_img_path,
|
||||
code_fd: options[:code_fd],
|
||||
vars_fd: options[:vars_fd],
|
||||
cpus: [1, System.cpus - 2].max,
|
||||
detach: options[:detached]
|
||||
detach: options[:detached],
|
||||
tpm: options[:tpm]
|
||||
)
|
||||
end
|
||||
|
||||
|
|
@ -117,6 +128,8 @@ module VirtualMachine
|
|||
Qemu.launch(
|
||||
options[:arch],
|
||||
disk_img_path,
|
||||
code_fd: options[:code_fd],
|
||||
vars_fd: options[:vars_fd],
|
||||
cpus: [1, System.cpus - 2].max,
|
||||
cdrom: path,
|
||||
detach: options[:detached],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue