Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Specific virtual machine image for gentoo?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
LIsLinuxIsSogood
l33t
l33t


Joined: 13 Feb 2016
Posts: 977

PostPosted: Mon Feb 05, 2018 7:12 am    Post subject: Specific virtual machine image for gentoo? Reply with quote

I want to make a virtual instance of my installation of Gentoo available to a virtual machine on a separate host (of a different distro). Is this possible? I read about virtualbox, and have followed some instructions to create a "link" to the disk partition using vboxmanager with the -rawdisk flag and that should allow direct access to the partition for my "/" with Gentoo installation on it. But the problem is I cannot boot the system, and it is because kernel space is not able to recognize the instruction to be handing things over to user space via not finding root partition.

Can anyone please help me out with this?

Also, for imaging my system, what tools are available that would allow me to be using it as a way of a fresh install, making sure it is bootable and allows for the more "advanced" stage of all files etc., if that makes sense. Does it??
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 268
Location: Brisbane, Australia

PostPosted: Mon Feb 05, 2018 11:20 am    Post subject: Reply with quote

What you propose does not work. You can't copy/move ypur VirtualBox guest without also copying/moving your host's /boot and / partitions.

I have several VirtualBox installations with 64 bit Gentoo, Debian, and 32 bit Suse, WinXP and Win7 guests. They all use and boot from .vdi files. To move or copy a guest from a Gentoo host to a Windows host, I copy the directory containing the .vdi, .vbox etc. files to the Windows host.

Use shared folders to access the host file system from the client.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42800
Location: 56N 3W

PostPosted: Mon Feb 05, 2018 3:39 pm    Post subject: Reply with quote

LIsLinuxIsSogood,

You can't share your root at the same time as you use it. Any filesystem must be only open read/write once.

Make yourself a stage4 backup of the install you want to virtualise.
Stage4 is described on the forums and wiki. In essence, its a tarball of your install.

Make a new virtual machine.
Install the stage4 there.

Be aware that not everything you need is contained inside the filesystem, The Master Boot Record and bits of grub are installed to the HDD outside of any filesystem.
You need to chroot into the install and install grub again to get these bit in the right places.
Copying them rarely works as the binaries that are installed directly to the HDD are modified during the install.

Lastly, the guest hardware environment is unrelated to the actual hardware fitted to the host.
Once your install is moved to be a guest, it needs to work with the virtual hardware. This may mean a kernel rebuild.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum