def fetch_info
return if @domain.nil?
@xml_desc = @domain.xml_desc
@memory = @domain.max_memory
@current_memory = document("domain/currentMemory") if running?
@type = document("domain", "type")
@vcpu = document("domain/vcpu")
@arch = document("domain/os/type", "arch")
@machine = document("domain/os/type", "machine")
@boot_device = document("domain/os/boot", "dev") rescue nil
network_type = document("domain/devices/interface", "type") rescue nil
unless network_type.nil?
@interface ||= Interface.new
@interface.type = network_type
@interface.mac = document("domain/devices/interface/mac", "address")
@interface.device = document("domain/devices/interface/source", "bridge") if @interface.type == "bridge"
@interface.network = document("domain/devices/interface/source", "network") if @interface.type == "network"
end
end