[fedora-virt] vmware guest -> Fedora-virt guest

Gene Czarcinski gene at czarc.net
Mon Jul 6 12:57:15 UTC 2009


On Saturday 04 July 2009 18:40:04 Richard W.M. Jones wrote:
> On Sat, Jul 04, 2009 at 01:54:20PM -0400, Gene Czarcinski wrote:
> > 2. Next, convert the vmdk file to raw using qemu-img and use this raw
> > image for a new storage SCSI device ... still did not work ... no good
> > partition table (fdisk -l).
>
> Using qemu-img to convert the vmdk images to raw should work.  Once a
> vmx file has been unpacked, it often[1] contains several individual
> *.vmdk files which you have to convert and reassemble into a raw file.
> Use a command like:
>
>   qemu-img convert -f vmdk -O raw image-s0*.vmdk image.raw
>
> The question is, why do you get no partition table.  You can try to
> examine the image in guestfish[2] to see what exactly it contains -
> eg. does it have a good partition table, does it have any LVM LVs,
> etc:
>
>   $ guestfish -a image.raw --ro
>
>   ><fs> run
>   ><fs> list-devices
>   ><fs> list-partitions
>   ><fs> lvs
>
> You can also use virt-inspector to see what kernel / drivers are
> installed.
>
> Rich.
>
> [1] I wonder if these are snapshots.
>
> [2] http://koji.fedoraproject.org/koji/packageinfo?packageID=8391


First of all, let me thank you for the tip on guestfish.  I am a newbie to 
Fedora-virtualization and am not aware of all the packages involves let alone 
all of the functions/packages that could be useful.  It would be nice if there 
was a list somewhere which listed such packages along with a brief description 
of what each did.

The vmware virtual disk file I used was first made into a single file rahter than 
split using vmware-vdiskmager.

OK, I used guestfish to verify that my "raw" image of a virtual disk was good.  
I then realized that part of my problem was that the rescue-mode system on the 
Fedora 9 netinst and the one on the Fedora 11 netinst differed in the order of 
disks (what was sda and what was sdb).  Once I figured that out, things looked 
better.

I deleted the ide disk definition so that only the sda scsi virtual disk 
pointing at my converted file was defined.  I tried booting up ... the kernel 
boots but then cannot find anything.  Well, this guest uses LVM for swap and 
"/".  lets, try something simpler.

I next built a small (minimal install) Fedora 9 vmware guest with sda1, sda2, 
and sda3 as /boot, swap, and "/" respectively..  I took the vmdk file and 
converted it to raw. OK, plug this file into Fedora-virtualization as sda.  
First, boot up with the Fedora 9 netinst ISO image and I am able to "chroot 
/mnt/sysimage" to the system ... looks great.  Try booking ... kernel; loads 
but fails because it cannot find anything such as "/dev/root", "/sys", or 
/selinux".

Any suggestions?

Gene




More information about the Fedora-virt mailing list