LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-14-2012, 12:08 PM   #1
secondhandman
Member
 
Registered: May 2012
Posts: 60

Rep: Reputation: Disabled
Virtualbox VM to Physical hardware?


Their must be a simple way to use a VM of Ubuntu 11.04 with LAMP, etc. and copying it to a physical machine for use in production?

I've tried a few things with no luck. Very new to this!
 
Old 06-14-2012, 12:13 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,588

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You would have to build out your new server and rsync your data across... no other easy solution unless you setup a config app like puppet to push your content/configs out to new servers.
 
1 members found this post helpful.
Old 06-14-2012, 12:41 PM   #3
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
I've backed up root using tar, I wonder if I could use a live cd, install to the physical computer from the cd and copy over my backup.tar file.

I also have a backup using deja dup.

There must be a simple way!
 
Old 06-14-2012, 12:56 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
The simplest way I could think of would be Clonezilla. Your can also use a LiveCD to just rsync the files to the physical machine (absolutely no need to install first), then install a bootloader. Won't get much simpler.
 
1 members found this post helpful.
Old 06-14-2012, 03:05 PM   #5
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,588

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You cant really use clonezilla or another disk to disk copy sort of method due to the hardware differences. You will need to do a clean OS install then copy over your content. I refresh servers to new hardware on a daily basis and yes I wish it were easier but thats the way it is.
 
1 members found this post helpful.
Old 06-14-2012, 03:21 PM   #6
jefro
Guru
 
Registered: Mar 2008
Posts: 11,742

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
I disagree that you can't move it via clonezilla. Generally can work.

I also agree that the old standard of clean install used to be true. Today a modern linux doesn't care what hardware it is on.

You are correct in that a clean install would be or tends to be best.

You can use a V2P app.
You can use dd or tar or other clone copy tool.

You can use G4U if you want.

The basic issue here is that a virtual machine is to be considered a real computer. Any task that can move a real computer can usually move this issue.

I have even used dd over ftp and dd over netcat to clone.

You need to watch out for how some computers boot. Some systems may say disk by id or disk by name in grub or use different geometry or names to boot so you'd have to fix it.


I am not sure I'd go from a VM to a real system. Seems backwards.

Last edited by jefro; 06-14-2012 at 07:32 PM.
 
1 members found this post helpful.
Old 06-14-2012, 04:20 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Quote:
Originally Posted by Kustom42 View Post
You cant really use clonezilla or another disk to disk copy sort of method due to the hardware differences. You will need to do a clean OS install then copy over your content. I refresh servers to new hardware on a daily basis and yes I wish it were easier but thats the way it is.
I had no problems to clone the OS from my laptop (AMD CPU+Chipset+Graphics) to my netbook (Intel CPU+Chipset+Graphics), except that I forgot to install the X.Org driver for the Intel graphics. No other problems. As long as you don't have proprietary drivers installed there should be no problem. The kernel looks anyways everytime at boot which hardware is present at boot. I had such incompatibility issues with Windows XP and older, but since Vista they are rare even on Windows.
 
1 members found this post helpful.
Old 06-14-2012, 09:17 PM   #8
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
Is there a way to use the back up I have using Deja Dup? I have a fresh install of Ubuntu 11.04 (physical) and I believe it's using the same version of gnome as the VM it came from.. I have the root of the VM backed up and copied to the Documents of my home folder on the physical machine. I know I can simply write over the entire root drive!

I can use dd to write the image of the VMs root to a flash drive? and how would I go about using the image with the physical machine?

I'm looking into all your suggestions!! I've tried Clonezilla, but find it tough to use. I'll look into it again!!

Thanks for the reply's!
 
Old 06-14-2012, 09:21 PM   #9
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Rep: Reputation: 162Reputation: 162
You can't use a VM on bare metal. I've tried! There may be some way, but it isn't going to be fun.
 
1 members found this post helpful.
Old 06-15-2012, 03:25 PM   #10
jefro
Guru
 
Registered: Mar 2008
Posts: 11,742

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
We are talking dd here or other ways to copy a hard drives content aren't we?

If you have a dd image of either a real hard drive or a virtual hard drive then the two are for this question the same. You can treat them as equal. IF something and OF it is the way it works. Bit by bit the data is moved.


Clonezilla saves some drive specific data. If we know about the failure then we might be able to fix it.

The now presented issue of the USB raises other issues.

The problems of moving an install may be simple to fix if you have ways to diag the failures. If you want you can do a test install from your dd image to the real machine. At this point, don't consider any sort of install OS and then try to add in data on top. You are simply trying a complete wipe of the storage media.
 
1 members found this post helpful.
Old 06-15-2012, 05:12 PM   #11
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
This is what I have worked out so far:

What has been installed on the VM can be found by running the following command at the terminal:
dpkg --get-selections > installed-software

and to restore on the physical machine I transferred the installed-software file to a usb and ran the following (this will download and install items listed in installed-software):
dpkg --set-selections < installed-software && dselect

From there I used Deja Dup to restore any files that held configurations and was careful to not overwrite anything that might break the system. I had to redo permissions to get somethings working. I'm guessing that's because I backed up as a user, not root..

Thanks for the help. I'm still looking into your suggestions!!

Last edited by secondhandman; 06-15-2012 at 05:16 PM.
 
Old 06-15-2012, 05:15 PM   #12
secondhandman
Member
 
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
Can I now just back up the whole system by making a bootable image?
 
Old 06-15-2012, 07:41 PM   #13
jefro
Guru
 
Registered: Mar 2008
Posts: 11,742

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
If you now have a good working physical machine then you could make some image. Not worth the trouble to make it bootable unless you mean you are trying to get an external usb hard drive working.

From what you did, I feel that it may have worked. More that one way to do stuff. Use what you know is best.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does hypervisor(virtualbox) can own a specific hardware jao_madn Linux - Virtualization and Cloud 2 04-07-2012 09:13 AM
Network Hardware Address, from the actual physical card j.smith1981 Linux - Networking 1 12-14-2010 04:47 PM
VirtualBox: Problem with hardware acceleration. gammahermit Linux - Virtualization and Cloud 5 06-28-2010 11:31 PM
Physical Hardware Problem. securehack Linux - Hardware 7 06-21-2005 07:42 PM


All times are GMT -5. The time now is 12:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration