1. Bicom Systems
  2. Solution home
  3. Quick problem solving documents
  4. Quick problem solving documents

General :: How to reduce the size on a VPS

HOWTO reduce the size on a VPS

 In order to reduce size on a VPS please follow below procedure:

1. On the Domains view select the domain in question(where VPS belongs to) and click on Edit button. Increase VPS quota by and Memory and Storage quota by the amount needed for creation of the VPS. 

2. Create VPS within the Domain in question

On the Virtual Private Servers view click Create VPS button and the Create VPS dialog will appear. 

Type: Service
Service: PBXware 
Template: For PBXware select the latest available template
Domain: Select the domain to which VPS belongs to
Host: select ‘the least loaded host’
Description: Enter relevant information
Name: Copy the name of the original VPS and add ‘-resized’ (example: DASPBX-22381-resized)
Enable Protected Mode until migration from original VPS is completed
Resources Tab: Select the flavor that is being used on the VPS on which we need to reduce the size. 
Networking tab: Skip
Review the summary information and click Finish button to initialize VPS creation
Change VPS owner → Select VPS → Click the Change Owner button → Change Owner dialog appears → Select a domain user from the list and click the Change button to change ownership of the VPS.
Geo Redundancy → Configure replication → Enable replication for added VPS

3. Increasing VPS storage in case it is needed:

Select VPS in question → Click on ‘Extend’ button → Enter an amount you wish to increase storage space for and click the Extend button to increase storage

4.  Perform initial synchronization of data to destination VPS, depending on VPS size this might be done one day or a couple of days prior the migration:

rsync -e “ssh -p2222” -avP source destination


rsync -avP -e "ssh -p2222" /home/lxc/VPS_Name/rootfs/opt/ root@IP:/home/lxc/VPS_Name_resized/rootfs/opt

5. Login via ssh on processing host and run this command: cat /home/lxc/VPS_Name/config

copy hwaddr address together with VPS IP on your PC

lxc.net.0.hwaddr = xx:xx:xx:xx:xx:xx
lxc.net.0.ipv4.address = x.x.x.x/x

6. Stop the original VPS

7. Perform the final synchronization → Login via ssh on processing host where you will be moving a VPS and download migration script: 

wget https://downloads.bicomsystems.com/serverware3/vps-migrate-sw3.sh

To run the script type: sh vps-migrate-sw3 and follow instructions. 

8. Once migration is finished go to the  SERVERware  GUI → VPSs → select original VPS and remove network → then select resized VPS → edit → change the IP address to reflect the original one → Save changes

9. Login via ssh on processing host and paste hwaddr/MAC address from original VPS config:

nano /home/lxc/VPS_Name_resized/config

paste hwaddr address(step 5.) → save changes.

10. Start VPS →  Select VPS and in the right upper corner press Start button.

11. Login to VPS via SSH and execute this:

arping -A -c 3 -I eth0 -s X.X.X.X

Where X.X.X.X is IP of the VPS.

12. Once we confirm that everything is working on the new VPS, VPS  can be renamed if needed.