I guess I need the list again.
I try to install my first KVM guest. Here is what I do, and finally, what I stumble on.
First I created a qcow2 img:
# qemu-img create -f qcow2 /var/lib/libvirt/images/test1.img 15G
And I created a network bridge (not essential here)
To get a text-based install, I followed this how-to:
http://sysadminman.net/blog/2011/kvm-virtualization-text-centos-guest-instal...
My install command was:
virt-install \ --name test1 \ --os-variant=rhel5.4 \ --ram 512 \ --vcpus=1 \ --accelerate \ --nographics \ -v \ --location=/mnt/centos56/ \ --network bridge:br0 \ --disk path=/var/lib/libvirt/images/test1.img,size=15 \ --extra-args="console=ttyS0";
I tried this also without the "size" argument for "disk"
Now, the install begins ok. I do a http install from a nearby mirror.
BUT when it is time to do partitions, I get
Which drive(s) do you want to use for this installation? | | [*] vda 0 MB (Unknown) ^ | |
And if I now try to create partitions, I get "no space" error.
What is going on??
Cheers to CentOS! - Jussi
On Thu, 21 Apr 2011, Jussi Hirvi wrote:
I guess I need the list again.
I try to install my first KVM guest. Here is what I do, and finally, what I stumble on.
First I created a qcow2 img:
In my experience, virt-install will create the disk image when passed a filename via --disk="path=/path/to/nonexistent/disk.dsk,size=15"
In other words, I'd suggest skipping the disk-creation step...
On 21.4.2011 19.04, Paul Heinlein wrote:
In my experience, virt-install will create the disk image when passed a filename via --disk="path=/path/to/nonexistent/disk.dsk,size=15"
In other words, I'd suggest skipping the disk-creation step...
Thanks Paul - it works! I wonder if the disk image will be of type qcow2. I guess I will soon find out.
- Jussi
On 21.4.2011 23.17, Jussi Hirvi wrote:
I wonder if the disk image will be of type qcow2. I guess I will soon find out.
Nope. Command "qemu-img info.." tells me that the image type is "raw". But I don't think I need any of the qcow2 specialties.
- Jussi
Hi Jussi After installing guest image, Convert it from raw to qcow2 by "convert" command.
qemu-img convert -f raw disk0.raw -O qcow2 newdisk0.qcow2
Now you can mount newdisk to empty VM with virt-manager. Or you can edit <DOMAIN>.xml as follows..
/var/lib/libvirt/qemu/<DOMAIN>.xml:
<domain type='kvm'> <name>vm1</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch='i686'>hvm</type> <boot dev='hd'/> </os> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/home/tsuyoshi/test/newdisk0.qcow2'/> <target dev='hda' bus='ide'/> </disk> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target port='0'/> </console> </devices> </domain>
-- Tsuyoshi