Internet (via the vm host) <--> Orchestra Server (vm guest) <--> Client machines (vm guests)
Build the Orchestra server
First get the ubuntu oneiric iso for our Orchestra server:
$ wget http://releases.ubuntu.com/oneiric/ubuntu-11.10-beta2-server-i386.iso
Next, install the packages we need on the laptop:
$ sudo apt-get install qemu-kvm kvm-pxe
Now build a virtual disk image:
$ qemu-img create -f qcow2 orchestra.img 10G
Launch a virtual machine to install the orchestra server:
$ qemu -m 2047 -hda orchestra.img -net nic,vlan=0 -net user,vlan=0 -redir tcp:5022::22 -redir tcp:5080::80 -net nic,vlan=1 -net socket,vlan=1,mcast=230.0.0.1:1234 -net dump,vlan=1,file=capture.pcap -cdrom ubuntu-11.10-beta2-server-i386.iso
This boots up a machine with two network cards. The first (eth0) will use your laptop's network connection to give you a connection to the internet. The second (eth1) is connected to the virtual switch and will be used to talk to fresh machines that need to be provisioned.
Note, we are also using QEMU's "-redir" command to port forward from our host machine into the vm instance. With the configuration above, host ports 5022 and 5080 are redirected to the orchestra server vm ports 22 and 80 respectively. This will allow us to use ssh and http from our host.
Install the ubuntu server as normal. Select eth0 as your primary network card.
Networking
We're going to set up the orchestra server to also act as our internet gateway for newly provisioned machines. Please note that the network described below is not secure and should not be used in a production deployment. Once the server has booted, set up the networking as follows:
/etc/network/interfaces
# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.16.1 netmask 255.255.255.0Uncomment the following line in /etc/ufw/sysctl.conf
net/ipv4/ip_forward=1Change the default FORWARD and INPUT firewall rule to ACCEPT in /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT" DEFAULT_INPUT_POLICY="ACCEPT"And add the following lines to the TOP of /etc/ufw/before.rules
# nat Table rules *nat :POSTROUTING ACCEPT [0:0] # Forward traffic from eth1 through eth0. -A POSTROUTING -s 192.168.16.0/24 -o eth0 -j MASQUERADE # don't delete the 'COMMIT' line or these nat table rules won't be processed COMMITNow enable the firewall:
$ sudo ufw disable && sudo ufw enableReboot the VM to make sure the networking configuration takes effect
$ sudo shutdown -r nowInstalling Orchestra
Once the networking is configured, update it and install Orchestra:
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install ubuntu-orchestra-server
Use the following settings:
Password for cobbler user: | cobbler (or any other password, just dont't forget!) |
Boot and pxe server IP address: | 192.168.16.1 |
Enable Orchestra managed DNS/DHCP: | yes |
Network range for DHCP clients: | 192.168.16.100,192.168.16.200 |
Default gateway for dhcp clients: | 192.168.16.1 |
Domain name for DHCP clients: | <leave blank> |
Now sync the cobbler server to activate the changes:
$ sudo cobbler sync
First PXE Boot
Now that Orchestra is up and running, let's get right to the good stuff and PXE boot a new VM.
We need a new disk image:
$ qemu-img create -f qcow2 client.img 10G
Now we just need to start it up:
$ qemu -hda client.img -net nic -net socket,mcast=230.0.0.1:1234 -boot once=nc
The "-boot once=nc" tells qemu to try booting off the network first ("n"), then off the hard disk ("c").
You should get a nice menu on your client VM. Scroll down to "oneiric-i386-ju ju" and hit enter. Watch as your new machine is automatically installed!
While you wait for that, have a poke around the web interface for cobbler:
Web Interface
On your host machine, point your browser to:
http://localhost:5080/cobbler_web/The username is cobbler and the password is cobbler (unless you set a different password during the install)
XMLRPC API
Here's a little snippet of python to provision a server via the API (See https://fedorahosted.org/cobbler/wiki/CobblerXmlrpc for full docs)
import xmlrpclib server = xmlrpclib.Server("http://localhost:5080/cobbler_api") token = server.login("cobbler","cobbler") system_id = server.new_system(token) server.modify_system(system_id, "name","new-machine",token) server.modify_system(system_id, "hostname","new-machine.example.com",token) server.modify_system(system_id, "modify_interface", { "macaddress-eth0" : "10:20:30:40:50:60", "ipaddress-eth0" : "192.168.16.20", "dnsname-eth0" : "new-machine.example.com", }, token) server.modify_system(system_id,"profile","lucid-i386-juju",token) server.save_system(system_id, token) server.sync(token)
Now start up a new instance with the MAC address we used above:
$ qemu-img create -f qcow2 client-lucid.img 10G $ qemu -hda client-lucid.img -net nic,macaddr=10:20:30:40:50:60 -net socket,mcast=230.0.0.1:1234 -boot once=nc
Enjoy!
Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
ReplyDeleteDerivative Calculator
edublackboards
How to find the height of a trapezoid
Area of a Rectangle
From free spins to welcome bonuses, the free slots websites in our evaluation guide are beneficiant with their offers. We also made certain choose on} free casino dafabet slots websites that supply favorable phrases and circumstances, corresponding to truthful wagering necessities, that assist you to get started on real money slot video games. The enjoyable of becoming a member of on-line casinos isn’t simply the supply of real money slot video games — it’s also the scale of the welcome bonus and free spins. Besides on-line slot video games, we also peeked into what different video games casino websites supply. Your greatest guess to play on-line slots for real money is at considered one of OUSC’s beneficial reliable casinos.
ReplyDeletekütahya
ReplyDeletetunceli
ardahan
düzce
siirt
LBHTNR
Van
ReplyDeleteizmir
Artvin
Tunceli
Eskişehir
ZWY
van
ReplyDeletedüzce
mardin
elazığ
sakarya
K8MP
049DA
ReplyDeleteÜnye Çekici
Ankara Fayans Ustası
Iğdır Lojistik
Manisa Şehirler Arası Nakliyat
Samsun Parça Eşya Taşıma
Tekirdağ Çatı Ustası
Batıkent Fayans Ustası
Mersin Şehir İçi Nakliyat
Bingöl Şehir İçi Nakliyat
57D62
ReplyDeletebuy deca durabolin
Tekirdağ Boya Ustası
Tekirdağ Evden Eve Nakliyat
halotestin
Silivri Çatı Ustası
Urfa Evden Eve Nakliyat
Kastamonu Evden Eve Nakliyat
Amasya Evden Eve Nakliyat
Silivri Evden Eve Nakliyat
4758E
ReplyDeleteBingöl Evden Eve Nakliyat
Antalya Lojistik
Kars Şehirler Arası Nakliyat
Tekirdağ Çatı Ustası
Çerkezköy Organizasyon
Bartın Parça Eşya Taşıma
Malatya Parça Eşya Taşıma
Sincan Fayans Ustası
Tunceli Evden Eve Nakliyat
9532A
ReplyDeletereferans
A04F9
ReplyDeleteyabancı görüntülü sohbet uygulamaları
denizli mobil sohbet siteleri
tokat rastgele görüntülü sohbet
bayburt bedava sohbet uygulamaları
Istanbul Parasız Görüntülü Sohbet
şırnak ücretsiz sohbet siteleri
canlı sohbet uygulamaları
sakarya canlı görüntülü sohbet
zonguldak ücretsiz sohbet sitesi
C9D5C
ReplyDeletekraken
kripto para kanalları telegram
kripto ne demek
kripto para telegram grupları
paribu
btcturk
kraken
okex
aax
A2BD7
ReplyDeleteen iyi kripto para uygulaması
referans kodu
bingx
gate io
referans kimligi nedir
kraken
telegram türk kripto kanalları
bitcoin hesabı nasıl açılır
mexc
F62B0
ReplyDeletekripto para haram mı
aax
coin nasıl alınır
https://kapinagelsin.com.tr/
probit
btcturk
kripto para nasıl alınır
canlı sohbet siteleri
okex
E1133
ReplyDeletewhatsapp ücretli şov
645A4
ReplyDeletegörüntülü show
55833
ReplyDeletegörüntülü şov whatsapp numarası
4FDAB2702B
ReplyDeletemaxman
bufalo çikolata
sertleştirici
themra macun
sildegra
viagra
lay era
bayan azdırıcı damla
sinegra
779A12CD6B
ReplyDeleteyapay kızlık zarı
vigrande
bufalo çikolata
sildegra
lay era
viga
kaldırıcı
sertleştirici
viagra
8A11C07198
ReplyDeletecam show
whatsapp görüntülü show güvenilir
degra
stag
novagra
viagra
sildegra
canli cam show
green temptation
511D7D586A
ReplyDeletecobra vega
cam show
whatsapp ücretli show
yapay kızlık zarı
telegram görüntülü şov
whatsapp görüntülü show güvenilir
sildegra
vega
görüntülü şov whatsapp numarası
B7C5D04748
ReplyDeletedelay
maxman
kaldırıcı hap
novagra hap
whatsapp ücretli show
green temptation
canli cam show
yapay kızlık zarı
cobra vega