Я установил kvm, создали новое изображение для виртуального хоста:
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/lubuntu.img 30G
созданный .xml конфигурационный файл для него:
<domain type='kvm'>
<name>lubuntu</name>
<uuid>f5b8c05b-9c7a-3211-49b9-2bd635f7e2aa</uuid>
<memory>10485760</memory>
<currentMemory>10485760</currentMemory>
<vcpu>1</vcpu>
<os>
<type>hvm</type>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/var/lib/libvirt/images/lubuntu.img"/>
<target dev="vda" bus="virtio"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/var/lib/libvirt/images/lubuntu-17.04-desktop-i386.iso"/>
<target dev="hdc" bus="ide"/>
<readonly/>
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
</disk>
<interface type='bridge'>
<source bridge='virbr0'/>
<mac address="00:00:A3:B0:56:10"/>
</interface>
<controller type="ide" index="0">
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
</controller>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport="yes" listen='0.0.0.0'/>
<console type='pty'>
<target port='0'/>
</console>
</devices>
</domain>
запущенный это:
virsh create lubuntu.xml
после того, как я соединяюсь с ним с помощью vnc средство просмотра и вижу окна установки, но когда я нажимаю "установку", я вижу предупреждение, что у меня нет достаточного дискового пространства
This pc has only 262.7 kB free.
мой lubuntu.img файл является точно этим размером, и я не могу зафиксировать. Когда я делаю:
valera@ubuntu-server:/var/lib/libvirt/images$ sudo qemu-img resize lubuntu.img +5G
Image resized.
это остается все еще 200 + размер КБ...
Вы использовали type="raw"
в xml для lubuntu.img изображения qcow2. Изменение его к type="qcow2"
решает проблему.