Method: QEMU::Command#command_arguments

Defined in:
lib/qemu/command.rb

#command_argumentsObject



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/qemu/command.rb', line 83

def command_arguments
  [].tap do |args|
    args << "-enable-kvm"

    args << "-m" << "#{memory}m" if memory
    disks.each_with_index do |disk, index|
      args << "-drive" << disk.qemu_drive(index)
    end
    args << "-net" << "nic,macaddr=#{mac_address}"
    unless vde_options.empty?
      args << "-net" << "vde," + vde_options.map { |k,v| "#{k}=#{v}" }.join(',')
    end
    if vnc
      args << "-vnc" << vnc
    else
      args << "-nographic"
    end

    args << "-usb" if usb

    args << "-monitor" << monitor if monitor
    args << "-soundhw" << sound_hardware if sound_hardware
  end
end