LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   making a virtual ubuntu guest, host (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/making-a-virtual-ubuntu-guest-host-4175435222/)

optimusNII 11-02-2012 03:33 AM

making a virtual ubuntu guest, host
 
Good morning,
please I have an Ubuntu12.04 running in vmware workstation, it's was my way of carrying my linux machine around. Now I'm getting a laptop & I'm wondering if I can make my virtual 12.04 run as the main OS on my Hp4530s

TobiSGD 11-02-2012 07:28 AM

Usually there should be no problem with that. Create the necessary partitions, copy the files over, adapt /etc/fstab to the new machine and re-install the bootloader.

gradinaruvasile 11-02-2012 08:41 AM

Quote:

Originally Posted by TobiSGD (Post 4820431)
Usually there should be no problem with that. Create the necessary partitions, copy the files over, adapt /etc/fstab to the new machine and re-install the bootloader.

Better just make an image of the virtual partition (with dd, to the real filesystem) then transfer it to the new hdd (no need removing the laptop hdd, it can be done with a live cd with netcat (preferably over ethernet). Ideal is to make a partition of the needed size before. Then install the bootloader, boot the system and (if needed) install drivers and stuff.
This way you will have the whole system as it was before.

optimusNII 11-02-2012 09:43 AM

Quote:

Originally Posted by gradinaruvasile (Post 4820494)
Better just make an image of the virtual partition (with dd, to the real filesystem) then transfer it to the new hdd (no need removing the laptop hdd, it can be done with a live cd with netcat (preferably over ethernet). Ideal is to make a partition of the needed size before. Then install the bootloader, boot the system and (if needed) install drivers and stuff.
This way you will have the whole system as it was before.

first, I'm greatful.
But how do you mean 'make an image of the virtual partition'? There's a .vmx image of the virtual ubuntu12.04 existent already in documents\virtual machines, the host machine is a windows 7. Is that what you're referring to?

jefro 11-02-2012 03:15 PM

Copy or clone a VM as if it were real drive.
 
I think he means to use a live iso to boot up the VM. Then dd the (virtual) mounted drive to some file either on a new blank virtual hard drive or over network.

The basic ways to copy or clone a VM are the same for a real computer. One can use a bit by bit such as dd or one can use other tools like gparted, cpio, tar or such to copy partition file by file.

It might be possible to use tools like redobackup and clonezilla also booted to the virtual machine. Then again use a new blank virtual hard drive or network drive to save the image(s).


I think there are tools to even mount some virtual hard drive's as one might mount an iso image to a currently booted linux system. That would require some linux being booted to the current host.

You might even be able to convert the .vhd to a .raw file. That raw file may or may not work to dd over to a real computer.

The main issue with dd is that some systems may have to be changed in places. Grub or other fstab entries may be device by name or such and will have to be corrected.

Another way is to do a clean install of your choice and update and add in all apps you have. Then only copy over the personal data.


All times are GMT -5. The time now is 04:32 PM.