我正在尝试使用以下命令在 CentOS 6.6 主机上安装 Centos 6.6 VM。
virt-install \
--name vm-queue \
--description "Queue Server" \
--ram 2048 \
--disk path=/var/kvm/images/vm-queue.img,size=30 \
--vcpus 2 \
--os-type linux \
--os-variant rhel6 \
--network bridge=br0 \
--graphics none \
--console pty,target_type=serial \
--cdrom /var/iso/CentOS-6.6-x86_64-minimal.iso
我得到了一个启动屏幕让我选择安装选项。
我一按回车键,就得到了
Loading vmlinuz......
Loading initrd.img....................................ready.
Probing EDD (edd=off to disable)... ok
然后我在左下角看到一个光标,大约 3-4 秒后,我看到了�
。
我让它静置长达一个小时,但什么也没发生。
据我所知,安装线上的一切都很棒。机器有 2 个 4 核处理器,96G 内存,桥接器正在运行。
/var/log/libvirt/libvirtd.log
在安装过程中没有得到任何东西。但是,当我最终不得不Enter+ ~+.终止会话时,我得到了
14232: error : daemonStreamHandleAbort:609 : stream aborted at client request
14232: error : virNetSocketReadWire:1194 : End of file while reading data: Input/output error
然后我终止该进程。
14232: error : qemuMonitorIO:615 : internal error End of file from monitor
有人知道我安装时获得的随机字符是怎么回事吗?
如果有人需要,这是 libvirt 创建的 XML 文件
<domain type='kvm'>
<name>vm-queue</name>
<uuid>de964c10-fdc3-ddad-96d3-c885bd9c1661</uuid>
<description>Queue Server</description>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='rhel6.6.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/kvm/images/vm-queue.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
</controller>
<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:bd:ac:6e'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>
答案1
您似乎正在尝试使用串行控制台而不是普通的控制台。不确定为什么你正在这么做,但是...
默认情况下,安装程序会尝试在 Linux 控制台上显示文本或图形。要将输出转移到串行您需要Tab在启动屏幕上点击的控制台,并确保将以下选项添加到启动命令行:
text console=ttyS0