Test Day:2010-04-08 Virtualization libguestfs

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Created page with '{|border="1" |-style="color: white; background-color: #3074c2; font-weight: bold" | DATE || TIME || WHERE |- | Thursday Apr 08, 2010 || Al...')
 
(Issues that were identified)
 
(6 intermediate revisions by 3 users not shown)
Line 19: Line 19:
 
The following people have also agreed to be available for testing, workarounds, bug fixes, and general discussion:
 
The following people have also agreed to be available for testing, workarounds, bug fixes, and general discussion:
  
 +
* [[User:Ericb|Eric Blake]]
 
* <i>add your name here</i>
 
* <i>add your name here</i>
  
Line 70: Line 71:
 
  virt-df
 
  virt-df
 
Does the output agree with the free/used space for that guest?  Do you see any error messages?
 
Does the output agree with the free/used space for that guest?  Do you see any error messages?
 +
Note that virt-df has a bug where it hangs if it cannot access a disk image: {{bz|579155}}
 
|-
 
|-
 
| virt-cat
 
| virt-cat
Line 85: Line 87:
 
| Make image
 
| Make image
 
|| Choose a large tarball and construct a disk image from it.
 
|| Choose a large tarball and construct a disk image from it.
You have to set the size of the disk image in advance, large enough to fit the tarball with some headroom.  eg. If the tarball was 10 MB, you might choose a 14 MB image. So:
+
You have to set the size of the disk image in advance, large enough to fit the tarball with some headroom.  eg. If the tarball was 10 MB, you might choose a 14 MB image (if the image is not large enough, you will trip {{bz|580246}}) So:
 
  guestfish -x alloc output.img 14M : run : \
 
  guestfish -x alloc output.img 14M : run : \
 
   sfdiskM /dev/sda , : \
 
   sfdiskM /dev/sda , : \
Line 94: Line 96:
 
  guestfish -a output.img -m /dev/sda1
 
  guestfish -a output.img -m /dev/sda1
 
  ><fs> ls /
 
  ><fs> ls /
|-
 
| virt-snapshot
 
|| Snapshot, rollback and commit an existing virtual machine. Ensure the guest is shut down, then do:
 
virt-snapshot <guest>
 
Make some changes (including changing/adding/removing virtual hardware), shutdown the guest again, then do:
 
virt-snapshot --rollback <guest>
 
Check the guest is back in its original state.
 
Shutdown, snapshot the guest again, make some more changes and shutdown again. Commit the changes with:
 
virt-snapshot --commit <guest>
 
Check the changes have persisted.
 
|-
 
| virt-v2v
 
|| If you have any Xen Fedora/RHEL guests around, copy them their images over to the test box and export their libvirt domain XML on the remote box with:
 
virsh dumpxml <guest> > <guest>.xml
 
Make sure you copy the images to the same location on the test box as they were in on the origin box. Alternatively do some path surgery on the domain xml. Create the following basic virt-v2v.conf:
 
[libvirtxml]
 
bridge.xenbr1=virbr0
 
If the guest has a PV kernel, obtain an FV kernel relevant to the target OS and add something like the following to your virt-v2v.conf:
 
[aliases]
 
rhel.kernel-xen=kernel
 
rhel.kernel-xenU=kernel
 
fedora.kernel-xen=kernel
 
fedora.kernel-xenU=kernel
 
 
[files]
 
rhel.5.kernel=/path/to/kernel.arch.el5.rpm
 
See virt-v2v.conf(5) for more. Snapshot the images and convert them to run on KVM with:
 
virt-snapshot -o <guest>-snapshot.xml -i libvirtxml <guest>.xml
 
virt-v2v -s virt-v2v.conf -i libvirtxml <guest>-snapshot.xml
 
Does the resulting guest boot? Does it give any errors on boot? Are the VirtIO drivers enabled? If anything looks wrong, please report any error messages, along with any config files in the guest which look broken.
 
 
|-
 
|-
 
| Advanced
 
| Advanced
Line 139: Line 111:
 
|-  
 
|-  
 
