Cloud Stack domain usually contains a group of accounts. For some cases like individual account billing purposes, we need to isolate the existing domain account. 

So we need to move the existing domain account to a new domain. For this case already we have run some resources under this account like Virtual Machine, Network, Volume, etc. 

So we need to migrate accounts with all the account resources. Get the Steps to Migrate Cloud Stack Account to Another Domain here in this blog.

Below is the list of cloud stack account dependency tables

1. account

2. vm_instance

3. vm_snapshots

4. volumes

5. snapshots

6. networks

7. vpc

8. vpc_gateways

9. security_group

10. affinity_group

11. autoscale_policies

12. autoscale_vmgroups

13. autoscale_vmprofiles

14. conditions

15. event

16. firewall_rules

17. global_load_balancing_rules

18. nic_ip_alias

19. nic_secondary_ips

20. portable_ip_address

21. project_invitations

22. remote_access_vpn

23. resource_limit

24. resource_tags

25. s2s_customer_gateway

26. s2s_vpn_connection

27. s2s_vpn_gateway

28. ssh_keypairs

29. sslcerts

30. static_routes

31. user_ip_address

32. user_ipv6_address

33. vpn_users

Some sample screenshots for before migration process

Steps to Migrate Cloud Stack Account to Another Domain

  1. We have created two domains like Domain1 and Domain2.
  2. Created one account(Account1) under Domain1.

   3. Created one account(Account2) under Domain2.

 4. Create one instance(TestVM-Account1) under Domain1.

Below are the simple Steps to Migrate Cloud Stack Account to Another Domain

  1. Create a new domain for migrating account
  2. Log-in Cloud Stack Management database server and execute the script “migrate_account_to_domain.sql”
  3. Stop the Cloud Stack Management and Usage server
  4. Run the migration script with the following parameters,

            SELECT migrate_account_to_domain(migratingAccount, newDomain);

              a). migratingAccount – Which account do you want to migrate

              b). newDomain – Where to move the account and corresponding resources

  1. Start the Cloud Stack Management and Usage server
  2. Now you can check all the resources and account properly migrated.
  3. From the next day of account migration, Usage data will be getting under a newly migrated domain.

Some sample screenshots for after migration process

Now you can see the below screenshot. Account1 is moved under Domain2.

Previously TestVM-Account1 is created under Domain1. After the migration process instance is moved to Domain2.

Now the Migration of Cloud Stack Account to Another Domain has been done.