我试图仅使用命令行(虚拟机管理程序和来宾)在KVM(RHEL 6)上安装完全虚拟化的来宾(Fedora 14 x86_64)。它没有错误,也没有明显的结果。我想知道如何进行纯文本安装。
所以,这是我所做的:
# virt-install \
--name=FE --ram=756 --vcpus=1 \
--file=/var/lib/libvirt/images/FE.img --network bridge:br0 \
--nographics --os-type=linux \
--extra-args='console=tty0' -v \
--cdrom=/media/usb/Fedora-14-x86_64-Live-Desktop.iso
Starting install...
Creating domain... | 0 B 00:00
Connected to domain FE
Escape character is ^]
ÿ
怎么办?据我了解,在搜寻了几天之后,我应该看到来自文本安装的访客输出,但是什么也没有发生。virt-viewer无法连接到它,建议我通过添加--help探索所有选项(我这样做了)。如果我重新连接virsh,则会看到以下内容:
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[root@v ~]
# virsh console FEConnected to domain FE
Escape character is ^]
这表明VM正在运行
# virsh list
Id Name State
----------------------------------
8 FE running
Qemu日志:
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 756 -smp 1,sockets=1,cores=1,threads=1 -name FE -uuid 6989d008-7c89-424c-d2d3-f41235c57a18 -nographic -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/FE.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -no-reboot -boot d -drive file=/var/lib/libvirt/images/FE.img,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/media/usb/Fedora-14-x86_64-Live-Desktop.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:0a:65:8d,bus=pci.0,addr=0x2 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
char device redirected to /dev/pts/1
/etc/libvirt/qemu/FE.xml的输出
# cat /etc/libvirt/qemu/FE.xml
<domain type='kvm'>
<name>FE</name>
<uuid>6989d008-7c89-424c-d2d3-f41235c57a18</uuid>
<memory>774144</memory>
<currentMemory>774144</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<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='raw' cache='none'/>
<source file='/var/lib/libvirt/images/FE.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:0a:65:8d'/>
<source bridge='br0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
</domain>
我显然缺少了许多其他人没有的东西,但这是什么?提前感谢!
--network bridge:br0
,改cdrom
到location
,并extra-args
以--extra-args='console=tty0 console=ttyS0,115200n8 serial'
和它的工作!
--cdrom
它都不能与extra-args一起使用,但是--location
(或-l
)可以。相同的道路,一切。