From Fedora Project Wiki
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
# From the dom0, attach one of the files to the rawhide domU <pre>$> virsh attach-disk rawhide --driver file /var/lib/xen/images/disk1.dsk xvdb</pre> | # From the dom0, attach one of the files to the rawhide domU <pre>$> virsh attach-disk rawhide --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. | # 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 rawhide guest <pre>$> virsh detach-disk | # From the dom0, disconnect the disk from the rawhide guest <pre>$> virsh detach-disk rawhide xvdb</pre> | ||
# Download this [[File:Xen-domu-attach-disks.sh]] script to the dom0, and make it executable with <code>chmod +x Xen-domu-attach-disks.sh</code>. This shell script attaches all 70 disks created above to the domU. You will probably have to modify this script to match your environment. Note that your dom0 must explicitly have support for this, so if your dom0 does not, this test will not work. Once you have modified the script appropriately, run it with <pre>Xen-domu-attach-disks.sh</pre> All 70 disks should successfully attach to the rawhide domU. | # Download this [[File:Xen-domu-attach-disks-dom.sh]] script to the dom0, and make it executable with <code>chmod +x Xen-domu-attach-disks.sh</code>. This shell script attaches all 70 disks created above to the domU. You will probably have to modify this script to match your environment. Note that your dom0 must explicitly have support for this, so if your dom0 does not, this test will not work. Once you have modified the script appropriately, run it with <pre>Xen-domu-attach-disks.sh</pre> All 70 disks should successfully attach to the rawhide domU. | ||
# Download this [[File:Xen-domu-hugefile.sh]] script to the dom0, and make it executable with <code>chmod +x Xen-domu-hugefile.sh</code>. This shell script attaches a simulated "huge" file (5TB) to the guest. Run the script <pre>$> Xen-domu-hugefile.sh create | # Download this [[File:Xen-domu-hugefile.sh]] script to the dom0, and make it executable with <code>chmod +x Xen-domu-hugefile.sh</code>. This shell script attaches a simulated "huge" file (5TB) to the guest. Run the script <pre>$> Xen-domu-hugefile.sh create rawhide</pre> to attach the huge file to the guest named "rawhide". Poke around inside the rawhide domU and make sure you can partition and use the 5TB disk. When you are finished, run <pre>$> Xen-domu-hugefile.sh remove rawhide</pre> to clean up. | ||
|results= | |results= | ||
# The disks should be presented to the domU on attach-disk, and removed from the guest on detach-disk. | # The disks should be presented to the domU on attach-disk, and removed from the guest on detach-disk. |
Latest revision as of 12:52, 17 September 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. - From the dom0, attach one of the files to the rawhide domU
$> virsh attach-disk rawhide --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 rawhide guest
$> virsh detach-disk rawhide xvdb
- Download this File:Xen-domu-attach-disks-dom.sh script to the dom0, and make it executable with
chmod +x Xen-domu-attach-disks.sh
. This shell script attaches all 70 disks created above to the domU. You will probably have to modify this script to match your environment. Note that your dom0 must explicitly have support for this, so if your dom0 does not, this test will not work. Once you have modified the script appropriately, run it withXen-domu-attach-disks.sh
All 70 disks should successfully attach to the rawhide domU. - Download this File:Xen-domu-hugefile.sh script to the dom0, and make it executable with
chmod +x Xen-domu-hugefile.sh
. This shell script attaches a simulated "huge" file (5TB) to the guest. Run the script$> Xen-domu-hugefile.sh create rawhide
to attach the huge file to the guest named "rawhide". Poke around inside the rawhide domU and make sure you can partition and use the 5TB disk. When you are finished, run$> Xen-domu-hugefile.sh remove rawhide
to clean up.
Expected Results
- The disks should be presented to the domU on attach-disk, and removed from the guest on detach-disk.
- The rawhide guest should be able to use the disks like any other piece of storage.