class Virt::VMWare::Host

Public Instance Methods

create_guest(opts) click to toggle source
# File lib/virt/vmware/host.rb, line 22
def create_guest opts
  Virt::VMWare::Guest.new opts
end
interface(iface) click to toggle source
# File lib/virt/vmware/host.rb, line 11
def interface iface
  connection.lookup_interface_by_name(iface)
end
interfaces() click to toggle source

Available libvirt interfaces, excluding lo

# File lib/virt/vmware/host.rb, line 5
def interfaces
  connection.list_interfaces.delete_if{|i| i == "lo"}.sort
rescue => e
  raise "This function is not supported by the hypervisor: #{e}"
end
networks() click to toggle source

libvirt internal networks

# File lib/virt/vmware/host.rb, line 16
def networks
  connection.list_networks.map do |network|
    connection.lookup_network_by_name(network).bridge_name
  end
end