0

Hey, I would like to customize Linux in VMware. Fully for myself.
Can I later set it on real computer? If yes, how? If not, dammit!

3
Contributors
5
Replies
21
Views
3 Years
Discussion Span
Last Post by RikTelner
1

You can certainly do it. There are a few ways, depending on what customizations you made and what the destination is (dual-boot, etc.). But it is certainly possible. For example, see the instructions given here.

If your customizations are limited to the list of installed packages and the contents of your "home" directory, then you can just make a new installation on your real HDD, and then do a batch install of all the packages of your VM installation, and then, an rsync to retrieve all the home-folder contents. That's the way I would typically do a backup and migrate thing for the usual scenario of "I want to migrate all my installed software and files".

But for a complete migration, just use the image-dumping techniques provided in the link I just provided.

0

and then do a batch install of all the packages of your VM installation, and then, an rsync to retrieve all the home-folder contents.

I don't get this part. Could you extend?

1

Be careful... Vmware, doesn't account for specifics such as hardware compatibility with said graphics card etc.

You can set your software pretty easily and assume compatibility, assuming that software doesn't leverage any of your internal architecture.

That being said, I have never set up a vm then transferred it onto a real machine.

Maybe mikey will be able to guide you better in this respect... Something I'd be keen to find out how to do myself.

1

and then do a batch install of all the packages of your VM installation, and then, an rsync to retrieve all the home-folder contents.

I don't get this part. Could you extend?

Yeah, that was a bit too dense in Linux jargon. Let's say you use a Debian-based distro, then you would be using dpkg and apt-get to install software. On your VM, you can do this:

$ dpkg --get-selections > list.txt

which will produce a file "list.txt" that contains a list of all software packages installed on your system. Then, on the new system (fresh install), you can install all those packages by doing this:

$ sudo dpkg --clear-selections
$ sudo dpkg --set-selections < list.txt
$ sudo apt-get autoremove
$ sudo apt-get dselect-upgrade

So, that's the first part (the "batch-install of all packages of your VM").

The second part is quite simple. As said in the link I gave, you can convert your VM image into a raw disk image:

$ qemu-img convert your-vmware-disk.vmdk -O raw disk.img

and then, in the new system, you can mount the image to a folder:

$ sudo mkdir /media/VMimage
$ sudo mount -o loop /path/to/disk/image/disk.img /media/VMimage

And then, all you need to do is rsync the home folders:

$ rsync -vrtz /media/VMimage/home/username/ ~/

And that will make your home folder in your new system identical to the one on the virtual machine. If you need to sync any other folder, do so, but make sure to be careful if sync'ing system folders.

Votes + Comments
Much better than all other rude, psycho Linux fans. Finally found someone who can explain things as normal and as plain as possible to someone of my knownledge of Linux (== null).
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.