xentaur

diff xendomain.py @ 65:cf823d27b029

Nattaur changes
author nata@nattaur
date Mon Oct 12 00:12:11 2009 +0300 (2009-10-12)
parents 07c6777758dc
children aaf034af3a35
line diff
     1.1 --- a/xendomain.py	Fri Feb 29 07:22:46 2008 +0200
     1.2 +++ b/xendomain.py	Mon Oct 12 00:12:11 2009 +0300
     1.3 @@ -13,7 +13,7 @@
     1.4  
     1.5  import os
     1.6  
     1.7 -sys.path.append(os.environ['HOME']+"/xentaur")
     1.8 +sys.path.append("/xentaur/xentaur")
     1.9  sys.path.append('.')
    1.10  os.environ['xendomain']=domain
    1.11  
    1.12 @@ -81,13 +81,16 @@
    1.13  N = domains.index(domain)
    1.14  name=domain
    1.15  
    1.16 -pae=1
    1.17 -if pae:
    1.18 -    kernel = "/boot/vmlinuz-2.6.18-4-xen-686"
    1.19 -    ramdisk = "/boot/initrd.img-2.6.18-4-xen-686"
    1.20 -else:
    1.21 -    kernel = "/boot/vmlinuz-2.6.18-without-PAE-4-xen-686"
    1.22 -    ramdisk = "/boot/initrd.img-2.6.18-without-PAE-4-xen-686-domU"
    1.23 +try:
    1.24 +    kernel
    1.25 +except:
    1.26 +    pae=1
    1.27 +    if pae:
    1.28 +        kernel="/boot/vmlinuz-2.6.18-6-xen-686"
    1.29 +        ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
    1.30 +    else:
    1.31 +        kernel = "/boot/vmlinuz-2.6.18-without-PAE-4-xen-686"
    1.32 +        ramdisk = "/boot/initrd.img-2.6.18-without-PAE-4-xen-686-domU"
    1.33  
    1.34  #builder='linux'
    1.35  cpu_cap = 10
    1.36 @@ -134,12 +137,12 @@
    1.37  else:
    1.38      if hvm:
    1.39          if domain_types[N] == 'linux':
    1.40 -            disk = [ 'file:/xen/xentaur-images/'+network+'/'+name+'.img,hda,w' ]
    1.41 +            disk = [ 'file:/xentaur/images/'+network+'/'+name+'.img,hda,w' ]
    1.42          else:
    1.43 -            disk = [ 'file:/xen/xentaur-images/'+network+'/'+name+'.img,hda,w', 'file:/xen/xentaur-images/'+network+'/'+name+'-disk2.img,hdb,w' ]
    1.44 +            disk = [ 'file:/xentaur/images/'+network+'/'+name+'.img,hda,w', 'file:/xen/xentaur-images/'+network+'/'+name+'-disk2.img,hdb,w' ]
    1.45  
    1.46      else:
    1.47 -        disk = [ 'file:/xen/xentaur-images/'+network+'/'+name+'.img,hda1,w' ]
    1.48 +        disk = [ 'file:/xentaur/images/'+network+'/'+name+'.img,hda1,w' ]
    1.49  
    1.50  root = "/dev/hda1 ro"
    1.51  
    1.52 @@ -188,7 +191,7 @@
    1.53          for i in range(len(vbridges)-1):
    1.54              xenomips += ' -p '+str(i+1)+':'+network_module
    1.55      for i in range(len(vbridges)):
    1.56 -        xenomips += ' -s '+str(i)+':0:gen_eth:eth'+str(i)
    1.57 +        xenomips += ' -s '+str(i)+':0:linux_eth:eth'+str(i)
    1.58      extra = "xenomips=\""+xenomips+"\""
    1.59  elif domain_types[N] == 'pixemu':
    1.60      xenomips="./pemu -net nic,vlan=1,macaddr=00:aa:00:00:02:01 -net pcap,vlan=1,ifname=eth0 -net nic,vlan=2,macaddr=00:aa:00:00:02:02 -net pcap,vlan=2,ifname=eth1 -serial stdio -m 128 FLASH"+' /xenomips/ios/'+ios_name