VMware Cloud Community
PiT9000
Contributor
Contributor
Jump to solution

P2V Gentoo ESXi 4 Fails

Hi,

Two days ago i tried to P2V my old gentoo box in the datacenter to a test ESXi server here at my home.

I did the following steps: downloaded the convertor and installed the server on my text only linux box, opened the tcp ports and permitrootlogin on ssh.

Then i started the conversion everything runs smooth till 98% then i get the following error:

Error: Failed to reconfigure the target virtual machine.

When i try to boot the VM i get this:

VFS: Cannot open root device "sda6" or unkown-block(0,0)

Please append a correct "root=" boot option; here are the available partitions:

0300 4194301 hda driver: ide-cdrom

Kernel Panic - not syncing: VFS: Unale to mount root fs on unkown-block(0,0)

Some things to note:

- the physical server has ide drivers and this is the orignal grub.conf:

title=Gentoo

  1. Partition where the kernel image (or operating system) is located

root (hd0,0)

#kernel /boot/linux-2.6.22-hardened-r8 root=/dev/hda6 init=/bin/bb

kernel /boot/linux-2.6.22-hardened-r8 root=/dev/hda6

Has this to do with the fact the custom kernel i build has no support for scsi devices?

0 Kudos
1 Solution

Accepted Solutions
continuum
Immortal
Immortal
Jump to solution

look:

I removed the scsi-controller

change the CDrom to IDE 1:0

and added the vmdk as IDE0:0

don't worry about the changed sequence of lines.

I always sort alphabetically - this way it is easier to find everything


.encoding = "UTF-8"
deploymentPlatform = "windows"
displayName = "intranetPIT-BUgentoo"
ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:94:1f:e7"
ethernet0.generatedAddressOffset = "0"
ethernet0.networkName = "VM Network"
ethernet0.pciSlotNumber = "32"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:94:1f:f1"
ethernet1.generatedAddressOffset = "10"
ethernet1.networkName = "VM Network"
ethernet1.pciSlotNumber = "33"
ethernet1.present = "TRUE"
ethernet1.wakeOnPcktRcv = "FALSE"
evcCompatibilityMode = "FALSE"
extendedConfigFile = "intranetPIT-BUgentoo.vmxf"
floppy0.present = "FALSE"
guestOS = "other26xlinux"

# note the edits here ...

ide0:0.present = "TRUE"
ide0:0.fileName = "intranetPIT-BUgentoo.vmdk"
ide1:0.clientDevice = "FALSE"
ide1:0.deviceType = "atapi-cdrom"
ide1:0.fileName = "/vmfs/devices/genscsi/mpx.vmhba1:C0:T0:L0"
ide1:0.present = "TRUE"
ide1:0.startConnected = "FALSE"

memsize = "832"
nvram = "intranetPIT-BUgentoo.nvram"
pciBridge0.pciSlotNumber = "17"
pciBridge0.present = "TRUE"
pciBridge4.functions = "8"
pciBridge4.pciSlotNumber = "21"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge5.pciSlotNumber = "22"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge6.pciSlotNumber = "23"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
pciBridge7.pciSlotNumber = "24"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.reset = "default"
powerType.suspend = "default"
replay.supported = "FALSE"

# note the edits here - scsi-controller was removed 
scsi0.pciSlotNumber = "16"
scsi0.present = "false"

virtualHW.productCompatibility = "hosted"
virtualHW.version = "7"
vmci0.id = "-1433133081"
vmci0.pciSlotNumber = "34"
vmci0.present = "TRUE"

I also removed non-essential lines that will be recreated automatically




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

View solution in original post

0 Kudos
20 Replies
PiT9000
Contributor
Contributor
Jump to solution

here's the attached logfile

0 Kudos
continuum
Immortal
Immortal
Jump to solution

Did you try to dd the Gentoo-box and then use the dd-image as IDE-vmdk ?

see my site for how to do that

http://sanbarrow.com/vmdk-basics.html#calcgeoexample

I would not expect that the Converter Linux-iso can adjust a custom kernel




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

Hi no i did not do that as the gentoo machine is like 100km away in a datacenter. I was trying to live converter way. I do think also it has to do with scsi support in the kernel.

Do you think i can boot with a rescue cd on the virtual machine, chroot into it and try with a new kernel ?

