VirtualBox: Clone por linha de comando

Primeiro listo as VMs que tenho hoje:

[ricardo@Oracle ~]$ VBoxManage list vms
"eva00" {440cf69e-18c5-4279-99fd-82343a9e30ae}
"Teste01" {8cf64608-6eae-44c0-9647-ffeaf14589dd}
"Teste02" {8fda6700-a9a1-4bd6-acbc-f88b8a2905c3}
"Teste03" {72d33bb4-f914-4308-b016-aafec747f7b9}
"Teste04" {65764537-6a97-47d0-b4d6-7dbc29acf5d6}
"Teste05" {057572ff-deaa-4792-8567-ceaa4577dd4e}
"Teste06" {a283d3d2-3315-42ef-89af-e908abe35a98}
"Percona XtraDB Cluster" {bcec78f6-cf64-4ac0-8162-90d3546657a4}
"Percona XtraDB Cluster - 01" {512f93ef-a4c9-4c65-97a0-1b3cde46ca5d}
"Percona XtraDB Cluster - 02" {16ede8c3-e203-435a-b4d9-1ea1cec5719e}
"Percona XtraDB Cluster - 03" {3efb7d15-a9e7-43e8-9854-d147c0b9ea65}
"Percona XtraDB Cluster - 04" {d34f55d8-be51-490b-9658-df56ec079b5d}
"Percona XtraDB Cluster - 05" {a0280a00-1f66-4e2f-a796-a6b90d2a4e49}
"Percona XtraDB Cluster - 06" {baefa1e2-b24c-4c54-a0b2-effaf1db1c9d}
[ricardo@Oracle ~]$

E executo o Clone de uma delas, para várias cópias:

[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 01" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 01"
[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 02" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 02"
[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 03" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 03"
[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 04" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 04"
[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 05" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 05"
[ricardo@Oracle ~]$ VBoxManage clonevm "Percona XtraDB Cluster" --name "MariaDB Galera Cluster - Debian 9 - 06" --register
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "MariaDB Galera Cluster - Debian 9 - 06"
[ricardo@Oracle ~]$

E listo novamente as VMs que tenho agora.

[ricardo@Oracle ~]$ VBoxManage list vms
"eva00" {440cf69e-18c5-4279-99fd-82343a9e30ae}
"Teste01" {8cf64608-6eae-44c0-9647-ffeaf14589dd}
"Teste02" {8fda6700-a9a1-4bd6-acbc-f88b8a2905c3}
"Teste03" {72d33bb4-f914-4308-b016-aafec747f7b9}
"Teste04" {65764537-6a97-47d0-b4d6-7dbc29acf5d6}
"Teste05" {057572ff-deaa-4792-8567-ceaa4577dd4e}
"Teste06" {a283d3d2-3315-42ef-89af-e908abe35a98}
"Percona XtraDB Cluster" {bcec78f6-cf64-4ac0-8162-90d3546657a4}
"Percona XtraDB Cluster - 01" {512f93ef-a4c9-4c65-97a0-1b3cde46ca5d}
"Percona XtraDB Cluster - 02" {16ede8c3-e203-435a-b4d9-1ea1cec5719e}
"Percona XtraDB Cluster - 03" {3efb7d15-a9e7-43e8-9854-d147c0b9ea65}
"Percona XtraDB Cluster - 04" {d34f55d8-be51-490b-9658-df56ec079b5d}
"Percona XtraDB Cluster - 05" {a0280a00-1f66-4e2f-a796-a6b90d2a4e49}
"Percona XtraDB Cluster - 06" {baefa1e2-b24c-4c54-a0b2-effaf1db1c9d}
"MariaDB Galera Cluster - Debian 9 - 01" {3ac36d65-6e83-41e5-affc-a552f2195caa}
"MariaDB Galera Cluster - Debian 9 - 02" {7f2a7ce6-4bc2-49b1-b72c-8e957ec153d0}
"MariaDB Galera Cluster - Debian 9 - 03" {9e0a90ea-c611-4d38-af1b-818517e981e3}
"MariaDB Galera Cluster - Debian 9 - 04" {84baa5bf-af7e-4790-9f09-940b26876a75}
"MariaDB Galera Cluster - Debian 9 - 05" {6d701c62-ac39-4e20-afc9-09547258074d}
"MariaDB Galera Cluster - Debian 9 - 06" {dd6b31b3-c206-4830-9794-bb9c3b1cf254}
[ricardo@Oracle ~]$

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.