|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-users
Re: [Xen-users] porting vmware's vmdk to domU
 
Hint???? 
 
Hmm........ 
Not so easy to explain in just couple of lines. 
 
here is what you can do...... 
 
[root@localhost vmdk]# fdisk -l -u -C 592 linux.raw 
 
Disk sharath: 0 MB, 0 bytes 
255 heads, 63 sectors/track, 592 cylinders, total 0 sectors 
Units = sectors of 1 * 512 = 512 bytes 
 
  Device Boot     
Start        
End      Blocks   Id  System 
linux1  
*         
63      208844     
104391   83  Linux 
linux2         
208845     7341704    
3566430   83  Linux 
linux3        
7341705     8385929     
522112+  82  Linux swap 
 
Consider that we have to extract linux2, which is ext3 
For this remember the formula (End - Start  + 1) = count 
For linux2: Start = 208845 = skip(in "dd" command) 
                 End = 7341704 
So we have count=(7341704 - 208845 + 1) = 7132860 
 
Now there we are, we have all the necessary info to "peel" the required partition. 
Now give the following command 
[root@localhost vmdk]# dd if=linux.raw of=linuxpartition.raw bs=512 skip=208845 count=7132860 
dd: writing `linuxpartition.raw': No space left on device 
1760697+0 records in 
1760696+0 records out 
 
Thats it...... 
we have linuxpartition.raw which should be mounted 
[root@localhost vmdk]# mount -o loop -t ext3 linuxpartition.raw /mnt/vmdisk/ 
 
 
Hope, thats a hint...... ;-) 
 
Regards, 
 
 
 
 
 
 
 
 
 
 On 10/5/05, Sven Uebelacker <uebelacker@xxxxxxx> wrote:
Thank you all, qemu-img is a good hint!
  With vmware-mount.pl I had my problems as described by Sharath.
  Am Samstag, 1. Oktober 2005 00:40 schrieb Sharath Babu: > I believe qemu-img works better in this case and much more easier to use.
 > #qemu-img convert -f vmdk /path/filename.vmdk -O raw /path/filename.raw
  This works although I use VMWare5... Just can't use my snapshots.
  > # fdisk -l /path/filename.raw
  Well, a known qemu error message occurs "You must set cylinders."
  > Make sure to peel off the required partition from this image to a new > image, because you cannot mount a disk, you can only mount a partition.
  Can you give me a hint how to do that?
  Sven.
  _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
    
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users 
 |   
 
 | 
    | 
  
  
    |   | 
    |