Adding Virtual Hosts

A virtual host is a physical computer running hypervisor software in order to run multiple virtual computers on top of it. This allows the resources of the physical computer to be shared among multiple virtual computers.

Virtual Hosts are added to VCL through the Manage Computers->Edit Computer Profiles section of the site. Select the Add New Computer button. A dialog will pop up in which information about the computer is entered.

The Public IP Address is a required field for this form. However, for virtual hosts, it is not used (unless the host is also acting as a NAT host) and any valid IP address can be entered.

Either the correct Private IP Address needs to be entered here or a valid entry needs to exist in the /etc/hosts file for the virtual host on the management node.

Most people will select None for Provisioning Engine. If there are many virtual hosts being used, it may be worth setting VCL up with xCAT to do bare metal provisioning and allowing VCL to provision the virtual hosts.

The State should always be set as vmhostinuse when adding virtual hosts.

VM Host Profile specifies which profile is used to control the host.

Assigning VMs to a Virtual Host

After adding at least one Virtual Host and some virtual machines (see Computers for more information on adding virtual machines), the VMs need to be added to the host so that VCL knows on which host to deploy the VMs. This is done in the Virtual Hosts part of the site.

Select the Virtual Host to be managed from the drop down box and click the Configure Host button. Select any desired VMs from the list on the right and click Add to assign them to the host. (Hint: clicking one VM in the list and then Shift+click another one to select all VMs in between the two as well).

Removing VMs from a Virtual Host

Normal Method

Removing VMs from a Virtual Host is also done under the Virtual Hosts portion of the site. The Virtual Host must be online and accessible from the management node for this to work correctly. If a Virtual Host is down and the VMs must be removed, follow the instructions further down under Manually Removing VMs.

Clicking on a VM in the box on the left will display the state of the VM below the box. Any VMs in the available state can be removed immediately. Any VMs currently being used can be scheduled to be removed after any current reservations for them are over. In either case, a VM is selected and the Remove button is clicked to remove it. The following image shows vm-2 after selecting it and clicking the Remove button.

Any VMs that have existing reservations will result in a dialog box prompting the user to schedule to remove them later or to cancel the remove.

Selecting Move Later will schedule it to be removed at the specified time.

Manually Removing VMs

If a Virtual Host exists with VMs assigned to it, but the Virtual Host is in a state where the management node cannot connect to it, VMs that need to be removed must be handled manually in the database. Normally, VCL logs in to a host to ensure any running (but unreserved) VMs are unregistered from the host before removing them. The following query will handle removing a VM from whatever host it is assigned to, replacing <computer hostname> with the hostname of your computer (do not include the <>). The hostname should be what is displayed in the box on the left in the screenshot above.

WARNING: This should only be done if the Virtual Host cannot be brought back online and made accessible to the management node again.

UPDATE computer SET vmhostid = NULL WHERE hostname = '<computer hostname>';



  • No labels