Skip to contentSkip to conversation

Loading a raw hard disk image in xen

DISCUSSION Sujata Garera 2 participants 3 messages May 12, 2008

lore
Share & tools
lore
#0 lore raw

Hello
I have a 40 gig raw image of a hard disk (created using dd) that loads a Windows OS. I would like to load this image as a Windows VM inside Xen. I have been trying to boot of this disk using the following config file

kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 1536
name = "mcforen"
vcpus = 1
disk=['file:disk2bak.iso,hdc:cdrom,r']
device_model = '/usr/lib/xen/bin/qemu-dm'
cdrom = '/dev/hda'
stdvga=0
sdl=1
vncviewer=0
usbdevice='tablet'
audio=1
serial='pty'
boot='c'

However I get the following error when the VM loads Boot from Hard Disk failed: could not read boot disk

Any ideas how I should proceed to load this raw image in xen ? Thanks
Sujata

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Hello Sujata,

Quoted 6 lines · Sujata Garera

Hello
I have a 40 gig raw image of a hard disk (created using dd) that loads a Windows OS. I would like to load this image as a Windows VM inside Xen. I have been trying to boot of this disk using the following config file

What you are describing here and the disk line you are using don't match up.

If it is a dd of the entire drive, which contains Windows, then you should treat
it like a hard drive and not a cdrom.

I will put some specific comment inline.

Quoted 5 lines

kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 1536
name = "mcforen"
vcpus = 1

If in fact it is a hard drive that you are working with that you made a dd of, you should try changing the disk line to something like:

disk=['tap:aio:/path/to/disk2bak.iso,hda,w']

I wouldn't use the .iso extention either. I would recommend either no extension, .img, or .disk (meaning that it is an image of a disk).

The line that you currently have is more similar to what I would expect if it was an ISO file taken from a dd of a physical cdrom (optical disk). But based on your description that it not what it is.

If it was a physical cdrom, then you should change the boot= line to be boot="d", which would boot from the installation CD.

Also you don't need the cdrom= line. You shouldn't have it in this case. It is my understanding that the preferred way is to use the disk=line instead.

Quoted 7 lines

disk=['file:disk2bak.iso,hdc:cdrom,r']

device_model = '/usr/lib/xen/bin/qemu-dm'

As explained about, suggest removing this cdrom line

Quoted 14 lines

cdrom = '/dev/hda'

stdvga=0
sdl=1
vncviewer=0
usbdevice='tablet'
audio=1
serial='pty'
boot='c'

Quoted 3 lines

However I get the following error when the VM loads Boot from Hard Disk failed: could not read boot disk

You should continue the discussion on the xen-users list, unless there is good reason to
have it on the devel list.

Also, what version of Xen, how was it installed, and what distribution/OS are you running?

Cheers,
Todd

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Hello Todd
Thank you very much. Changing the disk line worked ! Sujata

Quoted 91 lines · Todd Deshane

Hello Sujata,

Quoted 6 lines · Sujata Garera

Hello
I have a 40 gig raw image of a hard disk (created using dd) that loads a Windows OS. I would like to load this image as a Windows VM inside Xen. I have been trying to boot of this disk using the following config file

What you are describing here and the disk line you are using don't match up.

If it is a dd of the entire drive, which contains Windows, then you should treat
it like a hard drive and not a cdrom.

I will put some specific comment inline.

Quoted 5 lines

kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 1536
name = "mcforen"
vcpus = 1

If in fact it is a hard drive that you are working with that you made a dd of, you should try changing the disk line to something like:

disk=['tap:aio:/path/to/disk2bak.iso,hda,w']

I wouldn't use the .iso extention either. I would recommend either no extension, .img, or .disk (meaning that it is an image of a disk).

The line that you currently have is more similar to what I would expect if it was an ISO file taken from a dd of a physical cdrom (optical disk). But based on your description that it not what it is.

If it was a physical cdrom, then you should change the boot= line to be boot="d", which would boot from the installation CD.

Also you don't need the cdrom= line. You shouldn't have it in this case. It is my understanding that the preferred way is to use the disk=line instead.

Quoted 7 lines

disk=['file:disk2bak.iso,hdc:cdrom,r']

device_model = '/usr/lib/xen/bin/qemu-dm'

As explained about, suggest removing this cdrom line

Quoted 14 lines

cdrom = '/dev/hda'

stdvga=0
sdl=1
vncviewer=0
usbdevice='tablet'
audio=1
serial='pty'
boot='c'

Quoted 3 lines

However I get the following error when the VM loads Boot from Hard Disk failed: could not read boot disk

You should continue the discussion on the xen-users list, unless there is good reason to
have it on the devel list.

Quoted 8 lines

Also, what version of Xen, how was it installed, and what distribution/OS are you running?

Cheers,
Todd

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel