creating raw images for QEMU
This commit is contained in:
parent
3b9e0a1f33
commit
49cc960703
13 changed files with 164 additions and 17 deletions
8
bin/vm
8
bin/vm
|
|
@ -8,15 +8,15 @@ require 'virtual-machine'
|
|||
|
||||
options = OpenStruct.new
|
||||
subcommand = ARGV.shift&.to_sym
|
||||
options.parameter = ARGV[0] && ARGV[0] !~ /^-/ ? ARGV.shift : nil
|
||||
parameter = ARGV[0] && ARGV[0] !~ /^-/ ? ARGV.shift : nil
|
||||
|
||||
OptionParser.new do |opt|
|
||||
opt.on('--arch ARCH', 'Architecture arm64 or x86_64') do |arch|
|
||||
options.arch = arch
|
||||
end
|
||||
|
||||
opt.on('--name NAME', 'Virtaul Machine name') do |arch|
|
||||
options.arch = arch
|
||||
opt.on('--name NAME', 'Virtaul Machine name') do |name|
|
||||
options.name = name
|
||||
end
|
||||
|
||||
end.parse!
|
||||
|
|
@ -27,7 +27,7 @@ when :create
|
|||
puts "Creating image...."
|
||||
|
||||
when :setup
|
||||
options[:distro] = subcommand
|
||||
options[:distro] = parameter
|
||||
VirtualMachine.setup(options)
|
||||
else
|
||||
puts "Error not found #{options.type}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue