From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
|description=This test case verifies that block devices can be successfully attached to and detached from a Fedora Xen DomU. | |description=This test case verifies that block devices can be successfully attached to and detached from a Fedora Xen DomU. | ||
|actions= | |actions= | ||
# Create a number of dummy files on your dom0 by running <pre>$> for i in `seq 1 | # Create a number of dummy files on your dom0 by running <pre>$> for i in `seq 1 70` ; do dd if=/dev/zero of=/var/lib/xen/images/disk$i.dsk bs=1 count=1 seek=10G ; done</pre> Note that this command will create sparse files, meaning that unless you write data to the disk, no actual disk space on your hard drive will be used. | ||
# If you have free VG space available in your LVM volumes, create a few test LVs (for example, using: <code>lvcreate -n test1 -L1G</code>. If you have free space left in your partition table, create 1 or more partitions to test with. If you don't know what this means, or you are worried about making modifications like this, just skip this step. | # If you have free VG space available in your LVM volumes on the dom0, create a few test LVs (for example, using: <code>lvcreate -n test1 -L1G</code>. If you have free space left in your partition table on the dom0, create 1 or more partitions to test with. If you don't know what this means, or you are worried about making modifications like this, just skip this step. | ||
# From the dom0, attach one of the files to the F-11 domU <pre>$> virsh attach-disk f11 --driver file /var/lib/xen/images/disk1.dsk xvdb</pre> | |||
# Inside the guest, run <pre>$> fdisk /dev/xvdb</pre> You should be able to partition the disk however you want, create a new filesystem on it, etc. | |||
# From the dom0, disconnect the disk from the F-11 guest <pre>$> virsh detach-disk f11 xvdb</pre> | |||
# FIXME: add test case for phy for LVM/partition | |||
# Download this script to the dom0, and make it executable with <code>chmod +x Xen-domu-attach-disks.sh</code> Note that your dom0 must explicitly have support for this, so if your dom0 does not, this test will not work. | |||
|results= | |results= | ||
# | # The disks should be presented to the domU on attach-disk, and removed from the guest on detach-disk. | ||
# The F-11 guest should be able to use the disks like any other piece of storage. | |||
}} | }} | ||
[[Category:Virtualization XenDomU Test Cases|Block attach]] | [[Category:Virtualization XenDomU Test Cases|Block attach]] |
Revision as of 09:43, 4 May 2009
Description
This test case verifies that block devices can be successfully attached to and detached from a Fedora Xen DomU.
How to test
- Create a number of dummy files on your dom0 by running
$> for i in `seq 1 70` ; do dd if=/dev/zero of=/var/lib/xen/images/disk$i.dsk bs=1 count=1 seek=10G ; done
Note that this command will create sparse files, meaning that unless you write data to the disk, no actual disk space on your hard drive will be used. - If you have free VG space available in your LVM volumes on the dom0, create a few test LVs (for example, using:
lvcreate -n test1 -L1G
. If you have free space left in your partition table on the dom0, create 1 or more partitions to test with. If you don't know what this means, or you are worried about making modifications like this, just skip this step. - From the dom0, attach one of the files to the F-11 domU
$> virsh attach-disk f11 --driver file /var/lib/xen/images/disk1.dsk xvdb
- Inside the guest, run
$> fdisk /dev/xvdb
You should be able to partition the disk however you want, create a new filesystem on it, etc. - From the dom0, disconnect the disk from the F-11 guest
$> virsh detach-disk f11 xvdb
- FIXME: add test case for phy for LVM/partition
- Download this script to the dom0, and make it executable with
chmod +x Xen-domu-attach-disks.sh
Note that your dom0 must explicitly have support for this, so if your dom0 does not, this test will not work.
Expected Results
- The disks should be presented to the domU on attach-disk, and removed from the guest on detach-disk.
- The F-11 guest should be able to use the disks like any other piece of storage.