Jump to content
Josho

P2V a Linux boxen

Recommended Posts

Hi Guys,

 

Built a CentOS box on a old desktop sitting around and want to P2V it.

But after doing so i think it destroys the file structure and some guy called kernel Panic comes along and ruins it for everyone (hurr durr hurr)

 

So are there any utils, guides or tricks i should know / do before i send it to my esx servers?

Share this post


Link to post
Share on other sites

Booting off the VMware converter CD and using it to push it over the ESX server.

Hmm maybe the vm container i'm pushing too could be the issue. Will look into that. Might be expecting a windows OS etc.

Share this post


Link to post
Share on other sites

hmm ok will look up GRUB and my error. But my guess is i'll just build directly in the VM and turn it into a template i can deploy from.

Share this post


Link to post
Share on other sites

Please excuse my novice question, I don't consider myself an expert with regards to VMWare. What do you mean by your query "P2V a Linux boxen"?

Share this post


Link to post
Share on other sites

Please excuse my novice question, I don't consider myself an expert with regards to VMWare. What do you mean by your query "P2V a Linux boxen"?

Physical to virtual???

Share this post


Link to post
Share on other sites

Perhaps… "P2V" is meaningless… my guess is it's a VMWare term, and "physical to virtual" is one possible interpretation.

 

It'd be nice to know what the kernel is panicking about. Two thoughts spring to mind…

(1) CentOS, being a Red Hat derivative, likely installs a kernel targetted at the machine it was installed on. Is it possible an incompatible kernel was used? You might be able to boot up the VM from the CentOS CD image, and manually install a more suitable kernel.

(2) It'd be worth checking how VMWare represents HDDs … IIRC it uses a BusLogic SCSI adaptor. CentOS I'm pretty sure will be using a modular kernel with its own initrd, so should have the driver, but if the root= parameter passed from the bootloader (grub, lilo) is wrong, that will cause a panic.

 

Is it possible you could grab a screenshot of the panic message?

Share this post


Link to post
Share on other sites

Perhaps… "P2V" is meaningless… my guess is it's a VMWare term, and "physical to virtual" is one possible interpretation.

Have you been living under a rock for the last couple of years?

Share this post


Link to post
Share on other sites

Perhaps… "P2V" is meaningless… my guess is it's a VMWare term, and "physical to virtual" is one possible interpretation.

Have you been living under a rock for the last couple of years?

 

No, just not one that uses virtual machines all that much.

Share this post


Link to post
Share on other sites

is ok. I gave up on the P2V of the box (and yes your correct it means a physical to virtual)

 

I'm thinking your right as the drives and drives would have changed and i dont have the knowledge tell the boot loader what the differences are etc.

Still learning.

So i went the long way and built up a CENTOS box and created a Virtual template to deploy my CentOS virtual machines from.

 

i then discovered that by default it uses LVM2 file system which im unfamiliar with and that I couldn't figure out how to extend the drives as needed.

So once again back into the fray i wade and decide to build up another machine but this time with custom file system and partitions etc using EXT3 as im familiar with that from my time playing on my SANS.

 

Being able to extend out drives etc is a key feature to me as i need to be able to expand as the systems take on more load and more data is generated.

 

Once this was done i then converted that build to a template and have gone from there.

 

There's more of this story about me learning to use YUM, RPM, CPAN and getting used to the CLI but thats a different post.

Im slowly getting there but still have alot to learn.

 

oh and if anyone has any knowledge of how to setup a GSM modem to send and receive SMS's so we can tie it into the system so our clients can be notified and respond i'd appreciate it. apparently after 50 character the thing decides to go Chernobyl on me.

 

Might throw another post up for that.

Share this post


Link to post
Share on other sites

I've P2V and V2V'd a few linux servers using this procedure - http://forums.citrix.com/thread.jspa?messageID=1477999

* create new VM, boot it and assign a temporary IP
	* install rsync on the old and the new VM
	* enable SSH root login on the old VM
	* run the following rsync command the first time:

rsync -av --numeric-ids --delete --progress --exclude /sys --exclude /boot --exclude /dev --exclude /proc --exclude /etc/mtab --exclude /etc/fstab --exclude /etc/udev/rules.d --exclude /lib/modules root@my-old-vm:/ /

	* this copies most files from the old VM, but excludes the running kernel, special filesystems, fstab etc.
	* downtime begins: switch the old VM to runlevel 1, disable remote logins, startup the sshd again
	* do a final rsync with the command from above
	* shutdown the old VM
	* downtime ends: reboot the new VM
	* install the linux XenTools on the new VM

I am sure for vmware it's slightly different, but it's worked a treat.

Share this post


Link to post
Share on other sites

I've P2V and V2V'd a few linux servers using this procedure - http://forums.citrix.com/thread.jspa?messageID=1477999

* create new VM, boot it and assign a temporary IP
	* install rsync on the old and the new VM
	* enable SSH root login on the old VM
	* run the following rsync command the first time:

rsync -av --numeric-ids --delete --progress --exclude /sys --exclude /boot --exclude /dev --exclude /proc --exclude /etc/mtab --exclude /etc/fstab --exclude /etc/udev/rules.d --exclude /lib/modules root@my-old-vm:/ /

	* this copies most files from the old VM, but excludes the running kernel, special filesystems, fstab etc.
	* downtime begins: switch the old VM to runlevel 1, disable remote logins, startup the sshd again
	* do a final rsync with the command from above
	* shutdown the old VM
	* downtime ends: reboot the new VM
	* install the linux XenTools on the new VM

I am sure for vmware it's slightly different, but it's worked a treat.

This is probably the fastest approach. You obviously can't do this on a Windows system, but for Unix it's great!

 

Just be careful of /etc/fstab. Depending on how many virtual hard disks you're going to use, you may need to modify this file.

Share this post


Link to post
Share on other sites

Cheers guys.

Will bookmark this page for future reference.

 

Slowly becoming more comfortable in linux environment but still have a long way to go.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×