* [PATCH] fix vmx configuration after nics=n option is removed.
@ 2005-12-13 9:23 Ling, Xiaofeng
2005-12-13 10:59 ` Ewan Mellor
0 siblings, 1 reply; 2+ messages in thread
From: Ling, Xiaofeng @ 2005-12-13 9:23 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID 6c201a2164c232cf07983f3b47a963e8ce7f5736
# Parent 7f2ccea5a4ec96af72e83c13ee25845e5d2cbb61
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@intel.com>
[-- Attachment #2: vmxnicsfix.patch --]
[-- Type: text/x-patch, Size: 3135 bytes --]
# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID addc1771174c531af510ccae1ca55d6ec249b2c9
# Parent 7f2ccea5a4ec96af72e83c13ee25845e5d2cbb61
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@intel.com>
diff -r 7f2ccea5a4ec tools/examples/xmexample.vmx
--- a/tools/examples/xmexample.vmx Tue Dec 13 03:47:47 2005 +0100
+++ b/tools/examples/xmexample.vmx Tue Dec 13 17:10:20 2005 +0800
@@ -40,6 +40,8 @@
#vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0' ]
# 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 7f2ccea5a4ec tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Tue Dec 13 03:47:47 2005 +0100
+++ b/tools/python/xen/xend/image.py Tue Dec 13 17:10:20 2005 +0800
@@ -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 7f2ccea5a4ec tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Tue Dec 13 03:47:47 2005 +0100
+++ b/tools/python/xen/xm/create.py Tue Dec 13 17:10:20 2005 +0800
@@ -522,8 +522,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]])
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix vmx configuration after nics=n option is removed.
2005-12-13 9:23 [PATCH] fix vmx configuration after nics=n option is removed Ling, Xiaofeng
@ 2005-12-13 10:59 ` Ewan Mellor
0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2005-12-13 10:59 UTC (permalink / raw)
To: Ling, Xiaofeng; +Cc: xen-devel
On Tue, Dec 13, 2005 at 05:23:10PM +0800, Ling, Xiaofeng wrote:
> # HG changeset patch
> # User Xiaofeng Ling <xiaofeng.ling@intel.com>
> # Node ID 6c201a2164c232cf07983f3b47a963e8ce7f5736
> # Parent 7f2ccea5a4ec96af72e83c13ee25845e5d2cbb61
> 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@intel.com>
Applied, thank you.
I deliberately didn't touch the nics part of the VMX configuration, so that I
didn't break anything ;-( It might be worth coming up with a way to test
Xend's VMX path without having the appropriate hardware available, so that we
could try and reduce the risk of doing this again.
Ewan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-13 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-13 9:23 [PATCH] fix vmx configuration after nics=n option is removed Ling, Xiaofeng
2005-12-13 10:59 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.