If you have lvm installed and a volume group created you can create this filesystem as follow:. This starts the YAST module called "dirinstall". Select all the software you'd like to install. Alternatively you can select another target directory eg. Then go to "Next". The packages will be installed now. Finally you can exit YAST again. Your domU is now created. In small and medium business real life is normal to find the revolutionary technology of x that will be the definitive problem solving, recently i found a heavy ML G4p server executing business E.
Software has been heavily adapted and after 12 years continues working, after talk with the customer about that all the software has been reached end of life, and this will be a risky adventure he admits the problem but his strategy will be continue using the software as long is possible.
After talking with all stakeholder we decided that acquiring a new hardware is mandatory, after 12 years of service a hardware fault is a safe bet increasing every hour, nowadays get a replacement in second hand market is not the best deal.
In this scenario the best option is convert physical server into a virtual machine and keep working for years, we had two options Xen with XCP-NG and KVM with Proxmox, We choose Proxmox because it was a solution that fits better in customer infrastructure.
We will run blkid command to get a list of volumes and identify where is our filesystem take a photo from your phone to remember the UUID. To specify a global keymap entry for virtual machines on the host, edit the host's xend-config. To specify a keymap entry for a specific virtual machine, edit the virtual machine's settings by following instructions in Section 5. For example, you can specify a German keyboard. Make sure the virtual machine's operating system is set to use the specified keyboard.
After you specify the host's keymap setting, all virtual machines created by using the Create Virtual Machine Wizard on the host add the host's keymap entry to their virtual machine settings.
Virtual machines created before a host's keymap entry is specified are not automatically updated. These virtual machines start with the keyboard specified by the host, but the keymap entry is not a permanent part of the virtual machine's settings. For the entry to be permanent, it must be explicitly stated in the virtual machine's settings. It is possible to attach an arbitrary number of devices to the machine, providing for example extended storage, additional keyboard or mouse, Webcams and other devices.
Note, that USB devices will not survive live migrations and it is recommended to remove any USB device before using the migration feature of Xen. This method only supports fully virtualized guests, but is available since Xen 3. It is a low-performance method which does not require any special drivers neither in Domain0 or VM Guest.
This method supports paravirtualized guests, but is available in Xen 4. Qemu-dm used for Xen fully virtualized guests supports pass-through of USB devices from Domain0 to the guest. Qemu-dm emulates USB 1. The main advantage is that the emulation pass-through is supported in all Xen 3. For all of them, you need to run lsusb on the host and read the device ID number. For example, if lsusb contains the following line.
This ID will be the user in the following examples. This device assignment is temporary and will be forgotten after you shut the VM Guest down. Verify if the assignment has been successful by checking the output of lsusb on the VM Guest. The relevant line should contain the same device ID as the host. List all assignable USB devices in Domain0 with xm usb-list-assignable-devices.
Just add the following lines. It supports both USB 2. It requires special pvusb drivers in Domain0's Kernel xen-usbback and the front-end driver xen-usbfront in the VM Guest.
To assign a USB device with paravirtualized drivers, you first need to create a new virtual host controller if there not already exists one on the VM Guest, and then attach the physical USB device to it.
Make sure that the Kernel module usbbk is loaded by the system with the command:. If the package usb-utils has been installed, you can now see the host controller in the USB device list with the command lsusb. Check if you can list the virtual host controller from the VM Host Server with the command xm usb-list alice. On the VM Host Server system check which devices may be assigned to a guest with the command:. The device that should be assigned to alice has the number To assign this device to the first virtual host controller with number 0 on its port 1, run the command:.
After completing this procedure, you may use the keyboard, for example, to type inside a VNC window. To detach the USB device, you need to know the number of the virtual host controller and the port number of the assigned device inside the VM Guest. The port numbers of the host controllers start with the 0 , and the port numbers with 1. List currently assigned devices with the command xm usb-list alice.
The result should look similar to the following:. For more information see Section 2. The performance of Domain0 is important for the overall system as the disk and network drivers are running on it. On the other hand, the performance of VM Guests is also important to be able to accomplish the task they were set up for.
Failing to dedicate exclusive CPU resources to Domain0 usually results in a poor performance and can cause the VM Guests to function incorrectly. An example Kernel boot entry follows:. Assuming you are running a 8-CPU system, you need to add. It is often needed to dedicate specific CPU resources to a virtual machine. By default, a virtual machine uses any available CPU core. Its performance can be improved by assigning a reasonable number of physical processors to it as other VM Guests are not allowed to make use of them after that.
Assuming a machine with 8 CPU cores while a virtual machine needs to use 2 of them, change its configuration file as follows:. The above example dedicates 2 processors to the VM Guest, and it is exactly the 3rd and 4rd one 2 and 3 counted from zero. Now check the assignment:. When working with several VM Host Server systems that may run a pool of guests, a common task is to ensure that the guest systems are not started twice. Depending on the used block and network devices, this could lead to network problems as well as corrupted block devices.
Xen provides a mechanism that checks a lock file before a guest is started. In order to use this mechanism, a distributed file system like NFS or a cluster file system is needed. At the end of this file, the two parameters xend-domain-lock and xend-domain-lock-path control the behavior. Activate the new settings either by rebooting the VM Host Server system, or by restarting xend with the command rcxend restart.
Xenpaging allows memory over-commit where the total memory used by all running guests exceeds the amount of memory available on the host. It writes memory pages of a given guest to a file and moves the pages back to the pool of available memory. Once the guest wants to access the paged-out memory, the page is read from the disk and placed into the guest's memory.
This allows the sum of all running guests to use more memory than physically available on the host. After rebooting the guest, its ID changes dynamically, and the current xenpaging binary has no target anymore.
In Xen some features are only available for fully virtualized domains. They are not very often used, but still may be interesting in some environments. Just as with physical hardware, it is sometimes desirable to boot a VM Guest from a different device than its own boot device. For fully virtual machines, the managing program virt-manager provides a possibility to achieve this. A drop down box appears, that gives you a selection of bootable devices. Select the correct device and press Apply.
Then press Run to start the VM Guest. The Console is also available from the screen. If the actual CPUs are different on both hosts, it may be necessary to hide some of the features before the VM Guest is started in order to maintain the possibility to migrate the VM Guest between both hosts.
For fully virtualized guests, this can be achieved by configuring the cpuid that is available to the guest. This contains all the important information that defines the current CPU. These are available from:. The cpuid is organized in several bit bitmasks. In an sxp configuration, a cpuid entry that just supplies values with the default policy would look like the following:.
Note, that counting bits is done from right to the left, starting with bit 0. Changing the setting for VM Guest has no impact on Domain0 and vice versa.
For example to change Domain0 without changing VM Guest, use. XenStore is a database of configuration and status information shared between VM Guests and the management tools running in Domain0. VM Guests and the management tools read and write to XenStore to convey configuration information, status updates, and state changes. The XenStore database is managed by Domain0 and supports simple operations such as reading and writing a key.
VM Guests and management tools can be notified of any changes in XenStore by watching entries of interest. Note that it is not possible to restart the xenstored service. The domain identifier DOMID is an identification number that represents a particular running instance.
It typically changes when the VM Guest is migrated to another machine. The file system structure of the XenStore database can be operated with the following commands:.
Sends a command to the xenstored back-end, such as triggering an integrity check. To list the directory content, use xenstore-list. The first line of the output belongs to Domain0, and the second one to a running VM Guest. The following command lists all the entries related to the VM Guest:. Specifies whether to destroy or restart the VM Guest in response to a reboot request.
Specifies whether to destroy or restart the VM Guest in response to a halt request. The bitmask has a number of bits equal to the value of vcpus , with a bit set for each online virtual CPU. Shows arguments passed to the QEMU process.
The following entries are available:. See identical options in Section 9. The weight assigned to the VM Guest for scheduling purposes. Higher weights use the physical CPUs more often.
To see all entries available, refer to XenStore Reference. Contains memory information. Contains information all back-end devices used by the VM Guest. The path has subdirectories of its own. Setting up two Xen hosts as a failover system has several advantages compared to a setup where every server runs on dedicated hardware. Virtualization allows the consolidation of workloads on newer, more powerful, energy-efficient hardware.
The boot loader controls how the virtualization software boots and runs. You can modify the boot loader properties by using YaST, or by directly editing the boot loader configuration file. The Boot Loader Settings screen lists the sections that appear as options on the boot menu. From this screen, you can change the boot loader so it auto-selects the virtual machine host option when booting.
Select the Xen section, then click Edit to manage the way the boot loader and Xen function. If the Xen option does not appear on the GRUB boot menu, you can compare your updated GRUB boot loader file with the examples below to confirm that it was updated correctly. The first example shows a typical GRUB boot loader file updated to load the kernel that supports virtualization software. The title line defines sections in the boot loader file.
Replace hd0,5 with the correct partition. The kernel line specifies the directory and filename of the hypervisor. If the amount is not specified, the Domain0 takes the maximum possible memory for its operations.
The first module line specifies the directory and filename of the Linux kernel to load. These parameters are the same parameters as those that can be passed to a standard Linux kernel on physical computer hardware. The second module line specifies the directory and filename of the RAM disk used to boot the virtual machine host.
To set the GRUB boot loader to automatically boot the Xen virtualization software, change the default entry from 0 , which means the first title entry, to the number that corresponds to the title XEN entry. In the example file, Xen is the second title line. To specify it, change the value of default from 0 to 1. The Reiser file system, perceiving a corrupt disk environment, automatically sets the file system to read-only.
To increase the available space of a sparse image file, first increase the file size and then the file system. Touching the sizes of partitions or sparse files always bears the risk of data failure. Do not work without a backup. The resizing of the image file can be done online, while the VM Guest is running. Increase the size of a sparse image file with:.
It is also possible to increase the image files of devices that are not sparse files. However, you must know exactly where the previous image ends. Use the seek parameter to point to the end of the image file and use a command similar to the following:. If the VM Guest is running during the resize operation, also resize the loop device that provides the image file to the VM Guest.
First detect the correct loop device with the command:. The device name depends on the actually increased device. The resizing of the file system inside the sparse file involves tools that are depending on the actual file system.
A running virtual machine can be migrated from its source virtual machine host to another virtual machine host. This functionality is referred to as live migration. For live migration the virtual machine being migrated must have access to its storage in exactly the same location on both, source and destination host platforms.
Live migration only works when every entity involved has the same architecture. For example, a bit paravirtualized guest running on a bit hypervisor can be migrated to a host running a bit hypervisor.
If any of the pieces do not match exactly, migration will fail. Another requirement is, that the involved file systems are available on both machines. Furthermore, the routing of the network connection to the virtual network device must be correct. For information on modifying Xend settings, see Section 5. For more details about using xm to migrate VM Guest systems, see Section 5. In a virtual machine window, some key combinations, such as Ctrl — Alt — F1 , are recognized by the virtual machine host but are not passed to the virtual machine.
To bypass the virtual machine host, Virtual Machine Manager provides sticky key functionality. Pressing Ctrl , Alt , or Shift three times makes the key sticky, then you can press the remaining keys to pass the combination to the virtual machine.
You can also press Alt three times, then press Ctrl — F2. The sticky key functionality is available in the Virtual Machine Manager during and after installing a virtual machine. For a regular operation of many virtual guests, having a possibility to check the sanity of all the different VM Guest systems indispensable.
Xen offers several tools besides the system tools to gather information about the system. It is also possible to get information about disk and network usage with this tool, however, you must first activate this in the preferences:. Change the tab from General to Stats. If desired, also change the update interval or the number of samples that are kept in the history.
Afterwards, the disk and network statistics are also displayed in the main window of the Virtual Machine Manager. To get more precise data of the respective machine, select the machine, click Open and then Details. The statistics are displayed from the Performance entry of the left-hand tree menu. Information is also available when only a standard terminal is available on no X environment. The preferred tool to gather information in this case is xentop.
Unfortunately, this tool needs a rather broad terminal, else it inserts line breaks into the display. Some of the more important are:. Also display network statistics. Note, that only standard configurations will be displayed. If you use a special configuration like a routed network, no network will be displayed at all. For more information about xentop see the manual page man 1 xentop. Especially useful for monitoring a virtualization environment are the following tools:.
The command line utility ip may be used to monitor arbitrary network interfaces. This is especially useful, if you did set up a network that is routed or applied a masqueraded network. To monitor a network interface with the name alice. In a standard setup, all the Xen VM Guest systems are attached to a virtual network bridge. For example, the output of brctl show may look like the following:. This shows, that there are two virtual bridges defined on the system.
One is connected to the physical ethernet device eth0 , the other one is connected to a vlan interface vlan There is only one guest interface active in this setup, vif1. This means, that the guest with id 1 has an ethernet interface eth0 assigned, that is connected to br0 in the VM Host Server. Especially when using masquerade networks, or if several ethernet interfaces are set up together with a firewall setup, it may be helpful to check the current firewall rules.
The command iptables may be used to check all the different firewall settings. To list all the rules of a chain, or even of the complete setup, you may use the commands iptables-save or iptables -S. With Xen, it is possible to add an extra descriptions to the configuration of each guest. This may be helpful for example to document the purpose of the guest, or the responsible person to handle the guest. The description can be set during the installation of the guest. When running vm-install , in the Summary screen you can set the Name of Virtual Machine.
The graphical interface for changing the name also contains an extra description line, that may be used to add a single line of text. It is also possible to change the SXP configuration to add or change the description as described in Section 5. The description is added directly below the domain element and looks like this:.
To retrieve the description of a specific VM Guest, for example, a guest with the name alice, run the command:. If a guest should know more about the VM Host Server it runs on, vhostmd can provide more information to selected guests. To set up your system to run vhostmd , proceed as follows:. However, the default works well. Check the validity of the vhostmd. Start the vhostmd daemon with the command rcvhostmd start. If vhostmd should be started automatically during start-up of the system, run the command:.
Run the command vm-dump-metrics. The result of the vm-dump-metrics is an XML output. On the guest, see the manual page man 1 vm-dump-metrics. The operation is slightly similar to hibernating a computer. The virtual machine is off, but it can be quickly restored to its previously saved running condition.
When saved, the virtual machine is paused, its current memory state saved to a location you specify, and then the virtual machine is stopped. The amount of time to save the virtual machine depends on the amount of memory allocated. The restore operation is used to return a saved virtual machine to its original running state. After using the save operation, do not boot, start, or run a virtual machine that you intend to restore.
If the virtual machine is at any time restarted before it is restored, the saved memory state file becomes invalid and should not be used to restore. Click Open to view the virtual machine console, then Details to view virtual machine information. In the host environment, enter xm save ID state-file where ID is the virtual machine ID you want to save, and state-file is the name you specify for the memory state file.
The virtual machine does not boot the operating system but resumes at the point that it was previously saved. The operation is slightly similar to coming out of hibernation. After using the save operation, do not boot, start, or run the virtual machine you intend to restore.
Make sure the virtual machine to be restored has not been started since you ran the save operation. Select the hypervisor and connection used to restore the virtual machine. On the local machine, this is localhost. Right-click it and choose Details from the context menu. The virtual machine and the guest operating system are restored to the previously saved state.
In the host environment, enter xm restore state-file where state-file is the previously saved memory state file. It does not interact with the hypervisor but still maintains its allocated resources, such as memory.
The utilization of the server is improved, which has positive effects on the power consumption of the system. The setup of migration for Xen hosts is described in Section 5. In the following, several typical scenarios are described. Xen can directly provide a number of remote block devices to the respective Xen guest systems. All of these may be used to do live migrations. When a storage system is already in place, first try to use the same device type you already used in the network.
If the storage system cannot be used directly but provides a possibility to offer the needed space over NFS, it is also possible to create image files on NFS. If the NFS file system is available on all Xen host systems, this method also allows live migrations of Xen guests. When setting up a new system, one of the main considerations is, if a dedicated storage area network should be implemented.
The following possibilities are available:. Note, that all block device traffic goes over the same Ethernet interface as the network traffic. This may be limiting the performance of the guest.
Running the storage traffic over a dedicated Ethernet interface may eliminate a bottleneck on the server side. However, planning your own network with your own IP address range and possibly a VLAN dedicated to storage needs some more considerations.
NPIV is a method to virtualize fibre channel connections. When using very fast storage systems, such an Ethernet device will probably limit the speed of the system.
For space or budget reasons, it may be necessary to rely on storage that is local to the Xen host systems. To still maintain the possibility of live migrations, it is necessary to build block devices that are mirrored to both Xen hosts. If a system that uses DRBD to mirror the block devices or files between two Xen hosts should be set up, both hosts should use the identical hardware.
If one of the hosts has slower hard disks, both hosts will suffer from this limitation. During the setup, each of the required block devices should use its own DRBD device.
The setup of such a system is quite a complex task. When using several guest systems that need to communicate between each other, it is possible to do this over the regular interface. However, for security reasons it may be advisable to create a bridge that is only connected to guest systems. In a HA environment that also should support live migrations, such a private bridge must be connected to the other Xen hosts.
This is possible by using dedicated physical Ethernet devices, and also using a dedicated network. A different implementation method is using VLAN interfaces. In that case, all the traffic goes over the regular Ethernet interface. To change the size of the VNC display, an extra option must be supplied to the Xen boot options.
For SLES10, the same parameter is needed. However it must be added to the extra boot parameters of the configuration. To get both in sync, it is advisable to let SaX2 create an X configuration before the installation starts. It allows you to install additional products that may reside on a separate CD, ISO image file, or installation source. Because paravirtual machines present removable media, such as a CD inserted in the CD reader, as a non-removable disk device, the Add-On Product program does not recognize inserted CD as valid add-on product media.
When booting, virtual machines get their initial clock time from their host. After getting their initial clock time, fully virtual machines manage their time independently from the host. Paravirtual machines manage clock time according to their independent wallclock setting.
If the independent wallclock is enabled, the virtual machine manages its time independently and does not synchronize with the host. If the independent wallclock is disabled, the virtual machine periodically synchronizes its time with the host clock. OES 2 NetWare virtual machines manage clock time independently after booting. They do not synchronize with the host clock time. If a guest operating system is configured for NTP and the virtual machine's independent wallclock setting is disabled, it will still periodically synchronize its time with the host time.
This dual type of configuration can result in time drift between virtual machines that need to be synchronized. To effectively use an external time source, such as NTP, for time synchronization on a virtual machine, the virtual machine's independent wallclock setting must be enabled set to 1.
Otherwise, it will continue to synchronize its time with its host. Enter 1 to enable or 0 to disable the wallclock setting. While booting, a virtual machine gets its initial clock time from the host. Then, if the wallclock setting is set to 1 in the sysctl.
Although the current status of the independent wallclock changes immediately, its clock time might not be immediately synchronized. The setting persists until the virtual machine reboots. Then, it gets its initial clock time from the host and uses the independent wallclock according to setting specified in the sysctl.
To have the right device names supported in Xen, you must update the kernel and initrd that are used to install the system. Furthermore, the updated kernel must be available in the installation source.
Create this directory manually, if it does not exist already. Install the package inst-source-utils.
Then, change your working directory to your network installation source. Run the following commands to make all the new packages known to the installation source:. After this procedure, the packages that are copied to the updates directory are available during the installation. However, they will only be used if they are newer than the packages provided by the installation itself. Because this is not possible when consolidating servers, the hardware must be emulated for the operating system.
Emulation can be slow, but it is especially troubling for high-throughput disk and network subsystems. Most performance loss occurs in this area. These drivers bring many of the performance advantages of paravirtualized operating systems to unmodified operating systems because only the paravirtualized device driver not the rest of the operating system is aware of the virtualization platform.
For example, a paravirtualized disk device driver appears as a normal, physical disk to the operating system. However, the device driver interacts directly with the virtualization platform with no emulation to efficiently deliver disk access, allowing the disk and network subsystems to operate at near native speeds in a virtualized environment, without requiring changes to existing operating systems.
During the creation process, the virtual machine starts according to settings in this file, but the settings are then transferred and stored in Xend for ongoing operations. These expressions are either stand-alone, or have another expression as argument. Modifying the initial start-up file to create or make changes to a virtual machine is not recommended.
Whenever the xen-managed virtual machine starts, it takes its settings from information stored in the Xend database, not from settings in the initial start-up file. Although it is not recommended, you might need to start an existing virtual machine based on settings in the initial start-up file. If you do this, any Xend settings stored for the virtual machine are overwritten by the start-up file settings.
Specifies the action that the virtual machine performs when the operating system is powered off. Specifies the action that the virtual machine performs when the operating system reboots. Specifies the action that the virtual machine performs when the operating system crashes.
The following pages contain descriptions for most of the commonly used options for the Xend configuration. However, there is no guarantee for completeness. It needs several subelements to store all needed data.
Define the program that is used to boot the VM Guest. The settings may be changed with xm vcpu-pin. Defines the console that can be accessed with xm console id. Defines the connection information for the console of the given VM Guest. A vfb device will look like:. The PCI device number is organized as [[[[ domain ]:] bus ]:][ slot ][. A PCI device with device number Most computers have only one PCI domain. This is then 0x0.
To check the domain numbers of the PCI devices, use lspci -D. This expression defines the domain that holds the back-end device that the front-end device of the current VM Guest should connect to. Defines where the virtual block device really stores its data.
See also Section 7. Defines if the current virtual block device is a virtual disk image VDI. This is a read-only setting. Defines where to access the virtual frame buffer device when using VNC. VNC will only provide a server that has to be connected from a client. If not set to 0 , this option enables the VNC server on the first unused port above When using SDL, the specified file is used to define access rights.
The virtual interface definition is used to create and set up virtual network devices. To list, add, or remove network interfaces during runtime, you can use xm with the commands network-list , network-attach , and network-detach. Defines the back-end domain that is used for paravirtualized network interfaces. Defines the mac address of the virtual network interface. The mac addresses reserved for Xen virtual network interfaces look like E:xx:xx:xx.
See also Section 6. Defines a virtual keyboard and mouse device. This is needed for paravirtualized VM Guest systems and must be defined before vfb devices.
Defines the backend domain that is used for paravirtualized keyboard interfaces. This is needed before any USB device can be assigned to the guest.
Define which USB revision should be used. Note, that unlike the real USB revision numbers, this is only an integer. Starting with port-1 , depending on num-ports there are several port-? This is the container for the main machine configuration. The actual image type is either Linux or HVM for fully virtualized guests.
The linux image definition is used for paravirtualized Linux installations. When booting a kernel from the image definition, args defines extra boot parameters for the kernel. The device model used by the VM Guest. This defaults to qemu-dm. Defines the path to the kernel image this VM Guest should boot. Defaults to no image. The HVM image definition is used for all fully virtualized installations.
0コメント