-   Linux - Virtualization and Cloud (
-   -   clonezilla disk image into virtualbox virtual machine (

sirius57 02-17-2013 11:40 AM

clonezilla disk image into virtualbox virtual machine
I have used clonezilla to clone hard drive to hard drive successfully. Then I used clonezilla to clone drive and put image on external usb drive. I then booted clonezilla into a virtual box vm, but was unable to get virtual box to see the image on the usb drive. My image on the usb drive is a folder with several 2gb image files of the whole drive. I tried pointing virtual box to the usb drive, but it does not recognize any of the files as valid image files. Clonezilla from virtualbox does not see the usb drive. How do I get clonezilla to see external usb hardware from virtualbox?

TobiSGD 02-17-2013 11:45 AM

You have to pass through the USB device to the VM. Alternatively, you can mount the USB device and set it up as shared folder or you set up a Samba, FTP or NFS server.

jefro 02-17-2013 04:59 PM

There are a few more complex ways but start with the usb.

When you boot to the VM with the iso image of clonzilla you need two things. One is a pre-made hard drive image that would be blank. Best if it is the original size or more of the cloned disk you had. Second is when it boots up, you then have a chance to attach your hosts usb devices to the VM. Wait a bit for it to be ready. It should then show up as available to clonezilla for you to image over.

sirius57 02-21-2013 10:55 AM

I formatted a blank virtual hard drive in ntfs. Clonezilla can see the drive. I installed the virtualbox extensions and I can add my usb drive and create a filter for it. After booting clonezilla, it will see the virtual box ntfs formatted virtual disk, however, virtualbox is not allowing me to access the usb drive. If I hover the mouse pointer over the usb icon at the bottom, it says 'no usb devices attached', however, it is there but grayed out. In the virtualbox control panel, I have the usb device listed, including all its filter information. I tried to 'safely remove' drive in dolphin, but that did not help. Is there a way to disassociate the usb drive in the host in order to have access in the guest? Also, if I copy the image from the usb drive to the hard drive, how would I point clonezilla to it? Would that method work better?

jefro 02-21-2013 02:48 PM

I just click on the virtualbox usb device in the menu. I don't usually add in filters.

It is best to unmount the usb in the vm first.

TobiSGD 02-21-2013 04:22 PM

Is your host a Linux or a Windows machine? If it is Windows I would just setup a network share for the folder your image is in. If it is Linux you can use Samba or NFS to share it to the network. Clonezilla should be able to see and mount those shares, so that you can use access the image files.

sirius57 02-21-2013 08:16 PM

Thank you for the replies. I have usb working. The last piece of the puzzle was editing the file:
On the last two lines, remove the # in front of the lines, save and reboot. I tried it in a virtual machine and could browse the folders in the thumb drive. I found the instructions here:
The instructions also warned about the possible security risks by allowing usb support. I can only think of the possible risk of directly accessing the virtual machine with a usb drive that could have malware on it.
A question on clonezilla: I have only used it to make images. I am guessing that restoring an image is doing a copy, but in the reverse direction.

jefro 02-21-2013 08:26 PM

Clonezilla uses a few other tools to do it's tasks. Normally you clone to a group of files or clone to a complete hard drive. If Clonezilla understands the file system it will use file by file copy. If not it does a bit by bit copy if it can.

So to restore, clonezilla may format and partition and copy file by file or it may simply use bit by bit.

sirius57 02-23-2013 07:04 PM

The image is installed in virtual box. It was done using the partition option because the original was a dual boot windows linux and I cloned the windows partition. I then used the grub disk to repair the boot loader because the linux partition was not there. I could then boot the virtual machine with the grub disk. To my surprise, I did not have any issues with windows complaining. However, the box was decommissioned from a windows network, so I have to figure out how to get admin rights so I can install guest additions.

jefro 02-24-2013 10:50 AM

Came with a vm in it and no admin. Kind of odd by not unheard of. I usually run qemu since it doesn't need any admin privileges.

Plenty of web pages on how to get that admin. I use a gentoo live cd.

All times are GMT -5. The time now is 10:51 AM.