LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   virtualizing existing Slackware - how I did this (https://www.linuxquestions.org/questions/slackware-14/virtualizing-existing-slackware-how-i-did-this-4175412061/)

igadoter 06-18-2012 10:10 AM

virtualizing existing Slackware - how I did this
 
Hi,

I was running Slackware 12.2 on my old Lifebook E4400. The system was customized during years - to suit all my needs. I started to look for a way to run it as a virtual guest on my desktop - with W$ as a host. Virtual Box has a tool to convert an image of all the hard drive into virtual hard drive. The restriction is that it has to be the image of the whole hard disk - one can do such image using dd command. It was no use for me cause on the notebook I am running W$, OpenBSD and that Slackware 12.2. Finally I found a solution using Clonezilla. Clonezilla is able to copy a partition over a network. So I created a new virtual machine on the host (using VirtualBox) - and I was running Clonezilla LiveCD on both the virtual machine and the notebook. In fact it is not important what live system is started on the virtual machine - provided it grants remote login using ssh - Clonezilla mounts a remote partition using sshfs.
In this way I was able to copy only the partition containing Slackware. Freshly copied system didn't start - the next step is to change entries in the fstab file and reinstall Lilo. And that's it. In fact I'm posting this now from my "old, good Slackware 12.2" which is running virtually on W$. And, a nice surprise, this virtual copy runs faster than original system.

I hope this may be helpful for those who like me faced a problem: I bought a new box - but what to do with my old beloved one?

Gerard Lally 06-19-2012 03:24 PM

Quote:

Originally Posted by igadoter (Post 4706141)
Hi,

I was running Slackware 12.2 on my old Lifebook E4400. The system was customized during years - to suit all my needs. I started to look for a way to run it as a virtual guest on my desktop - with W$ as a host. Virtual Box has a tool to convert an image of all the hard drive into virtual hard drive. The restriction is that it has to be the image of the whole hard disk - one can do such image using dd command. It was no use for me cause on the notebook I am running W$, OpenBSD and that Slackware 12.2. Finally I found a solution using Clonezilla. Clonezilla is able to copy a partition over a network. So I created a new virtual machine on the host (using VirtualBox) - and I was running Clonezilla LiveCD on both the virtual machine and the notebook. In fact it is not important what live system is started on the virtual machine - provided it grants remote login using ssh - Clonezilla mounts a remote partition using sshfs.
In this way I was able to copy only the partition containing Slackware. Freshly copied system didn't start - the next step is to change entries in the fstab file and reinstall Lilo. And that's it. In fact I'm posting this now from my "old, good Slackware 12.2" which is running virtually on W$. And, a nice surprise, this virtual copy runs faster than original system.

I installed Slackware to one physical disk and installed NetBSD Xen to another. I can now run Slackware virtualised under Xen *and* I can boot into Slackware on the bare metal as well, although the only reason I need to run it on bare metal is gaming and YouTube. As a virtual domU under the NetBSD dom0 Slackware is every bit as fast as the native install. While I was running Slackware outside Xen I had a KVM Windows XP virtual machine running on a logical volume. Xen recognised the volume (LVM is in NetBSD 6) and I can now boot up XP as a domU from within NetBSD as well, running under Xen instead of KVM. No modifications required! Incredible technology! With paravirtualization and LVM a virtual machine is as close to the bare metal as it can get.

NetBSD Xen *and* Slackware - best of all possible worlds!

:cool:

With regard to your fstab problem, one way around this is to put the UUIDs of your partitions in your fstab instead of the device or partition labels.

To output a list of partition UUIDs for your disk: blkid /dev/sda > ~/disk-uuid.txt

Now replace the partition labels in your fstab with the corresponding UUID and you won't have problems with fstab not finding root and other partitions.

igadoter 06-19-2012 04:40 PM

Yeah, I agree.

I'm using W$ for playing games....In fact I have three boxes...One of it is running Slackware 9.1...Now I'm to virtualize all of them...with the host as a NFS server ... The host may run both DHCP and NFS servers...This way I hope to reach two goals: to workaround the problems with not working guest additions (or non-existing)...The shared folders will be stored on the host...And a communication is realized between guests...I imagine that I'll be running in the same time several virtual machines ...and the systems on these machines will share the same files stored on the host via NFS or any other network file system...and they communicate to each other using virtual network realized by the host...It is really amusing technology...Now I'm thinking that it may be in the future a middle level: hardware - BIOS - host - virtual machines - applications ... So..No more problems with a dual boot


All times are GMT -5. The time now is 08:15 PM.