From Fedora Project Wiki
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
== Installing KVM and the virt tools == | == Installing KVM and the virt tools == | ||
As root, do: | |||
# yum install libvirt-daemon-kvm virt-manager | |||
# yum | |||
After installation, check whether libvirtd is running: | After installation, check whether libvirtd is running: | ||
Line 65: | Line 54: | ||
# export OSNAME=Fedora-16-i386-DVD | # export OSNAME=Fedora-16-i386-DVD | ||
=== Test case 1: ISO media | === Test case 1: Inspecting ISO media === | ||
The first test is to try to inspect the ISO media and see if libguestfs can identify the operating system. Use the 'virt-inspector' command todo this | |||
# virt-inspector /path/to/iso/image | |||
'''This test shall be considered successful if the above commands outputs an XML document containing an <operatingsystem> element and the following child elements''' | |||
- <name> | |||
- <distro> | |||
- <arch> | |||
- <major_version> + <minor_version> | |||
- <format>installer</installer> | |||
If this | If any of this data is missing, file a bug report against the libguestfs component, providing details of the ISO image you used | ||
For example a successful invocation on a Fedora 16 DVD looks like this: | For example a successful invocation on a Fedora 16 DVD looks like this: | ||
# cd /var/lib/libvirt/images | # cd /var/lib/libvirt/images | ||
# | # virt-inspector $OSNAME.iso | ||
<?xml version="1.0"?> | |||
<operatingsystems> | |||
<operatingsystem> | |||
<root>/dev/sda</root> | |||
<name>linux</name> | |||
<arch>i386</arch> | |||
<distro>fedora</distro> | |||
<major_version>116</major_version> | |||
<minor_version>0</minor_version> | |||
<package_format>rpm</package_format> | |||
<package_management>yum</package_management> | |||
<format>installer</format> | |||
<multipart/> | |||
<mountpoints> | |||
<mountpoint dev="/dev/sda">/</mountpoint> | |||
</mountpoints> | |||
<filesystems> | |||
<filesystem dev="/dev/sda"> | |||
<type>iso9660</type> | |||
<label>Fedora 16 i386 DVD</label> | |||
</filesystem> | |||
</filesystems> | |||
<applications/> | |||
</operatingsystem> | |||
</operatingsystems> | |||
Even if this test fails, you can still proceed with the other three tests. | Even if this test fails, you can still proceed with the other three tests. | ||
Line 97: | Line 114: | ||
Assuming the $OSNAME env variable is still set from earlier, the following command can be used: | Assuming the $OSNAME env variable is still set from earlier, the following command can be used: | ||
# virt-install --hvm --noreboot --ram 800 --vnc --name $OSNAME | # virt-install --hvm --noreboot --ram 800 --vnc --name $OSNAME --network network=default --disk file=/var/lib/libvirt/images/$OSNAME.qcow2,size=10 --cdrom /var/lib/libvirt/images/$OSNAME.iso | ||
For recent windows/linux guests, it is advisable to tell virt-install what the guest OS type is. Take the above command line and add in 2 more options: | For recent windows/linux guests, it is advisable to tell virt-install what the guest OS type is. Take the above command line and add in 2 more options: |