Cloudmin needs Export System / Import System feature

Hi,

Cloudmin currently features no practical way to copy virtual machines from one physical host to another independent, unrelated and unconnected physical host.

http://virtualmin.com/node/33661

http://www.virtualmin.com/node/24528

The ability to copy machines in this way is a basic feature of any virtualization solution and needs to be implemented properly. Regardless of the ability of Cloudmin to operate on complex and large common-LAN cloud enviroments with multiple connected KVM hosts, it should also support another important business case: several different customers with isolated networks, unrelated business and common support provider. This business case needs Export / Import to allow for the creation of virtual machines on the provider development network and deploy them later on the customer production environment.

Review of the situation:

  • creating images is not OS independent
  • backups created with Cloudmin can only be restored via GuI on the host where they were created
  • even manual restore via commad line is not trivial (suport request pending)
  • the concept of backup on Cloudmin includes more than file copying and doesn't seem to be the same as the export / import concept that is needed here

Desirable situation:

We should be aple to copy a system, inside a single self-contained file or directory, from one Cloudmin host to another and have it imported and able to run on the latter.

Benchmark with VMWare Server:

With VMWare Server we need to:

1- halt the VM on the source host

2- copy the directory that contains all the files to the target host

3- add the VM to the inventory (locating the VMX file)

4- start the VM on the target host

Proposed behaviour for Cloudmin:

a) Cloudmin should present an Export System page that sends a copy of an existing system to a self contained file or directory at the default Export location, or to a user-specified directory

b) Cloudmin should present an Import System page that retrieves a previously exported Cloudmin system and copies it to the local virtual machine location

Details:

a.1) the results of exporting should be self contained - the user should never have to cherry pick files with partially common names (this is very error prone and implies manual work, think of scp -r versus one scp per file)

a.2) the results of exporting must be deletable as the exported system is a copy of a system that is running

b.1) the input files for importing must be deletable on Cloudmin target host as Cloudmin should copy everything to the usual internal locations using the input files only once and for that purpose

The default locations for import and export should be user definable just as happens now with the default backup location (ex: /home/virtual/EXPORT, /home/virtual/IMPORT, /home/virtual/BACKUP)

Status: 
Closed (fixed)

Comments

Would it work in your case if it was possible to move an image from one Cloudmin master system to another?

This can be done manually right now (by copying the image files from /var/webmin/server-manager), but it could be made more friendly.

Alternately, the UI could offer a way to import backups as will be possible using the command-line restore-domain tool. This would be in line with the way Virtualmin supports moves, with the only down-side being that a backup may consist of multiple files.

Jamie,

My problem that needs an immediate solution is documented on another ticket. This ticket is about how an import / export system should be implemented with the necessary UI and safeguards to avoid accidents.

And I think it should not involve a user touching directly the VM files on ./var/webmin/server-manager. It should be Cloudmin manipulating those files and packaging them into a single archive which is A COPY of what is running and is, therefore, safe to be touched by the user.

It would even be possible that the default export location is a directory that can be read by non root users, in order to allow copies without risking the server. And the same could apply to the import location.

Think of the export archive as a backup that can be taken externally.

I did my best to describe what made sense to me. Please feel free to comment and ask me further input.

Ok, so what I think makes the most sense is for backups to be the way to migrate VMs to other systems, rather than a separate export/import process. I'll work on making this more user-friendly.

If that is the way you want to do it, then it should be enough to provide a manual import function in the Restore page. However, I still think that user cherry-picking of files should be avoided so there should an option for backups that creates a self contained archive.

Am interested and subscribing to track further discussion on this issue.

FYI, this is being actively worked on, for inclusion in the next release.

Hi,

What is the status of this issue?

Cheers Gustavo

It is done in the latest Cloudmin released - you can migrate a VM by importing (restoring) the backup on the new system.

A backup is usually made up of 3 files - one ending with tar.gz that contains the VM filesystem, one ending with .disks that contains details of disk mount points, and one ending with .serv that contains the full details of the VM.

I will update the docs to explain how to use a backup to move systems.

Automatically closed -- issue fixed for 2 weeks with no activity.