Add/remove floating IP
If you want to add or remove a floating IP from an existing machine
On Morpheus under the tab Provisioning → Instances, select the corresponding VM and go to Resources section.
Attach Floating IP
Then click on the small setting button and select "Attach Floating IP" to attach floating IP.
Then select a floating IP or external if not floating IPs are available in the list and finally hit Execute.
and finally hit Execute.
The change is not instantaneous, be patient and then you will see the public IP assigned to the machine.
Detach Floating IP
If you have to remove you will see a different action "Detach Floating IP" as shown below:
The change is not instantaneous, be patient and then you will see the public IP removed from the machine.
Reconfigure plan
On Morpheus under the tab Provisioning → Instances, select the corresponding VM and select under Actions → Reconfigure.
This action will reboot the VM - make sure you're ready for this!
In the pop up menu, select a different plan and press reconfigure.
Once the VM is back to status "running", you can login to your VM.
Resizing storage on instances
If you have added extra storage volumes to your instance, you may want to expand it.
Change the volume size
On Morpheus under the tab Provisioning → Instances, select the corresponding VM and select under Actions → Reconfigure.
This action will reboot the VM - make sure you're ready for this!
In the pop up menu, change the volume size to the new value and press reconfigure.
Once the VM is back to status "running", you can login to your VM. There, you will find that the disk space has not changed. However, this is as if you'd put a new larger hard disk into the machine and cloned the existing filesystem onto it. To make use of the new disk space, you need to do some more steps - in short, you need to expand the partition and filesystem to fill the new space.
Extend a partition
These steps can result in data loss if a mistake is made - make sure you have backups of anything important
When following these steps, if anything looks significantly different to the instructions, e.g. a file system type other than ext4, or you're uncertain, it's best to stop and contact support!
In order to use the new volume, there are several possibilities, e.g. create a new partition for the newly created disk space. Here, we show how to extend an existing partition on the disk to use the added volume.
In this example, we have a 10 GB partition, which we want to increase to 20 GB having completed the above volume change on morpheus.
Running
df -h
should show the previous size of the mounted partition, with output like
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 798M 760K 797M 1% /run
/dev/vda1 15G 11G 3.7G 75% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/vda15 105M 8.9M 96M 9% /boot/efi
/dev/vdb1 9.8G 3.1G 6.3G 33% /data-1
tmpfs 798M 0 798M 0% /run/user/352200006
Where /dev/vdb1
is the partition which we want to increase.
Check if the command line tool parted is installed, e.g. call parted --help
- Make sure you have sudo rights on the VM
- If you just execute parted, you will land on the parted console, which you can exit typing quit.
- Unmount the disk
sudo umount /dev/vdb1
- Launch parted as superuser
sudo parted
- Type the command `print all` which should show information about the partitions
Which shows, that the volume has been extended to the desired size, but the partition is not using it entirely.(parted) print all Model: Virtio Block Device (virtblk) Disk /dev/vdb: 21.5GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 10.7GB 10.7GB primary ext4 Model: Virtio Block Device (virtblk) Disk /dev/vda: 16.1GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 14 1049kB 5243kB 4194kB bios_grub 15 5243kB 116MB 111MB fat32 boot, esp 1 116MB 16.1GB 16.0GB ext4
- Select the disk you want to extend typing
The command print should now show only information on this disk.(parted) select /dev/vdb
- Now, type the command resizepart and give the relevant answers. In this example:
(parted) resizepart Partition number? 1 Warning: Partition /dev/vdb1 is being used. Are you sure you want to continue? Yes/No? Yes End? [10.7GB]? 100%
- Now, print should show that the partition is using the entire disk space.
- Type `quit` to exit the parted console.
Extend the filesystem
As the last step, we still need to tell the filesystem to use the entire partition. This can be done using the command resize2fs. In this example:
sudo e2fsck -f /dev/vdb1 # mandatory disk check to ensure there are no errors prior to resizing
sudo resize2fs /dev/vdb1 # resize the filesystem to fit the new larger partition
Remount the partition with
sudo mount /dev/vdb1
or
sudo mount -a
and you are done.
To confirm your reconfiguration, run
df -h
which should show the increased size, see the increased value of /dev/vdb1 in this example:
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 798M 764K 797M 1% /run
/dev/vda1 15G 11G 3.7G 75% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/vda15 105M 8.9M 96M 9% /boot/efi
tmpfs 798M 0 798M 0% /run/user/352200006
/dev/vdb1 20G 3.1G 16G 17% /data-1
Which has changed from 9.8G to 20G.