][Thread Next][Date Index
Re: Import VMs into CloudStack
As Andrija mentioned that is not possible yet. However, it is possible that as a part of the future Backup and Recovery framework: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Backup+and+Recovery+Framework some backup vendor plugins would require to import a restored VM into CloudStack. That mechanism could be exposed on the CloudStack API too, allowing to import existing VMs into CloudStack.
From: Andrija Panic <andrija.panic@xxxxxxxxx>
Sent: Thursday, December 20, 2018 4:49:44 AM
Subject: Re: Import VMs into CloudStack
unfortunately that is not possible (not in an official way at least) - since CloudStack is keeping tons of meta-data (info about VM hardware and such) in DB.
For simpler VMs, you could *experiment* with deploying brand new VM with (empty) appropriate disk sizes, shutdown VM, then go and replace QCOW2 files on your NFS storage with original volumes, but again this is all hacking and is not really guarantied to work - MAC and IP address would certainly change etc, perhaps underlying hardware for VM and you would need to play with drivers potentially (for sure if Windows VMs) - not the best approach - but is possible to work.
Normal way would be to export original ROOT (system/OS, say, /dev/vda) volume of your VM as qcow2 files to some web server (optionally RAW format, but that is both inefficient and might have its issues) and then register it as template inside CloudStack and finally deploy new VM in regular way - still some play with drivers etc might be needed, possible mount points (if not used UUID of volume in /etc/fstab), change MAC address of VM (i.e. delete udev rules for network, reboot VM), etc.
For data volumes (i.e. vdb and onwards) you would just upload qcow2 file as Volume to CloudStack - and attach it to your VM (this "attach" is "lazy" attach - meaning when you power on VM very first time (or you hot-plugged the volume during VM running...) CloudStack will move the qcow2 data file that you uploaded, from Secondary NFS to Primary Storage - and this move (qemu-img convert) takes time obviously...so you are not confused why it's so long for the first time.
Just in case you have some Windows VMs - you would probably need to initialize HAL again (google this or ping me if needed) - especially if changing from emulated/IDE stuff to VirtIO (otherwise you will get nice BSOD as usual with driver issues)
CloudStack is an awesome stuff, just give it a try.
Hope that helps
Amadeus House, Floral Street, London WC2E 9DPUK
On Thu, 20 Dec 2018 at 01:45, Werner, Mark <Mark.Werner@xxxxxxxxxx<mailto:Mark.Werner@xxxxxxxxxx>> wrote:
I am curious to know if I am doing migrations of workloads into a virtual infrastructure, in this case KVM, that is managed by CloudStack, and I perform the migrations directly to the hypervisor(‘s), is there a way then to register or import those migrated VM instances into the CloudStack environment / inventory so that CloudStack is aware of them and can manage them?
Mark Werner | Senior Systems Engineer | Cloud & Infrastructure Services
Unisys | Mobile Phone 586.214.9017 | mark.werner@xxxxxxxxxx<mailto:mark.werner@xxxxxxxxxx>
11720 Plaza America Drive, Reston, VA 20190
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all devices.
[Grey_LI]<http://www.linkedin.com/company/unisys> [Grey_TW] <http://twitter.com/unisyscorp> [Grey_GP] <https://plus.google.com/+UnisysCorp/posts> [Grey_YT] <http://www.youtube.com/theunisyschannel> [Grey_FB] <http://www.facebook.com/unisyscorp> [Grey_Vimeo] <https://vimeo.com/unisys> [Grey_UB] <http://blogs.unisys.com/>