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-devel

[Xen-devel] [PATCH]FIX MAC address issue for vmx guest.

To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]FIX MAC address issue for vmx guest.
From: "Ling, Xiaofeng" <xiaofeng.ling@xxxxxxxxx>
Date: Tue, 8 Nov 2005 10:38:58 +0800
Delivery-date: Tue, 08 Nov 2005 02:39:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXj/FonmivxRoGLSt2t+yGmguPhhAAAO62QAABialAAAc/dsAABiEqgAABDcfA=
Thread-topic: [PATCH]FIX MAC address issue for vmx guest.
After move randomMac to netif in 7637, we need to this for vmx guest.
otherwise, if no mac address configured, vmx guest can not be created.

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

diff -r 25599e222c33 -r aeb61fb653b3 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Mon Nov  7 18:14:45 2005 +0100
+++ b/tools/python/xen/xend/image.py    Tue Nov  8 09:39:56 2005 +0800
@@ -24,6 +24,7 @@
 from xen.xend import sxp
 from xen.xend.XendError import VmError
 from xen.xend.XendLogging import log
+from xen.xend.server.netif import randomMAC


 xc = xen.lowlevel.xc.new()
@@ -276,6 +277,8 @@
                ret.append("%s" % vbdparam)
             if name == 'vif':
                mac = sxp.child_value(info, 'mac')
+               if mac == None:
+                   mac = randomMAC()
                ret.append("-macaddr")
                ret.append("%s" % mac)
             if name == 'vtpm': 

Attachment: randomMac.patch
Description: randomMac.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]FIX MAC address issue for vmx guest., Ling, Xiaofeng <=