VMware Cloud Community
deed02392
Contributor
Contributor

P2V - Debian Linux > ESXi 4 with vCenter over Internet

Hi guys,

I am trying to perform a P2V of a Debian Linux source to ESXi 4, which is installed in a virtual machine in VMware Player.

I get everything set up, vCenter Standalone on the Linux server, that's running directly on the Internet with its own IP.

The ESXi server is running in a VM on my computer at home, behind a NAT router. So, I have set up DMZ on the ESXi's IP, so the Linux machine can connect to it.

The issue I get is that the process hangs at "Connecting to the Converter helper on the target virtual machine".

From watching the ESXi server with vSphere Client, I can see that the VM has been created, its boot up, a private key pair has been generated presumably so the source machine can be authenticated automatically.

The IP of the helper VM is of course a local IP as it got this from my home DHCP server.

Now, is it the issue that the source machine can't connect directly to the helper server? I think it is, which I should be able to resolve by setting my home IP address as the helper machines IP info, then using port forwards to make it look like they're hte same (as long as communication with the ESXi server and the helper VM do not use any of the same port combos, in which case I would obviously need two IPs, which I don't have).

Am I right? If so, which ports do I need to forward for it to connect?

Tags (4)
Reply
0 Kudos
17 Replies
weinstein5
Immortal
Immortal

Welcome to the Community - You are correct the issue is the connectivity between the two machines - Would you be able to backup/copy the files that make up Debian VM to say a local USB drive and hand carry them over and import them that way?

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos
deed02392
Contributor
Contributor

Which Debian VM are you referring to? I only have a physical machine with Debian installed at the moment.

But the server and my target VM are thousands of miles apart, since I am leasing the server from a datacenter in another country. This is why I need this achieved over the Internet. I tested using the same IP for both ESXi server and helper converter, but they both appear to listen on port 443, meaning by default that wouldn't be possible. If I can change the port assignment of either that should resolve this.

Alternatively I suppose it might be possible to achieve this if I set up a VPN? However that would require a lot of additional work I would think so I'd prefer to try and avoid that if possible.

Reply
0 Kudos
ivivanov
Expert
Expert

I think it is much better to install the Converter Server at your home location close to your target ESX server and connect to the source server (which has public IP as far as I understand). This should resolve all network problems. Everything converter needs in order to connect to the source is SSH enabled from Converter Server machine and from target VM machine.

__________
It is worse!
deed02392
Contributor
Contributor

Right, it's started working now!

So basically, as the last poster suggested I only needed SSH access to the SOURCE machine, as it's linux.

First I installed VMware vCenter Converter on my Windows machine here at home. Then I installed VMware Player. After loading up vCenter converter and starting the process for the SOURCE machine, I noted that it only supported up to ESXi 4. So I installed ESXi 4 in a VM (with VMware Player).

Once that's set up, configure it as the target for the conversion. Leave the helper IP details to automatic, assuming you have DHCP, because that connection is just referring to between vCenter Converter and the VM _INSIDE_ ESXi (naturlich).

Now everything will go smoothly. All traffic is going over SSH from SOURCE ==22==> NAT ( CONVERTER <==> ESXi )

No problem. Smiley Happy

Reply
0 Kudos
ivivanov
Expert
Expert

You have installed an old version of Converter and that's why you see it supports only up to ESX 4. If you download Converter Standalone 5.0 (https://my.vmware.com/group/vmware/evalcenter?p=converter - look under the Binaries section (don't know why it is hidden there!)) it supports vCenter/ESX 5.0.

__________
It is worse!
Reply
0 Kudos
deed02392
Contributor
Contributor

Damn! Yeah, they are all quite inconsistent. I downloaded the top of the list of VMware Player too, only to find it had not been sorted version descending..!

I have already started the process now, is it worth cancelling and starting over?

Reply
0 Kudos
ivivanov
Expert
Expert

Well, if your Debian is using GRUB2 then the old Converter for sure cannot complete the process successfully. On the other hand it is not clear whether 5.0 can do it as well since Debian is not officially supported and not tested with Debian... Don't know what to say :-). I would say if you are over 50% then may be you should wait and see what happens :-). You might need to fix the target VM to boot after the conversion anyway...

