Xen installation and configuration

Source: Internet
Author: User

The Host OS is debian6.0.3 _ amd64.
Basically, it is based on http://wiki.debian.org/xen.
 
1. Install xen and other tools
Java code
Aptitude-P install xen-linux-system xen-tools xen-hypervisor-4.0-amd64
 
Aptitude-P install xen-linux-system xen-tools xen-hypervisor-4.0-amd64
 
2. Modify grub (I wonder if it is necessary)
Java code
Mv-I/etc/grub. d/10_linux/etc/grub. d/50_linux
Update-grub2
 
Mv-I/etc/grub. d/10_linux/etc/grub. d/50_linux
Update-grub2
If an error occurs during update and a device. map error is reported, delete device. map and try again.
 
3. Disable the save Function
Java code
XENDOMAINS_RESTORE = false
XENDOMAINS_SAVE = ""
 
XENDOMAINS_RESTORE = false
XENDOMAINS_SAVE = ""
 
 
Iv. Network Configuration
Use xen unreliable network scripts temporarily.
Modify/etc/xen/xend-config.sxp
Add this line
Java code
(Network-script network-bridge)
 
(Network-script network-bridge)
The Virtual Machine network configuration is omitted here. Please follow the blog below. I should write
 
5. Configure xen-tools
Java code
Lvm = yourLVMname
Size = 1.5 Gb
Gateway = 10.0.0.1
Netmask = 255.255.255.0
Pai_squeeze = http: // localhost: 81/iso
Passwd = 1
 
Lvm = yourLVMname
Size = 1.5 Gb
Gateway = 10.0.0.1
Netmask = 255.255.255.0
Pai_squeeze = http: // localhost: 81/iso
Passwd = 1
Mirror is used to make the CD image to be installed into an http accessible link, and then the url is here for installation.
 
6. Create mirror
Put the debian CD into the machine
Create an iso Image
Java code
Dd if =/dev/cdrom of =/debian. iso
 
Dd if =/dev/cdrom of =/debian. iso
Mounting an iso Image
Java code
Mount-o loop/debian. iso/usr/local/nginx/html/iso
 
Mount-o loop/debian. iso/usr/local/nginx/html/iso
Configure nginx
Java code
Vim/usr/local/nginx/conf/nginx. conf
Listen 81
Location/iso {
Alias html/iso;
Index index.html index.htm;
Autoindex on;
}
 
Vim/usr/local/nginx/conf/nginx. conf
Listen 81
Location/iso {
Alias html/iso;
Index index.html index.htm;
Autoindex on;
}
 
7. Expand Hard Disk Partitions
I don't have enough hard disks, so I can extend the hard disk. If there are still empty partitions on the hard disk, skip this step.
Fdisk: Check the location of the new hard disk. Assume the disk is located at the Mount point/dev/sdb.
First, format the new hard disk. For the purpose of practice, split the disk into 1/4 GB space.
Java code
Fdisk/dev/sdb
 
Fdisk/dev/sdb
Let the kernel re-read the Partition Table (download the parted Package). You must never forget this.
Java code
Partprobe
 
Partprobe
Extended volume group
Java code
Vgextend vgname/dev/sdb1
 
Vgextend vgname/dev/sdb1
Check the volume group size and whether the FE is increased.
Java code
Vgdisplay
 
Vgdisplay
 
8. Install and delete virtual machines
Java code
Xen-create-image -- hostname = xen-test0 -- ip = 10.0.0.1 -- dist = squeeze -- verbose
Xen-delete-image xen-test0
 
Xen-create-image -- hostname = xen-test0 -- ip = 10.0.0.1 -- dist = squeeze -- verbose
Xen-delete-image xen-test0
 
 
9. General Operations
Open xend, list virtual machines, start virtual machines, and reconnect virtual machines
Java code
Xend start
Xm list
Xm create-c xen-test0.cfg
Xm console cfg
 
Xend start
Xm list
Xm create-c xen-test0.cfg
Xm console cfg
 
Memo:
To be continued ...... Then write the xen network configuration and have time to think about installing the virtinst virtual machine.


From MWI's blog

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.