Class: OsVm::MachineConfig::UserNetwork
- Defined in:
- lib/osvm/machine_config.rb
Instance Attribute Summary
Attributes inherited from Network
Instance Method Summary collapse
Methods inherited from Network
Constructor Details
This class inherits a constructor from OsVm::MachineConfig::Network
Instance Method Details
#qemu_options ⇒ Object
80 81 82 83 84 85 86 87 88 |
# File 'lib/osvm/machine_config.rb', line 80 def net_opts = "net=#{@opts.fetch(:network)},host=#{@opts.fetch(:host)},dns=#{@opts.fetch(:dns)}" net_opts << ",hostfwd=#{@opts[:hostForward]}" if @opts[:hostForward] [ '-device', 'virtio-net,netdev=net0', '-netdev', "user,id=net0,#{net_opts}" ] end |