Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Kind of rude to be upset that no one answered your question. You are using XEN from what distribution? Different distributions and different management tools might keep img file in different directories. What are the 4 .img files that find locates? What is the name of your VM, often the harddrive image may have a same or similar name. You could always look at the configuration files that will tell you the path to the img file. Hw many VMs are you running? if you run 4 vms then those 4 img files are likely the drives for each of them. If you shutdown the VM copy the img files you can adjust file paths and settings for your new machine to reflect the changes int he configuration files or through your management tools.
I've had about 4 posts on here and they never get any responses, it's just irritating - apologies if it seemed rude.
Anyway! On with the show!
I'm using Citrix xen, there's no link between the uuid and the LVM uuid (this was my first thought! that way I could use DD without taking any systems offline).
The .img files found are all in /boot
The name of an example VM is "Windows XP test env" I've also done a search for windows and found the templates xen uses (templates aren't any use as all Citrix Xen servers have the same templates).
There are no configuration files as xen has various scripts for obtaining this information. As you'll see in my reply on thread I linked initially, it also has scripts for creating VM images.
I run 42 VM's so those 4 img files are not numerically related (they're also called 'kernel.name.XEN.OS' and the fact they're stored in boot suggests they aren't the same VM's being used).
When you say "copy the img file" I presume you mean the img file my kernel boots from? This seems like a terrible idea.
The solution is in the other thread. vm-export and vm-import, this will work 70% of the time and takes a good 2hours per vm.
Last edited by genderbender; 11-24-2010 at 11:59 AM.
Sorry you didn't specify you were using Citrix XEN, technically I am too but the basic opensource version with no frills. In this scenario I can use LVM of a SAN device, or on local drives, or an img file. To setup XEN in the CLI with the no frills option you create a configuration file, and generate an img file form the command line using qemu if you are using an img file as a hard drive. In terms of using img files as a hard drive you can literally copy these files provided the VM isn't running. Using LVM can be a bigger pain if using local drives, but if you use a SAN you can live migrate etc... between XEN servers.
That would work I believe, the other alternative which would also be possible is a shared NFS store. When citrix xen is using shared storage, same hardware and os version, it has something with a weird name like xen move or flow (I forget the exact name) where you can use xencenter to move VM's (while online) between servers via drag and drop. This, as far as I can tell is not possible when there are any differences between the servers and thus the import/export thing is the only way to do it or shared storage of some kind (which ammounts to the same thing seeing as xen dynamically assigns disk space and only leaves 1.5GB used as scratch meaning most of the time a new drive will need to be mounted; for me NFS was my solution to this disk shortage problem).