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!

Recommended Answers

All 5 Replies

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.

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?

Member Avatar for iamthwee

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.

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.

commented: 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). +2

Got it, Rob it! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.