--- vmware-manager-0.2.0.orig/vmm +++ vmware-manager-0.2.0/vmm @@ -2,32 +2,32 @@ # POD {{{ =head1 NAME -vmm - Manage VMware virtual machines +vwm - Manage VMware virtual machines =head1 SYNOPSIS - vmm [options] + vwm [options] =over =item B - vmm [-f] [-v+] [-w seconds] [@profile] + vwm [-f] [-v+] [-w seconds] [@profile] =item B - vmm clone [-o pool] [-c count] [-a datastore...] [-l folder] - vmm deploy [synonym of 'clone'] - vmm df [-h] [datastore...] - vmm host [maintenance|restore|restart|shutdown|disconnect|reconnect] - vmm list [-d col1,col2... | perl string] [-t title] [vm|datastore|host|pool|template][s] [patterns...] - vmm migrate [-p low|normal|high] [-o pool] - vmm move [-o pool] - vmm setpool - vmm show [vm|datastore|host|pool] [items...] - vmm snapshot [-t title] - vmm state - vmm version + vwm clone [-o pool] [-c count] [-a datastore...] [-l folder] + vwm deploy [synonym of 'clone'] + vwm df [-h] [datastore...] + vwm host [maintenance|restore|restart|shutdown|disconnect|reconnect] + vwm list [-d col1,col2... | perl string] [-t title] [vm|datastore|host|pool|template][s] [patterns...] + vwm migrate [-p low|normal|high] [-o pool] + vwm move [-o pool] + vwm setpool + vwm show [vm|datastore|host|pool] [items...] + vwm snapshot [-t title] + vwm state + vwm version =back @@ -108,7 +108,7 @@ =item B Display various version informaiton about the connected vServer and local API. -This command is the default if no actual command is specified (i.e. just running 'vmm' with nothing else specified). +This command is the default if no actual command is specified (i.e. just running 'vwm' with nothing else specified). =back @@ -134,16 +134,16 @@ Specifies which profile to use when addressing the vServer. This can be an entry within the config file or the URL (with optional login details) e.g. - vmm version @cluster1 - vmm version @cluster2 - vmm version @https://cluster1.acme.edu - vmm version @https://username@cluster1.acme.edu - vmm version @https://username:password@cluster1.acme.edu + vwm version @cluster1 + vwm version @cluster2 + vwm version @https://cluster1.acme.edu + vwm version @https://username@cluster1.acme.edu + vwm version @https://username:password@cluster1.acme.edu Examples 1 and two assume 'custer1' and 'customer2' have been defined in the examples file (see EXAMPLES). The further examples specify the connection information on the command line. Specifying the password from the command line is exceptionally silly and should be avoided. -If username and/or password is omitted (such as in examples 3 and 4 above) they will be prompted for when vmm is run. +If username and/or password is omitted (such as in examples 3 and 4 above) they will be prompted for when vwm is run. =item B<-c> @@ -228,8 +228,8 @@ =back Force continue if an error occurs. -Normaly if an error occurs vmm will stop processing any operations specified on the command line. -If this flag is enabled vmm will continue operation as if no error occured. +Normaly if an error occurs vwm will stop processing any operations specified on the command line. +If this flag is enabled vwm will continue operation as if no error occured. =item B<--human> @@ -268,7 +268,7 @@ =back Dry run mode. -When enabled vmm will continue as normal but no actual call to the VMware VServer is made. +When enabled vwm will continue as normal but no actual call to the VMware VServer is made. =item B<--folder> @@ -414,69 +414,69 @@ =over -=item B +=item B Clone VM01 to VM02. Since neither the datasource (-d) or pool (-o) is specified these details are copied from VM01. -=item B +=item B Clone DB01 to DB02 creating 30 copies. This will actually make the machines DB01 to DB30. Since neither the datasource (-d) or pool (-o) is specified these details are copied from VM01. -=item B +=item B Same as the above example but spread the datastores across SAN1 and SAN2 and move the machine to the 'Active' pool. -=item B +=item B Deploys the template Template-DBServer into DB05, moving the destination into the Databases folder. -=item B +=item B This is exactly the same as above. A clone and deploy operations will automatically figure out if the source is a template and act accordingly. -=item B +=item B Display a datastore usage sheet (similar to the Unix 'df' command) for all datastores ending in '2'. -=item B +=item B Put the hosts 'Moe' and 'Homer' into maintenance mode (use 'restore' to recover from this). -=item B +=item B List all VMs. -=item B +=item B List all VMs - showing their name, currently allocated host and IP address. -=item B +=item B Migrate all virtual machines matching 'DBS*' to the 'Carl' host. -=item B +=item B Migrate all virtual machines matching 'DBS*' with high priority to the 'Active' pool on the 'Lenny' host waiting 60 seconds between machine. -=item B +=item B Move VMs DB00 and DB01 to the SAN2 datastore within profile 'cluster2'. -=item B +=item B Show information on host 'Lisa'. -=item B +=item B Take a snapshot of VMs 'DB04' and 'DB05' using the title 'Todays backup' -=item B +=item B Turn DB00 and DB01 on waiting 30 seconds between machines. -=item B +=item B Turn DB* VMs on. -f ensures that even if any of the machines fail to turn on for any reason the remaining machines will still be sent the 'on' command. @@ -592,15 +592,14 @@ * Install the VMware Perl SDK from http://www.vmware.com/support/developer/viperltoolkit/ -* Install all the required CPAN modules - - cpan Config::IniFiles Getopt::Long Number::Bytes::Human Term::ReadKey Text::Glob + This requires the packages libclass-methodmaker-perl libcrypt-ssleay-perl + libsoap-lite-perl libuuid-perl libxml-libxml-perl. -* Setup the config file. See either the CONFIG section above or use the sample file from /usr/share/doc/vmm +* Setup the config file. See either the CONFIG section above or use the sample file from /usr/share/doc/vmware-manager. * Run VMM with a simple command to make sure everything is setup right. - vmm version + vwm version * Enjoy @@ -624,10 +623,16 @@ use Config::IniFiles; use IO::Handle; use Getopt::Long; -use Number::Bytes::Human qw/format_bytes/; +use Number::Format qw/format_bytes/; use Term::ReadKey; use Text::Glob qw/match_glob glob_to_regex/; -use VMware::VIRuntime; + +my $mod="VMware::VIRuntime"; +die "Couldn't load the VMware SDK: maybe you haven't installed it yet?\nPlease check the README file in /usr/share/doc/vmware-manager/ for details.\n" + if (!eval "require $mod"); +$mod->import(); + + Getopt::Long::Configure('bundling', 'ignorecase_always', 'pass_through'); STDERR->autoflush(1); # } Flush the output DIRECTLY to the output buffer without caching STDOUT->autoflush(1); # } @@ -879,10 +884,8 @@ my $cfg = Config::IniFiles->new( -file => ($cfgfile ? $cfgfile : \*DATA), # Read defaults from __DATA__ section if we cant find a default file. -default => 'global', - -fallback => 'global', -nocase => 1, -allowempty => 1, - -handle_trailing_comment => 1, ); --- vmware-manager-0.2.0.orig/debian/changelog +++ vmware-manager-0.2.0/debian/changelog @@ -0,0 +1,35 @@ +vmware-manager (0.2.0-3) unstable; urgency=high + + * updated fix from previous revision for a less messy + source archive. this should finally clear the RC bug (#680481) + and get the package into wheezy. + + -- Alexander Zangerl Sun, 19 Aug 2012 11:37:35 +1000 + +vmware-manager (0.2.0-2) unstable; urgency=low + + * renamed vmm program to vwm to avoid file clash + with vmm package (closes: #680481) + + -- Alexander Zangerl Sun, 08 Jul 2012 19:41:16 +1000 + +vmware-manager (0.2.0-1) unstable; urgency=low + + * new upstream version + * lifted standards version + * lowered priority to extra as some perl prerequisites are of that + priority + + -- Alexander Zangerl Mon, 14 May 2012 12:33:43 +1000 + +vmware-manager (0.1.1-2) unstable; urgency=low + + * fixed wrong architecture line (closes: #632760) + + -- Alexander Zangerl Thu, 07 Jul 2011 18:50:09 +1000 + +vmware-manager (0.1.1-1) unstable; urgency=low + + * initial upload (closes: #617630) + + -- Alexander Zangerl Fri, 01 Jul 2011 12:21:35 +1000 --- vmware-manager-0.2.0.orig/debian/vmware-manager.docs +++ vmware-manager-0.2.0/debian/vmware-manager.docs @@ -0,0 +1,2 @@ +README.md + --- vmware-manager-0.2.0.orig/debian/control +++ vmware-manager-0.2.0/debian/control @@ -0,0 +1,19 @@ +Source: vmware-manager +Section: contrib/admin +Priority: extra +Maintainer: Alexander Zangerl +Build-Depends: perl (>= 5.10.0), debhelper (>= 8.0.0) +Standards-Version: 3.9.3 +Homepage: https://github.com/hash-bang/VMM + +Package: vmware-manager +Architecture: all +Depends: perl (>= 5.10.0), libconfig-inifiles-perl, libnumber-format-perl, + libterm-readkey-perl, libtext-glob-perl, ${misc:Depends}, libdata-dump-perl, ${perl:Depends} +Description: utility to manage VMware virtual machines + This package provides vwm, a command-line tool for managing VMware + virtual machines. This is primarily useful for larger installations + where virtuals need to be migrated, cloned or otherwise modified + from the command line. + . + vwm requires the non-free VMware Vsphere Perl SDK to be installed. --- vmware-manager-0.2.0.orig/debian/copyright +++ vmware-manager-0.2.0/debian/copyright @@ -0,0 +1,25 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Name: vmware-manager +Maintainer: Alexander Zangerl +Source: https://github.com/hash-bang/VMM + +Copyright: 2011 Matt Carter + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. --- vmware-manager-0.2.0.orig/debian/NEWS +++ vmware-manager-0.2.0/debian/NEWS @@ -0,0 +1,11 @@ +vmware-manager (0.2.0-2) unstable; urgency=low + + The VMM binary had to be renamed to resolve a name clash with + another debian package: it's now /usr/bin/vwm instead + of /usr/bin/vmm. + + Nothing else has been changed, and VMM still reads the same + configuration files as before. + + -- Alexander Zangerl Sun, 08 Jul 2012 19:41:16 +1000 + --- vmware-manager-0.2.0.orig/debian/compat +++ vmware-manager-0.2.0/debian/compat @@ -0,0 +1 @@ +8 --- vmware-manager-0.2.0.orig/debian/rules +++ vmware-manager-0.2.0/debian/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +# GNU copyright 1997 to 1999 by Joey Hess. + +PACKAGE=$(shell dh_listpackages) +TMP=$(CURDIR)/debian/$(PACKAGE) + +build: build-stamp +build-stamp: + dh_testdir + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf $(TMP) + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + + # vmm makefile isn't useful + dh_installdirs usr/bin usr/share/man/man1 usr/share/doc/vmware-manager + dh_install --sourcedir=. + # dh_install can't rename vmm->vwm + install -m 755 vmm $(TMP)/usr/bin/vwm + pod2text vmm $(TMP)/usr/share/doc/vmware-manager/README + pod2man vmm $(TMP)/usr/share/man/man1/vwm.1 + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs -n + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_perl + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: + +binary: binary-indep +.PHONY: build clean binary-indep binary install configure --- vmware-manager-0.2.0.orig/debian/vmware-manager.install +++ vmware-manager-0.2.0/debian/vmware-manager.install @@ -0,0 +1 @@ +docs/vmmrc.example usr/share/doc/vmware-manager