Preliminary support for the Xen xl toolstack
(xen-create-image supported only so far)
This commit is contained in:
@@ -169,6 +169,11 @@ Bugs to fix and features to add for 5.0
|
||||
* Support `cpu_weight` and other features from
|
||||
http://wiki.xensource.com/xenwiki/CreditScheduler
|
||||
|
||||
* Make used Xen toolstack configurable, i.e. via --xen-toolstack=xl
|
||||
|
||||
* Support Xen xl toolstack elsewhere than xen-create-image. Needs code
|
||||
deduplication as mentioned below.
|
||||
|
||||
* Code Deduplication / Refactor the code for less code duplication
|
||||
|
||||
`bin/x*` currently contain the same or similar code like e.g. in the
|
||||
|
||||
@@ -310,7 +310,7 @@ Install a new distribution.
|
||||
Run a collection of hook scripts to customise the freshly installed system.
|
||||
|
||||
=item B<xt-create-xen-config>
|
||||
Create a Xen configuration file in so that xm can start the new domain.
|
||||
Create a Xen configuration file in so that xm/xl can start the new domain.
|
||||
|
||||
=back
|
||||
|
||||
@@ -1282,7 +1282,7 @@ sub setupDefaultOptions
|
||||
# Paths and files.
|
||||
#
|
||||
$CONFIG{ 'dir' } = '';
|
||||
$CONFIG{ 'xm' } = findBinary("xm");
|
||||
$CONFIG{ 'xm' } = findXenToolstack();
|
||||
$CONFIG{ 'kernel' } = '';
|
||||
$CONFIG{ 'modules' } = '';
|
||||
$CONFIG{ 'initrd' } = '';
|
||||
@@ -1391,6 +1391,40 @@ sub setupDefaultOptions
|
||||
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Find the right Xen toolstack. On Debian and derivatives there's a
|
||||
script which tells you about the current toolstack.
|
||||
|
||||
=end doc
|
||||
|
||||
=cut
|
||||
|
||||
sub findXenToolstack
|
||||
{
|
||||
my $helper = '/usr/lib/xen-common/bin/xen-toolstack';
|
||||
|
||||
if (-x $helper) {
|
||||
my $toolstack = `$helper`;
|
||||
chomp($toolstack);
|
||||
return $toolstack if $toolstack;
|
||||
}
|
||||
|
||||
my $xm = findBinary('xm');
|
||||
if ($xm and system("$xm list >/dev/null 2>/dev/null") == 0) {
|
||||
return $xm;
|
||||
}
|
||||
|
||||
my $xl = findBinary('xl');
|
||||
if ($xl and system("$xl list >/dev/null 2>/dev/null") == 0) {
|
||||
return $xl;
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
||||
=begin doc
|
||||
|
||||
Read the specified configuration file, and update our global configuration
|
||||
|
||||
@@ -472,7 +472,7 @@ sub setupAdminUsers
|
||||
open( SUDOERS, ">>", "/etc/sudoers" ) or
|
||||
warn "Failed to add user to sudoers file : $user - $!";
|
||||
print SUDOERS
|
||||
"$user ALL = NOPASSWD: /usr/sbin/xm, /usr/bin/xen-create-image\n";
|
||||
"$user ALL = NOPASSWD: /usr/sbin/xm, /usr/sbin/xl, /usr/bin/xen-create-image\n";
|
||||
close(SUDOERS);
|
||||
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ sub setupAdminUsers
|
||||
open( SUDOERS, ">>", "/etc/sudoers" ) or
|
||||
warn "Failed to add user to sudoers file : $user - $!";
|
||||
print SUDOERS
|
||||
"$user ALL = NOPASSWD: /usr/sbin/xm, /usr/bin/xen-create-image\n";
|
||||
"$user ALL = NOPASSWD: /usr/sbin/xm, /usr/sbin/xl, /usr/bin/xen-create-image\n";
|
||||
close(SUDOERS);
|
||||
|
||||
}
|
||||
|
||||
1
debian/changelog
vendored
1
debian/changelog
vendored
@@ -11,6 +11,7 @@ xen-tools (4.3.1+dev-1) UNRELEASED; urgency=low
|
||||
- Default DomUs to use the noop scheduler (Closes: #693131)
|
||||
- Remove CVS revisions from --version output
|
||||
- Preliminary support for Debian Jessie and Ubuntu Raring
|
||||
- Preliminary support for xl toolstack (xen-create-image only so far)
|
||||
- xen-create-image: Consistently use runCommand() instead of system()
|
||||
* Add debian/gbp.conf to be able to to build xen-tools with
|
||||
git-buildpackage.
|
||||
|
||||
Reference in New Issue
Block a user