How to create OpenVZ VMs on OpenQRM 4.9

VInh Hồ
2011-11-08
2013-04-13
  • VInh Hồ
    VInh Hồ
    2011-11-08

    HI all,
    I'm new at OpenQRM, after install OpenQRM on my CentOS 5.6 Server, I want to create a virtual machine by openvz, but i don't know how to do that. Would you please to show me how ?
    If you have some document or video tutorial about this, please give it to my contact info :

    Email : vinh.ho2110@gmail.com
    Skype : vinhhd2110

    Thanks you so much, guys !

     
  • Satoru Funai
    Satoru Funai
    2011-11-23

    If you already have an OpenVZ server,
    Just integrate OpenVZ server with local-server plugin, and create OpenVZ-host appliance.
    Also create OpenVZ-storage on dedicated partition(LVG) of OpenVZ server, and create LV for openvz-VM.
    And create OpenVZ-VM and  create an appliance with the VM with created image on OpenVZ-storage.
    To access OpenVZ-VM from external, you need to configure veth bridge on OpenVZ host.
    And OpenVZ templates should be located in /vz/templates/cache on the openQRM Server, not on the openvz hosts.
    Hope this helps,
    Satoru

     
  • VInh Hồ
    VInh Hồ
    2011-12-15

    Thanks satoruf for your help
    But can you tell more detail or some examples for me ?
    I mean :
    - I already had an OpenQRM in CentOS 5.6 server
    - Then i build another CentOS 5.6 server. (remark as server A)
    - In this new CentOS server, i install OpenVZ in it. (remark as server B)
    - So now i want to use OpenQRM in server A to create a new VM on server B
    - Can you tell my how to do, or any document, example to do that
    I'm very grateful for your help !

     
  • VInh Hồ
    VInh Hồ
    2011-12-15

    Satoru, Can you give me your contact info so we can discuse via email ?

     
  • Satoru Funai
    Satoru Funai
    2011-12-16

    Do you mean that server A and server B are the same machine which runs openvz on centos5.6, right?
    Just integrate server A by using local-server plugin. Then change Resource type to OpenVZ host from Edit Appliance panel.
    Satoru

     
  • VInh Hồ
    VInh Hồ
    2011-12-17

    Allow me to tell more detail my lab and my problem i got for you :

    - In my laptop, I create 2 vmware machines, and install CentOS5.6 in each machine with full apache,mysql,….
    - Next, the first VMware machine (called server A, IP 192.168.3.110), i install OpenQRm
    - The second VMware machine (called servere B, IP 192.168.3.111), i install OpenVZ
    - After succesfully installed the following OpenQRM plugin on server A : local-server, openvz-storage, cloud, On server A (IP 3.110) i intergrate the server B to server A : scp /usr/share/openqrm/plugins/local-server/bin/openqrm-local-server :/tmp/
    ssh 192.168.3.111 /tmp/openqrm-local-server integrate -u openqrm -p openqrm -q 192.168.3.110 -i eth0 -s http
    - After this step, I had a new appliance in my appliance list

    - Next, i change this appliance resource from Physical System to OpenVZ host

    - Next, I go to Components -> create resource -> create openVZ virtual machine -> I chose the OpenVZ host that i just edited
    - Then i click to the VM button, and start to create VPS by filling VPS info
       + VM ID : 113
       + IP Add : 192.168.3.113
       + Subnetmask : 255.255.255.0
       + Network : 192.168.3.0/24
       + Gateway : 192.168.3.1
    - I realize that an new openvz vps had successfully create :

    - But i haven't time to cheer because …. i can't do any thing on that new vps, can't ping, can't access internet, can't change IP, can't edit file :
    # vzctl enter 113
    entered into CT 113
    -bash-3.2# ping www.google.com
    ping: bad address 'www.google.com'
    -bash-3.2#

    I don't know why, and my target is :
    - many remote servers, install openvz
    - I will build a server with giant resource, install OpenQRM server on it, and share/supply resource to the remote servers via Ethernet, kind of cloud computing, i'm researching about cloud computing by using openqrm
    - I wonder that what i do is right ? Can't you give me a vector to have a right researching ?
    - I'm so glade if you give me you email address to easily contact and discuse via email ?
    Thanks you Satoru !

     
  • Satoru Funai
    Satoru Funai
    2011-12-17

    Please check VM's veth is added to virtual bridge on Openvz host.
    # brctl show
    And also you need to create OpenVZ-storage on dedicated partition(LVG) of OpenVZ host, and create LV for openvz-VM to deploy openvz template.
    NOTE:  you can download openvz template from http://wiki.openvz.org/Download/template/precreated, and you must save templates in /vz/template/cache/ directory of the OpenQRM host (not on openvz host).
    regards,
    satoru

     
  • VInh Hồ
    VInh Hồ
    2011-12-17

    I already put a working template to /vz/template/cache open OpenQRM server
    In the OpenVZ host, when i logged in VPS by command : vzctl enter 113, the user is not root, it is :
    # vzctl enter 113
    entered into CT 113
    -bash-3.2# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:89:43:56:66:3C
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2283 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:63924 (62.4 KiB)

    eth0:oq   Link encap:Ethernet  HWaddr 00:89:43:56:66:3C
              inet addr:192.168.3.113  Bcast:192.168.3.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:1521 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1521 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:133968 (130.8 KiB)  TX bytes:133968 (130.8 KiB)
    -bash-3.2# brctl addbr MYBRIDGE
    brctl: bridge MYBRIDGE: Package not installed
    -bash-3.2# brctl addif MYBRIDGE eth0
    brctl: bridge MYBRIDGE: Operation not permitted
    -bash-3.2# brctl addif MYBRIDGE eth0:oq
    brctl: bridge MYBRIDGE: Operation not permitted

    ==>> i can't logged in vps by root user, why ? i had setup openvz vps before, and using hypervm to manage openvz, everything OK, but when i create openvz with openqrm, the problem appear

    Can you tell me more detail abou create opoenvz-storage ? i create openvz-sto in openVZ host. It mean : i add an hard-drive to openvz host, next in openqrm host, i create Volgroup and specify to openvz host hard-drive ?

    My contact info is

    Email : vinh.ho2110@gmail.com
    Skype : vinhhd2110

    Many thanks to you. Please give me your email address !

     
  • Satoru Funai
    Satoru Funai
    2011-12-17

    You need to create volume group on a partition of openvz host: "pvcrete" and "vgcreate".
    The you can create OpenVZ-storage from Base > Components > Create > Storage, select "OpenVZ LVM Storage" from Deployment type menu and select your openvz host and save it.
    Now you can select created OpenVZ-storage from storage list, click Mgmt icon, select volume group you created, then add new logical volume.
    After created new logical volume, select it from your storage list and click deploy icon, then you can chose templates you saved in /vz/template/cache/ directory on OpenQRM host.
    Finally you need to create Image and Appliance.
    from Base > Components > Create > Image, then select OpenVZ LVM Storage and logical volume you created and save.
    Select Base > Appliances > Create and chose openvz vm and image you created then set.
    Now you can run Appliance.
    Hope this helps,
    Satoru

     
  • VInh Hồ
    VInh Hồ
    2011-12-19

    thanks for you detail help, Satoru ! I can susscessfully create an Image in my Volgroup -> that make me an deep understading about openqrm.
    But after create my manual Image, i found no thing change in create appliance process. Because the kernel still the old kernel, maybe we have to create a new kernel too.
    Can you help me to explaine to creating kernel command line ?
    I thinks this is the last step to solve, and our problem will be solved soon. Wait for your suggestion !
    Thanks you so much Satoru !

     
  • VInh Hồ
    VInh Hồ
    2011-12-19

    Allow me to tell more detail about what i goal after follow your introduction :
    You need to create volume group on a partition of openvz host: "pvcrete" and "vgcreate".

    The you can create OpenVZ-storage from Base > Components > Create > Storage, select "OpenVZ LVM Storage" from Deployment type menu and select your openvz host and save it.
    Step 1

    Step 2

    Step 3

    Step 4

    Base > Components > Create > Image, then select OpenVZ LVM Storage and logical volume you created and save.

    The problem is I can't active My New Image,

    And can't find My Image when i create new appliance, just only local Install

    I keep trying to create another Resource from the local appliance, but the VM button no active ?


    But in this case, when i create a new appliance, i can chose LVM


    So, i try to create a new appliance, and what i get is: true Image, but wrong kernel

    I found 2 venets in my OpenVZ host (3.111), when i use # ifconfig, may be we will change something in those venet to make the VPS can access Internet

    That's all my process, i hope you have anything to suggest me.
    Thank you Satoru !

     
  • Matt
    Matt
    2012-01-15

    Thank you Satoru !

    many thanks and have a nice day,

    Matt Rechenburg
    Project Manager openQRM

     
  • VInh Hồ
    VInh Hồ
    2012-02-12

    by the way Matt,
    I wonder if you please to give me your email address for more discussion about OpenQRM. I have some idea to discuse

    Regarding;
    Vinh Ho