
The resizing of the image file can be done online, while the VM Guest is running. In-
crease the size of a sparse image file with:
dd if=/dev/zero of=<image file> count=0 bs=1M seek=<new size in MB>
For example, to increase the file
/var/lib/xen/images/sles11/disk0
to a
size of 16GB, use the command:
dd if=/dev/zero of=/var/lib/xen/images/sles11/disk0 count=0 bs=1M seek=16000
NOTE: Increasing Non Sparse Images
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:
dd if=/dev/zero of=/var/lib/xen/images/sles11/disk0 seek=8000 bs=1M
count=2000
Be sure to use the right seek, else data loss may happen.
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:
losetup -j /var/lib/xen/images/sles11/disk0
Then resize the loop device, for example,
/dev/loop0
with the following command:
losetup -c /dev/loop0
Finally check the size of the block device inside the guest system with the command
fdisk -l /dev/xvdb
. 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. This is described in detail in the Storage Administration Guide,
found at
http://www.novell.com/documentation/sles11/stor_admin/
data/bookinfo.html
.
Administration Tasks
83
Содержание LINUX ENTERPRISE 11 SP1 - LINUX AUDIT
Страница 1: ...SUSE Linux Enterprise Desktop www novell com 11 SP1 August 18 2010 Virtualization with Xen ...
Страница 6: ......
Страница 11: ...Part I Getting Started with Xen ...
Страница 12: ......
Страница 17: ...Figure 1 2 Desktop Showing Virtual Machine Manager and Virtual Machines Introduction to Xen Virtualization 7 ...
Страница 18: ......
Страница 41: ...Part II Advanced Configurations ...
Страница 42: ......
Страница 54: ......
Страница 87: ...Part III Administration and Best Practices ...
Страница 88: ......
Страница 100: ......
Страница 108: ......
Страница 114: ......
Страница 116: ......
Страница 117: ...Part IV Appendix ...
Страница 118: ......
Страница 122: ......