From d04496901a4bc246fdf2925c9681b8d2ad2a5bf6 Mon Sep 17 00:00:00 2001 From: Carl Caum Date: Fri, 3 Aug 2012 12:09:38 -0700 Subject: [PATCH] Replace network from 'nat' to 'network' Previous to the commit, a new libvirt instance was created with the 'nat' network type. However, Fog master/HEAD doesn't support this network type. This commit changes the network type from 'nat' to 'network', which Fog supports. --- lib/veewee/provider/kvm/box/create.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/veewee/provider/kvm/box/create.rb b/lib/veewee/provider/kvm/box/create.rb index a9ed0049..e276bc89 100644 --- a/lib/veewee/provider/kvm/box/create.rb +++ b/lib/veewee/provider/kvm/box/create.rb @@ -21,8 +21,8 @@ def create_server(options) :memory_size => definition.memory_size.to_i*1024, :cpus => definition.cpu_count.to_i, :volume_capacity => "#{definition.disk_size}M", - :network_interface_type => "nat", :domain_type => options['use_emulation'] ? 'qemu': 'kvm', + :network_interface_type => "network", :iso_file => definition.iso_file, :arch => definition.os_type_id.end_with?("_64") ? "x86_64" : "i686", :iso_dir => env.config.veewee.iso_dir @@ -64,7 +64,7 @@ def add_floppy # Get the raw xml of the changed document new_xml=domain_doc.to_xml - # Undefine the existing domain + # Undefine the existing domain s.undefine # Re-define the domain