0 Kudos
continuum
Immortal
Immortal
Jump to solution

yes - that may work - but why ?

If the kernel is good keep it - you can use IDE-disks on ESX4 i.

The VM arrived already ?

Then I would rewrite the vmdk to use IDE and just try if it boots already.

If it does not - boot Rescue CD and re-install Grub






___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

thx for the info, could you please explain how to rewrite the vmdk for IDE?

I heard using IDE disks has some disadvantages or isn't that true?

0 Kudos
continuum
Immortal
Immortal
Jump to solution

I explain how to do that here http://sanbarrow.com/vmdk-basics.html

If you are unsure - just post the vmdk-descriptor-file you already have and I rewrite it for you.

Also post the vmx-file.

In the end virtual disk are just files - the difference between a IDE-disk and a SCSI-disk appear in just 4 lines.

Yes - IDE maybe slower - but this depends on the guest and the drivers it uses.

In your case I would think that a Linux with a custom kernel without SCSI support will run best on IDE-disks Smiley Wink




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

hello this is my vmdk file:

  1. Disk DescriptorFile

version=1

encoding="UTF-8"

CID=f82a18e7

parentCID=ffffffff

createType="vmfs"

  1. Extent description

RW 42347340 VMFS "intranetPIT-BUgentoo-flat.vmdk"

  1. The Disk Data Base

#DDB

ddb.toolsVersion = "0"

ddb.virtualHWVersion = "7"

ddb.longContentID = "d981be758b57cf9d62c6a3c5f82a18e7"

ddb.uuid = "60 00 C2 98 0a dc 2b 7a-0a 2b f2 d7 5e 43 dc ea"

ddb.geometry.cylinders = "2636"

ddb.geometry.heads = "255"

ddb.geometry.sectors = "63"

ddb.adapterType = "lsilogic"

and this is my vmx file:

.encoding = "UTF-8"

config.version = "8"

virtualHW.version = "7"

pciBridge0.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

nvram = "intranetPIT-BUgentoo.nvram"

deploymentPlatform = "windows"

virtualHW.productCompatibility = "hosted"

unity.customColor = "|23C0C0C0"

tools.upgrade.policy = "useGlobal"

powerType.powerOff = "default"

powerType.powerOn = "default"

powerType.suspend = "default"

powerType.reset = "default"

displayName = "intranetPIT-BUgentoo"

extendedConfigFile = "intranetPIT-BUgentoo.vmxf"

scsi0.present = "TRUE"

scsi0.sharedBus = "none"

scsi0.virtualDev = "lsilogic"

memsize = "832"

scsi0:0.present = "TRUE"

scsi0:0.fileName = "intranetPIT-BUgentoo.vmdk"

scsi0:0.deviceType = "scsi-hardDisk"

ide0:0.present = "TRUE"

ide0:0.clientDevice = "FALSE"

ide0:0.deviceType = "atapi-cdrom"

ide0:0.startConnected = "FALSE"

ethernet0.present = "TRUE"

ethernet0.wakeOnPcktRcv = "FALSE"

ethernet0.networkName = "VM Network"

ethernet0.addressType = "generated"

ethernet1.present = "TRUE"

ethernet1.wakeOnPcktRcv = "FALSE"

ethernet1.networkName = "VM Network"

ethernet1.addressType = "generated"

guestOS = "other26xlinux"

uuid.location = "56 4d ba 0d e6 e9 72 8d-9d 4f e7 9e aa 94 1f e7"

uuid.bios = "56 4d ba 0d e6 e9 72 8d-9d 4f e7 9e aa 94 1f e7"

vc.uuid = "52 79 3a 90 8c be 17 d3-ec 18 84 b1 85 39 1f 28"

ethernet0.generatedAddress = "00:0c:29:94:1f:e7"

ethernet1.generatedAddress = "00:0c:29:94:1f:f1"

tools.syncTime = "FALSE"

cleanShutdown = "TRUE"

replay.supported = "FALSE"

sched.swap.derivedName = "/vmfs/volumes/4bbf7ebf-e06bce2c-98a8-a4badb3cec57/intranetPIT-BUgentoo/intranetPIT-BUgentoo-0ebe95b3.vswp"

scsi0:0.redo = ""

