-
Notifications
You must be signed in to change notification settings - Fork 126
User manual: vmcasts
In one word, it's a RSS feed that proposes some links to download xvm2 files. xvm2 is a simple tar containing:
- GZIP image of drives, one gzip per drive
- a MANIFEST
- a file named description.xml containing the actual libvirt domain description
An example of VMCast would be:
<?xml version="1.0" encoding="utf-8"?><rss version="2.0">
<channel>
<title>My Awesome VMCast</title>
<link>http://www.archipelproject.org</link>
<uuid>ec53db38-a692-4f04-bac9-50ff9f590001</uuid>
<description>The awesome VMCast feed for Archipel</description>
<language>en-us</language>
<item>
<title>Wordpress template</title>
<link>http://www.archipelproject.org</link>
<uuid>ae201436-8b36-11dd-bbb3-269650d01a85</uuid>
<enclosure url="http://myhypervisor/wordpresstemplate.xvm2" length="266741760" type="application/enomalism2-xvm2"/>
<description>Debian with Wordpress ready to use</description>
<pubDate>Tue, 23 Sep 2011 12:00:00 -0800</pubDate>
</item>
....
<item>
<title>Windows XP</title>
<link>http://www.archipelproject.org</link>
<uuid>ae201436-8b36-11dd-bbb3-269650d01a86</uuid>
<enclosure url="http://myhypervisor/wordpresstemplate.xvm2" length="42000000" type="application/enomalism2-xvm2"/>
<description>Windows XP virtual machines</description>
<pubDate>Tue, 23 Sep 2011 12:00:00 -0800</pubDate>
</item>
</channel>
</rss>
Archipel understands VMCasts, and you can register to any available VMCasts over the internet. Each hypervisor can package existing virtual machines into xvm2 appliances and can generate a valid VMCast repository and the RSS file containing informations about it.
Each hypervisors contains two folders that are related for VMCasts and appliances:
- /vm/repo: It contains all the downloaded and ready to use appliances from random VMCasts
- /vm/vmcast: It contains all the appliances that are published in hypervisor's VMCast and the rss.xml file
Archipel generates automatically everything to use the VMCasts. But it's up to you to serve the feed. You just need a simple HTTP server. We will use nginx
for this purpose.
First, install nginx
:
yum install nginx
Then open /etc/nginx/nginx.conf
, locate the default server
and edit it:
http {
...
# The default server
#
server {
listen 8080; # beware if you already have a http server running on port 80!
server_name _;
location / {
root /vm/vmcasts/;
index rss.xml;
}
}
}
Then start nginx:
service nginx start
Now, let's say your nginx is accessible from the outside with url http://vmcast.hypervisor.com:8080/
Edit /etc/archipel/archipel.conf
and locate the [VMCASTING]
section (note that only the own_vmcast_url
parameter needs to be updated):
[VMCASTING]
...
# the name of vmcast. $HOSTNAME is replaced by the actual hostname
own_vmcast_name = Local VM casts of $HOSTAME
# vmcast description
own_vmcast_description = This is the own vmcast feed of the hypervisor $HOSTAME
# the url to access the vmcast
## THIS IS CAPITAL TO ADD THE BASE URL YOU CONFIGURE WITH YOUR HTTP SERVER!
own_vmcast_url = http://vmcast.hypervisor.com:8080/
...
And finally, restart archipel agent
/etc/init.d/archipel restart
Your platform is now ready to use VMCasts and publish appliances!
You need to make your hypervisor to register to its own VMCasts (it's not necessary if you don't plan to use its own templates, but in this example, we have only one hypervisor). So first of all, select your hypervisor from the contact list, then select the VMCast
module.
Then click the +
button to register to a new VMCast feed, and enter the URL we configure in previous section (http://vmcast.hypervisor.com:8080/):
Click Register
. You will see the list of available appliances after a little while:
As you can see, it's empty. That's normal as we haven't created any appliances. Let's do this.
To do so, create a new virtual machine using the normal way (or use an existing one). Then configure it as you want. Install what you want on it, configure it as you like. When you will be happy with it, package it. To do so, choose the Appliances
module of your Virtual Machine, and click on the Package
button (it looks like a small box):
Choose a name (it cannot be changed! choose wisely) and click on Package
button. The virtual machine will become in "Do Not Disturb" (DND) mode. Wait for the packaging to finish.
Note it can be pretty long, depending on how much drive you have, their size etc.
When packaging is done, virtual machine becomes available again. The appliance has been published in your hypervisor VMCast:
The size is 0KB simply because we create an empty drive for the purpose of this tutorial.
You need to install appliance in order to use them (even if it's from the own hypervisor VMCasts. We'll talk about this later). To download an appliance, select it, and click on the down arrow icon (or simply double click on it):
Confirm you want to download the appliance. Then a download manager appears and give you the download status. Download is obviously done in background by the agent, you can continue to use Archipel. When appliance is downloaded, you will see the green pill indicating it's available. You can now use it for any virtual machines running on the hypervisor.
Create a new VM, or choose an existing one (note that if you use an appliance on an already configured virtual machine you will loose all existing data!). Go to virtual machines Appliances
module. Your template will be listed:
To use it, just click the attach
button (looks like a lock), or double click on it:
Confirm and wait. Virtual machine will enter in "DND" mode during the decompression of the informations. Description will be updated, new MAC address will be generated etc. After a while, the VM becomes available again, and you have a brand new VM based on your template.