[pve-devel] [PATCH 1/2] add ip parameter to network settings

Dietmar Maurer dietmar at proxmox.com
Mon Sep 2 10:11:11 CEST 2013


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/QemuServer.pm |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4d90484..2a4f683 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1229,6 +1229,8 @@ sub parse_net {
 	    $res->{rate} = $1;
         } elsif ($kvp =~ m/^tag=(\d+)$/) {
             $res->{tag} = $1;
+        } elsif ($kvp =~ m/^ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) {
+            $res->{ip} = $1;
 	} else {
 	    return undef;
 	}
@@ -1248,6 +1250,7 @@ sub print_net {
     $res .= ",bridge=$net->{bridge}" if $net->{bridge};
     $res .= ",rate=$net->{rate}" if $net->{rate};
     $res .= ",tag=$net->{tag}" if $net->{tag};
+    $res .= ",ip=$net->{ip}" if $net->{ip};
 
     return $res;
 }
-- 
1.7.10.4




More information about the pve-devel mailing list