Difference: CreatingKVMImages (3 vs. 4)

Revision 42010-06-22 - mvliet

Line: 1 to 1
META TOPICPARENT name="UvicKVMResources"
Line: 22 to 22
  --cdrom /home/mvliet/SL.53.031809.DVD.i386.disc1.iso
The example below will create a 10GB guest image and start a net based install of fedora10. To achieve a truly text-only install, the --nographics option is used in combination with the --extra-args option. The provided arguments for the --extra-args option are specific to the Anaconda installer and inform it to enable a serial console for the installation process. Since the default behavior of virt-install is to connect to the guest console, you will immediately be connected to the serial console you told Anaconda to create. This method will also work for RedHat based distros (rhel, centos, scientific linux, etc.) as they will all use Anaconda.
sudo virt-install --connect qemu:///system \
    --os-type linux \
    --name fedora2 \
    --ram 512 \
    --disk path=/home/mvliet/fedora.img,bus=virtio,size=10,sparse=true \
    --accelerate \
    --location http://download.fedoraproject.org/pub/fedora/linux/releases/10/Fedora/i386/os/ \
    --nographics \
    --extra-args="serial console=tty0 console=ttyS0,115200"
  • When creating a KVM guest you must always use the --accelerate option. If you do not, it will fall back to QEMU emulation.
  • the --cdrom option can point to an actual drive (ie, /dev/hdc), or a iso file on your local machine, or even a remote file (ftp, http, etc.).
  • the --cdrom option can point to an actual drive (ie, /dev/hdc), or a iso file on your local machine.
  • use --location for a remote file (ftp, http, etc.).
  • ram is specified in MB, disk size is specified in GB.
  • the --disk option may be of more use to you the --file.
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback