![从 Ubuntu 18.04 升级到 20.04。Xen 现在存在 hvm VM 问题](https://linux22.com/image/925739/%E4%BB%8E%20Ubuntu%2018.04%20%E5%8D%87%E7%BA%A7%E5%88%B0%2020.04%E3%80%82Xen%20%E7%8E%B0%E5%9C%A8%E5%AD%98%E5%9C%A8%20hvm%20VM%20%E9%97%AE%E9%A2%98.png)
问题 1:运行 Ubuntu Linux 的 pv VM 可以运行,但无法通过桥接连接,直到我将
net.ipv4.ip_forward=1
其添加sysctl.conf
(并重新启动)。不确定为什么我现在需要这个,但查看sysctl.conf
启动时运行的问题(与旧问题相比)可能会提供线索。
问题 2:(更大的问题)运行 Windows 10 的 hvm VM 现在拒绝启动:
root@ap1:/etc/xen# cat zz.cfg
type = 'hvm'
name = 'win10'
memory = 4196
vcpus = 3
vif = ['bridge=xenbr0']
disk = ['phy:/dev/rootvg/win10-disk,hda,w','file:/backups/MLaptop/Windows10.iso,hdc:cdrom,r']
sdl = 0
vnc = 1
vncconsole = 1
vnclisten = ''
vncpasswd = ''
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
localtime = 1
root@ap1:/etc/xen#
root@ap1:/etc/xen# xl create zz.cfg
Parsing config from zz.cfg
libxl: error: libxl_dm.c:2426:device_model_spawn_outcome: Domain 18:domain 18 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1563:domcreate_devmodel_started: Domain 18:device model did not start: -3
libxl: error: libxl_dm.c:2541:kill_device_model: Device Model already exited
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 18:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 18:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 18:Destruction of domain failed
有人能知道为什么我升级后会出现失败的情况吗?
更多信息:- en.service 未正确启动:
root@ap1:/etc/xen# systemctl status xen.service
● xen.service - LSB: Xen daemons
Loaded: loaded (/etc/init.d/xen; generated)
Active: failed (Result: exit-code) since Thu 2020-06-18 18:08:58 BST; 1min 58s ago
Docs: man:systemd-sysv-generator(8)
Process: 2378 ExecStart=/etc/init.d/xen start (code=exited, status=1/FAILURE)
Tasks: 3 (limit: 19033)
Memory: 30.5M
CGroup: /system.slice/xen.service
├─2460 /usr/lib/xen-4.11/bin/oxenstored --pid-file /var/run/xenstore.pid
└─2466 /usr/lib/xen-4.11/bin/xenconsoled --pid-file /var/run/xenconsoled.pid
Jun 18 18:08:58 apollo systemd[1]: Starting LSB: Xen daemons...
Jun 18 18:08:58 apollo xen[2378]: * Starting Xen daemons
Jun 18 18:08:58 apollo xen[2469]: qemu-system-i386: -xen-domid 0: Option not supported for this target
Jun 18 18:08:58 apollo xen[2378]: ...fail!
Jun 18 18:08:58 apollo systemd[1]: xen.service: Control process exited, code=exited, status=1/FAILURE
Jun 18 18:08:58 apollo systemd[1]: xen.service: Failed with result 'exit-code'.
Jun 18 18:08:58 apollo systemd[1]: Failed to start LSB: Xen daemons.
答案1
发行版从 18.04 到 20.04 的升级日志指出找不到xen
utils 版本 4.9(本来应该安装 4.11)。
我尝试删除xen
然后重新安装它(从 Ubuntu 使用apt
),但这并没有解决问题。所以我删除了xen
和qemu
,然后重新安装了
xen-hypervisor-amd64
。这引入了一个版本,qemu
现在支持-xen-domid
打开qemu-system-i386
。xen-service
现在报告运行正常,我的 Windows 10 VM 现在像以前一样工作。