diff --git a/src/cli/onevnet b/src/cli/onevnet
index f152a103df..72ab53716a 100755
--- a/src/cli/onevnet
+++ b/src/cli/onevnet
@@ -171,4 +171,15 @@ cmd=CommandParser::CmdParser.new(ARGV) do
             :options=>OpenNebulaHelper::XML do
         helper.show_resource(args[0],options)
     end
+
+    update_desc = <<-EOT.unindent
+        Launches the system editor to modify and update the template contents
+    EOT
+
+    command :update, update_desc, :vnetid do
+        helper.perform_action(args[0],options,"modified") do |vnet|
+            str = OpenNebulaHelper.update_template(args[0], vnet)
+            vnet.update(str)
+        end
+    end
 end
diff --git a/src/oca/ruby/OpenNebula/VirtualNetwork.rb b/src/oca/ruby/OpenNebula/VirtualNetwork.rb
index de1a06e746..6fb8964492 100644
--- a/src/oca/ruby/OpenNebula/VirtualNetwork.rb
+++ b/src/oca/ruby/OpenNebula/VirtualNetwork.rb
@@ -31,7 +31,8 @@ module OpenNebula
             :delete     => "vn.delete",
             :addleases  => "vn.addleases",
             :rmleases   => "vn.rmleases",
-            :chown      => "vn.chown"
+            :chown      => "vn.chown",
+            :update     => "vn.update"
         }
 
         VN_TYPES=%w{RANGED FIXED}
@@ -81,6 +82,13 @@ module OpenNebula
             super(VN_METHODS[:allocate],description)
         end
         
+        # Replaces the template contents
+        #
+        # +new_template+ New template contents
+        def update(new_template)
+            super(VN_METHODS[:update], new_template)
+        end
+
         # Publishes the VirtualNetwork, to be used by other users
         def publish
             set_publish(true)