Upgrading from VZ 4.0 to VZ 4.6

Posted by Vanessa | Tagged under | Posted on Mon Feb, 2011

0

 

If your server already has VZ 4.0, it’s very easy to upgrade to 4.6. You pretty much don’t have a choice because if you have other servers running 4.6, you won’t be able to move containers back and forth, and you won’t have many new kernel updates headed your way.

Note: This procedure is only for VZ 4.0 servers. If you run a previous version, you need to re-OS and reinstall VZ. You can’t upgrade to 4.6 from previous vesions!

1. Migrate all your containers off the server

If this is a live server, you’ll want to move off all your customers to avoid lengthy downtime.  If you plan on moving them back, you can speed up the reverse process by moving off the containers and retaining their private areas

for ve in `vzlist -H -o veid,diskspace |sort -rnk2 |awk '{print $1}'` ; do vzmigrate -r no 192.168.x.x $ve ; done

2. Run a Yum update

Take this opportunity to update your operating system, noting that Virtuozzo already has an exclude file (/etc/yum/swsoft-excludes) to prevent the updates of certain packages.

yum update -y

3) install VZ 4.6

cd /root
wget http://download.parallels.com/pvc/46/lin/rtm/vzinstall-linux-x86_64.bin
chmod 755 vzinstall-linux-x86_64.bin
./vzinstall-linux-x86_64.bin

4) Run the self update

After the installation, run vzup2date twice (one is a self-update, the other is the kernel update)

5) reboot

6) Reapply customizations

If you had any customizations to VZ scripts (such as files in /etc/sysconfig/vz-script), you may need to re-apply them

7) Re-populate the server

Start migrations back to the server, which will take a fraction of the time since the private areas were retained:

for ve in `vzlist -H -o veid,diskspace |sort -rnk2 |awk '{print $1}'` ; do vzmigrate -r yes 192.168.x.x $ve; done

Which Container is Running that Process?

Posted by Vanessa | Tagged under , | Posted on Fri Jul, 2010

0

When troubleshooting load issues on a node, top is still an effective command for a quick glance at what’s going on. However, since the PIDs for processes in a container do not correlate with users on the parent node, it can sometimes be unclear as to what container is running the processes.

Virtuozzo has a built-in command called vzpid which identifies the container running a given process. For example, if I wanted to find out which container was running process ID #31299:

[root@server ~]# vzpid 31299
Pid    VEID    Name
31299    102    mysqld

Recreating the Service Container

Posted by Vanessa | Tagged under , | Posted on Tue Mar, 2010

0

If your service container isn’t working or you need to recreate it, follow these steps:

1) Download the autoinstaller for Virtuozzo:

wget http://download.parallels.com/virtuozzo/virtuozzo4.0/linux/vzinstall-linux.bin

2) Run the autoinstaller and select the download only option. This will download the files to /root/virtuozzo

chmod 755 vzinstall-linux.bin
./vzinstall-linux.bin

3) Extract the source to a temporary location:

mkdir -p /vz/temp
/root/virtuozzo/download/Linux/{arch}/virtuozzo-{version}-{arch}.sfx -d /vz/temp--extract

4) Now create the service container and assign it an IP:

vzsveinstall -v -D /vz/temp -s $ip

Needed APF Tweaks for Virtuozzo Servers

Posted by Vanessa | Tagged under , | Posted on Sun Feb, 2010

0

If you’re installing APF on a VPS, chances are you’ll need to make a couple changes to your APF’s config file. Here are a couple errors that are common:

eth0: error fetching interface information: Device not found

You need to change the interface values in apf.conf to use venet0 instead of eth0 since the VPS is on a virtual interface:

IFACE_IN="eth0"
IFACE_OUT="eth0"

unable to load iptables module (ip_tables), aborting.

Change the MONOKERN value from ’0′ to ’1′ .

How to Uninstall Virtuozzo

Posted by Vanessa | Tagged under , | Posted on Sun Jan, 2010

0

Sometimes you may need to remove Virtuozzo, either to reinstall or just remove it, but are not able to completely reinstall the OS. I’ll stress though that if possible, you should reinstall the OS entirely to completely remove VZ. But in case you can’t, here are the steps to uninstall:

1. Stop Virtuozzo

service vz stop

2. Uninstall all Virtuozzo packages

rpm -qa|grep swsoft|grep vz|xargs yum remove -y
rpm -qa|grep swsoft|grep -E “virtu|-ez-|-tmpl-”|xargs yum remove -y

3. Remove contents from /vz : actionlog, backups, lock, private, root, template, vzup2date

cd /vz/ && mkdir _before_reinstall && mv * _before_reinstall

I usually have /vz on a separate partion, so I move all its contents to another partition on the server and just reformat using mkfs.

4. Remove configs from /etc

mkdir -p /vz/_before_reinstall/etc && find /etc -name vz\* -exec mv {} /vz/_before_reinstall/etc \;

5. Check /etc/grub.conf and make sure the boot kernel is standard (meaning, the parent OS and not VZ)

6. Reboot the server