vmotion.checkpointFBSize = "4194304"

pciBridge0.pciSlotNumber = "17"

pciBridge4.pciSlotNumber = "21"

pciBridge5.pciSlotNumber = "22"

pciBridge6.pciSlotNumber = "23"

pciBridge7.pciSlotNumber = "24"

scsi0.pciSlotNumber = "16"

ethernet0.pciSlotNumber = "32"

ethernet1.pciSlotNumber = "33"

vmci0.pciSlotNumber = "34"

ethernet0.generatedAddressOffset = "0"

ethernet1.generatedAddressOffset = "10"

vmci0.id = "-1433133081"

hostCPUID.0 = "0000000b756e65476c65746e49656e69"

hostCPUID.1 = "000106a510100800009ce3bdbfebfbff"

hostCPUID.80000001 = "00000000000000000000000128100800"

guestCPUID.0 = "0000000b756e65476c65746e49656e69"

guestCPUID.1 = "000106a500010800809822010febfbff"

guestCPUID.80000001 = "00000000000000000000000128100800"

userCPUID.0 = "0000000b756e65476c65746e49656e69"

userCPUID.1 = "000106a510100800009822010febfbff"

userCPUID.80000001 = "00000000000000000000000128100800"

evcCompatibilityMode = "FALSE"

debugStub.linuxOffsets = "0x92d83ea,0xffffffff,0x2d0ac,0x0,0x0,0x0,0x92d8aeb,0x0,0x92d8aff,0x0,0x2d1f0,0x0,0x0,0x0"

tools.remindInstall = "TRUE"

ide0:0.fileName = "/vmfs/devices/genscsi/mpx.vmhba1:C0:T0:L0"

floppy0.present = "FALSE"

So if i understand correctly this is what i have to change in vmdk:

ddb.geometry.cylinders = "16383"

ddb.geometry.heads = "16"

ddb.geometry.sectors = "63"

ddb.adapterType = ide

After the change do i have to change the settings for my virtual machine? Because the vmx still has entries about lsilogic

After reading your guide it seems it's better to split up the VM HD file in 2GB files, is there anyway this still can be done or should i convert again?

I probably wouldn't have had all the trouble if i edited the defaults during the start of the conversion from scsi disk to ide disk.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

your vmdk edits are fine.

the disk is larger then 8 Gb so the standard IDE geometry for disks larger then 8 Gb can be used.

about the vmx ...

I planned to connect "intranetPIT-BUgentoo.vmdk" as ide0:0

by setting

ide0:0.fileName = "intranetPIT-BUgentoo.vmdk"

but you already have ide0:0 defined as

ide0:0.fileName = "/vmfs/devices/genscsi/mpx.vmhba1:C0:T0:L0"

can you change that ?

You ask about using vmdkssplit in 2 Gb slices - why would you want to do that ?

and what makes you think I recommend that ?

Please explain - I will rewrite the site if it is not clear




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

i guess i can change that to: ide1:0.fileName = "/vmfs/devices/genscsi/mpx.vmhba1:C0:T0:L0" so the VM thinks it's on the secondary master?

Could you please tell me what i have to change more then in the vmx file?

0 Kudos
continuum
Immortal
Immortal
Jump to solution

look:

I removed the scsi-controller

change the CDrom to IDE 1:0

and added the vmdk as IDE0:0

don't worry about the changed sequence of lines.

I always sort alphabetically - this way it is easier to find everything


.encoding = "UTF-8"
deploymentPlatform = "windows"
displayName = "intranetPIT-BUgentoo"
ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:94:1f:e7"
ethernet0.generatedAddressOffset = "0"
ethernet0.networkName = "VM Network"
ethernet0.pciSlotNumber = "32"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:94:1f:f1"
ethernet1.generatedAddressOffset = "10"
ethernet1.networkName = "VM Network"
ethernet1.pciSlotNumber = "33"
ethernet1.present = "TRUE"
ethernet1.wakeOnPcktRcv = "FALSE"
evcCompatibilityMode = "FALSE"
extendedConfigFile = "intranetPIT-BUgentoo.vmxf"
floppy0.present = "FALSE"
guestOS = "other26xlinux"

# note the edits here ...

