Re: test VMs

2015-01-09 Thread Bob Proulx
Bonno Bloksma wrote:
> I was thinking I could run something which Debian Install runs too
> but then later realized that probably depends on files like ssh keys
> not being present yet and only creating new keys when that is the
> case.

There isn't anything that runs later that does this in the
debian-installer.  Things are built up from nothing in place with the
settings as given by the user.

> > A very basic list of things that need to be changed are:
> 
> Thanks, that is enough for now. Just going to install a machine with
> only the system tools installed, need to do some basic routing /
> firewall testing.

I think you will do fine then.

Note that there are often some lingering places where a previous
hostname persists.  Mostly those are harmless.  But they do persist.
Therefore picking a neutral hostname for the initial installation that
won't do any harm later is good.  Such as "localhost" is typical.  But
otherwise something else innocuous is good too.

For example the mdadm tool encodes the system name into arrays
constructed by the debian-installer.

  mdadm --examine /dev/sda1

Bob


signature.asc
Description: Digital signature


RE: test VMs

2015-01-08 Thread Bonno Bloksma
Hi Bob,

>> I want to setup a few test VMs on my VMware servers.
>
> Fun!
>
>> Can I simply clone a basic machine? A machine with no desktop, just an 
>> "empty" server.
>
> Yes.  I do that all of the time.  Depending upon what VM system you are using 
> there may
> be a script to clone the VM and automatically change the things like the 
> Ethernet
> address that need to be unique across your network.
>
>> Is there a script which I can use to simply "reset" machine specific 
>> stuff like the hostname, ssh keys, etc?
>
> No.  It depends upon what you have installed.  Every system will be 
> different.  But it is easy enough to script it for your systems.  If we knew 
> what you had installed.

I was thinking I could run something which Debian Install runs too but then 
later realized that probably depends on files like ssh keys not being present 
yet and only creating new keys when that is the case.

> A very basic list of things that need to be changed are:
>  /etc/hostname
>  /etc/mailname
>  /etc/hosts
>  /etc/network/interfaces if static IP
>  /etc/ssh/ssh_host_*key*
>  /etc/postfix/main.cf if customized
>
> Other things depend upon what you have installed.

Thanks, that is enough for now. Just going to install a machine with only the 
system tools installed, need to do some basic routing / firewall testing.

Bonno Bloksma


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/89d1798a7351d040b4e74e0a043c69d7ad601...@einexch-01.tio.nl



Re: test VMs

2015-01-08 Thread Bob Proulx
Bonno Bloksma wrote:
> I want to setup a few test VMs on my VMware servers.

Fun!

> Can I simply clone a basic machine? A machine with no desktop, just
> an "empty" server.

Yes.  I do that all of the time.  Depending upon what VM system you
are using there may be a script to clone the VM and automatically
change the things like the ethernet address that need to be unique
across your network.

> Is there a script which I can use to simply "reset" machine specific
> stuff like the hostname, ssh keys, etc?

No.  It depends upon what you have installed.  Every system will be
different.  But it is easy enough to script it for your systems.  If
we knew what you had installed.

A very basic list of things that need to be changed are:

  /etc/hostname
  /etc/mailname
  /etc/hosts
  /etc/network/interfaces if static IP
  /etc/ssh/ssh_host_*key*
  /etc/postfix/main.cf if customized

Other things depend upon what you have installed.

Bob


signature.asc
Description: Digital signature


Re: test VMs

2015-01-08 Thread Jarle Aase

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/08/2015 04:18 PM, Bonno Bloksma wrote:
> Hi,
>
> I want to setup a few test VMs on my VMware servers.
> Can I simply clone a basic machine? A machine with no desktop, just an
"empty" server.
Yes.

>
> Is there a script which I can use to simply "reset" machine specific
stuff like the hostname, ssh keys, etc?
One way could be to configure a template machine that you clone from.
This machine will probably use with dhcp, and a firstboot script that is
run only on the first boot for each cloned machine. This script could
regenerate the ssh key for the ssh server, and poll additional scripts
from another server that sets the hostname and a static IP address. (I
wrote an instance manager for AWS a few years ago that could spin up any
number of instances based on some rules, and with a combination of
first-boot scripts and scripts generated for each instance, everything
was 100% automated).

Jarle

- -- 
Jarle Aase  email: ja...@jgaa.com
Author of Free Software.http://www.jgaa.com

War FTP Daemon: http://www.warftp.org
Other free software:http://products.jgaa.com

NB: If you reply to this message, please include all relevant
information from the conversation in your reply. Thanks.
<<< no need to argue - just kill'em all! >>>
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJUrsYOAAoJECdIPpCNC8ty4SkQALNzLpWmSbIT/qCRtirfyY/Y
enP73Zb5KGIyYJeQHUO1LblK50O83/CW01n0JZo/Wd7CuHIOj7PdLB/wHXAEXEIq
g7Z2f0cfNsAybAzvhCUCSaJa8gR1CLp4Jj7rk/3nbnUs/3W8S2SdXsLXJlS3hDMx
zrGwW5m1LHs4+eVvf90GNPhZydVY4OOoVYY3dRrGlBxC63gYLU1BbQV5mSdH/ELX
LEy3aPiGhf9c19V7t7X8cVwHcoTLB5ghVJl35TFrwdTJ1FjfHoXlUrEkyhlR03VX
UvrykoqTJ4EB4DTMGVOKUDKWmxI9+SE10JeWuhuo5v2cv4VVHX89LZM7GzCW+lGB
qMx/L0IUf8sQ8yYk/moEqBcNGOvDEwrC8k/6XR3J7OEXwbk6BLSg/+eaiv+9Z7Bf
LP2Dn56CCAJsPHxs/yrvU6j4nuBjtWA4KVPb4YRQONIPmzrvD2K6t7yUxV9uptd1
8J0/uy5Opy6vVo5IcvCxfGg5aym8UbEwOCk5maXAV5XFqCR1pOViDJ3Ap0WS6kcD
kDIyhbIRH79vvVtWdR1jARsLTfQ8q07BYwGPgooWNJ7u31QlL8mO4wXxI7j4DMhk
k6JGG3le64Z1bAq5xDfsLmdvDRsqrDvHMVPFCFg68HpKroBGZYzD3I3xhrYZntW3
TxvPDT0Boa1tUIKR8yty
=ehxS
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/54aec60e.9000...@jgaa.com



test VMs

2015-01-08 Thread Bonno Bloksma
Hi,

I want to setup a few test VMs on my VMware servers.
Can I simply clone a basic machine? A machine with no desktop, just an "empty" 
server.

Is there a script which I can use to simply "reset" machine specific stuff like 
the hostname, ssh keys, etc?

Bonno Bloksma


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/89d1798a7351d040b4e74e0a043c69d7ad600...@einexch-01.tio.nl