Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent Changes
Live Chat
commons-linode-stage
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
TechOPS
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== KC POP - Virtual Machine Creation == The process to create a new virtual machine is pretty straightforward # Login to pfsense # Go to services -> DHCP Server # Add a new DHCP reservation to the appropriate network # Login to bare metal server A virtual machine consists of two components * Data for the virtual instance: (located in /data/lxc) <pre> kccp root@knel-prod-fm1:/data/lxc# ls authorized_keys fix-dev.sh infra occupy www fix_dev.sh fnf knel templates root@knel-prod-fm1:/data/lxc# root@knel-prod-fm1:/data/lxc# ls fnf/ fnf-base fnf-freeswitch fnf-opsview fnf-sogo fnf-chili fnf-git fnf-packetfence fnf-video fnf-freeside fnf-logger fnf-snorby fnf-voiptest </pre> ===Configuration files for the virtual instance: (located in /etc/lxc)=== <pre> root@knel-prod-fm1:/etc/lxc# ls cnwknel fnf infra knel occupy stage www root@knel-prod-fm1:/etc/lxc# root@knel-prod-fm1:/etc/lxc# ls fnf/ fnf-base.conf fnf-freeswitch.conf fnf-nocproject.conf fnf-video.conf fnf-chili.conf fnf-git.conf fnf-opsview.conf fnf-voiptest.conf fnf-freeside.conf fnf-jabber.conf fnf-sogo.conf root@knel-prod-fm1:/etc/lxc# </pre> Creating a new virtual machine is straight forward: # Setup the new DHCP lease in PfSense # Clone the data directory in /data/lxc/<category> to the new machine name. # Clone the config file in /etc/lxc/<category> to the new machine name. # Edit the config file and adjust the mac address and data path lxc-start -f <path to config> -d -n <name of vm> Most likely a new VM isn't needed at this point. Cpanel VM should be able to do just about everything LAMP/Java related. A few notes: The first time you start the new container, you'll want to invoke lxc-start -f <path-to-config> -n <name of vm> (notice no -d) You'll then be in the container. Make any necessary changes (hostname, password). shutdown -h now will bring you back to the bare metal. If you'd like to enable ssh access to the new box, there's a couple of extra steps: * A NAT rule to forward a random port to port 22 on the vm * A DNS entry to resolve some domain to the correct ip address (this depends on which vlan your vm is on)
Summary:
Please note that all contributions to commons-linode-stage may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Commons-linode-stage:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width