[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Boot Error in converting VMDK/VMX to XEN HVM



On Thu, 2013-05-30 at 22:57 +0200, Stefan Pielmeier wrote:
> Hi,
> 
> I am trying to convert a VM Ware Fusion/Player working Virtual Machine with 
> Windows XP to XEN.
> I recieved some car service manuals in that format

What a strange way to distribute documentation!

>  and refuse to buy VMWare fusion or make VMWare player work on Ubuntu
> 12.04, this is a nightmare, and I have a server for my VM's running
> XEN, this is just perfect, so why not as well for this WinXP VMs with
> the service manuals on?
> 
> I converted the VMDK disk to a physical device using qemu-img convert 
> smart.vmdk -O raw /dev/mapper/vol0-domU-smart.
> 
> my cfg file for the domU-smart:
> ------------------
> builder='hvm'
> name="domU-smart"
> memory=512
> vcpus=2
> #disk=['phy:/dev/vol0/domU-smart,hda,w','file:/root/odin2/multimedia/prg/trinity-rescue-kit.3.4-build-367.iso,hdc:cdrom,r']
> #disk=['phy:/dev/vol0/domU-smart,hda,w','file:/root/odin2/multimedia/prg/win/xp_pro_sp2.iso,hdc:cdrom,r']
> #disk=['phy:/dev/vol0/domU-smart,hda,w']
> disk=['file:/home/sp/Mercedes_2012_WSM/VM/Mercedes_2012_WSM.img,hda,w']
> vif=[' ']
> boot="c"
> vfb=['type=vnc']
> -----------------
> then I ran "xm create domU-smart"
> 
> Trying to boot showed me a: "Booting from Hard Disk..." "Error loading 
> operating system_"
> 
> Next I tried to repair the MBR and boot sectors:
> - win XP bootcd as img and boot from CD works fine, but the XP install was 
> protected with a admin password => couldn't start the rescue mode
> - then I used trinity rescue to remove the admin password, worked fine, could 
> start rescue mode from XP disk :-)
> - fixmbr and fixboot got called
> 
> Still same boot result: "Booting from Hard Disk..." "Error loading operating 
> system_"
> 
> Then I checked manually the first sector of the harddisk with hexedit and it 
> seems ok regarding the partitioning and the position of the boot sector. The 
> only strange thing seems that the disk has following fdisk parameters with 56 
> sectors/track instead of 63 like in the other examples I found on the net for 
> Win XP:
> 
> Disk /dev/mapper/vol0-domU--smart: 26.8 GB, 26843545600 bytes
> 255 heads, 56 sectors/track, 3671 cylinders, total 52428800 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x130b130a
> 
>                        Device Boot      Start         End      Blocks   Id  
> System
> /dev/mapper/vol0-domU--smart1   *          56    52407599    26203772    7  
> HPFS/NTFS/exFAT
> 
> could this be some trick to make the VM not working with other than
> VMWares VM platforms?

More likely to just be unfortunate rather than deliberate.

I think (although I'm by no means sure) that the sectors/track thing is
a property of the block device (i.e. the LVM volume) and not part of the
partition table or held as data on the disk itself etc. I have no idea
if/how you can control this and since its a logical volume it is likely
to be completely fictional anyway (so I'm a little surprised to see they
aren't just 63 too).

How did you create this LVM volume?

In a recent kernel source tree I can see a DM_DEV_SET_GEOMETRY_CMD
ioctl, which appears to have a bearing on the result of asking the
device for its geometry. Google isn't finding any references for what
tool uses it though, but it might be worth following up a bit more.

> Well I am stuck, somebody can help me?

You could try enabling guest logging (guest_loglvl=all on your
hypervisor command line) and see if the HVM BIOS debugging which gets
dumped to the Xen dmesg contains any hints.

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.