From Fedora Project Wiki

(Mention libguestfs password bug)
(Link to latest cloud media)
Line 9: Line 9:


=== Ready your disk image ===
=== Ready your disk image ===
{{admon/warning | Use of virt-customize/virt-builder for setting a password appears broken | See bug 1146275 for more info}}


==== Personal pre-existing disk image ====
==== Personal pre-existing disk image ====
Line 19: Line 17:


* Install virt-customize with: <code>yum install libguestfs-tools-c</code>
* Install virt-customize with: <code>yum install libguestfs-tools-c</code>
* <code>wget https://dl.fedoraproject.org/pub/fedora/linux/releases/test/21-Alpha/Cloud/Images/x86_64/Fedora-Cloud-Base-20140915-21_Alpha.x86_64.qcow2</code>
* <code>wget https://dl.fedoraproject.org/pub/fedora/linux/releases/test/22_Alpha/Cloud/x86_64/Images/Fedora-Cloud-Atomic-22_Alpha-20150305.x86_64.qcow2</code>
* Set the root password to '123456' with: <code> virt-customize -a Fedora-Cloud-Base-20140915-21_Alpha.x86_64.qcow2 --root-password password:123456</code>
* Set the root password to '123456' with: <code> virt-customize -a Fedora-Cloud-Atomic-22_Alpha-20150305.x86_64.qcow2 --root-password password:123456</code>
** This is not secure, but should be fine for test purposes.
** This is not secure, but should be fine for test purposes.


Line 27: Line 25:


* Install virt-builder with: <code>yum install libguestfs-tools-c</code>
* Install virt-builder with: <code>yum install libguestfs-tools-c</code>
* Use <code>virt-builder --list</code> to see the available distro images. We will use fedora-20
* Use <code>virt-builder --list</code> to see the available distro images. We will use fedora-21
* Download the image and set the root password to '123456': <code>virt-builder fedora-20 --root-password password:123456</code>
* Download the image and set the root password to '123456': <code>virt-builder fedora-21 --root-password password:123456</code>


=== virt-manager ===
=== virt-manager ===

Revision as of 01:08, 14 April 2015

Description

Import an existing VM disk image.

Setup

Initial test day setup, a pre-existing VM image.

How to test

Ready your disk image

Personal pre-existing disk image

For this test we want to be sure that all sorts of disk images will import and run correctly, so please consider using any existing disk image you have.

Fedora cloud image

If you don't have an existing disk image, but still want to run the test, you can use a Fedora cloud image

virt-builder pre-installed image

virt-builder is a new tool that can download pre-installed minimal images for a variety of distros.

  • Install virt-builder with: yum install libguestfs-tools-c
  • Use virt-builder --list to see the available distro images. We will use fedora-21
  • Download the image and set the root password to '123456': virt-builder fedora-21 --root-password password:123456

virt-manager

  1. Run virt-manager (should autoconnect to qemu)
  2. Launch the 'New VM' wizard
  3. Choose the 'Import' option
  4. Browse to the existing VM image.
  5. Make sure to enter a valid OS type, it's important for performance defaults.
  6. Proceed with through the wizard, using the default suggested values.
  7. On the final page, use the VM name: test-day-vm
  8. Finish the install, verify your VM boots as expected. Depending on the OS and content of the image, additional devices may need to be configured in the 'customize before install' step.

virt-install

An example virt-install invocation looks like

sudo virt-install --name test-day-vm --ram 2048 \
        --disk /path/to/my/existing/vm/disk.img \
        --os-variant fedora21 \
        --import

Expected Results

Guest installations start and perform without any issues. Guest is bootable after install completes.