Xen Virtualization Combat Series (iv) methods for expanding disk space by Xen virtual machines A

Source: Internet
Author: User
Tags uuid

Note: It is recommended to add a virtual disk file to increase disk space by adding LVM logical volumes to the virtual machine. The creation process is as follows.

1. DD Creates a disk file

# dd If=/dev/zero bs=1024m count=4 >/data/test_01new.img

2. Turn off the test01 virtual machine

3. Modify the new virtual machine configuration file

# vi/etc/xen/test01

# Modification Instructions:

# (1) name

# (2) UUID changes the last few data

# (3) change to the actual path, note the disk number when you add a new disk.

# (4) Vif modify the MAC address of the NIC to change the last few data

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/virtualization/

Name = "Test01"

UUID = "Cc49eaea-fb0c-5239-c055-bdafcf209cab"

MAXMEM = 512

Memory = 512

Vcpus = 1

bootloader = "/usr/bin/pygrub"

On_poweroff = "Destroy"

On_reboot = "Restart"

On_crash = "Restart"

disk = ["Tap:aio:/data/test01.img,xvda,w", "Tap:aio:/data/test_01new.img,xvdb,w"]

Vif = ["Mac=00:16:3e:44:ee:07,bridge=xenbr1,script=vif-bridge"]

Note: If you use LVM logical volume, use the following parameters, using logical volumes in the Xen virtualization environment in a large number of uses, so that the maximum utilization of disk performance.

disk = ["Tap:aio:/data/test01.img,xvda,w", "Phy:/dev/lvmdata/var01,xvdb,w"]

4. Start the virtual machine

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.