projects
/
invirt/packages/invirt-xen-config.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't create iptables rules in vif-invirtroute - they don't do anything.
[invirt/packages/invirt-xen-config.git]
/
invirt-database
diff --git
a/invirt-database
b/invirt-database
index
4f793ed
..
4b86a85
100644
(file)
--- a/
invirt-database
+++ b/
invirt-database
@@
-2,8
+2,6
@@
from invirt.database import models, connect
from invirt.config import structs as config
import re
from invirt.database import models, connect
from invirt.config import structs as config
import re
-import tempfile
-from subprocess import call
connect()
prefix = "d_"
connect()
prefix = "d_"
@@
-25,7
+23,7
@@
if 'cdrom_image' in locals():
check(cdrom is not None)
memory = machine.memory
check(cdrom is not None)
memory = machine.memory
-maxmem = memory
+maxmem = '2048'
check(re.match('^[A-Za-z0-9][A-Za-z0-9._-]*$', machine.name))
name = prefix + machine.name
check(re.match('^[0-9a-f-]+$', machine.uuid))
check(re.match('^[A-Za-z0-9][A-Za-z0-9._-]*$', machine.name))
name = prefix + machine.name
check(re.match('^[0-9a-f-]+$', machine.uuid))
@@
-52,8
+50,10
@@
else:
if 'installer_options' in locals(): #Installer
disk.append('phy:/dev/xenvg/s_install_hda,hdb,r')
if 'installer_options' in locals(): #Installer
disk.append('phy:/dev/xenvg/s_install_hda,hdb,r')
- kernel = '/boot/vmlinuz-2.6.24-19-xen' #From hardy
- ramdisk = '/boot/initrd.img-2.6.24-19-xen'
+ import os
+ release = os.uname()[2]
+ kernel = '/boot/vmlinuz-%s' % release
+ ramdisk = '/boot/initrd.img-%s' % release
if not machine.nics:
raise RuntimeError('You must have a nic to autoinstall')
if not machine.nics:
raise RuntimeError('You must have a nic to autoinstall')
@@
-64,6
+64,8
@@
if 'installer_options' in locals(): #Installer
extra += ' %s' % installer_options
root = '/dev/hdb1'
codepath = None
extra += ' %s' % installer_options
root = '/dev/hdb1'
codepath = None
+
+ memory = max(memory, 512)
elif cdrom is not None:
disk.append('phy:/dev/xenvg/image_' + cdrom.cdrom_id + ',hdc:cdrom,r')
boot = 'd'
elif cdrom is not None:
disk.append('phy:/dev/xenvg/image_' + cdrom.cdrom_id + ',hdc:cdrom,r')
boot = 'd'
@@
-75,7
+77,6
@@
if codepath == 'hvm':
kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
vnc = 1
kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
vnc = 1
- vncpasswd = 'moocow'
device_model = '/usr/sbin/qemu-dm-invirt'
serial = "pty"
elif codepath == 'paravm':
device_model = '/usr/sbin/qemu-dm-invirt'
serial = "pty"
elif codepath == 'paravm':
@@
-84,7
+85,8
@@
elif codepath == 'paravm':
for n in machine.nics:
check(re.match('^[0-9a-fA-F:]+$', n.mac_addr) and re.match('^[0-9.]*$', n.ip))
for n in machine.nics:
check(re.match('^[0-9a-fA-F:]+$', n.mac_addr) and re.match('^[0-9.]*$', n.ip))
- d = '%smac=%s, ip=%s, script=vif-invirtroute' % (viftype, n.mac_addr, n.ip)
+ d = ('%smac=%s, ip=%s, script=vif-invirtroute netdev=%s'
+ % (viftype, n.mac_addr, n.ip, config.xen.network.iface))
vif.append(d)
for d in machine.disks:
vif.append(d)
for d in machine.disks: