Novell SUSE LINUX ENTERPRISE DESKTOP 11 SP1 - 8-18-2010 VIRTUALIZATION WITH ZEN Manual page 93

Virtualization with xen
Table of Contents

Advertisement

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,
http://www.novell.com/documentation/sles11/stor_admin/
found at
data/bookinfo.html.
Administration Tasks
83

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise desktop 11 sp1

Table of Contents