You can create a virtual machine image in hypervisors such as VMware ESXi, Microsoft Hyper-V, Oracle VM VirtualBox, Proxmox VE, QEMU, and others, but we will consider the option with VirtualBox. You can also install various systems and upload an image for subsequent installation in "Cloud VPS" using various methods.
How to upload an image for subsequent installation in "Cloud VPS" using various methods
This guide will be useful in various situations, including but not limited to:
Transferring a local project to the cloud: If you have a local project that you want to deploy in the cloud, creating an image in VirtualBox and uploading it to Cloud VPS will provide you with a convenient working environment similar to your local system.
Developing and debugging applications: If you are developing applications, you may need an environment identical to your production one. With this guide, you will be able to create and upload an image, simplifying debugging and testing.
System recovery: In case of failures or issues with your server, you can quickly restore the working environment by uploading a previously created image anywhere, saving time and effort.
Scaling projects: If you plan to scale your projects and need to create multiple identical servers, creating an image will allow you to quickly deploy new instances with the same settings.
Training and experimentation: This guide may be useful for students and developers who want to experiment with various Linux distributions or software.
What you will need to perform the actions described in this article:
VirtualBox: https://www.virtualbox.org/wiki/Downloads
ISO image of your system. For example: https://releases.ubuntu.com/noble/
When choosing an ISO image, it is advisable to select stable versions of popular Linux distributions such as Ubuntu, Debian, which have an active community and documented updates. This will ensure you have support and access to necessary resources.MobaXterm or SSH client PuTTY with FTP client FileZilla.
"Cloud VPS" service. You can familiarize yourself with the services at the link: https://zomro.com/vps
Domain or subdomain.
To perform items 1 and 2, you can refer to the article at the link:
https://zomro.com/rus/blog/articles/489-how-to-install-linux-using-virtualbox-on-windows
If you want to install the system on the "Cloud Standard" service, specify the size of the system disk no more than 20 GB. As shown in the screenshot in item 1, the "Virtual Size" should be no more than 20 GB, as this service provides 20 GB of disk space at the time of writing this article.
If you specified a larger size, you need to perform the "Shrink Volume" operation on your disk.
1. Let's start creating an environment to upload the image to the platform https://cp.zomro.com/services/cloud_vps/images via "Cloud VPS".
First, you need to create a direct link to this disk for uploading at the link: https://cp.zomro.com/services/cloud_vps/images. For example, this can be done using a subdomain and the "Cloud VPS" service. To do this, follow these steps:
1.1. Go to the link: https://cp.zomro.com/services/cloud_vps and order the service you are interested in, on which you plan to install your personal image. For example, I will order the "Cloud Standard" service with Ubuntu 22.04. After activation, the instructions and connection data to the server can be found in your personal account at the link: https://cp.zomro.com/services/cloud_vps. Select your service, and in the "gear" menu, click on "Instructions".
1.2. When the server is ready, you can create an environment for hosting your disk from VirtualBox named "Ubuntu_24_Desktop.vmdk". To do this, log in to the server via SSH (how to do this can be found in the instructions at the link: https://zomro.com/blog/faq/218-kak-vojti-na-linux-server-po-ssh).
1.3. Then install the Hestia control panel. You can use the article at the link: https://zomro.com/rus/blog/faq/245-kak-ustanovit-hestiacp.
1.4. After installing the control panel, add a domain. You can find out how to add a domain to the server from the instructions at the link: https://zomro.com/rus/blog/faq/247-kak-sozdat-polzovatelja-i-dobavit-domen-v-panel-hestiacp.
1.5. Then, after creating the domain, upload the file "Ubuntu_24_Desktop.vmdk" to the server so that it is available for download through your personal account in "https://cp.zomro.com/services/cloud_vps/images". To upload the disk mentioned in item 1, use the root user data from the server instructions, specifying port 22. You can refer to the instructions at the link: https://zomro.com/rus/blog/faq/144-kak-podkljuchitsja-k-serveru-po-ftp-sftp-i-scp for connecting to the server. After connecting, upload "Ubuntu_24_Desktop.vmdk" to the following path: /home/your_user/web/your_domain/public_html/Ubuntu_24_Desktop.vmdk.
1.6. Next, you need to point the domain to your server so that all requests to the domain are forwarded to the server. First, point the domain to our NS in the "personal account" of the registrar where you ordered the domain. To do this, go to your "personal account" - Domains (https://cp.zomro.com/services/domains) - Select the required domain - NS. Then enter our NS in the fields:
ns1.zomro.net.
ns2.zomro.ru.
ns3.zomro.com.
ns4.zomro.su.
1.7. Order a free DNS hosting service (50 domains for free) in your personal account if you haven't used it before. To do this, go to the "Products/Services" section -> "DNS hosting" (https://cp.zomro.com/services/dns) - Order - DNS hosting for 50 domains - Order.
1.8. Go to the "Services" -> "DNS hosting" -> "gear" -> "go to panel". In the control panel, select "Domain names", then create your domain in the DNS hosting panel specifying your server's IP, type "Master". Enter your domain and the IP address of your server. After that, the image "Ubuntu_24_Desktop.vmdk" will be available for download via the browser at the link: http://your_domain/Ubuntu_24_Desktop.vmdk.
2. Let's start creating an image on the "Images" platform
2.1. Go to the link: https://cp.zomro.com/services/cloud_vps/images and create a new image (an example is shown in the screenshot, any other image is created according to the instructions provided on the right).
2.2. Click "Create image" and wait for the image to be created on the platform https://cp.zomro.com/services/cloud_vps/images.
2.3. When the image is ready, it will have the status "active", as indicated in the screenshot below.
2.4. After activating the image, we can install it on our server. To do this, go to the link: https://cp.zomro.com/services/cloud_vps, click on the "gear" of the server you selected and click on the "Reinstall OS" button, select "My images", then click on your created image and click on the "Confirm" button (see screenshot).
After this action, a request is sent to the system to reinstall the system from the image you uploaded. The old system may still be available for some time (1-5 minutes), after which the installation process will be executed.
You can log in and check the operation of your virtual server via VNC connection. To do this, go to the link: https://cp.zomro.com/services/cloud_vps, select your service and click on the "gear" icon → "Console" to connect via VNC.
Screenshot of the system transferred from VirtualBox to the "Cloud Standard" service.
We observe that the volume "vda2" occupies 15 GB, meaning not all disk space of the "Cloud Standard" service is used.
3. Expanding the file system
3.1. Open the terminal and enter the command "lsblk" to see the current state of disks and partitions, we are interested in this disk "vda":
vda 253:0 0 20G 0 disk
├─vda1 253:1 0 1M 0 part
└─vda2 253:2 0 15G 0 part /var/snap/firefox/common/host-hunspell
3.2. Execute the following commands to expand the file system: sudo fdisk /dev/vda
- Press
p
to display the current partitions. - Press
d
to delete a partition (for example,2
for/dev/vda2
). - Press
n
to create a new partition. Choose the same number (for example,2
), specify the first sector (default) and the last sector (default, to use all available space). - Next, the program will ask you to Remove signature (if necessary) When you create a new partition,
fdisk
asks if you want to remove the signature. If you want to use the file system that was already on this partition (for example, ext4), chooseN
(no) to keep the existing signature. If you chooseY
(yes), you will lose data on this partition. Here we chooseN
(no).
- After creating the new partition, press
w
to save changes and exit.
3.3. Now that you have a new partition, you need to run the file system expansion so that it uses the entire available size. Execute the following command: sudo resize2fs /dev/vda2
3.4. After executing the resize2fs
command, you can check that your partition size has increased by executing the lsblk
command.
Conclusion
Creating your own Linux image for Cloud VPS may seem like a daunting task, but by following the provided instructions, you can easily set up and upload your image to the Zomro platform. By using VirtualBox and cloud services, you gain the ability to flexibly manage your server, optimizing it for your needs.
Remember that you can always refer to the Zomro "FAQ" and existing resources for additional information and support. If you have any questions or difficulties with the image creation system or our services, do not hesitate to contact support.
Now that you have completed the setup, you can enjoy the benefits of your own virtual server, managing it as you see fit. Good luck with your endeavors, and may your new Cloud VPS become a reliable foundation for all your projects!