Implementing the Startup method for shared VMs on Xen servers with shared storage _xenserver

Source: Internet
Author: User
Tags uuid

If you create a VM on a Xen server host, the VM is installed on a shared disk array. So if the host is down for hardware reasons, how to launch the VM on the shared disk on the other host to realize the VM's high availability. The advanced version and Enterprise version of Citrix Xen Server provide high availability support and require Xen server hosts to be in the same pool.

Here we do not pass the same pool, how to implement the VM launch it. Spend a lot of time on the Internet to find relevant information. Failed to plug in the information I needed.

Later on thinking, according to the principle that this function should be able to achieve the right. Kung Fu is not a conscientious

Environment

Citrix Xen Serer 6.1 Free Edition: http://www.jb51.net/softs/391983.html

The free version here requires three servers

A and B are Xen server servers. C host is used for iSCSI virtualization out of a shared disk.
The establishment of virtual machines on host a

1. Establish iSCSI SR

2, the new virtual machine when selecting the master server page, choose not to assign the master server for this VM (D), as shown in figure:
3. Use iSCSI SR Library to allocate storage for new VM as shown:

4, continue to complete the installation of the VM.

Starting a VM built on host A on Host B to start a VM built on host A on Host B requires host A to disconnect from the shared disk array. ISCSI SR Library Right--> detach (D) .... Note that the detach operation is required for all virtual machines on the SR to be shut down.

If host A is not separated from the shared disk array, the disk array data is destroyed after the Host B is connected to the disk array.

1. New iSCSI repositories

In the iSCSI Repository path input page, enter the iSCSI destination host IP address. When you click Finish, the following dialog box will pop up:
Select Connection sr (A)

2, the new virtual machine and does not start (consistent with the source virtual machine parameters)

3. Add the previously established iSCSI disk to the newly added VM and set the location to 0
Select Swap these disks (S)

At this point, if we do not need the newly created disk, you can delete it (the newly created disk has no data, you can delete it directly)

4, remove the DVD drive

Set the DVD drive to blank, or you will start the virtual machine from the DVD drive. (You should be able to modify the startup entry of the virtual machine by configuring the startup parameters of the virtual machine)
When we start the virtual machine, we will report: Error from Bootloader:no bootable disk. That the current virtual machine does not have a boot disk.

5, set the virtual machine boot parameters:

Perform an XE vm-list command to view a virtual machine on a former Xen host

Perform the XE vm-param-list uuid=<vm-uuid> command look at the parameters of the specified UUID virtual machine

We can see:


Pv-bootloader (RW): Elioader this line.

Modify the value of Pv-bootloader (RW) to Pygrub, with the following command:

Xe Vm-param-set Pv-bootloader=pygrub uuid=<vm-uuid>

Then perform the start virtual machine operation, if still reported the error from Bootloader:no bootable disk, then perform the 6th

6, modify the VBD parameters

Execute command

Xe vbd-list lists all VBD on the current host and finds the VBD of the corresponding virtual machine

Execute Command XE vbd-param-list uuid=<vbd-uuid>
You can see bootable (RW): The value is false, and you need to modify the value to true. Execute the command as follows

: Xe Vbd-param-set bootable=true uuid=<vbd-uuid>
Restart the startup, this time it started successfully;


7. Modify the network Physical address (MAC address) If a virtual machine is set up on Host B, the MAC address of the VM on source host A is specified. Then skip this step. Otherwise, the MAC address needs to be modified.
Modifies the MAC address to the MAC address set within the virtual machine (the MAC address of the virtual machine on the original host a)

This allows us to implement the ability to start a shared virtual machine on another host.

Note: This is just my experimental results, it's not clear whether the virtual machine or the Xen server has any effect on it. It remains to be tested and perfected.

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.