[SOLVED] Restore clonezila image to KVM


Recommended Posts

I have a clonezilla image made by third party. It is a Set-Top-Box alike software, based on Ubuntu 14.

When I try to restore the image in Unraid VM environment, it complains that /dev/SDA is not available. In the installation settings I am changing the installation disk from SDA to VDA and then the software installs correctly, but on the first boot it continues to ask for /dev/SDA and of course just halts.

How do I change the device in the clonezilla image so that the software starts from /dev/VDA and not /dev/SDA?

 

Link to comment

I have successfully installed the image in Virtual Box environment and it is working great. No success in KVM.

I would like to avoid keeping Virtual Box, as KVM is build-in now and I am running windows7 and Ubuntu Desktop as VMs as well. Do I need special .XML settings or do I need to modify the image so that every partition is /dev/vdaX, instead of /dev/sdaX? Tried to do it with "cnvt-ocs-dev" but the command fails as the image is reported being read-only.

Is there anyway to "cheat" the system that actually vda is sda?

Any input will be appreciated.

 

 

Link to comment

Hi jonp and thanks for your input. As I stated in my first message, the linux image (ubuntu distribution) is an actual working backup made by clonezilla in a PC environment where a HDD was presented with a number of partitions (/dev/sda, /dev/sdb, etc...)

The .iso installs fine in a VM under unraid I have no problems with that.

The problem is upon first boot of the VM after a successful installation where it hangs because of /dev/sda partition is not found. Obviously there is no /dev/sda/ as the VM disk is /dev/vda/ .

My question is the following: is it possible to convert somehow the .iso image (or to tell KVM) so that it is not searching for dev/sda, but/dev/vda?

I will provide screenshots if needed.

Thanks.

Link to comment

Edit the XML for your VM and try changing the bus to sdX instead of vdX for your disk.

Is it as simple as that?    I wondered if the vdX was a side-effect of using the virtio drivers and you might need to change the XML to using a generic SATA device to get the sdX device working?

You tell me after you try it ;-)

Link to comment

Edit the XML for your VM and try changing the bus to sdX instead of vdX for your disk.

Is it as simple as that?    I wondered if the vdX was a side-effect of using the virtio drivers and you might need to change the XML to using a generic SATA device to get the sdX device working?

You tell me after you try it ;-)

Funny - I was just about to do that as I hit a similar issue trying to create a VM with the latest Ubuntu :)
Link to comment

Edit the XML for your VM and try changing the bus to sdX instead of vdX for your disk.

Is it as simple as that?    I wondered if the vdX was a side-effect of using the virtio drivers and you might need to change the XML to using a generic SATA device to get the sdX device working?

You tell me after you try it ;-)

Funny - I was just about to do that as I hit a similar issue trying to create a VM with the latest Ubuntu :)

I will say in 6.2 we actually will let you toggle between the bus type in the webgui, but not the device lettering (that will still require XML edits).

Link to comment

OK - I went into the edit XML option and made the following changes:

  • On the hard disk 'target' line changed it to read dev='sda' bus='sata'
  • Deleted the address line (so that libvirt could generate one itself
  • Hit the update

When I now started the VM my virtual hard disk was the device sda and everything worked exactly as I wanted it to.  I had the CDROM on hda using the virtio drivers and I left it alone.

 

I guess the next step is to see if I can switch to using the virtio drivers and keep the /dev/sda device that has been set up for booting?  Not sure how much better performance would be using the virtio drivers?

Link to comment

OK - I went into the edit XML option and made the following changes:

  • On the hard disk 'target' line changed it to read dev='sda' bus='sata'
  • Deleted the address line (so that libvirt could generate one itself
  • Hit the update

When I now started the VM my virtual hard disk was the device sda and everything worked exactly as I wanted it to.  I had the CDROM on hda using the virtio drivers and I left it alone.

 

I guess the next step is to see if I can switch to using the virtio drivers and keep the /dev/sda device that has been set up for booting?  Not sure how much better performance would be using the virtio drivers?

 

VirtIO should be better performance from a CPU usage standpoint.  When you DON'T use VirtIO, you are putting more strain on your CPU to emulate a controller itself, as opposed to passing through a lot of those instructions to the host itself (reducing overhead).  How much more strain?  It depends.  It might not be enough to worry you (especially if the underlying storage isn't fast enough to strain the system), but from our standpoint, there is never a reason to use anything other than VirtIO unless the OS you're using doesn't have support for VirtIO drivers.

 

You may be able to use dev='sda' while specifying bus='virtio'

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.