Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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 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.
Launch you virtual machine, booting with the g4l (ghost for linux) iso.
Not possible I do not have access to rack to connect monitor or some switch to get the display on to a monitor.
Quote:
Originally Posted by Linux.tar.gz
Backup an image you save on network (plenty of tutos around).
I have rsync backup of the LVMs.
Quote:
Originally Posted by Linux.tar.gz
Create a vmware machine (care of disk size, must be equal or higher than qemu), boot g4l on it and restore the image.
Ok I get your point.
Quote:
Originally Posted by Linux.tar.gz
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.
Some one suggested to use the snapshot volume to do all this and as they suggested
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.
Guttorm in my post above the converter which I mentioned has failed is the same thing which you pointed out.
@Linux.tar.gz
qemu-img directly to vmdk (yes correct) I am away from that system I will try and post the results (it might take next week but I surely will update here )
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
Quote:
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
Quote:
/dev/abcd/lvm4
which I would like to run on a vmware setup.
So I have two servers one where
Quote:
/dev/abcd/lvm4
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
Quote:
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
It is a big LVM volume.So it is taking some time I have no idea as when it will complete but let me see what is the outcome of this work.I hope this should work.
You don't need a monitor when you have ssh ^^.
You can tunnel the X output of applications.
More easy, you can also start qemu with a vnc exported display.
You don't need a monitor when you have ssh ^^.
You can tunnel the X output of applications.
More easy, you can also start qemu with a vnc exported display.
Ok
in your above post
Quote:
Originally Posted by Linux.tar.gz
Very rudimentary, but working :
Launch you virtual machine, booting with the g4l (ghost for linux) iso.
I am not clear doing this part on ssh.
Quote:
Originally Posted by Linux.tar.gz
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.
The lvm size where the production machine is running is 100G so do I need to have a 100G size in the vmware machine which you say me to create.
Quote:
Originally Posted by Linux.tar.gz
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.