OpenVZ Forum


Home » General » Support » *SOLVED* FC3 p2v migration
Re: FC3 p2v migration [message #2615 is a reply to message #2605] Tue, 11 April 2006 15:09 Go to previous messageGo to previous message
Toerkeium is currently offline  Toerkeium
Messages: 2
Registered: April 2006
Junior Member
OK, it's fixed now. Of course, by dev.. not me Smile))

After this, I would like to say 2 things to consider in order to migrate a physical server to a VPS (p2v), again, these are recommendations dev gave me.

1.- Removing all daemons which works directly to hardware, since there is no hardware involved directly with VPSs.

2.- Remove al unnecesary daemons to increase performance (things that unexpert admins do, like me) and in my case, I had dev mounted as tmpfs, which is not recommended because of its excesive consumption

so, this is what I did, mixed with what dev did:

Create a new VPS (in my case was FC3), and the only purpose to create a new VPS will be to have the configuration file made by vzctl, instead of manually. Lets assume the use of VPS 103, in which will be copy the entire physical box OS:

create the vps:
vzctl create 103 --ostemplate fedora-core-3 --config vps.basic]


set it to boot on HW start:
vzctl set 103 --onboot yes --save


set up a hostname:
vzctl set 103 --hostname host.yourdomain.com --save


set up an ip address:
vzctl set 103 --ipadd 10.10.10.100 --save


In case your Physical OS doesn't fee any cached template, you can do just the 103 directory, and generate the configuration file fot the vps /etc/sysconfig/vz-scrips/103.conf.

rsync the physical box into the vps

from the HOST or Hardware-Node:
rsync -avz root@ip-of-box-to-migrate:/ /vz/private/103/


NOTE: In my case, when I tried to start the vps after syncing the physical box, it started, but I wasn't able to connect to it throu ssh or "vzctl enter 103" command. The problem was that as I used the basic.vps, the vps was little in resources to start, so incresing values fixed that.


now I have the VPS which id is 103 with my physical FC3 box OS in it.

customization:

use the fol command to turn off kudzu (in case you have it):
vzctl exec 103 /sbin/chkconfig kudzu off


increase memory parameters (if you need more; I needed):
vzctl set 103 --kmemsize 6000000:6500000 --save


remove daemons which speak directly to hardware:

rpm -e --nodeps acpid apmd irqbalance pcmcia messagebug haldaemon nfslock rpcsvcgssdged netfs rpcidmapd most likely autofs isdn gpm cups cpuspeed smartd mdmonitor


also if don't need NFS and such, better disable

I cound't use the "vzctl enter 103" command at this point, which was fixed issuing this command in thr HN to increase dcachesize:
vzctl set 103 --dcachesize 2000000:2000000 --save


About the issue of having /dev mounted as tmpfs:

*<swdev]> I fixed it, by removing udev and installing vzdev-*rpm
*<kir> Toerkeium, basically what you need to do before you start a VPS migrated from the physical server is:
*<kir> (1) chroot into /vz/private/NNN
*<kir> (2) rpm -e --nodeps udev
*<kir> (3) rpm -ihv vzdev*.rpm
*<kir> vzdev rpm is available from /vz/template/fedora-core/N/i386/vz-addons

so, lets do what people who knows tell us:
cp /vz/template/fedora-core/3/i386/vz-addons/* /vz/root/103/



now lets enter the VPS:
vzctl enter 103


rpm -e --nodeps udev
rpm -ihv vzdev*.rpm
rpm -ihv dummy-fedora-core-3-1.0-3.swsoft.i386.rpm


Disable SELinux (inside the vps):
/etc/selinux/config: SELINUX=disabled


make mtab a symlink of /proc/mounts:
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab


Now lets exit from the VPS:
exit


I didn't have /dev/tty entries, so to create them:

vzctl exec 103 MAKEDEV tty
vzctl exec 103 MAKEDEV pty


End.

that should be all. It's working for me. THanks os much to dev for his help!
 
Read Message
Read Message
Read Message
Previous Topic: gfs does not compile with openvz kernel
Next Topic: Using IPTables MAC Filter Module in VE ?
Goto Forum:
  


Current Time: Sat Sep 28 11:35:39 GMT 2024

Total time taken to generate the page: 0.04116 seconds