Ticket #11998: clone.pl
| File clone.pl, 445 bytes (added by , 11 years ago) |
|---|
| Line | |
|---|---|
| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | |
| 6 | my $clone_limit = $ARGV[0]; |
| 7 | my $ref_name = $ARGV[1]; |
| 8 | |
| 9 | if (!$clone_limit) |
| 10 | { |
| 11 | print STDERR "Please provide the number of desired machines to clone\n"; |
| 12 | exit(0); |
| 13 | } |
| 14 | |
| 15 | if (!$ref_name) |
| 16 | { |
| 17 | print STDERR "Please provide the name of the machine to be cloned\n"; |
| 18 | exit(0); |
| 19 | } |
| 20 | |
| 21 | foreach (my $i = 0; $i < $clone_limit; $i++) |
| 22 | { |
| 23 | `vboxmanage clonevm malanize-windows-xp --name sample_clone_$i --mode all --register`; |
| 24 | } |

