|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Re: centos over debian
Mike Wright wrote:
John Morris wrote:
I do this sort of thing pretty regularly with the files in the
images/xen directory on the CentOS cd. I use a config file like the
following, and just do a "xm create -c norman" or "xm create -c
norman mode=install".
John
# Xen config file for norman, the mail guy
#
# use "xm create [-c] <hostname>" to start; add "mode=install" to
reinstall!
#
# modify the next block at a minimum
name = "norman"
memory = "128" # memory for normal operation
ip = "192.168.7.8"
disk = ['phy:domU/norman,xvda,w',
'phy:domU/mail,xvdb1,w', ]
# change this if you want to add extra interfaces
vif = [ 'mac=00:16:ee:' + ":".join(ip.split('.')[1:4]) + ',
bridge=intbr', ]
I'm very weak WRT python, but I note that ip is in decimal and the
partial mac is in hex. That would yield mac='00:16:ee:168:7:8'.
Probably not what you intended.
:m)
You caught me! :) This is actually my first python code ever, but
that's not an excuse to have missed this. That last line should be this:
[ "mac=00:16:ee:%02x:%02x:%02x, bridge=intbr" % tuple([int(i) for i in
ip.split('.')[1:4]]), ]
That's the prettiest I can do for now. Thanks for picking this out!
John
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- Re: [Xen-users] Re: centos over debian,
John Morris <=
|
|
|
|
|