__________
It is worse!
Reply
0 Kudos
deed02392
Contributor
Contributor

I'm not sure what bootloader it's using, it's been up for nearly 2 years now! It's going to take another 20 hours just to download all the data on the drive, so I hope if it fails it doesn't just wipe it without giving me a chance to fix things manually.

Reply
0 Kudos
ivivanov
Expert
Expert

If it fails during cloning - it deletes everything :-). If cloning completes successfully and only the reconfiguration fails - then the target VM is not destroyed and you have a chance to try to make it boot. In most cases this means to fix the grub.conf file, fix /etc/fstab (if some volumes were mounted using UUIDs, because UUIDs are changed) and rebuild initrd image.

HTH

__________
It is worse!
Reply
0 Kudos
deed02392
Contributor
Contributor

Hooray, nearly 3 days later and the entire server has been downloaded. As it was Debain 4 and using LILO the reconf failed but all the data is there.

One issue is that the screen seems to take an absolute age to refresh, i.e. I can literally see it scanning down line by line when it updates the terminal in the console. Why might that be? Not enough resources or something?

Reply
0 Kudos
Qbgroup
Contributor
Contributor

Hi,

I've just tried with Debian 6.0.1 and Converter 5.

It fails reconfiguring the VM as far as I understand:

--> Installing GRUB1 on (hd0)...
--> /vmware-updateGrub.sh: 59: grub: not found
--> Error installing GRUB
--> Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root
--> ",
-->                            msg = "An error occurred during the conversion: 'GrubInstaller::InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code: 127, and message:
--> Installing GRUB1 on (hd0)...
--> /vmware-updateGrub.sh: 59: grub: not found
--> Error installing GRUB
--> Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root
--> '",

This seems to me the same problem I have seen in this thread http://communities.vmware.com/message/1884331#1884331.

Am I right?

Do I need to try the same solution posted in that thread?

Otherwise, it possible to recover the vm? If I boot with a live it seems that the data is there..

Any help will be appreciated, mostly because I'm not so expert in Linux administration... and that's my fault Smiley Sad

Thanks

Paolo

Reply
0 Kudos
deed02392
Contributor
Contributor

I am pretty sure it will only reinstall GRUB (legacy, aka 1) successfully if you're already using it to boot. As your logs indicate you don't have that installed so it wasn't able to reinstall it. All you should need to do is reinstall grub, probably using 'grub-install' which now I just read that link it goes on to mention. Fix your bootloader and you'll probably be able to boot. Smiley Happy

Reply
0 Kudos
Qbgroup
Contributor
Contributor

Yes, I think you're right, on the physical machine grub-install -v  says (GRUB) 1.98+20100804-14.

Let's see what I can do to fix that...:smileyconfused:

Thanks!

Reply
0 Kudos
ivivanov
Expert
Expert

Your problem is exactly as the one in the other thread you referenced. You have GRUB2 on the source, but Converter was not able to detect it and falled back to GRUB1, which lead to the problem described. In my opinion the workaround suggested there should work for you, at least with regards to the GRUB problems. You can still experience errors at a later step when trying to rebuild initrd on the target, because Debian was not tested and who knows what would come out of it.

__________
It is worse!
Reply
0 Kudos
deed02392
Contributor
Contributor

Ultimately though the problems aren't vastly complicated and with the help of a live cd, fixing it won't take you too long, even given your self-proclaimed lack of Linux admin experience.

It all just involved a bit of reading on fixing Linux booting which is all pretty generic. Install grub2 and fix the initrd (that's "initial ramdisk" for your searching pleasure).

I had LILO on my physical machine...

G'luck

Reply
0 Kudos
Qbgroup
Contributor
Contributor

Ok, something to do for the night Smiley Wink

I'll try another conversion with ivivanov's trick in the meanwhile I'll try to fix

grub.

Thanks !

Reply
0 Kudos
Qbgroup
Contributor
Contributor

Just to let you know that I have completed the conversion booting with a Debian iso, fixing the partition table and installing grub.

Now the VM is up and running Smiley Happy

Thanks

Paolo

Reply
0 Kudos