Parallels Parallels Server 4 Bare Metal User's Guide Copyright © 1999-2010 Parallels Holdings, Ltd.
Parallels Holdings, Ltd. c/o Parallels International GMbH. Parallels International GmbH Vordergasse 49 CH8200 Schaffhausen Switzerland Tel: + 49 (6151) 42996 - 0 Fax: + 49 (6151) 42996 - 255 Copyright © 1999-2010 Parallels Holdings, Ltd. and its affiliates. All rights reserved. Parallels, Coherence, Parallels Transporter, Parallels Compressor, Parallels Desktop, and Parallels Explorer are registered trademarks of Parallels Software International, Inc.
Contents Introduction 7 About This Guide......................................................................................................................................... 7 Organization of This Guide .............................................................................................................. 8 Documentation Conventions............................................................................................................. 8 Getting Help......................................
Table of Figures 4 Migrating Virtual Machines and Containers Between Parallels Servers ........................................ 51 Migrating a Container to a Virtual Machine ................................................................................... 56 Migrating a Physical Computer to a Virtual Machine and Container ............................................. 58 Migrating a Virtual Machine to a Container ...................................................................................
Table of Figures Managing Parallels Server Bare Metal Network 5 134 Managing Network Adapters on the Parallels Server .............................................................................. 134 Listing Adapters............................................................................................................................ 135 Creating VLAN Adapter...............................................................................................................
Table of Figures 6 Changing System Time From Container.................................................................................................. 185 Obtaining Server ID From Inside a Container ......................................................................................... 186 Enabling VPN for Container .................................................................................................................... 186 Managing Server Resources Parameters ..............................
CHAPTER 1 Introduction Parallels Server 4 Bare Metal is a virtualization solution that combines the benefits provided by Parallels Server 3.0 with those present in Parallels Virtuozzo Containers 4.0 for Linux. Using Parallels Server Bare Metal, you can run both virtual machines and Containers on the same server. In This Chapter About This Guide.................................................................................................................. 7 Getting Help ...............................
Introduction 8 Organization of This Guide This guide is organized in the following way: Chapter 1, Introduction, gives an overview of the Parallels Server Bare Metal product and this guide. Chapter 2, Parallels Server Bare Metal Basics, explains the general principles of Parallels Server Bare Metal operation.
Introduction Italics Used to emphasize the importance of a point, to introduce a term or to designate a command-line placeholder, which is to be replaced with a real name or value. 9 These are the so-called EZ templates. To destroy a Container, type vzctl destroy ctid. Monospace The names of commands, files, and directories. Use vzctl start to start a Container. Preformatted On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages.
Introduction 10 Getting Help In addition to this guide, there are a number of other resources available for Parallels Server Bare Metal which can help you use the product more effectively. These resources include: Manuals: Parallels Server 4 Bare Metal Installation Guide. This guide provides detailed information on installing Parallels Server Bare Metal on your server, including the prerequisites and the stages you shall pass. Getting Started With Parallels Server 4 Bare Metal.
CHAPTER 2 Parallels Server 4 Bare Metal Basics This chapter provides a brief description of Parallels Server 4 Bare Metal, Parallels virtual machines and Containers, their specifications and underlying technologies. In This Chapter Parallels Server 4 Bare Metal Overview ............................................................................... 12 OS Virtualization Layer ........................................................................................................
Parallels Server 4 Bare Metal Basics 12 Parallels Server 4 Bare Metal Overview Parallels Server 4 Bare Metal provides you with the possibility to simultaneously run Parallels virtual machines and Containers on the same server. Using this software, you can efficiently use your server's hardware resources by sharing them among multiple virtual machines and Containers.
Parallels Server 4 Bare Metal Basics 13 At the base resides server hardware. Next is the Parallels Server Bare Metal software which is installed directly on the server hardware and does not need any operating system for its functioning. Parallels Server Bare Metal includes two virtualization layers: Hardware virtualization layer. This layer provides the necessary environment for creating and managing Parallels virtual machines. OS virtualization layer.
Parallels Server 4 Bare Metal Basics 14 Basics of OS Virtualization The OS virtualization allows you to virtualize physical servers on the operating system (kernel) layer. The diagram below shows the basic architecture of OS virtualization. The OS virtualization layer ensures isolation and security of resources between different Containers. The virtualization layer makes each Container appear as a standalone server. Finally, the Container itself houses its own applications and workload.
Parallels Server 4 Bare Metal Basics 15 Virtuozzo File System Virtuozzo File System (VZFS) is a file system that allows sharing common files among multiple Containers without sacrificing flexibility. It is possible for Container users to modify, update, replace, and delete shared files. When a user modifies a shared file, VZFS creates a private copy of the file transparently for the user. Thus, the modifications do not affect the other users of the file.
Parallels Server 4 Bare Metal Basics 16 Parallels Server Bare Metal Configuration Parallels Server Bare Metal allows you to flexibly configure various settings for the physical server in general as well as for each and every Container. Among these settings are disk and user quota, network parameters, default file locations and configuration sample files, and others.
Parallels Server 4 Bare Metal Basics 17 Basics of Hardware Virtualization Parallels Server Bare Metal is based on the concept of hardware virtualization. Hardware virtualization has a base layer - a hypervisor. This layer is loaded directly on the bare server and acts as an intermediary between the server hardware and virtual machines. To allocate hardware and resources to virtual machines, Parallels Server Bare Metal virtualizes all hardware on the server.
Parallels Server 4 Bare Metal Basics 18 Parallels Virtual Machines From the point of view of applications and virtual machine users, each virtual machine is an independent system with an independent set of virtual hardware. This independence is provided by the Parallels Server Bare Metal hardware virtualization layer. The main features of the virtualization layer are the following: A virtual machine looks like a normal computer.
Parallels Server 4 Bare Metal Basics Virtual Machine Hardware A Parallels virtual machine works like a stand-alone computer with the following hardware: CPU Up to 12-core Intel/AMD CPU (Intel Celeron or AMD Duron for legacy OS compatibility) Motherboard Intel i965 chipset-based motherboard RAM Up to 64 GB of main memory Video Adapter VGA and SVGA with VESA 3.0 compatible video adapter Video RAM Up to 256 MB of video memory Floppy Disk Drive 1.
Parallels Server 4 Bare Metal Basics 20 Virtual Machine Files A virtual machine has at least two files: a configuration file (PVS file) and a hard disk image file (HDD file). It can also have additional files: a file for each additional virtual hard disk and output files for virtual ports. By default, the virtual machines files are stored in the /var/parallels directory on the Parallels server. The list of files related to a virtual machine is given in the table below: File Name Description .
Parallels Server 4 Bare Metal Basics 21 Support of Virtual and Real Media This section lists the types of disks that can be used by Parallels virtual machines and provides the information about basic operations you can perform on these disks. Supported Types of Hard Disks Parallels virtual machines can use only virtual hard disks image files as their hard disks. Virtual Hard Disks The capacity of a virtual hard disk can be set from 100 MB to 2 TB.
Parallels Server 4 Bare Metal Basics 22 Note: Parallels Server cannot create images of real diskettes. Parallels Management Console Parallels Management Console is a remote tool with a graphical user interface (GUI) for managing your physical servers with Parallels Server Bare Metal and virtual machines residing on them. This tool uses a typical client-server architecture.
Parallels Server 4 Bare Metal Basics 23 Resource Management Parallels Server Bare Metal resource management controls the amount of resources available to virtual machines and Containers. The controlled resources include such parameters as CPU power, disk space, a set of memory-related parameters.
Parallels Server 4 Bare Metal Basics 24 Physical Server Availability Considerations The availability of a physical server running Parallels Server Bare Metal is more critical than the availability of a typical PC server. Since it runs multiple virtual machines and Containers providing a number of critical services, physical server outage might be very costly. It can be as disastrous as the simultaneous outage of a number of servers running critical services.
CHAPTER 3 Operations on Virtual Machines and Containers This chapter describes how to perform day-to-day operations on your virtual machines and Containers. Note: We assume that you have successfully installed, configured, and deployed your Parallels Server Bare Metal system. If you have not, refer to the Parallels Server Bare Metal Installation Guide providing detailed information on these operations. In This Chapter Creating a Virtual Machine and Container ...........................................
Operations on Virtual Machines and Containers 26 Creating a Virtual Machine and Container This section explains how to create a new Parallels virtual machine and Container. The options you should pass to this command differ depending on whether you want to create a virtual machine or Container. Creating a Container To create a Container, you can use the pctl create command.
Operations on Virtual Machines and Containers 27 1 Creating a virtual machine configuration. To create a virtual machine configuration, you can use either the pctl create command or Parallels Management Console. 2 Installing an operating system in the virtual machine. This operation can be performed using Parallels Management Console only.
Operations on Virtual Machines and Containers 28 Supported Guest Operating Systems Listed below are the operating systems that you can run in your virtual machines and Containers: Operating System Virtual Machine Container Windows Windows 7 (x32, x64) + - Windows Server 2008 R2 (x32, x64) + - Windows Server 2003 R2 (x32, x64) + - Windows Vista with Service Pack 1 and 2 (x32, x64) + - Windows XP with Service Pack 2 and 3 (x32, x64) + - Windows 2000 with Service Pack 4 (x32, x64) + - Re
Operations on Virtual Machines and Containers 29 Choosing a Container ID Every Container has a numeric ID, also known as Container ID, associated with it. The ID is a 32-bit integer number beginning with zero and unique for a given Parallels server. When choosing an ID for your Container, please follow the simple guidelines below: ID 0 is used for the Parallels server itself. You cannot and should not try to create a Container with ID 0.
Operations on Virtual Machines and Containers 30 Choosing OS EZ Template Before starting to create a Container, you shall decide on which OS EZ template your Container will be based.
Operations on Virtual Machines and Containers 31 Setting the Password for a Virtual Machine and Container In Parallels Server Bare Metal, you can use the --userpasswd option of the pctl set command to create new accounts in your virtual machines and Containers directly from the Parallels server. The created account can then be used to log in to the virtual machine and Container.
Operations on Virtual Machines and Containers 32 Installing Parallels Tools in a Windows Virtual Machine Parallels Tools are available for the following Windows guest operating systems: Windows 2000 Windows Server 2003 Windows XP Windows Vista Windows Server 2008 To install Parallels Tools in any of these operating systems: 1 Make sure the respective virtual machine is running. 2 Execute the pctl installtools VM_Name command on the server.
Operations on Virtual Machines and Containers 33 Installing Parallels Tools in a Linux Virtual Machine Parallels Tools can be installed in any supported Linux guest operating systems that have the following packages: X.org 6.7 and later glibc2.4 and later To install Parallels Tools, do the following: 1 Make sure the respective virtual machine is running.
Starting, Stopping, and Querying Status of a Virtual Machine and Container After a Parallels virtual machine and Container has been created, it can be managed like an ordinary computer. Starting a Virtual Machine and Container You can use the pctl start command to start your virtual machines and Containers: To start Container 101: # pctl start 101 Starting the Container ... To start a virtual machine with the name of MyVM: # pctl start MyVM Starting the VM ...
Operations on Virtual Machines and Containers 35 Container was stopped Container is unmounted Starting Container ... Container is mounted Adding IP address(es): 10.0.186.101 Container start in progress...
Operations on Virtual Machines and Containers 36 Storing Extended Information on a Virtual Machine and Container Sometimes, it may be difficult to remember the information on certain virtual machines and Containers. The probability of this increases together with the number of virtual machines and Containers and with the time elapsed since their creation.
Operations on Virtual Machines and Containers 37 Copying a Virtual Machine and Container Within the Server Parallels Server Bare Metal allows you to create a complete copy of a particular virtual machine and Container (in respect of all the virtual machine and Container data and resources parameters), or a clone. This saves your time because you do not have to think of setting up the virtual machine and Container configuration parameters and the like.
Operations on Virtual Machines and Containers 38 /vz/dest_VM_Name.pvm storing the files of a cloned virtual machine (where dest_VM_Name denotes the name of the resulting virtual machine). For example, for the ClonedVM virtual machine, this directory is /vz/ClonedVM.pvm.
Running Commands in a Virtual Machine and Container Parallels Server Bare Metal allows you to execute arbitrary commands inside virtual machines and Containers by running them on the physical server, i.e. without the need to log in to the respective virtual machine and Container. For example, this can be useful in these cases: If you do not know the virtual machine and Container login information, but need to run some diagnosis commands to verify that it is operational.
Deleting a Virtual Machine and Container You can delete a virtual machine and Container that is not needed anymore using the pctl delete command. Notice that you cannot delete a running or mounted virtual machine and Container. The example below illustrates deleting Container 101 and the MyVM virtual machine: Deleting Container 101 # pctl delete 101 Deleting Container private area: /vz/private/101 Container is currently mounted (unmount first) # pctl stop 101 Stopping Container...
Operations on Virtual Machines and Containers 41 Backups Overview Parallels Server Bare Metal backup utilities deal with three kinds of servers: Source Server. This is the server where virtual machines and Containers are hosted during their backing up. Backup Server. This is the server where virtual machine and Container backups are stored.
Operations on Virtual Machines and Containers 42 Ubuntu, version 4.10 and higher Using pctl backup and pctl restore This section describes how to perform the basic backup-related operations using the pctl utility. Creating a Virtual Machine and Container Backup You can use the pctl backup command to back up your virtual machines and Containers. This command is executed on the Source Server and can store the created virtual machine and Container backup on both the Source and Backup Servers.
Operations on Virtual Machines and Containers 43 {c1dee22f-8667-4870-9e11-278f1398eab0} {209d54a0-e3b8-4a03-9ca8-d4cc7a2a27ca} test.com 2009-06-30 10:19:32 f 411566405 This command lists the backups existing on the Source Server. If you want to list the backups on the Backup Server, you need to specify the IP address of this server. The command output shows that currently only two backups exist on the Source Server.
Operations on Virtual Machines and Containers 44 Restore a Virtual Machine and Container To restore a backup of a virtual machine and Container, you can use the pctl restore command. This command supports restoring backups to the Source Server only. For example, to restore a backup of the MyVM virtual machine stored on the Backup Server with the IP address of 10.10.100.1, you can run this command on the Source Node: # pctl restore MyVM -s root:1qaz2wsx@10.10.100.
Operations on Virtual Machines and Containers 45 Using pbackup and prestore Along with pctl, you can use the following utilities to create and manage backups of your virtual machines and Containers: pbackup. This utility is used to create backups of individual virtual machines and Containers or entire Parallels servers. prestore. This utility is used to manage the existing backups of virtual machines and Containers.
Operations on Virtual Machines and Containers 46 Restoring Backups To restore any individual virtual machines and Containers or entire Parallels servers, you may want to view first the information about them. This can be done using the prestore -l command: # prestore -l -n test.com test.com root@test.com's password: ... Backups for node test.com: ID Backup_ID Size 101 2009-07-15T220425+0400@test.com test.
Operations on Virtual Machines and Containers 47 Notes: 1. The current version of Parallels Server Bare Metal supports restoring virtual machines to the Source Server only. 2. The prestore utility can also manage (list, restore, etc.) backups created using the pctl backup command. However, you are recommended to use the same utility (either pctl or prestore) during the life cycle of a particular backup. 3.
Operations on Virtual Machines and Containers 48 Configuring Passwordless Access to the Source Node You need to provide the Source Server credentials each time you execute the pbackup and prestore commands. However, you can allow these utilities to log in to the Source Server without having to enter the root password.
Operations on Virtual Machines and Containers 49 Migrating Virtual Machines and Containers The Parallels physical server is the system with higher availability requirements in comparison with a typical system. If you are running your company mail server, file server, and web server in different virtual machines and Containers on one and the same physical server, then shutting it down for hardware upgrade will make all these services unavailable at once.
Operations on Virtual Machines and Containers 50 General Migration Requirements Before deciding on the type of migration to perform, make sure that the source computer (i.e. the physical computer that you will migrate or that stores the virtual machine and Container before its migration) and the destination computer (i.e. the computer that runs Parallels Server Bare Metal and that will host the resulting virtual machine and Container) meet the requirements below.
Operations on Virtual Machines and Containers 51 Note: In the current version of Parallels Server Bare Metal, you cannot migrate Containers running Windows Server 2008 to virtual machines. Requirements for the destination Server The destination server must meet the following requirements: Has enough hard disk space to store the resulting virtual machine and Container. Has enough memory and CPU power to run the resulting virtual machine and Container.
Operations on Virtual Machines and Containers 52 Standard Migration The standard migration procedure allows you to move stopped, paused, suspended, and running virtual machines and Containers. Migrating a stopped, paused, or suspended virtual machine and Container includes copying all virtual machine and Container-related files from one Parallels server to another and does not differ from copying a number of files from one server to another over the network.
Operations on Virtual Machines and Containers 53 Migrating a Virtual Machine In its turn, to migrate a virtual machine from the source server to ts7.test.com, you need just to specify v instead of c and the name of the resulting virtual machine instead of Container ID 101: # pmigrate v MyVM v ts7.test.com/MyVM Migrate the VM MyVM to test.com root@ts7.test.com's password: Operation progress 100% The VM has been successfully migrated.
Operations on Virtual Machines and Containers 54 Zero-Downtime Migration The pmigrate utility also allows you to migrate your Containers from one Parallels server to another with zero downtime. The zero downtime migration technology has the following main advantages as compared with the standard one: The process of migrating a Container to another Parallels server is transparent for you and the Container applications and network connections.
Operations on Virtual Machines and Containers 55 To migrate a Container by using the zero downtime migration technology, you should pass the -online option to the pmigrate utility. By default, the iterative online migration type is used to move a Container from one Parallels server to another. For example, you can migrate Container 101 from the current server to the destination server named my_node.
Operations on Virtual Machines and Containers 56 Migrating a Container to a Virtual Machine The pmigrate utility allows you to migrate Containers to virtual machines. The source server, i.e. the server where the Container resides before its migration, can be one of the following: a local server running Parallels Server Bare Metal a remote server running Parallels Server Bare Metal a remote server running Parallels Virtuozzo Containers Currently, the destination server, i.e.
Operations on Virtual Machines and Containers 57 Migrating a Container from a Server with Parallels Virtuozzo Containers You can use the pmigrate utility to migrate Containers that reside on remote servers running the following versions of the Parallels Containers software: Parallels Virtuozzo Containers 4.0 for Linux with update TU-4.0.0-464 or higher Parallels Virtuozzo Containers 4.
Operations on Virtual Machines and Containers 58 Migrating a Physical Computer to a Virtual Machine and Container You can also use the pmgirate utility to move a stand-alone physical computer to a virtual machine and Container. The migration process includes copying the whole contents of the physical computer (i.e. all its files, directories, quota limits, configuration settings, and so on) to a virtual machine and Container on the Parallels server.
Operations on Virtual Machines and Containers 59 root:1qsde34rt@192.168.1.130 is the IP address and credentials of the physical computer to be migrated. You can omit the credentials in the command above. In this case you will be asked to provide them during the command execution. v indicates that the physical computer is to be moved to a virtual machine. MyVM is the name of the resulting virtual machine on the Parallels server.
Operations on Virtual Machines and Containers 60 Requirements for Migrating to Containers To avoid delays and problems when migrating a physical server to a Container, make sure that the following requirements are fulfilled: Migrating to Containers on Linux servers: The Linux distribution installed on the physical server is supported by Parallels Server Bare Metal.
Operations on Virtual Machines and Containers 61 Migration Restrictions for Containers Listed below are the limitations you should take into account when deciding on the migration process. Migrating to Containers on Linux servers: During the migration, all the filesystems available on your physical server are joined to one filesystem inside the Container - VZFS (Virtuozzo File System). Detailed information on VZFS is provided in the Virtuozzo File System subsection (p. 15).
Operations on Virtual Machines and Containers 62 Non-NTFS volumes cannot be migrated. After the physical server migration, the Quality of Service packet scheduler is disabled inside the Container irrespective of its state on the server before the migration began.
Operations on Virtual Machines and Containers 63 Migrating a Virtual Machine to a Container The process of migrating a virtual machine to a Container on the Parallels server is the same as migrating a physical computer to a Container. For example, you can execute the following command to move a virtual machine with the IP address of 192.168.1.130 to Container 101 on your Parallels server: # pmigrate h root:1qsde34rt@192.168.1.130 c 101 You can omit the virtual machine credentials in the command above.
Operations on Virtual Machines and Containers 64 Performing Container-Specific Operations This section provides the description of operations specific for your Containers. Setting Name for Container You can assign an arbitrary name to your Container and use it, along with the Container ID, to refer to the Container while performing this or that Container-related operation on the server. For example, you can start or stop a Container by specifying the Container name instead of its ID.
Operations on Virtual Machines and Containers 65 You can find out what name is assigned to Container 101 in one of the following ways: Using the vzlist utility: # vzlist -o name 101 NAME computer1 Checking the NAME parameter in (/etc/vz/conf/101.conf). For example: the Container configuration file # grep NAME /etc/vz/conf/101.conf NAME="computer1" Checking the NAME parameter in the /etc/vz/names/computer1 file which is a symlink to the Container configuration file.
Operations on Virtual Machines and Containers 66 Disabling Container There may appear situations when you wish to forbid Container owners to use their Containers. For example, it may happen in case the Container owner uses it for unallowed purposes: intruding into computers of other users, participating in DoS attacks, etc. In such cases, you can disable a Container, thus, making it impossible to start the Container once it was stopped.
Operations on Virtual Machines and Containers 67 Reinstalling Container Reinstalling a Container is used if a Container administrator has inadvertently modified, replaced, or deleted any file that is part of an application or OS template, which has brought about the Container malfunction.
Operations on Virtual Machines and Containers 68 Setup slm subgroup (default) Setting devperms 20002 dev 0x7d00 Adding port redirection to Container(1): 4643 8443 Adding IP address(es) to pool: Adding IP address(es): 10.14.14.101 Hostname for Container set: localhost.localdomain Container start in progress... # pctl exec 101 ls / bin boot dev [...other directories...] old [...other directories...
Operations on Virtual Machines and Containers 69 Customizing Container Reinstallation The default reinstallation, as performed by the pctl reinstall command, creates a new private area for the broken Container as if it were created by the pctl create command and copies the private area of the broken Container to the /old directory in the new private area so that no file is lost.
Operations on Virtual Machines and Containers 70 instead of exit 0 The 128 exit code tells the utility not to run the scripts and to reinstall the Container with the default behavior. Performing Virtual Machine-Specific Operations This section focused on operations specific for your virtual machines. Pausing a Virtual Machine Pausing a running virtual machine releases the resources, such as RAM and CPU, currently used by this virtual machine.
Operations on Virtual Machines and Containers 71 Managing Snapshots In Parallels Server Bare Metal, you can save the current state of a virtual machine by creating a snapshot. You can then continue working in your virtual machine and return to the saved state any time you wish. For example, you can make use of snapshots in the following cases: You are going to configure an application with a lot of settings.
Operations on Virtual Machines and Containers 72 Creating a Snapshot To create a snapshot of a virtual machine in Parallels Server Bare Metal, you can use the pctl snapshot command. For example, you can execute the following command to create a snapshot of the MyVM virtual machine: # pctl snapshot MyVM Creating the snapshot... The snapshot with ID {12w32198-3e30-936e-a0bbc104bd20} has been successfully created. A newly created snapshot is saved to the /vz/VM_Name.pvm/Snapshots/Snapshot_ID.
Operations on Virtual Machines and Containers 73 Listing Snapshots To list all snapshots of a particular virtual machine, use the pctl snapshot-list command: # pctl snapshot-list MyVM PARENT_SNAPSHOT_ID SNAPSHOT_ID {989f3415-3e30-4494-936e-a0bbc104bd20} {989f3415-3e30-4494-936e-a0bbc104bd20} *{063615fa-f2a0-4c14-92d4-4c935df15840} This command shows that currently two snapshots exist for the MyVM virtual machine.
Operations on Virtual Machines and Containers 74 Reverting to a Snapshot You can use the pctl snapshot-switch command to revert to a snapshot. When you revert to a snapshot, the current state of the virtual machine is discarded, and all changes made to the system since the previous snapshot are lost. So, before returning to a specific snapshot, you may first wish to save these states by creating a new snapshot. Refer to the Creating a Snapshot subsection (p. 72) for information on how you can do it.
Operations on Virtual Machines and Containers 75 Managing Templates A template in Parallels Server Bare Metal is a pre-configured virtual machine that can be easily and quickly deployed into a fully functional virtual machine. Like any normal virtual machine, a template contains hardware (virtual disks, peripheral devices) and the operating system. It can also have additional software installed.
Operations on Virtual Machines and Containers 76 Deploying a Template Though a template has the same components as a virtual machine (hardware, software, etc.), it cannot be started. To run a template as a virtual machine, you need first to convert the template. By converting a template, you create a virtual machine with the configuration identical to that of the template. To convert a template into a virtual machine, use the --ostemplate option of the pctl create command.
Operations on Virtual Machines and Containers 77 Changing the Disk Type A virtual disk can be one of the two types: plain. A plain virtual hard disk has a fixed size from the moment of its creation. expanding. An expanding virtual hard disk is small initially. Its size grows as you add applications and data to it. To change the type of a virtual disk in Parallels Server Bare Metal, you can use the pctl set command.
Operations on Virtual Machines and Containers 78 Reducing the Virtual Disk Capacity Parallels Server Bare Metal provides a possibility to reduce the size of an expanding virtual disk by setting the limit the disk cannot exceed. In general, the process of reducing a virtual disk includes these steps: 1 Finding out the minimum capacity to which the disk can be reduced. 2 Running the prl_dsk_tool resize command to reduce the disk.
Operations on Virtual Machines and Containers 79 The capacity of an expanding virtual disk shown from inside the virtual machine and the size the virtual disk occupies on the server's physical disk may differ. Compacting the Virtual Disk In Parallels Server Bare Metal, you can decrease the space your virtual machines occupy on the Parallels server's disk drive by compacting their virtual disks.
Operations on Virtual Machines and Containers 80 Adding a New Device This section provides information on adding new devices to your virtual machines. You can add new virtual devices to your virtual machine using the pctl set command. The options responsible for adding particular devices are listed in the following table: Option Name Description hdd Adds a new hard disk drive to the virtual machine. You can either connect an existing image to the virtual machine or create a new one.
Operations on Virtual Machines and Containers 81 If you want to use an existing image file as a virtual CD/DVD-ROM drive, keep in mind that Parallels Server Bare Metal supports .iso, .cue, .ccd and .dmg (non-compressed and non-encrypted) image files. A virtual machine can have only one floppy disk drive. A virtual machine can have up to 16 virtual network adapters. A virtual machine can have up to four serial ports. A virtual machine can have up to three parallel ports.
Operations on Virtual Machines and Containers 82 Initializing the Newly Added Disk After you added a new blank virtual hard disk to the virtual machine configuration, it will be invisible to the operating system installed inside the virtual machine until the moment you initialize it.
Operations on Virtual Machines and Containers 83 4 To get extensive information about the disk, enter: p 5 To create a new partition, enter: n 6 To create the primary partition, enter: p 7 Specify the partition number. By default, it is 1. 8 Specify the first cylinder. If you want to create a single partition on this hard disk, use the default value. 9 Specify the last cylinder. If you want to create a single partition on this hard disk, use the default value.
Operations on Virtual Machines and Containers 84 Configuring Virtual Devices In Parallels Server Bare Metal, you can use the --device-set option of the pctl set command to configure the parameters of an existing virtual device. As a rule, the process of configuring the device properties includes two steps: 1 Finding out the name of the device you want to configure. 2 Running the pctl set command to configure the necessary device properties.
Operations on Virtual Machines and Containers 85 Deleting a Device You can delete a virtual device that you do not need any more in your virtual machine using the --device-del option of the pctl set command. The options responsible for removing particular devices are listed in the following table: Option Name Description hdd Deletes the specified hard disk drive from the virtual machine. cdrom Deletes the specified CD/DVD-ROM drive from the virtual machine.
Operations on Virtual Machines and Containers 86 Deleting a Virtual Device Once you know the virtual device name, you can remove it from your virtual machine. For example, you can execute the following command to remove the virtual disk hdd1 from the MyVM virtual machine: # pctl set MyVM --device-del hdd1 Remove the hdd1 device. The VM has been successfully configured.
CHAPTER 4 Managing Resources The main goal of resource control in Parallels Server Bare Metal is to provide Service Level Management or Quality of Service for virtual machines and Containers. Correctly configured resource control settings prevent serious impacts resulting from the resource over-usage (accidental or malicious) of any virtual machine and Container on the other virtual machines and Containers.
Managing Resources 88 Managing Resources for Containers All resource management parameters for Containers can be divided into the disk, network, CPU, and system groups. The table below summarizes these groups: Group Description Parameter names Explained in Disk This group of parameters determines disk quota in Parallels Server Bare Metal. The disk quota is implemented on two levels: the per-Container level and the per-user/group level.
Managing Resources 89 Managing Container CPU Resources The current section explains the CPU resource parameters that you can configure and monitor for each Container. The table below provides the name and the description for the CPU parameters. The File column indicates whether the parameter is defined in the global configuration file (G) or in the Container configuration files (V).
Managing Resources 90 Managing CPU Share The Parallels Server Bare Metal CPU resource control utilities allow you to guarantee any Container the amount of CPU time this Container receives. The Container can consume more than the guaranteed value if there are no other Containers competing for the CPU and the cpulimit parameter is not defined. Note: The CPU time shares and limits are calculated on the basis of a one-second period.
Managing Resources 91 Configuring Number of CPUs Inside Container If your server has more than one physical processor installed, you can control the number of CPUs which will be used to handle the processes running inside separate Containers. By default, a Container is allowed to consume the CPU time of all processors on the server, i.e. any process inside any Container can be executed on any processor on the server.
Managing Resources 92 Managing Disk Quotas This section explains the basics of disk quotas, defines disk quota parameters, and describes how to perform the following disk quota related operations: turning on and off per-Container (first-level) disk quotas setting up first-level disk quota parameters for a Container turning on and off per-user and per-group (second-level) disk quotas inside a Container setting up second-level quotas for a user or for a group checking disk quota statistic
Managing Resources 93 Disk Quota Parameters The table below summarizes the disk quota parameters that you can control. The File column indicates whether the parameter is defined in the global configuration file (G), in the Container configuration files (V), or it is defined in the global configuration file but can be overridden in a separate Container configuration file (GV).
Managing Resources 94 Turning On and Off Per-Container Disk Quotas The parameter that defines whether to use first-level disk quotas is DISK_QUOTA in the global configuration file (/etc/vz/vz.conf). By setting it to “no”, you will disable disk quotas completely. This parameter can be specified in the Container configuration file (/etc/vz/conf/.conf) as well. In this case, its value will take precedence of the one specified in the global configuration file.
Managing Resources 95 Setting Up Per-Container Disk Quota Parameters Three parameters determine how much disk space and inodes a Container can use. These parameters are specified in the Container configuration file: DISKSPACE The total size of disk space that can be consumed by the Container, in 1-Kb blocks. When the space used by the Container hits the soft limit, the Container can allocate additional disk space up to the hard limit during the grace period specified by the QUOTATIME parameter.
Managing Resources 96 Turning On and Off Second-Level Quotas for a Container The parameter that controls the second-level disk quotas is QUOTAUGIDLIMIT in the Container configuration file. By default, the value of this parameter is zero and this corresponds to disabled per-user and per-group quotas. If you assign a non-zero value to the QUOTAUGIDLIMIT parameter, this action brings about the two following results: 1 Second-level (per-user and per-group) disk quotas are enabled for the given Container.
Managing Resources 97 Setting Up Second-Level Disk Quota Parameters Parallels Server Bare Metal provides the standard Linux quota package for working inside Containers: # pctl exec 101 rpm -q quota quota-4.03-1.1.parallels This command shows that the quota package installed in the Container is built and shipped by Parallels. Use the utilities from this package (as is prescribed in your Linux manual) to set second-level quotas for the given Container.
Managing Resources 98 Checking Quota Status As the server administrator, you can check the quota status for any Container with the vzquota stat and vzquota show commands. The first command reports the status from the kernel and shall be used for running Containers. The second command reports the status from the quota file (located at /var/vzquota/quota.) and shall be used for stopped Containers. Both commands have the same output format.
Managing Resources 99 Cleaning Up Containers The first-level quota assigned to this or that Container essentially shows how much space may be occupied by the Container private files, i.e. not by the OS or common applications files. The real OS and application files reside in the /vz/template directory on the server and practically do not add up to the Container quota (except for the symlinks to them located inside the Container and occupying insignificant space).
Managing Resources 100 Moving Container Files to the Cache Area We will illustrate the effect produced by vzcache by copying one and the same huge dummy file into two Containers.
Managing Resources 101 As you can see, both the server and the Containers have each gained more than 600 MB of disk space. In real life, the disk space is gained by caching not one huge file in two Containers but a number of identical files across many Containers. The operation of the vzcache utility may be customized to a certain extent by using vzcache command line switches (see the Parallels Command Line Reference Guide for details).
Managing Resources 102 Managing Network Accounting and Bandwidth This section explains how to perform the following tasks: setting up network classes viewing network traffic statistics turning on and off network bandwidth management setting up the bandwidth limit for a Container Note: In the current version of Parallels Server Bare Metal, you can manage network accounting and bandwidth for Containers only.
Managing Resources 103 Configuring Network Classes Parallels Server Bare Metal allows you to track the inbound and outbound network traffic as well as to shape the outgoing traffic for a Container. To provide the ability to distinguish between domestic and international traffic, a concept of network classes is introduced. It is important to fully understand this notion, because network classes IDs are used in the values of some network traffic parameters.
Managing Resources 104 Viewing Network Traffic Statistics Parallels Server Bare Metal allows you to view the current network traffic statistics with the help of the vznetstat command. The session below shows the traffic statistics for Container 101: # vznetstat -v 101 CTID Net.Class Input(bytes) Input(pkts) 101 1 2202448 19527 101 2 0 0 Output(bytes) Output(pkts) 9081832 19584 0 0 In this case, around 2 MB of data were uploaded to the Container and about 9 MB were downloaded from it.
Managing Resources 105 Turning On and Off Network Bandwidth Management Traffic shaping also known as network bandwidth management allows you to control what network bandwidth a Container receives for outgoing traffic. Traffic shaping is off by default in Parallels Server Bare Metal and is controlled by the TRAFFIC_SHAPING variable in the /etc/vz/vz.conf global configuration file. Note: Container incoming traffic cannot be controlled in Parallels Server Bare Metal.
Managing Resources 106 Now you have activated the network bandwidth limits. To turn traffic shaping off temporarily, use the /etc/init.d/vz shaperoff command. If you want to disable bandwidth management permanently, set the TRAFFIC_SHAPING variable to no in the /etc/vz/vz.conf configuration file.
Managing Resources 107 Configuring Network Bandwidth Management for Container The network bandwidth for outgoing traffic a Container receives is controlled by two variables in the Container configuration file (/etc/vz/conf/.conf): RATE and RATEBOUND. Note: Container incoming traffic cannot be controlled in the current version of Parallels Server Bare Metal. The RATE variable has the same format as TOTALRATE ::.
Managing Resources 108 With the default TOTALRATE of 4096 Kb/s, bandwidth pool will be distributed according to the following table: Container 101 Container 102 Container 103 Bandwidth consumed by Containers transmits idle idle Container101: 4096 Kb/s idle idle transmits Container103: 64 Kb/s transmits transmits idle Container101: 2048 Kb/s Container102: 2048 Kb/s transmits idle transmits Container101: 4032 Kb/s Container103: 64 Kb/s transmits transmits transmits Container101: 2016
Managing Resources 109 Overview Service Level Management (SLM) is a special system allowing you to configure and control the service levels provided to Container users. SLM can be used to manage the Container memory resources, i.e. to adjust the amount of memory that any Container on the server is allowed to consume.
Managing Resources 110 Computing Memory Usage in SLM As the server administrator, you may often need to properly set the amount of memory this or that Container will be allowed to consume. Therefore, you should have a clear idea of the memory computation mechanism used in the SLM scheme. On the whole, the memory usage inside every particular Container for which the SLM functionality is enabled is calculated in the same way as it would be done on a standalone server.
Managing Resources 111 Controlling Memory Usage by Container SLM has a number of means at its disposal allowing you to effectively control and configure the memory usage on the server and inside its Containers. These means include: a Using the free command to check the memory limit set for a Container and the current memory consumption inside this Container. If the SLM functionality is disabled, running this command inside your Containers will display the total and used memory on the server.
Managing Resources 112 SLM Modes SLM is automatically enabled during the Parallels Server Bare Metal installation on the server, i.e. you do not have to perform any additional operations to start using this functionality on your server. After the installation, you can manage SLM in one of the following ways: Disable SLM on a global basis. In this case no Container on the server will be able to make use of this functionality.
Managing Resources 113 Managing Container Memory Usage The SLM mechanism allows you to manage the amount of memory a Container can consume by configuring a single parameter - slmmemorylimit. This significantly simplifies the process of memory management on the server and inside its Containers and represents the main SLM advantage over the old memory management mechanism (implemented on the basis of multiple UBC parameters).
Managing Resources 114 Grouping Applications Inside Container SLM provides a mechanism of classifying available applications (or processes representing instances of these running applications) inside a Container, uniting them into certain groups, and ensuring a sort of isolation among these groups.
Managing Resources 115 process if it is a daemon. 0x0002 |_0_|_0_|_0_|_0_|_0_|_0_|_1_|_0 _| This bit, if set to 1, indicates that the rule is to be applied to the process if it is not a daemon. 0x0004 |_0_|_0_|_0_|_0_|_0_|_1_|_0_|_0 _| This bit, if set to 1, indicates that the rule is to be applied to the process during its forking (i.e. on the fork() call).
Managing Resources 2 116 execution irrespective of the group it originally belongs to. #4 "lighthttpd" 0000001c -1 If the process has the name of lighthttpd, 2 move it to group 2 during the process forking and execution irrespective of the group it originally belongs to. #5 "mysqld" 3 0000001c -1 If the process has the name of mysqld, move it to group 3 during the process forking and execution irrespective of the group it originally belongs to.
Managing Resources 117 During its life cycle, any process running inside the Container is checked against the available rules in the /etc/vzslm.d/default.conf file from top to bottom and the first matching rule is applied to it. So, if the following 2 rules are present in the default.conf file "httpd" "httpd" 0000001c 00000016 -1 -1 2 1 the first rule ("httpd" 0000001c all Containers on the server.
Managing Resources 118 Managing Container Resources Configuration Any Container is configured by means of its own configuration file. You can manage your Container configurations in a number of ways: 1 Using configuration sample files shipped with Parallels Server Bare Metal. These files are used when a new Container is being created (for details, see the Creating and Configuring New Container section).
Managing Resources 119 Splitting server Into Equal Pieces It is possible to create a Container configuration roughly representing a given fraction of the server. If you want to create such a configuration that up to 20 fully loaded Containers would be able to be simultaneously running on the given server, you can do it as follows: # cd /etc/vz/conf # vzsplit -n 20 -f mytest Config /etc/vz/conf/ve-mytest.conf-sample was created Notice that the configuration produced depends on the given server resources.
Managing Resources 120 Scaling Container Configuration Any configuration or configuration sample file can prove insufficient for your needs. You might have an application which does not fit into existing configurations. The easiest way of producing a Container configuration is to scale an existing one. Scaling produces a “heavier” or “lighter” configuration in comparison with an existing one. All the parameters of the existing configuration are multiplied by a given number.
Managing Resources 121 Validating Container Configuration The system resource control parameters have complex interdependencies. The violation of these interdependencies can be catastrophic for the Container. In order to ensure that a Container does not break them, it is important to validate the Container configuration file before creating Containers on its basis. The typical validation scenario is shown below: # vzcfgvalidate /etc/vz/conf/101.conf Error: kmemsize.
Managing Resources 122 Applying New Configuration Sample to Container Parallels Server Bare Metal allows you to change the configuration sample file a Container is based on and, thus, to modify all the resources the Container may consume and/or allocate at once. For example, if Container 101 is currently based on the basic configuration sample and you are planning to run the Plesk application inside the Container, you may wish to apply the slm.
Managing Resources 123 Managing Virtual Machine Resources Parallels Server Bare Metal allows you to manage the following resources of your virtual machines: main memory number of CPUs video memory The procedure of managing these resources is described below in this section. Configuring Main Memory To configure the amount of memory that will be available to the virtual machine, use the -memsize option of the pctl set command.
Managing Resources 124 Configuring Video Memory To set the amount of video memory to be available to the virtual machine's video card, use the -videosize option of the pctl set command. Assuming that the current video memory size of the MyVM virtual machine is set to 32 MB, you can increase it to 64 MB by running the following command: # pctl set MyVM --videosize 64 Set the --videosize parameter to 64Mb. The VM has been successfully configured.
CHAPTER 5 Managing Services and Processes This chapter provides information on what services and processes are, the influence they have on the operation and performance of your system, and the tasks they perform in the system. You will learn how to use the command line utilities in order to manage services and processes in Parallels Server Bare Metal.
Managing Services and Processes 126 What Are Services and Processes Instances of any programs currently running in the system are referred to as processes. A process can be regarded as the virtual address space and the control information necessary for the execution of a program. A typical example of a process is the vi application running on your server or inside your Linux-based Containers.
Managing Services and Processes 127 Main Operations on Services and Processes The ability to monitor and control processes and services in your system is essential because of the profound influence they have on the operation and performance of your whole system. The more you know about what each process or service is up to, the easier it will be to pinpoint and solve problems when they creep in.
Managing Services and Processes 128 Managing Processes and Services In Parallels Server Bare Metal, services and processes can be managed using the following Parallels command line utilities: vzps vzpid vztop vzsetxinetd.
Managing Services and Processes 129 Viewing Active Processes and Services The vzps utility provides certain additional functionality related to monitoring separate Containers running on the Parallels server. For example, you can use the -E switch with the vzps utility to: display the Container IDs where the processes are running view the processes running inside a particular Container vzps prints the information about active processes on your Parallels server.
Managing Services and Processes 130 You will notice a question mark in most of the TTY fields in the vzps aux output. This is because most of these programs were started at boot time and/or by initialization scripts. The controlling terminal does not exist for these processes; thus, the question mark. On the other hand, the bash command has a TTY value of pts/4. This is a command being run from a remote connection and has a terminal associated with it.
Managing Services and Processes 131 Monitoring Processes in Real Time The vztop utility is rather similar to vzps but is usually started full-screen and updates continuously with process information. This can help with programs that may infrequently cause problems and can be hard to see with vzps. Overall system information is also presented, which makes a nice place to start looking for problems. The vztop utility can be run on the server just as the standard Linux top utility.
Managing Services and Processes 132 Changing Services Mode xinetd is a service used to start and stop a variety of data communication services. xinetd starts on the Parallels server startup and waits for a connection request from a remote client that wants to connect to the server. There can be a number of remote clients in the network, and each of them can use different network protocols to establish connection to the server.
Managing Services and Processes 133 2. In the current version of Parallels Server Bare Metal, you cannot use the vzsetxinetd utility for managing services in virtual machines. Determining Container Identifier by Process ID Each process is identified by a unique PID (process identifier), which is the entry of that process in the kernel's process table. For example, when you start Apache, it is assigned a process ID. This PID is then used to monitor and control this program.
CHAPTER 6 Managing Parallels Server Bare Metal Network The given chapter familiarizes you with the Parallels Server Bare Metal network structure, enumerates Parallels networking components, and explains how to manage these components in your working environments. In particular, it provides the following information: How you can manage network adapters on the Parallels server. What Virtual Networks are and how you can manage them on the Parallels server.
Managing Parallels Server Bare Metal Network 135 Listing Adapters You can view the physical, virtual, and VLAN network adapters existing on your Parallels server using the vznetcfg utility. For example, you can execute the following command to list the available adapters: # vznetcfg if list Name Type eth0 nic br2 bridge br1 bridge br0 bridge vnic1 vnic vnic0 vnic Network ID Bridged Bridged Host-Only Shared Host-Only Shared Addresses 10.30.18.41/16,dhcp 10.37.131.2/24 10.37.130.
Managing Parallels Server Bare Metal Network 136 Creating VLAN Adapter Parallels Server Bare Metal allows you to create new VLAN adapters on the Parallels server. You can use these adapters later on to connect your virtual machines and Containers to any of the available Virtual Networks (for more information on Virtual Networks, turn to Managing Virtual Networks (p. 138). VLAN adapters can be made using the vznetcfg vlan add command.
Managing Parallels Server Bare Metal Network 137 Connecting an Adapter to a Virtual Network Connecting an adapter on the physical server to a Virtual Network allows you to join all virtual machines and Containers included in the Virtual Network to the network where the corresponding adapter is connected. Let us assume the following: The eth1 physical adapter and the vznetwork1 Virtual Network exist on the Parallels server.
Managing Parallels Server Bare Metal Network 138 Managing Virtual Networks A Virtual Network acts as a binding interface between a virtual network adapter inside a virtual machine and Container and the corresponding network adapter on the Parallels server, which allows you to include your virtual machines and Containers in different networks. In Parallels Server Bare Metal, you can manage Virtual Networks as follows: Create a new Virtual Network and remove an existing one.
Managing Parallels Server Bare Metal Network 139 Creating a Virtual Network Virtual Networks serve as binding interfaces between the virtual network adapters inside virtual machines and Containers and the physical, VLAN, and virtual network adapters on the Parallels server. Using Virtual Networks, you can connect your virtual machines and Containers to different networks. By default, Parallels Server Bare Metal creates the following Virtual Networks: Bridged.
Managing Parallels Server Bare Metal Network br0 vnic1 vnic0 vnic2 bridge vnic vnic vnic Shared Host-Only Shared vznetwork1 140 10.37.131.2/24 10.37.130.2/24 10.37.132.2/24 The bridges existing on the Parallels server are listed in the Name column and can be easily identified by the br prefix. For example, you can see that the br3 bridge is currently associated with the vznetwork1 Virtual Network.
Managing Parallels Server Bare Metal Network 141 Listing Virtual Networks Sometimes, you may wish to list the Virtual Networks existing on the Parallels server. To do this, you can use either the vznetcfg or prlsrvctl utility.
Managing Parallels Server Bare Metal Network Network ID The name assigned to the Virtual Network. Type The networking mode set for the Virtual Network. Bound To The adapter on the Parallels server connected to the Virtual Networks, if any. 142 Deleting a Virtual Network At any time, you can remove a Virtual Network that you do not need any more from the physical server. To do this, you can use both the vznetcfg and prlsrvctl utilities.
Managing Parallels Server Bare Metal Network Container Networking Modes In Parallels Server Bare Metal, any Container can operate in one of the two operating modes: venet0 mode veth mode Detailed information on these operating modes is provided in the following subsections.
Managing Parallels Server Bare Metal Network 144 venet0 Mode By default, all the Containers on the server are operating in the venet0 mode, which means that they are connected among themselves and with the server using a virtual network adapter called venet0.
Managing Parallels Server Bare Metal Network 145 The venet0 adapter is also used to exchange the traffic among all the Containers hosted on the given server. All the network traffic of a Container is isolated from that of the other Containers, i.e. all Containers are protected from each other in the way that makes traffic snooping impossible.
Managing Parallels Server Bare Metal Network 146 veth Mode You can also create special veth virtual adapters inside your Containers and make the Containers operate in the veth mode. The following figure represents an example of the network structure where all Containers (Container#1 and Container#2) are operating in the veth mode: Figure 2: Networking - veth Mode In the veth mode, a separate veth virtual adapter is created for each Container on the server.
Managing Parallels Server Bare Metal Network 147 Both interfaces are closely linked to each other, which means that an IP packet entering one interface will always come out from the other one. Differences Between venet0 and veth Modes The veth mode demonstrates the following differences as compared to the venet0 mode: Each of the Ethernet interfaces constituting a veth virtual adapter has a MAC address assigned to it while venet0 does not have any.
Managing Parallels Server Bare Metal Network 148 Creating and Deleting veth Network Adapters By default, any Container on the Parallels server starts functioning in the venet0 mode right after its creation. However, at any time you can create additional virtual adapters for your Container and set them to work in the veth mode. This can be done by using the -netif_add option of the pctl set command.
Managing Parallels Server Bare Metal Network 149 Configuring veth Adapter Parameters While functioning in the veth mode, each Container virtual network adapter appears as a full participant on the network to which it is connected and needs to have its own identity on this network. Fist of all, to start functioning on a TCP/IP network, a veth virtual adapter should be assigned one or several IP addresses.
Managing Parallels Server Bare Metal Network 150 Connecting Containers to Virtual Networks With the implementation of veth virtual adapters allowing Containers to function as full participants on the network, it has become possible to include Containers in a wide range of network configurations the most common of which are Ethernet networks and VLANs (virtual local area networks).
Managing Parallels Server Bare Metal Network 151 Saved parameters for Container 102 After completing these tasks, Container 101 and Container 102 will be able to access any of the servers in the network where the eth0 physical adapter is connected.
Managing Parallels Server Bare Metal Network 152 Creating and Deleting Virtual Adapters A virtual machine can have up to 16 virtual network adapters. Each adapter can be connected to a different network. Let us assume that you wish to create a new virtual adapter for the MyVM virtual machine. To do this, you can execute the following command : # pctl set MyVM --device-add net Creating net1 (+) type=shared iface='default' mac=XXXXXXXXXXX The VM has been successfully configured.
Managing Parallels Server Bare Metal Network 153 Configuring Virtual Adapter Parameters Parallels Server Bare Metal allows you to configure the following parameters of virtual machine adapters: Configuring the MAC Address If you need for some reason to regenerate the current MAC address of a network adapter, you can use the following command: # pctl set MyVM --device-set net1 --mac 00:1C:42:2D:74:00 Creating net1 (+) network=Bridged mac=001C422D7400 The VM has been successfully configured.
Managing Parallels Server Bare Metal Network 154 Connecting Virtual Machines to Virtual Networks In Parallels Server Bare Metal, you can connect your virtual machines to Virtual Networks of the following types: Bridged networks. This type of Virtual Networks allows the virtual machine to use one of the physical server's network adapters, which makes it appear as a separate computer on the network the corresponding adapter belongs to. Shared networks.
CHAPTER 7 Managing Licenses The given chapter provides information on managing Parallels Server Bare Metal licenses. In particular, you will know how to view the current license status, to install a new license on your server or to update an existing one, to transfer the license from one server to another, etc. In This Chapter Installing the License ............................................................................................................ 156 Updating the Current License ...........
Managing Licenses 156 Installing the License Depending on the way you have obtained your Parallels Server Bare Metal license, it can be installed on the Parallels server as follows: If you have obtained the license in the form of a product key, you can install it on the server using the -p option of the vzlicload command.
Managing Licenses 157 Updating the Current License In Parallels Server Bare Metal, you can use the vzlicupdate utility to update the license currently installed on the Parallels server. When executed, the utility tries to connect to the Parallels Key Authentication (KA) server and to retrieve a new license and install it on the server. To update your license, do the following: 1 Make sure that the Parallels server where you wish to update the license is connected to the Internet.
Managing Licenses 158 2. Make sure that the destination server is up and connected to the Internet. 3. Log in to the destination server (e.g. via ssh). 4. Execute the following command on the destination server: # vzlicupdate -t -a XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX When executed, vzlicupdate sends the activation code to the Parallels KA server, thus informing the server of its intention to transfer the license to a new Parallels server.
Managing Licenses 159 Viewing the License In Parallels Server Bare Metal, you can use the vzlicview utility to view the information on the installed license and find out its current status. When executed, this utility processes the license currently installed on the Parallels server and prints the license contents along with its status. A sample output of vzlicview is given below: # vzlicview Show installed licenses VZSRV status="ACTIVE" version=4.
Managing Licenses product 160 The product name for which the license has been issued.
CHAPTER 8 Keeping Your System Up To Date This chapter explains the ways to keep your Parallels server up to date. The components you need to take care of are the following: Parallels Server Bare Metal software virtual machines and Containers created on the Parallels server In This Chapter Updating Parallels Server Bare Metal Software ................................................................... 162 Updating Software In Virtual Machines ....................................................
Keeping Your System Up To Date 162 Updating Parallels Server Bare Metal Software Parallels Server Bare Metal is constantly developing: there appear new versions of the Parallels Server Bare Metal core and of existing utilities, OS and application templates are perfected, new templates and utilities are also added from time to time. Thus, Parallels Server Bare Metal may sometimes be repackaged to include the latest changes in any of its parts.
Keeping Your System Up To Date 163 Updating in Graphical Mode In the graphical mode, the vzup2date utility can be launched in two submodes. If invoked without any parameters or with the -s switch, it is supposed to check and, if necessary, download and install Parallels Server Bare Metal system files. On the other hand, specifying the -z option when invoking the utility tells it to perform the same operations for OS and application EZ templates.
Keeping Your System Up To Date 164 Once you press Next in the Welcome window, the utility will try to connect to the specified repository (either the Parallels default repository or your own one) and, if the connection is successful, display the next screen, which will vary depending on the mode of the vzup2date invocation. First, we will describe the mode of updating Parallels Server Bare Metal system files and then proceed with updating your EZ templates.
Keeping Your System Up To Date 165 Updating System Files After the vzup2date utility has checked the repository and found any updates, you are presented the following window: This window displays the list of updates that can be installed on your Parallels server. If you want to update to the latest Parallels Server Bare Metal core and utilities versions, just press Next on this screen, and the vzup2date utility will download and install them asking your confirmation before each action.
Keeping Your System Up To Date 166 Notice that the bottommost update includes the functionality of all the other updates. You can select any of the intermediary updates and press Select to go back to the List of Selected Updates screen and read the information on this update. You will be able to perform customization more than once until you finally decide on the set of updates to be applied and press Next. Downloading and installing the necessary updates is straightforward.
Keeping Your System Up To Date 167 Updating EZ Templates Updating EZ templates consists in updating one or more EZ templates configuration files located in the /vz/template////config directory on the Parallels server and takes place if you have launched the vzup2date utility with the -z option. The first few steps of the wizard were described in the Updating in Graphical Mode subsection (p. 163). As soon as you press Next in the Welcome...
Keeping Your System Up To Date 168 After choosing the right EZ templates, click the Select button to close the displayed window, and then click Next to proceed with the wizard. Note: New application EZ templates for a Linux distribution can be installed on the Parallels server only if the corresponding OS EZ template is already installed on this server.
Keeping Your System Up To Date 169 In this window, you can view the templates/template updates ready to be installed on your server. If you are installing a new OS EZ template/OS EZ template update, you can select the Run vzpkg cache after installation option and specify whether to cache the corresponding OS EZ template/template update right after its installation on the server or to do it at a later time. By default, all OS EZ templates are just installed on the Parallels without being cached.
Keeping Your System Up To Date 170 Updating in Command Line Mode Another way of updating your Parallels Server Bare Metal system files and templates is to run the vzup2date utility in the command line mode and to pass the corresponding commands, switches, and options to it. While executing vzup2date in the command line mode, you can choose between the batch and messages submodes.
Keeping Your System Up To Date 171 Updating Software In Virtual Machines To keep software in your virtual machines up to date, you can use the same means you would use on standalone computers running the corresponding operating systems: In Linux-based virtual machines, you can use the native Linux updaters (up2date, yum, or yast). In Windows-based virtual machines, you can use the native Windows updaters (e.g. the Windows Update tool).
Keeping Your System Up To Date 172 Updating EZ Template Packages Inside a Container Parallels Server Bare Metal allows you to update packages of the OS EZ template a Container is based on and of any application EZ templates applied to the Container. You can do it by using the vzpkg update utility. Assuming that Container 101 is based on the redhat-el5-x86 OS EZ template, you can issue the following command to update all packages included in this template: # vzpkg update 101 redhat-el5-x86 ...
Keeping Your System Up To Date 173 Updating OS EZ Template Caches With the release of new updates for the corresponding Linux distribution, the created OS EZ template cache can become obsolete. Parallels Server Bare Metal allows you to quickly update your OS EZ template caches using the vzpkg update cache command. Note: If you are going to update the cache of a commercial OS EZ template (e.g.
CHAPTER 9 Advanced Tasks This chapter describes those tasks that are intended for advanced system administrators who would like to obtain deeper knowledge about Parallels Containers capabilities. In This Chapter Configuring Capabilities ....................................................................................................... 174 Creating Customized Containers...........................................................................................
Advanced Tasks 175 Creating VZFS Symlinks Inside a Container Normally it is impossible to create a VZFS symlink from a Container. The ability to create VZFS symlinks presents a serious security concern explained further in this subsection. However, there may be a situation when you need such an ability, for example, for testing created templates or creating VZFS mounts. A VZFS symlink is a symbolic link starting with four slashes.
Advanced Tasks [root@ct101 root]# ls -l total 3 -rwxrwxrwx 1 root root -rwxrwxrwx 1 root root 176 1252 Oct 29 23:56 passwd 823 Oct 29 23:56 shadow While there is no easy way to substitute the password files on the server, a malicious Container administrator could run a dictionary attack against the obtained files. Available Capabilities for Container This section lists all the capabilities that can be set with the command.
Advanced Tasks Linux-Specific Capabilities Name Description Default setpcap Transfer any capability in your permitted set to any process ID; remove any capability in your permitted set from any process ID. off linux_immutable Allows the modification of the S_IMMUTABLE and S_APPEND file attributes. These attributes are implemented only for the EXT2FS and EXT3FS Linux file systems and, as such, this capability has no effect for Containers running on top of VZFS.
Advanced Tasks 178 Creating Customized Containers If you wish to run one or several customized applications inside your Containers and the number of such Containers is relatively large, you may think of a way to automate the process of creating Containers that already have a number of applications installed and tuned to meet your demands. So, you do not need to manually install and customize your applications every time you create a new Container.
Advanced Tasks 179 Using Customized OS EZ Template Let us first start with making a customized base OS EZ template which can then be used to create Containers with a set of application already tuned to meet your demands. To make such a template, you should perform the following operations: 1 Create a metafile that will serve as the basis for your customized base OS EZ template. Notes: 1.
Advanced Tasks 180 --post-install /root/rhel4/post_install.bash This command will create an OS EZ template for RHEL 4 and put it to the /root directory (e.g. /root/redhat_customized-as4-x86-ez-4.0.01.swsoft.noarch.rpm). 5 Install the resulting OS EZ template on the server: # rpm -i /root/redhat_customized-as4-x86-ez-4.0.0-1.swsoft.noarch.rpm 6 Cache the installed OS EZ template: # vzpkg create cache redhat_customized-as-x86 ... Complete! Packing cache file redhat_customized-as4-x86.tar.gz ...
Advanced Tasks 181 Using EZ OS Template Set Another way of creating customized Containers is to make a non-base OS EZ template (also known as an OS EZ template set) differing from the corresponding base OS EZ template in the number of packages included in this template.
Advanced Tasks 182 Note: You can also specify a number of additional parameters in your metafile. For example, you may wish to add one or several extra packages to your OS EZ template set which are not available in the repository used to handle the packages for the corresponding base OS EZ template. For this purpose, you will have to specify the %mirrorlist parameter providing information on the repository where these extra packages are kept.
Advanced Tasks 183 Using Customized Application Template If the number of customized applications inside your Containers is relatively small, you can also use the following way of creating customized Containers: 1 Create a metafile that will serve as the basis for your customized application EZ template. Note: Detailed information on how to create metafile is given in the Creating Metafile for EZ Template subsection of the Parallels Server 4 Bare Metal Templates Management Guide.
Advanced Tasks 184 7 Create Container 101 by using the pctl create command and the mysql sample file: # pctl create 101 --ostemplate redhat-as4-x86 -–config mysql Creating Container private area (redhat-as4-x86) Container is mounted Postcreate action done Container is unmounted Container private area was created Delete port redirection Adding port redirection to Container(1): 4643 8443 So, you have just created Container 101 having the customized mysql application installed inside it.
Advanced Tasks 185 Changing System Time From Container Normally it is impossible to change the system time from a Container. Otherwise, different Containers could interfere with each other and could even break applications depending on the system time accuracy. Normally only the server system administrator can change the system time.
Advanced Tasks 186 Obtaining Server ID From Inside a Container The default Parallels Server Bare Metal installation does not allow users inside a Container to obtain any information specific to the Parallels server the Container is running on. The reason is that no Container shall have knowledge about the corresponding server.
Advanced Tasks 187 Managing Server Resources Parameters Parallels Server Bare Metal allows you to configure a number of resource management parameters defining the amount of resources to be allocated to the Parallels server. These parameters include all standard UBC parameters (VMGUARPAGES, KMEMSIZE, OOMGUARPAGES, etc.) as well as the ONBOOT parameter. You can edit any of these parameters in the /etc/vz/conf/0.
Advanced Tasks 188 Setting Immutable and Append Flags for Container Files and Directories You can use standard Linux utilities - chattr and lsattr - to set extra flags for files and directories inside your Containers and to query their status, respectively. Currently, two of these extra flags - 'append' and 'immutable' - are supported.
Advanced Tasks 189 Customizing /proc/meminfo Output Inside Container The /proc/meminfo virtual file allows you to view the information about memory usage (both physical and swap) on the system. In the current version of Parallels Server Bare Metal, you can customize the output of this file inside a particular Container and set it to one of the following modes: Non-virtualized.
Advanced Tasks 190 200 denotes the number of pages to be shown in the /proc/meminfo output. In our case the /proc/meminfo output inside Container 101 may look like the following: # pctl exec 101 cat /proc/meminfo MemTotal: 8000 kB MemFree: 5140 kB LowTotal: 8000 kB LowFree: 5140 kB Buffers: 0 kB Cached: 0 kB SwapCached: 0 kB HighTotal: 0 kB HighFree: 0 kB ...
Advanced Tasks 191 Note: If the value specified after the --meminfo option exceeds the total amount of memory available on the Parallels server, the cat /proc/meminfo command executed inside a Container will display the information about the total physical memory on this server. The --save flag in the commands above saves all the parameters to the Container configuration file.
Advanced Tasks 192 Loading iptables Modules to Particular Containers The list of iptables modules that are loaded to a Container by default is determined by the iptables modules loaded on the server at the moment of the Container startup. For example, if your server has the ipt_REJECT, ipt_tos, ipt_limit, ipt_multiport, and iptable_filter modules loaded, any Containers on this server will also have these iptables modules loaded after their startup.
Advanced Tasks 193 Creating Configuration Files for New Linux Distributions Distribution configuration files are used to distinguish among Containers running different Linux versions and to determine what scripts should be executed when performing the relevant Container-related operations (e.g. assigning a new IP address to the Container).
CHAPTER 10 Troubleshooting This chapter provides the information about those problems that may occur during your work with Parallels Server Bare Metal and suggests the ways to solve them, including getting technical support from Parallels. In This Chapter General Considerations ......................................................................................................... 195 Kernel Troubleshooting .............................................................................................
Troubleshooting 195 General Considerations The general issues to take into consideration when troubleshooting your system are listed below. You should read them carefully before trying to solve more specific problems. Make sure a valid license is always loaded on the server. If your license has expired and the grace period is over, all the virtual machines and Containers on your server will be stopped. You should always remember where you are currently located in your terminal.
Troubleshooting 196 Nmap run completed -- 1 IP address (1 host up) scanned in 169 seconds to check if any ports are open that should normally be closed. That could however be a problem to remove a rootkit from a Container and make sure it is 100% removed. If you're not sure, create a new Container for that customer and migrate his/her sites and mail there. Check the /var/log/ directory on the server to find out what is happening on the system.
Troubleshooting 197 Kernel Troubleshooting Using ALT+SYSRQ Keyboard Sequences Press ALT+SYSRQ+H (3 keys simultaneously) and check what is printed at the server console, for example: SysRq: unRaw Boot Sync Unmount showPc showTasks showMem loglevel0-8 tErm kIll killalL Calls Oops This output shows you what ALT+SYSRQ sequences you may use for performing this or that command. The capital letters in the command names identify the sequence.
Troubleshooting 198 Saving Kernel Fault (OOPS) You can use the following command to check for the kernel messages that should be reported to Parallels Server Bare Metal developers: grep -E "Call Trace|Code" /var/log/messages* Then, you should find kernel-related lines in the corresponding log file and figure out what kernel was booted when the oops occurred. Search backward for the "Linux" string, look for strings like that: Sep 26 11:41:12 kernel: Linux version 2.6.18-8.1.1.el5.028stab043.
Troubleshooting 199 Aug 25 08:27:46 boar Aug 25 08:27:46 boar [] scsi_io_completion+0x149/0x2f3 [scsi_mod] Aug 25 08:27:46 boar [] sd_rw_intr+0x1f1/0x21b [sd_mod] Aug 25 08:27:46 boar [] scsi_finish_command+0x73/0x77 [scsi_mod] Aug 25 08:27:46 boar [<024cbfa2>] blk_done_softirq+0x4d/0x58 Aug 25 08:27:46 boar [<02426452>] __do_softirq+0x84/0x109 Aug 25 08:27:46 boar [<0242650d>] do_softirq+0x36/0x3a Aug 25 08:27:46 boar [<024050b7>] do_IRQ+0xad/0xb6 Aug 25 08:27:46 boar [<0240
Troubleshooting 200 Failure to Create a Container An attempt to create a new Container fails. There is a message on the system console: Cached package set XXX version YYY not found. Solution 1 The necessary OS template might be absent from the server. Copy the template to the server, install it, cache it, and try to create a Container once again. Solution 2 The Container private area might not be pre-cached. In this case the vzpkgcache utility shall be used.
Troubleshooting 201 Failure to Start a Container An attempt to start a Container fails. Solution 1 If there is a message on the system console: parameters missing, and the list of missed parameters follows the message, set these parameters using the pctl set --save command (see Performing Initial Configuration (p. 30) for instructions). Try to start the Container once again. Solution 2 If there is a message on the system console: IP address is already used, issue the cat /proc/vz/veinfo command.
Troubleshooting 202 Solution 7 Restore the latest operable copy of the Container by means of the vzrestore utility (see the Managing virtual machine and Container Backups section (p. 40) for details). Failure to Access Container From Network Solution 1 The IP address assigned to this Container might be already in use in your network. Make sure it is not. The problem Container address can be checked by issuing the following command: # grep IP_ADDRESS /etc/vz/conf/.conf IP_ADDRESS="10.0.186.
Troubleshooting 203 Getting Technical Support Preparing and Sending Questions to Technical Support In most cases, the support team must rely on the customer's observations and communications with the customer to diagnose and solve the problem. Therefore, the detailed problem report is extremely important. You can submit a support report by visiting the http://www.parallels.com/en/support/virtuozzo/request/ web page and filling in the Online Support Form.
Troubleshooting 204 Submitting Problem Report to Technical Support Parallels Server Bare Metal is shipped with a special utility - vzreport - allowing you to compile a detailed report if you have any problems and to automatically send it to the Parallels support team. After receiving your report, the support team will closely examine your problem and make its best to solve it as quickly as possible. vzreport has two modes of execution — full screen and command line.
Troubleshooting 205 After the utility has gathered all the necessary information on your server, the Submit report window is displayed: In this window you can do one of the following: Click the Submit button to send your problem report to the Parallels technical support team. The report is dispatched directly to Parallels by using the HTTP protocol and port 80.
Troubleshooting 206 Establishing Secure Channel to Parallels Support Parallels Server Bare Metal provides you with a special tool - Support Tunnel - which allows you to establish a private secure channel to the Parallels support team server. After establishing such a channel, the support team will be able to quickly and securely connect to your Parallels server and diagnose and solve your problem.
Troubleshooting 207 Notes: 1. Support Tunnel is implemented as a standard Linux service running in the background of your system. Therefore, to have this service running after your server reboot, you should set it to the autoboot mode or start it manually again by executing the /etc/init.d/vzvpn start command. 2. To close the VPN session with the Parallels support server, you should issue the /etc/init.d/vzvpn stop command on the server.
Glossary Application template. A template used to install a set of applications in Containers. See also Template. Container (or regular Container). A virtual private server, which is functionally identical to an isolated standalone server, with its own IP addresses, processes, files, its own users database, its own configuration files, its own applications, system libraries, and so on. Containers share one Parallels server and one OS kernel. However, they are isolated from each other.
Glossary 209 Template (or package set). A set of original application files (packages) repackaged for mounting over Virtuozzo File System. There are two types of templates. OS Templates are used to create new Containers with a pre-installed operating system. Application templates are used to install an application or a set of applications in Containers. UBC. An abbreviation of User Beancounter. User Beancounter.
Index A About This Guide - 7 Adding a New Device - 80 Advanced Tasks - 174 Applying New Configuration Sample to Container - 122 Associating Container Files With Application Templates - 101 Available Capabilities for Container - 176 B Backups Overview - 41 Basics of Hardware Virtualization - 17 Basics of OS Virtualization - 14 C Capabilities Defined by POSIX Draft - 176 Changing Services Mode - 132 Changing System Time From Container - 185 Changing the Disk Type - 77 Checking Quota Status - 98 Choosin
Index 211 License Statuses - 160 Linux-Specific Capabilities - 177 Listing Adapters - 135 Listing Snapshots - 73 Listing Templates - 75 Listing Virtual Machines and Containers - 35 Listing Virtual Networks - 141 Loading iptables Modules - 191 Loading iptables Modules to Parallels Server 191 Loading iptables Modules to Particular Containers - 192 Managing Container Resources Configuration 118 Managing CPU Share - 90 Managing Disk Quotas - 92 Managing Licenses - 155 Managing Network Accounting and Bandwidt
Index Organization of This Guide - 8 OS Virtualization Layer - 13 Overview - 109 P Parallels Containers - 14 Parallels Management Console - 22 Parallels Server 4 Bare Metal Basics - 11 Parallels Server 4 Bare Metal Overview - 12 Parallels Server Bare Metal Configuration - 16 Parallels Virtual Machines - 18 Pausing a Virtual Machine - 70 Performing Container-Specific Operations - 64 Performing Initial Configuration - 30 Performing Virtual Machine-Specific Operations - 70 Physical Server Availability Consid
Index W What are Disk Quotas? - 92 What are Resource Control Parameters? - 87 What Are Services and Processes - 126 Z Zero-Downtime Migration - 54 213