SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've googled around endlessly, and can't find anything - even in the Xen or OpenSuSE docs.
I'm running OpenSuSE 10.3 and Xen3.
Is there any way to clone or duplicate a virtual machine? And what would need to be done in terms of reconfiguration?
I'm looking to test a bunch of network monitoring applications, and compare them to each other. So I figured, given that I have a spare box with Xen on it, the easy way would be to install OpenSuSE 10.3 as a new Xen VM - a default installation for the "base" machine - and then make a copy of that for each package that I want to comparatively test. That would allow me to have a relatively level playing field for all of them (run one at a time with no other system load), as well as pause and restart them as needed. Most importantly, when I pick one of the four I'm looking at, I could just trash the other VMs and use the one I want.
I know it is a long time since you posted but this is still mysterious to many people. Xen no longer allows the simple copying of a disk image or other location of a guest domain (domU), followed by editing an existing config file or creating a new one in the - now legacy - standard location of:
/etc/xen/guestconfigfoo.sxp
As of 3.0.4 Xen configuration files are of the name config.sxp and are dynamically managed. Thus, hand-editing a config of this type is contra-indicated as it will be written over.
New tools to manage Xen Guest domains include:
virt-viewer
virt-install
virt-image
...and, yes, "virt-clone."
These tools are evolving and it is best to get the latest versions at:
virt-clone the tool that you are interested in is installed with 'virt-install' - I strongly suspect that your system already has these tools installed. virt-clone can run interactively or you can feed it command line parameters - and they are pretty simple. It deals with sticky little details like unique MAC address, UUID etc. Nice...
There should also be a man page on your system...well I hope...and you can find it on the internet as well it will be something similar too:
virtinst/man/en/virt-clone.1
Currently, I am having a problem with virt-clone, alas, but when it is working right it is a great boon, especially with the changes in the way configs are managed in Xen.
I hope that this helps a little, Jason or at least someone else!
...this is the new default location for .sxp (ie Xen config) files. IF you open the file you will note that it is no longer in Python format. Again, not a file to edit directly.
I continue to have trouble with virt-clone and if you find that you have trouble, as well, on your system, just write, I am under great pressure to update my Xen cloning knowledge and will know more, I hope, in the next several days. It looks as if I should post a 'how to' on cloning DomU's post-3.0.4, as soon as I have answers to my virt-clone bug problem!
Best,
P.
P.S. - don't know about an rpm but what about YaST, if you are using SuSE?
Sorry for the long wait for a further post - events (...and illness...) overtook me. virt-clone is now working properly, slip-stream fixes have been done. If your version does not work, get a new one, as per previous post. Now it is working I am able to clone a 10gig domU in a matter of a few minutes and the new guest is, immediately, ready to go!
Yes, Jason, documents are not available, but cloning a XEN VM is easy, trivial.
To clone a XEM VM:
1. Look into /var/lib/xen/images and find the directory where your original OS is installed. It is a good idea to have images directory on a separate partition, so that you can do the usual wonders with it, like mount, umount ...
2. Create a directory under images with the name of your clone VM.
3. Copy the template VM disk image or images is your original system have more virtual disk drives to the clone directory.
3. Now use the Create Virtual Machines tool and edit the default options for memory, processors and disks. Your new machine should have the same number of virtual processors as the original. Memory is not critical, so you can enter any good number. When you come to disks, you will see there is one disk already there, this is the one you copied.
4. Press Finish and your clone will start up. The problem with your clone is, specially with Windows, that it has the same machine name as the original, so change the computer name and maybe domain and reboot.
5. Enjoy
Quote:
Originally Posted by jantman
Hi,
I've googled around endlessly, and can't find anything - even in the Xen or OpenSuSE docs.
I'm running OpenSuSE 10.3 and Xen3.
Is there any way to clone or duplicate a virtual machine? And what would need to be done in terms of reconfiguration?
I'm looking to test a bunch of network monitoring applications, and compare them to each other. So I figured, given that I have a spare box with Xen on it, the easy way would be to install OpenSuSE 10.3 as a new Xen VM - a default installation for the "base" machine - and then make a copy of that for each package that I want to comparatively test. That would allow me to have a relatively level playing field for all of them (run one at a time with no other system load), as well as pause and restart them as needed. Most importantly, when I pick one of the four I'm looking at, I could just trash the other VMs and use the one I want.
I manage the VMs in our small cluster. I usually duplicate the DomU VMs by copying the virtual disk and change the config files. And I usually create and start DomUs by "xm create". I know this is the old method. But it runs very well in our platform (kernel 2.6.29, xen 3.4.1). I find the method in this post is different. So I post my method here: http://fclose.com/b/linux/605/how-to...tual-machines/. Hope it is helpful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.