WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] change the NIC configuration accordingly after remove "n

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] change the NIC configuration accordingly after remove "nics=n"
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Dec 2005 13:50:07 +0000
Delivery-date: Tue, 13 Dec 2005 13:51:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
# Node ID d01b3b50ea64100a631a4509444c3e0775392080
# Parent  c8378d3c3af835a4626c07b9850a4fc19361fec8
change the NIC configuration accordingly after remove "nics=n"
otherwise, nics=-1 will be passed to device model and cause device
model exiting.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>

diff -r c8378d3c3af8 -r d01b3b50ea64 tools/examples/xmexample.vmx
--- a/tools/examples/xmexample.vmx      Mon Dec 12 15:11:13 2005
+++ b/tools/examples/xmexample.vmx      Tue Dec 13 10:57:04 2005
@@ -42,6 +42,8 @@
 nics=1 
 # type=ioemu specify the NIC is an ioemu device not netfront
 vif = [ 'type=ioemu, bridge=xenbr0' ]
+# for multiple NICs in device model, 3 in this example
+#vif = [ 'type=ioemu, bridge=xenbr0', 'type=ioemu', 'type=ioemu']
 
 #----------------------------------------------------------------------------
 # Define the disk devices you want the domain to have access to, and
diff -r c8378d3c3af8 -r d01b3b50ea64 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Mon Dec 12 15:11:13 2005
+++ b/tools/python/xen/xend/image.py    Tue Dec 13 10:57:04 2005
@@ -238,9 +238,7 @@
     # xm config file
     def parseDeviceModelArgs(self, imageConfig, deviceConfig):
         dmargs = [ 'cdrom', 'boot', 'fda', 'fdb', 'ne2000', 
-                   'localtime', 'serial', 'stdvga', 'isa', 'vcpus',
-                   'nics'
-                   ]
+                   'localtime', 'serial', 'stdvga', 'isa', 'vcpus']
         ret = []
         for a in dmargs:
             v = sxp.child_value(imageConfig, a)
@@ -262,6 +260,7 @@
         # Handle disk/network related options
         mac = None
         ret = ret + ["-domain-name", "%s" % self.vm.info['name']]
+        nics = 0
         for (name, info) in deviceConfig:
             if name == 'vbd':
                uname = sxp.child_value(info, 'uname')
@@ -283,6 +282,7 @@
                type = sxp.child_value(info, 'type')
                if type != 'ioemu':
                    continue
+               nics += 1
                if mac != None:
                    continue
                mac = sxp.child_value(info, 'mac')
@@ -299,6 +299,8 @@
                instance = sxp.child_value(info, 'pref_instance')
                ret.append("-instance")
                ret.append("%s" % instance)
+        ret.append("-nics")
+        ret.append("%d" % nics) 
         return ret
 
     def configVNC(self, config):
diff -r c8378d3c3af8 -r d01b3b50ea64 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Dec 12 15:11:13 2005
+++ b/tools/python/xen/xm/create.py     Tue Dec 13 10:57:04 2005
@@ -545,8 +545,7 @@
     """
     args = [ 'device_model', 'vcpus', 'cdrom', 'boot', 'fda', 'fdb',
              'localtime', 'serial', 'stdvga', 'isa', 'nographic',
-             'vnc', 'vncviewer', 'sdl', 'display', 'ne2000', 'lapic',
-             'nics']
+             'vnc', 'vncviewer', 'sdl', 'display', 'ne2000', 'lapic']
     for a in args:
         if (vals.__dict__[a]):
             config_image.append([a, vals.__dict__[a]])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] change the NIC configuration accordingly after remove "nics=n", Xen patchbot -unstable <=