Before a system can be used to host Xen instances, Solaris Zones or Linux VServers, VM2 must be informed that is will be used for this purpose, and must verify that needed software and kernel support is installed. The steps to do this are similar for the various virtualization types, but they all start with the registration of the host system itself, documented on the Using VM2 page.
When a virtual system is created by VM2, it will be assigned an IP address and a hostname. To allow this hostname to be used by other systems, it must be added to the DNS so that it can be resolved - otherwise, only the IP can be used to connect.
Fortunately, VM2 can make use of Webmin's BIND DNS Server module to add these DNS records automatically. For this to work, the VM2 master system must be running a name server, and it must have at least one DNS domain configured, as explained below :
On the master system, click on the
Webmin link at the top of the left menu, open the
Servers category and click on
BIND DNS Server.
If BIND is not installed yet, Webmin will inform you and offer to automatically install it from YUM, APT or Blastwave, if your operating system supports one of those repositories. You should click on the link to install it, which if successful will return you to the BIND module.
If you want to create a new
DNS domain for virtual systems (recommended), click on the
Create master zone link above the list of existing domains.
In the Domain name / Network field, enter the new domain name. If your company's domain is yourcompany.com , we recommend a domain like xen.yourcompany.com .
If the Email address field is empty, enter your email address.
Click the Create button.
Click the Apply Changes button below the list of domains.
Unless the VM2 master system is already the primary nameserver for the yourcompany.com domain, you will need to add an NS record in that domain for xen.yourcompany.com with the hostnmae of the VM2 master system. Using Webmin, the steps to do this are :
Login to Webmin on your primary
DNS server, and open the
BIND DNS Server module under the
Servers category.
Click on your company's primary
DNS domain, like
yourcompany.com .
Click on the Address icon.
Unless the VM2 master system is already in your
DNS, use the
Add Address Record form to add it. In the
Name field you could enter
vm2, and in the
Address field the IP of the VM2 system. Then click
Create.
Return to the Edit Master Zone page, and click on Name Server.
In the Add Name Server Record form, enter xen.yourcompany.com for the Zone Name, and the hostname of the VM2 master in the Name Server field, such as vm2.yourcompany.com . Then click Create.
Return to the main page of the BIND module, and click the Apply Changes button at the bottom of the page.
The steps to add a system for Xen hosting are :
-
Open the VM2 Settings section on the left menu, and click on Xen Host Systems.
Click on the Register a system for Xen hosting link.
Select the host system from the System hosting Xens menu.
In the
Base directory for virtual systems field, enter an existing directory on the system under which Xen images will be created. This should be on a filesystem with plenty of disk space, and ideally using fast disks and/or
RAID.
From the
Add Xen systems to DNS domain menu, select the local
DNS domain to which new instances hostnames' should be added.
In the textboxes next to IP address allocation range, enter the starting and ending IP addresses for a range that will be allocated to new Xen instances. These should be on the same network as the system's primary ethernet interface.
Click the Register button. If Virtualmin can contact the selected system and verifies that Xen kernel support and commands are available, you will be returned to the list of Xen hosts.
Once at least one system has been registered, you will be able to create Xen instances using VM2.
The steps to add a system for Linux VServers hosting are :
-
Open the VM2 Settings section on the left menu, and click on VServer Host Systems.
Click on the Register a system for VServer hosting link.
Select the host system from the System hosting VServers menu.
In the
Base directory for virtual systems field, enter an existing directory on the system under which VServer filesystems will be created. This should be on a filesystem with plenty of disk space, and ideally using fast disks and/or
RAID.
From the
Add VServer systems to DNS domain menu, select the local
DNS domain to which new instances hostnames' should be added.
In the textboxes next to IP address allocation range, enter the starting and ending IP addresses for a range that will be allocated to new VServer instances. These should be on the same network as the system's primary ethernet interface.
If you will not be using VM2 images to create VServers, the Distribution to install on VServers field can be used to enter a distribution code like fc6 or edgy or sarge .
Because VServer systems created without images are often missing important packages by default, the Packages to install on VServers section can be used to select some that you may want installed.
Click the Register button. If Virtualmin can contact the selected system and verifies that VServers kernel support and commands are available, you will be returned to the list of VServers hosts.
Once at least one system has been registered, you will be able to create VServers instances using VM2.
The steps to add a system for Zones hosting are :
Open the VM2 Settings section on the left menu, and click on Solaris Zones Host Systems.
Click on the Register a system for Solaris Zones hosting link.
Select the host system from the System hosting zones menu. Naturally, this must run Solaris.
In the
Base directory for zones field, enter an existing directory on the system under which zones filesystems will be created. This should be on a filesystem with plenty of disk space, and ideally using fast disks and/or
RAID.
From the
Add systems in zones to DNS domain menu, select the local
DNS domain to which new instances hostnames' should be added.
In the textboxes next to IP address allocation range, enter the starting and ending IP addresses for a range that will be allocated to new zones. These should be on the same network as the system's primary ethernet interface.
Click the Register button. If Virtualmin can contact the selected system and verifies that they run Solaris, you will be returned to the list of zones hosts.
Once at least one system has been registered, you will be able to create Solaris Zones using VM2.