ide0:0.present = "TRUE"
ide0:0.fileName = "intranetPIT-BUgentoo.vmdk"
ide1:0.clientDevice = "FALSE"
ide1:0.deviceType = "atapi-cdrom"
ide1:0.fileName = "/vmfs/devices/genscsi/mpx.vmhba1:C0:T0:L0"
ide1:0.present = "TRUE"
ide1:0.startConnected = "FALSE"

memsize = "832"
nvram = "intranetPIT-BUgentoo.nvram"
pciBridge0.pciSlotNumber = "17"
pciBridge0.present = "TRUE"
pciBridge4.functions = "8"
pciBridge4.pciSlotNumber = "21"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge5.pciSlotNumber = "22"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge6.pciSlotNumber = "23"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
pciBridge7.pciSlotNumber = "24"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.reset = "default"
powerType.suspend = "default"
replay.supported = "FALSE"

# note the edits here - scsi-controller was removed 
scsi0.pciSlotNumber = "16"
scsi0.present = "false"

virtualHW.productCompatibility = "hosted"
virtualHW.version = "7"
vmci0.id = "-1433133081"
vmci0.pciSlotNumber = "34"
vmci0.present = "TRUE"

I also removed non-essential lines that will be recreated automatically




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

i've done what you said see attached screenshot for error.

I've edited the image because the real hostname off the machine is in there.

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

ok i added the line config version and now it boots

It seems to recognize my disk now but i get the error during boot:

Warning: unable to open an initial console

Then it complains about missing /dev files trying to fix this now keeping your posted.

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

was able to fix the dev fs by the next steps:

mkdir /mnt/fix

mount --bind / /mnt/fix

cp -a /dev/* /mnt/fix/dev/

umount /mnt/fix

rmdir /mnt/fix

cp /etc/issue.devfs /etc/issue

rebooted now next problem, no network device i guess i have to load other network drivers in the kernel, we're getting there thx so much for the scsi to ide tips.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

oops -sorry for the bad edit

for the network issue ...

try to use

ethernet0.virtualDev = "e1000"

maybe then you do not need to rebuild the kernel ...




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
PiT9000
Contributor
Contributor
Jump to solution

i've tried that and doublechecked that intel pro under my 1000mbit devices is enabled in kernel (which it is)

in dmesg i see the driver loading and it seems to detect a mac address but it cannot find eth0, i guess i'll have to compile module support into the kernel and then try and get vmware tools to work with it ? Which will be tricky as gentoo does not use the standard rcX.d directories.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

if you use E1000 you do not need vmware-tools.

vmware-tools are only useful/necessary if you use

ethernet0.virtualDev = "vlance" or "vmxnet"

In that case the vmware-tools "enhance" the driver ...

may I ask you for a favour ?

I am adding a section on P2V to my site and would really like to have an example for one of those Linux that do not work with Converter.

It would be great if you could make some notes on the final adjustments you made with your rather "exotic" gentoo

Ulli




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

PiT9000
Contributor
Contributor
Jump to solution

i deffo will do that, i dont get this tbh i checked lspci and see the e1000 driver loaded. But it cannot bring eth0 up i'm now recompiling the kernel with only e1000 support. If you got any more pointers yourself i'm happy to try them out for you and document it in this post for your blog.

0 Kudos
continuum
Immortal
Immortal
Jump to solution

I am no Linux expert - but maybe eth0 does not come up because it is still linked to the old MAC-address ?

This often happens when you change the virtual nics in Debian or other distributions - in P2V scenarios i would expect the same thing to happen.

Debian for example has a config-file that links the ethernet devices to the MAC.

Often after a change the users can bring up a new eth1 - but not eth0.

When they then remove the old link of eth0 to old MAC eth0 is available after next boot.




___________________________________

VMX-parameters- Workstation FAQ -[ MOA-liveCD|http://sanbarrow.com/moa241.html] - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

PiT9000
Contributor
Contributor
Jump to solution

you sir are a genius, i owe you two beers allrdy Smiley Happy

The fix for the bind to wrong mac address:

Delete file : /etc/udev/rules.d/70-persistent-net-rules

Reboot

Networking is up now and i can access the internet from the linux VM. But networking is only in one way it seems i'm not able to access the linux VM from another client on the network, the search continues Smiley Happy

0 Kudos