Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Help, Manual OpenVZ Container Creation
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Help, Manual OpenVZ Container Creation

Ben1002Ben1002 Member
edited June 2013 in Help

Ok, So basically I have manually created a container via command line. Can anyone explain what I have done wrong. I have assigned the IP, I can ping the IP and the container has full connectivity. But when I check the IP in the container by curling a website. It returns the host nodes IP

[root@juno /]# vzctl set 1380 --ipadd CONTAINERIP --save

Deleting IP address(es): CONTAINERIP

Adding IP address(es): CONTAINERIP

CT configuration saved to /etc/vz/conf/1380.conf

[root@juno /]# vzctl exec 1380 curl curlmyip.com

199.101.. (Main nodes IP)

I believe it is an IPtables rule. But I can't seem to quite get it

Comments

  • shovenoseshovenose Member, Host Rep

    I don't want to start an argument here but if I were to ask this same question I would get beat up virtually. but BenND gets to ask these things?

  • mpkossenmpkossen Member
    edited June 2013

    What happens when you enter the container and then run the command?

    Also, these are the IP table rules that always help me out:

    iptables -P FORWARD ACCEPT
    iptables -F FORWARD
    

    @shovenose said:
    I don't want to start an argument here but if I were to ask this same question I would get beat up virtually. but BenND gets to ask these things?

    It's not fair people beat you up over these things. I'm glad somebody creates a container from the CLI for a change. Most people only know how to do it with SolusVM.

  • @mpkossen

    Same difference, was just easier to use exec to demonstrate. Them rules are already in place however.

    @shovenose

    No one said I get to ask these things, I just do it anyway. People can rip into me all they like I just choose to ignore it.

  • Forwarding set up properly in /etc/sysctl.something?

  • @mpkossen

    I know why it is now I think. Its because its a different IP range (Node has multiple IP ranges) I think I need to do source based routing???

  • vRozenSch00nvRozenSch00n Member
    edited June 2013

    @BenND said:
    No one said I get to ask these things, I just do it anyway. People can rip into me all they like I just choose to ignore it.

    @BenND, IMHO it is good to ask questions to the community, as the answers might be beneficial to others.

    I like good questions like this, as I can also learn something from it when I bumped into a similar problem. :)

  • SpeedBusSpeedBus Member, Host Rep

    It's this Nat rule, I had this issue a while ago, give this a try, disable iptables on the HN and then try your curl inside the VPS, if it fixes the issue, ie displays the correct IP of the VPS then you can maybe find the offending rule and then start iptables on the HN

  • ExpertVMExpertVM Member, Host Rep

    @BenND try to edit this file /etc/vz/vz.conf

    change the value for "NEIGHBOUR_DEVS" to "all" and see if it helps.

  • @SpeedBus

    Sometimes I feel like such an idiot. Thanks for the help everyone!

    [root@juno scripts]# vzctl exec 630 curl curlmyip.com

    WRONGIP


    [root@juno scripts]# service iptables stop

    iptables: Flushing firewall rules: [ OK ]

    iptables: Setting chains to policy ACCEPT: nat mangle filte[ OK ]

    iptables: Unloading modules: iptable_nat iptable_mangle ip[FAILED]lter iptable_nat iptable_mangle iptable_filter ip_tables


    [root@juno scripts]# vzctl exec 630 curl curlmyip.com

    CORRECTIP

  • wilbowilbo Member

    @ExpertVM said:
    BenND try to edit this file /etc/vz/vz.conf

    change the value for "NEIGHBOUR_DEVS" to "all" and see if it helps.

    Then restart the container.

  • @shovenose said:
    I don't want to start an argument here but if I were to ask this same question I would get beat up virtually. but BenND gets to ask these things?

    Here is the difference, he asked after he searched and couldn't find the solution (Which sounds more like traffic forwarding issue btw).

    On the other hand, you my friend, would open up a thread asking
    " HEY, HOW DO YOU CREATE OVZ VPS WITHOUT SOLUSVM, LOL".

  • SpeedBusSpeedBus Member, Host Rep

    @BenND said:
    SpeedBus

    Sometimes I feel like such an idiot. Thanks for the help everyone!

    nah, np, took me a bit to figure out too :P

  • Ben1002Ben1002 Member
    edited June 2013

    Now thats resolved my side project is progressing a lot

  • As we are on it, does anyone know if vzmigrate can replace the config of the VPS on the fly as it migrates?
    I'm looking to change some settings when migrating to my new node but i don't really want to shutdown the containers for any longer time.

  • i don't use quotas so this doesn't matter, i need to set RAM and everything else to unlimited (my private VPS node, ressource usage of containers is not an issue).

  • rds100rds100 Member

    @William you can set these limits with vzctl set, without rebooting the VPSes. Either before or after the migration.

Sign In or Register to comment.