Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I am using KVM on Ubuntu Server 10.04. and Virtual Machines are running on it in LVM.
I have to migrate some of them to Vmware server.How can I achieve this.
I searched and came across some links but they all talked converting vmdk images to qcow or so.
In this case I have OS in LVM.
Launch you virtual machine, booting with the g4l (ghost for linux) iso.
Backup an image you save on network (plenty of tutos around).
Create a vmware machine (care of disk size, must be equal or higher than qemu), boot g4l on it and restore the image.
Be aware that if your image is windowze, you probably have to boot with install disk and repair the installation (in the "install on this partition" menu) after restoring it in vmware.
I know NFS is a damn easy thing to do.
My problem about NFS I opened in another thread as I did not wanted to mix this thread with the other problem.
If you want to look that thread then http://www.linuxquestions.org/questi...volume-854301/
only when my NFS problem gets solved I will be able to proceed on this thread.
Ok since the NFS thing got resolved by your help.
Now updating my attempt to migrate KVM guests to Vmware server.
I found here http://linhost.info/2009/04/vmware-c...-ubuntu-linux/
How ever in spite of the fact that converter for Linux is free I did not found it useful.
I tested it on two machines first I tried to install the converter on Ubuntu server(where the VMs are actually running) 10.04 64 bit (it badly failed).
God knows how people have succeeded in using it.
Second attempt was to install on a Ubuntu Desktop 10.04 64 bit.The installation went peacefully but the converter
failed to detect the Virtual Machine running on remote host (there is an option to give SSH credentials to vmware-client-converter).
So the converter even failed to work.
I will try to convert the LVM based VM in a qcow image and then convert that to vmdk will post the results as what happened.
I am a bit confused with qemu-img.
I was reading man page of qemu-img and what I understand is I need to first create a qcow image file which I need to populate and then convert that to a vmdk file.
Is that understanding correct.
What the situation is it is a production environment where I am having Guest OS running.These OS are in an LVM based setup.
Here is output of lvscan
ACTIVE '/dev/abcd/lvm1' [100.00 GiB] inherit
ACTIVE '/dev/abcd/lvm2' [150.00 GiB] inherit
ACTIVE '/dev/abcd/lvm3' [50.00 GiB] inherit
ACTIVE '/dev/abcd/lvm4' [100.00 GiB] inherit
Now suppose /dev/abcd/lvm4 is what I would like this to be in its original format running on the server where it is.Can pause or shutdown for some time to take backup.
How ever I want one more image of the
which I would like to run on a vmware setup.
So I have two servers one where
is originally hosted and will keep running for production use where as another place
where vmware is running there would be different experiments on this vmdk file.
Show is the following way
qemu-img convert -c -f raw -O vmdk /dev/abcd/lvm4 /backup/lvm4.img
the correct way to go or it will affect the lvm4 on which I apply it and mess with original lvm4.
So you better have to use :
find / -depth | cpio -pduv /newfolder
Adapt it to your needs, ie. :
find /where/is/mounted/dev/abcd/lvm4/ -depth | cpio -pduv /newfolder
I will create a cpio archive you can "unzip" on a hard drive, virtual or not.
But i still recommend my first suggestion too. You don't need a cd drive, as you boot the qemu with an .iso.
I have no idea if your qemu-img command will work as you wish, but it won't mess your original lvm, as it only reads it.
Ok I do have the first suggestion you gave me in mind.How ever currently due to hardware constraints it is not possible to do the same.I have no access to a monitor to be able to boot and see the results.Hence I have to do every thing with ssh connection.
Right now this is what I just tried before I read your message
Here I waited for 2 hours and I see a vmdk file which is 12 GB but still the second command is not complete and I see the file
further growing in size beyond 12GB.I have to go out of office so can not continue this command for a moment.So if you can tell what exactly is happening why even after a 12 GB of vmdk things did not stopped.
Also I have one more question I already have the rsync backups of the LVMs in some folders on a USB hard disk.The size of these folders is not more than 5GB or 6GB.Is it not possible to convert these to a format which I can use in vmware or some thing like that?
Launching qemu -vnc display[,option[,option[,...]]] will create a vnc output, so it's pretty easy to connect to it.
You also have to use -boot d -cdrom g4l.iso
I indeed highly recommend to have the same size, ie 100G.
The virtual chipsets of qemu are not necessary the same as the vmware. So, like on real hard drive, if you move a XP from a motherboard to another, you will probably get a BSOD. So you have to repair XP with the cd.
"lvcreate -L5G -s -n myvolume /dev/myvg/myvolume_snapshot
qemu-img convert /dev/myvg/myvolume_snapshot -O vmdk myvolume.vmdk"
Why are you creating an empty lvm, and converting it to .vmdk ?
You can create vmdk directly with qemu-img or vmware.
I have no idea why it oversized the 5G...
I doubt rsync preserves all files attributes. That's why i use cpio instead of a simple tar.