| || || [http://bugzilla.redhat.com/XXXXXX #XXXXX] || '''ASSIGNED'''
 
| || || [http://bugzilla.redhat.com/XXXXXX #XXXXX] || '''ASSIGNED'''
 +
|-
 +
| [[User:Ericb]] || xz support in guestfish
 +
| {{bz|580556}} || '''FIXED UPSTREAM'''
 +
|-
 +
| [[User:Ericb]] || virt-inspector hits undefined value
 +
| {{bz|580650}} ||
 
|}
 
|}
  
 
[[Category:Fedora_13_Test_Days]]
 
[[Category:Fedora_13_Test_Days]]
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]

Latest revision as of 17:33, 8 April 2010

DATE TIME WHERE
Thursday Apr 08, 2010 All day #fedora-test-day (webchat)

Contents

[edit] What to test?

This part of today's Fedora Test Day will focus on testing the libguestfs / guestfish feature in Fedora 13.

If you come to this page after the test day is completed, your testing is still valuable, and you can use the information on this page to test libguestfs and provide feedback.

[edit] Who's available

Richard Jones is your host for today.

The following people have also agreed to be available for testing, workarounds, bug fixes, and general discussion:

[edit] What's needed to test

  • A fully updated Fedora 13 test machine. See instructions on the main test day page. Note you can use a virtual machine for testing!
  • (Optional) Existing virtual machine disk images.

[edit] How to test

Look at the Test Cases section below and run through them.

Add your comments below this in the Issues that were identified section, and/or file bugs in Bugzilla by following this link.

[edit] Test Cases

Things to test:

Test Method
Installation Install F13 (you can install it inside a virtual machine if you want, but it'll run a bit slower). Then:
yum install libguestfs guestfish perl-libguestfs \
  virt-cat virt-df virt-inspector virt-v2v

If there are any installation errors or dependency problems, these are serious bugs and should be reported.

Start up Does libguestfs start up? Firstly run this:
guestfish alloc /tmp/test.img 10M : run || echo failed

This should take a few seconds (perhaps up to a minute or two on a slow machine). It shouldn't print any error messages. You don't need to be root.

Edit: Although it "shouldn't print any error messages", if KVM is unavailable then you may see the following harmless warnings, and it'll also be a lot slower:

open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support

If the short test above fails, please run:

libguestfs-test-tool

If it doesn't print "== TEST FINISHED OK== " at the end, copy the complete, unedited output into a bug report, along with details of your test machine. You can also ask about problems in the IRC channel.

Inspector If you have any existing virtual machine disk images around, then try running virt-inspector on them:
virt-inspector /path/to/disk.img

(Note you don't need to be root, but if the disk image isn't at least readable as non-root them you may need to chmod the image or become root). Does the output look sensible? Does it match the operating system you think is in the disk image? Are there any error messages?

virt-df If you have any existing virtual machine disk images around, or the machine has libvirt guests, try running virt-df on them:
virt-df /path/to/disk.img
virt-df

Does the output agree with the free/used space for that guest? Do you see any error messages? Note that virt-df has a bug where it hangs if it cannot access a disk image: RHBZ #579155

virt-cat If you have any existing virtual machine disk images around, or the machine has libvirt guests, try running virt-cat on them:
virt-cat guestname /etc/fstab
virt-cat guestname /var/log/messages
virt-cat guestname /var/run/utmp > /tmp/utmp
who /tmp/utmp
virt-cat mydomain /var/log/wtmp > /tmp/wtmp
last -f /tmp/wtmp

Does the output agree with what is in the corresponding files in that guest? Do you see any error messages?

Make image Choose a large tarball and construct a disk image from it.

You have to set the size of the disk image in advance, large enough to fit the tarball with some headroom. eg. If the tarball was 10 MB, you might choose a 14 MB image (if the image is not large enough, you will trip RHBZ #580246) So:

guestfish -x alloc output.img 14M : run : \
  sfdiskM /dev/sda , : \
  mkfs ext2 /dev/sda1 : \
  mount /dev/sda1 / : \
  tgz-in something.tar.gz /

That should produce an output file (output.img) which you can look at also with guestfish:

guestfish -a output.img -m /dev/sda1
><fs> ls /
Advanced If you have lots of time, try some of the guestfish recipes here:

http://libguestfs.org/recipes.html

Thanks for your contribution to making Fedora better and less buggy!

[edit] Issues that were identified

Tester Description Bug references Status
#XXXXX ASSIGNED
User:Ericb xz support in guestfish RHBZ #580556 FIXED UPSTREAM
User:Ericb virt-inspector hits undefined value RHBZ #580650