Pro*_*ter 8 kvm virtualization
我已将操作系统升级到 Ubuntu 16.04,并尝试使用我在 Ubuntu 14.04 上成功使用的KVM 管理工具从头开始安装 ubuntu 14.04 来宾。不幸的是,看起来 virt-install 已更改并且不再接受--location带有 ISO 映像的参数,因为它将输出以下错误:
Starting install...
ERROR Could not find an installable distribution at '/home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso'
The location must be the root directory of an install tree.
Run Code Online (Sandbox Code Playgroud)
但是,如果我不使用该--cdrom参数代替--location它,则不再喜欢我有一个--extra-args参数指定 kickstart/preseed 文件的位置以及控制台将使用 ttyS0的事实。
--extra-args "console=ttyS0 ks=http://pastebin.com/raw.php?i=SrTvbt6Z"
Run Code Online (Sandbox Code Playgroud)
此时,我尝试从 CD 中删除要安装的 --extra-args 参数,但如果这样做,则在 CLI 中看不到任何安装输出。我猜它希望您通过 VNC 或其他不理想的方式进行连接。
作为参考,原来的安装命令是:
qemu-img create -f qcow2 -o preallocation=metadata,lazy_refcounts=on /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img 20G
virt-install --connect qemu:///system \
--nographics \
--os-type linux \
--accelerate \
--hvm \
--network network=default,model=virtio \
--name ubuntu14.04 \
--os-variant=ubuntu14.04 \
--location /home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso \
--extra-args "console=ttyS0 ks=http://pastebin.com/raw.php?i=SrTvbt6Z" \
--disk /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img,bus=virtio,format=qcow2 \
--ram 512 \
--vcpus 2
Run Code Online (Sandbox Code Playgroud)
新命令是:
qemu-img create -f qcow2 -o preallocation=metadata,lazy_refcounts=on /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img 20G
virt-install --connect qemu:///system \
--nographics \
--os-type linux \
--accelerate \
--hvm \
--network network=default,model=virtio \
--name ubuntu14.04 \
--os-variant=ubuntu14.04 \
--cdrom /home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso \
--disk /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img,bus=virtio,format=qcow2 \
--ram 512 \
--vcpus 2
Run Code Online (Sandbox Code Playgroud)
如何使用额外参数从本地 ISO 映像安装 virt-install 以指定 kickstart/preseed 文件的位置,并允许我查看进度并可能通过 CLI 而不是使用 VNC 选择选项?
也许我必须为 指定一个 web url 而不是 ISO 映像--location,但如果我可以传递本地位置,我会更喜欢它,以防互联网不是那么好。
小智 5
@Programster - 我在他们的邮件列表中向 virt-manager 维护者报告了这个问题。请参阅http://www.redhat.com/archives/virt-tools-list/2016-August/msg00009.html。您可以关注该线程以获取更多详细信息。知道这适用于 Ubuntu 14.04 而不是 Ubuntu 16.04 是解决问题的关键。
最重要的是,这现已在https://github.com/virt-manager/virt-manager的 master 分支中修复。
修复它的提交是:https : //github.com/virt-manager/virt-manager/commit/3f15a489cda87f8028828d567848193dd2640a43
我不确定这什么时候会出现在各种 virt-manager 包中。但是您可以获取源代码并从那里运行 virt-install。(注意:您需要添加一些包,并且可能应该创建一个 Python 虚拟环境,因此您可能需要在 VM 上进行试验,然后再在需要保持稳定和干净的系统上处理额外的包。)
| 归档时间: |
|
| 查看次数: |
13925 次 |
| 最近记录: |