[CentOS] OpenVZ – container based virtualization quick guide. Part 2

In this guide, we will be exploring how to use the tools which come with OpenVZ and setup a internet facing container/vm. This part of the guide also assumes you have followed part 1 to setup the container already and have a working environment.

In part 1, we setup a CentOS container which we could enter/exit but we didn’t do anything else on the network. What we want to do is set it up so we have the ability to bridge our hosts’ network and define static IP for network interface.

yum install bridge-utils

[root@tooncent ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe

[root@tooncent ~]# cat /etc/sysconfig/network-scripts/ifcfg-bridge0

/etc/init.d/network restart

[root@tooncent ~]# cat ifcfg-veth101.0
# Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe

vzctl set 101 --netif_add eth0 --save
echo '
' > /vz/private/101/etc/sysconfig/network-scripts/ifcfg-eth0

After this just start and you should be good to go.

26 thoughts on “[CentOS] OpenVZ – container based virtualization quick guide. Part 2

  1. Stu

    The “read more” link that your blog adds to copied text is really rather annoying when you’re copying commands into a terminal. Maybe you’d consider turning it off?

  2. dior sunglasses

    I’m commenting to let you be aware of what a remarkable encounter my wife’s daughter enjoyed studying your web page. She figured out numerous pieces, which included what it’s like to possess a marvelous giving character to make certain people without problems fully understand specific complex topics. You truly surpassed our own expected results. Many thanks for coming up with those powerful, healthy, educational and also cool tips about the topic to Janet.

  3. chrome hearts

    I needed to post you one little bit of note just to thank you over again just for the extraordinary techniques you have contributed above. It is really wonderfully generous of you in giving extensively what exactly some people could have offered for sale as an electronic book to help make some cash on their own, even more so since you could have done it in the event you wanted. Those smart ideas in addition worked to become a good way to realize that some people have the identical passion just as my very own to see a great deal more when it comes to this problem. I think there are numerous more enjoyable opportunities up front for people who read your site.

  4. off white jordan 1

    I actually wanted to compose a small message to be able to appreciate you for those remarkable suggestions you are giving out at this site. My rather long internet lookup has at the end been rewarded with reasonable facts and techniques to talk about with my contacts. I ‘d assume that we readers actually are extremely blessed to live in a notable site with so many awesome professionals with very helpful tactics. I feel very fortunate to have discovered your website page and look forward to some more entertaining minutes reading here. Thanks once again for a lot of things.

  5. adidas nmd r1

    I intended to post you this bit of observation so as to thank you so much as before with the breathtaking strategies you’ve contributed in this article. It was simply open-handed of people like you to allow unreservedly precisely what a number of us could possibly have offered as an e-book to help with making some dough for themselves, most importantly considering the fact that you could have done it if you considered necessary. These suggestions likewise acted as a easy way to understand that most people have a similar keenness really like my own to grasp much more regarding this matter. I believe there are some more pleasant times up front for those who check out your site.

Leave a Reply

Your email address will not be published. Required fields are marked *