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
#default_opts, from_config, #initialize, #resolve_mac_address
Constructor Details
This class inherits a constructor from OsVm::MachineConfig::Network
Instance Method Details
#qemu_options ⇒ Object
109 110 111 112 113 114 115 116 117 |
# File 'lib/osvm/machine_config.rb', line 109 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=net#{index},mac=#{mac}", '-netdev', "user,id=net#{index},#{net_opts}" ] end |