AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[kvm](ubuntu)

Martin Hope
apalacheno
Asked: 2021-06-07 01:25:54 +0800 CST

netplan 支持多少个 VLAN 网桥?

  • 3

在实验室网络中,我尝试虚拟化在多个 VLAN [2] 之间路由的路由器。Hypervisor 运行 Ubuntu 20.04。

但是,我只能在 Hypervisor 上设置 21 个 VLAN 网桥。一旦我添加了第 22 个 VLAN 网桥(或更多),netplan 就会引发错误 [1]。

这让我想知道,如果 netplan 只支持有限数量的 VLAN 网桥?

[编辑]:这是在 netplan 上0.102-0ubuntu1~20.04.2。Systemd 单元输出低于 [3]。更有趣的是日志输出,其中包含以下行:Could not enumerate addresses: No buffer space available[4]。

[1] 尝试应用 >21 个 VLAN 网桥时的错误:

root@test1:~# netplan apply
Job for systemd-networkd.service failed because the control process exited with error code.
See "systemctl status systemd-networkd.service" and "journalctl -xe" for details.
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 264, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 236, in command_apply
    utils.systemctl_networkd('start', sync=True, extra_services=netplan_wpa + netplan_ovs)
  File "/usr/share/netplan/netplan/cli/utils.py", line 131, in systemctl_networkd
    subprocess.check_call(command)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'start', 'systemd-networkd.service', 'netplan-ovs-cleanup.service']' returned non-zero exit status 1.

[2] 具有 30 个接口的完整 netplan 配置:

network:
  version: 2
  renderer: networkd

  ethernets:
    enp1s0:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.0.135/24
      gateway4: 192.168.0.254
      nameservers:
        search:
          - example.com
        addresses:
          - 192.168.0.1
          - 192.168.0.2

  vlans:
    br0.1:
      id: 1
      link: br0
    br0.2:
      id: 2
      link: br0
    br0.3:
      id: 3
      link: br0
    br0.4:
      id: 4
      link: br0
    br0.5:
      id: 5
      link: br0
    br0.6:
      id: 6
      link: br0
    br0.7:
      id: 7
      link: br0
    br0.8:
      id: 8
      link: br0
    br0.9:
      id: 9
      link: br0
    br0.10:
      id: 10
      link: br0
    br0.11:
      id: 11
      link: br0
    br0.12:
      id: 12
      link: br0
    br0.13:
      id: 13
      link: br0
    br0.14:
      id: 14
      link: br0
    br0.15:
      id: 15
      link: br0
    br0.16:
      id: 16
      link: br0
    br0.17:
      id: 17
      link: br0
    br0.18:
      id: 18
      link: br0
    br0.19:
      id: 19
      link: br0
    br0.20:
      id: 20
      link: br0
    br0.21:
      id: 21
      link: br0
    br0.22:
      id: 22
      link: br0
    br0.23:
      id: 23
      link: br0
    br0.24:
      id: 24
      link: br0
    br0.25:
      id: 25
      link: br0
    br0.26:
      id: 26
      link: br0
    br0.27:
      id: 27
      link: br0
    br0.28:
      id: 28
      link: br0
    br0.29:
      id: 29
      link: br0

  bridges:
    br0:
      interfaces:
        - enp1s0
      macaddress: 54:52:00:00:51:14
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.0.249/24
      gateway4: 192.168.0.254
      nameservers:
        search:
          - example.com
        addresses:
          - 192.168.0.1
          - 192.168.0.2
      #parameters:
      #  forward-delay: 0
      #  stp: false
    br1:
      interfaces:
        - br0.1
      macaddress: 54:52:01:00:00:14
      dhcp4: no
      dhcp6: no
      addresses:
        - 10.1.0.14/24
      gateway4: 10.1.0.254
      nameservers:
        search:
          - example.com
        addresses:
          - 192.168.0.1
          - 192.168.0.2
    br2:
      interfaces:
        - br0.2
      dhcp4: no
      dhcp6: no
    br3:
      interfaces:
        - br0.3
      dhcp4: no
      dhcp6: no
    br4:
      interfaces:
        - br0.4
      dhcp4: no
      dhcp6: no
    br5:
      interfaces:
        - br0.5
      dhcp4: no
      dhcp6: no
    br6:
      interfaces:
        - br0.6
      dhcp4: no
      dhcp6: no
    br7:
      interfaces:
        - br0.7
      dhcp4: no
      dhcp6: no
    br8:
      interfaces:
        - br0.8
      dhcp4: no
      dhcp6: no
    br9:
      interfaces:
        - br0.9
      dhcp4: no
      dhcp6: no
    br10:
      interfaces:
        - br0.10
      macaddress: 54:52:20:00:00:01
      dhcp4: no
      dhcp6: no
      addresses:
        - 10.10.0.1/24
      gateway4: 10.10.0.254
      nameservers:
        search:
          - example.com
        addresses:
          - 192.168.0.1
          - 192.168.0.2
    br11:
      interfaces:
        - br0.11
      dhcp4: no
      dhcp6: no
    br12:
      interfaces:
        - br0.12
      dhcp4: no
      dhcp6: no
    br13:
      interfaces:
        - br0.13
      dhcp4: no
      dhcp6: no
    br14:
      interfaces:
        - br0.14
      dhcp4: no
      dhcp6: no
    br15:
      interfaces:
        - br0.15
      dhcp4: no
      dhcp6: no
    br16:
      interfaces:
        - br0.16
      dhcp4: no
      dhcp6: no
    br17:
      interfaces:
        - br0.17
      dhcp4: no
      dhcp6: no
    br18:
      interfaces:
        - br0.18
      dhcp4: no
      dhcp6: no
    br19:
      interfaces:
        - br0.19
      dhcp4: no
      dhcp6: no
    br20:
      interfaces:
        - br0.20
      dhcp4: no
      dhcp6: no
    br21:
      interfaces:
        - br0.21
      dhcp4: no
      dhcp6: no
    br22:
      interfaces:
        - br0.22
      dhcp4: no
      dhcp6: no
    br23:
      interfaces:
        - br0.23
      dhcp4: no
      dhcp6: no
    br24:
      interfaces:
        - br0.24
      dhcp4: no
      dhcp6: no
    br25:
      interfaces:
        - br0.25
      dhcp4: no
      dhcp6: no
    br26:
      interfaces:
        - br0.26
      dhcp4: no
      dhcp6: no
    br27:
      interfaces:
        - br0.27
      dhcp4: no
      dhcp6: no
    br28:
      interfaces:
        - br0.28
      dhcp4: no
      dhcp6: no
    br29:
      interfaces:
        - br0.29
      dhcp4: no
      dhcp6: no

[3] 系统输出:

root@test1:~# systemctl status systemd-networkd.service
● systemd-networkd.service - Network Service
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled-runtime; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-06-07 16:17:15 CEST; 2s ago
       Docs: man:systemd-networkd.service(8)
    Process: 63803 ExecStart=/lib/systemd/systemd-networkd (code=exited, status=1/FAILURE)
   Main PID: 63803 (code=exited, status=1/FAILURE)
      Error: 105 (Kein Hauptspeicher für den Puffer verfügbar)

Jun 07 16:17:15 test1 systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE
Jun 07 16:17:15 test1 systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Jun 07 16:17:15 test1 systemd[1]: Failed to start Network Service.
Jun 07 16:17:15 test1 systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 5.
Jun 07 16:17:15 test1 systemd[1]: Stopped Network Service.
Jun 07 16:17:15 test1 systemd[1]: systemd-networkd.service: Start request repeated too quickly.
Jun 07 16:17:15 test1 systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Jun 07 16:17:15 test1 systemd[1]: Failed to start Network Service.

[4] 错误日志:

root@test1:~# journalctl -xe
Jun 07 16:17:14 test1 systemd[1]: Reloading.
Jun 07 16:17:14 test1 systemd[1]: Stopping Network Service...
-- Subject: A stop job for unit systemd-networkd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit systemd-networkd.service has begun execution.
--
-- The job identifier is 3254.
Jun 07 16:17:14 test1 systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
-- Subject: A start job for unit netplan-ovs-cleanup.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit netplan-ovs-cleanup.service has finished successfully.
--
-- The job identifier is 3259.
Jun 07 16:17:14 test1 systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
-- Subject: A start job for unit netplan-ovs-cleanup.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit netplan-ovs-cleanup.service has finished successfully.
--
-- The job identifier is 3262.
Jun 07 16:17:14 test1 systemd[1]: systemd-networkd.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit systemd-networkd.service has successfully entered the 'dead' state.
Jun 07 16:17:14 test1 systemd[1]: Starting Network Service...
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit systemd-networkd.service has begun execution.
--
-- The job identifier is 3256.
Jun 07 16:17:14 test1 systemd-networkd[63781]: br9: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br8: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br7: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br6: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br5: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br4: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br3: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br29: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br28: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br27: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br26: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br25: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br24: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br23: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br22: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br21: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br20: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br2: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br19: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br18: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br17: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br16: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br15: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br14: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br13: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br12: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br11: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br10: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br1: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: br0: netdev ready
Jun 07 16:17:14 test1 systemd-networkd[63781]: Could not enumerate addresses: No buffer space available
Jun 07 16:17:14 test1 systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jun 07 16:17:14 test1 systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit systemd-networkd.service has entered the 'failed' state with result 'exit-code'.
Jun 07 16:17:14 test1 systemd[1]: Failed to start Network Service.
-- Subject: A start job for unit systemd-networkd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit systemd-networkd.service has finished with a failure.
--
-- The job identifier is 3256 and the job result is failed.
Jun 07 16:17:14 test1 systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 1.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jun 07 16:17:14 test1 systemd[1]: Condition check resulted in OpenVSwitch configuration for cleanup being skipped.
-- Subject: A start job for unit netplan-ovs-cleanup.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit netplan-ovs-cleanup.service has finished successfully.
--
-- The job identifier is 3268.

(以及一堆重复的输出)。

kvm
  • 1 个回答
  • 276 Views
Martin Hope
Håkon Hægland
Asked: 2021-04-27 04:10:35 +0800 CST

当我暂停虚拟机时,分配的 CPU 数量是否释放给主机?

  • 0

在KVM virt-manager中,如果我暂停虚拟机,分配的 CPU 数量是否从 VM 释放到主机?

在此处输入图像描述

如果在我暂停虚拟机时释放了分配的 CPU,我可以分配更多的 CPU,因为我只倾向于同时使用 VM 或主机,而不是同时使用两者。因此,当我使用 VM 时,它会获得大量 CPU,而当我暂停 VM 并使用主机时,它会获得大量 CPU。

kvm
  • 1 个回答
  • 65 Views
Martin Hope
Håkon Hægland
Asked: 2021-04-27 04:00:51 +0800 CST

kvm virt-manager 中的 CPU 拓扑是什么?

  • 2

在KVM virt-manager中,Sockets、Cores 和 Threads 的含义是什么?

在此处输入图像描述

kvm
  • 1 个回答
  • 2260 Views
Martin Hope
Tyrelius
Asked: 2020-12-10 01:44:40 +0800 CST

树莓派 4 上 Ubuntu 20.04 上的 KVM 桥接器

  • 0

我无法在来宾 VM 内建立网络以在运行官方 Ubuntu 20.04 映像的 Raspberry Pi 4 8​​GB 上使用 KVM。据我所知,我的网络配置正确。而且我真的希望有人会告诉我我做错了什么,并可以为我指出更好的文档。我已经阅读了 netplan 的文档、十几个关于 KVM 设置的不同教程,甚至还查看了一些与 CPU 配置相关的 QEMU 文档,因为我发现 QEMU 对 aarch64 的构建不如对 x86_64 的构建好。

我通过与在十几个教程中找到的相同方式安装 KVM:

$ sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon-system virtinst bridge-utils
$ sudo systemctl enable libvirtd
$ sudo systemctl start libvirtd

这是我的网络计划:

$ cat /etc/netplan/01-netcfg.yaml 
network:
    ethernets:
        eth0:
            dhcp4: false
            dhcp6: false
            optional: true
            nameservers:
                addresses: [1.1.1.1, 1.0.0.1]
    wifis:
        wlan0:
            dhcp4: true
            dhcp6: false
            optional: true
            access-points:
                "censored":
                    password: "censored"
    bridges:
        br0:
            interfaces: [eth0]
            nameservers:
                addresses: [1.1.1.1, 1.0.0.1]
            parameters:
                stp: true
                forward-delay: 4
            dhcp4: true
            dhcp6: false
    version: 2
    renderer: networkd

然后我为 KVM 域定义了它:

$ sudo mkdir -p /opt/kvm
$ sudo nano /opt/kvm/host-bridge.xml

<network>
    <name>host-bridge</name>
    <forward mode="bridge"/>
    <bridge name="br0"/>
</network>

$ virsh net-define /opt/kvm/host-bridge.xml
$ virsh net-start host-bridge
$ virsh net-autostart host-bridge

然后我检查了它是否确实存在并且配置正确:

$ virsh net-list --all
 Name          State      Autostart   Persistent
--------------------------------------------------
 default       inactive   no          yes
 host-bridge   active     yes         yes

开始创建 VM 后,我检查了它的 vnet0 是否已正确添加到网桥:

$ sudo virt-install --name Test-VM --ram=2048 --vcpus=2 --cpu max --hvm --disk path=/opt/vhd/test-vhd,size=16 --cdrom /opt/iso/ubuntu-20.04.1-live-server-arm64.iso --network bridge=br0 --graphics vnc
$ virsh domiflist Test-VM
 Interface   Type     Source   Model    MAC
-----------------------------------------------------------
 vnet0       bridge   br0      virtio   52:54:00:64:58:9e
$ brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.dca632b43f5b       yes             eth0
                                                        vnet0
docker0         8000.0242aa58079a       no
docker1         8000.024296884d89       no              veth239b4dd
                                                        veth76e81fc
                                                        vethdffe7c7
                                                        vethef20e5a

然而,在这一切之后,我的客人内部的网络似乎不起作用。它只是不停地试图获得一个 IP 地址,但它永远不会得到一个。有什么我错过的吗?

我还检查了虚拟机实际上正在使用桥接接口,它似乎是:

$ virsh edit Test-VM
...
    <interface type='bridge'>
      <mac address='52:54:00:64:58:9e'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
...

这是客人正在旋转的屏幕。如您所见,我通过主机上的桥接接口具有完整的网络能力,可以通过 VNC 连接到 KVM。 截屏

virtualization kvm qemu network-bridge raspberrypi
  • 1 个回答
  • 1330 Views
Martin Hope
acgbox
Asked: 2020-12-08 11:27:42 +0800 CST

如何在 VDI 中创建动态磁盘 .qcow2?

  • 3

我用 .qcow2 格式的 QEMU / KVM 创建了一个虚拟磁盘 在此处输入图像描述

我已经知道它们是虚拟磁盘,但是,问题是当我尝试在另一个路径(可移动驱动器)中复制和粘贴虚拟磁盘(vol.qcow2)时,它仍然是 20GB(不是 3.32 MiB),这确实Virtualbox 中的动态磁盘不会发生。

我尝试编辑 .xml 文件以放置

sparce = true # supposedly this option is the one that defines if the disk is dynamic or fixed

但我一直没有成功。

我应该怎么做才能使用 .qcow2 或 RAW 格式的 QEMU / KVM / virt-manager 创建一个虚拟磁盘,并保持它与 virtualbox 动态虚拟磁盘(VDI 和其他格式,如 VHD 等)的大小相似?

PD:请在 linux 中使用 QEMU/KVM virt-manager"

先谢谢了

virtualbox partitioning virtualization kvm
  • 1 个回答
  • 7099 Views
Martin Hope
Betty Von Schmartenhausen
Asked: 2020-11-26 01:12:12 +0800 CST

在 20.10 中无法验证 KVM/QEMU 快照的 XML

  • 1

尝试使用virsh snapshot-create-as --domain vm --name vm-snap --disk-only --diskspec "sdc,snapshot=internal,file=/var/lib/libvirt/images/vm.qcow2,,new"获取 KVM 快照时,出现错误:

error: XML document failed to validate against schema: 
 Unable to validate doc against /usr/share/libvirt/schemas/domainsnapshot.rng  
Extra element disks in interleave  
Element domainsnapshot failed to validate content

然而,XML 可以很好地验证使用visrh edit vm.xml,但这里有些东西没有验证。

  • 操作系统:Ubuntu 20.10
  • qemu: 1:5.0-5ubuntu9.1
  • libvirt:6.6.0-1ubuntu3.1
virtualization kvm qemu
  • 1 个回答
  • 728 Views
Martin Hope
HTV04
Asked: 2020-11-19 17:11:34 +0800 CST

帮助使用 QEMU/KVM 设置 Windows VM

  • 0

我完全迷失了这一点。

我使用本指南帮助我设置 VM 环境(也安装了 virt-manager):https ://help.ubuntu.com/community/KVM/Installation

然后,我使用 Windows 10 ISO 设置了一个带有 virt-manager 的 VM,除了 RAM 分配、要使用的 CPU 核心数和 HDD 大小之外,我没有被提示更改任何内容。当我第一次加载 VM 时,我注意到视频非常滞后,但我认为这只是 Windows 安装程序的一个奇怪的副作用。但这在 Windows 完全安装后仍然发生。分辨率也没有自动改变,我不得不手动改变它。虚拟机的视频感觉非常慢。

我不知道我做错了什么,我一直在到处寻找答案。我怎样才能解决这个问题?我正在尝试制作一个感觉像本机安装的虚拟机。

windows virtualization kvm qemu
  • 1 个回答
  • 1819 Views
Martin Hope
Dschungel Ratte
Asked: 2020-10-06 03:32:38 +0800 CST

如何修复 Ubuntu 20.04 主机上的 virt-install/python 错误?

  • 1

在我的 20.04 主机上安装来宾时遇到问题,我需要帮助。

DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
virtinst                             1:2.2.1-3ubuntu2
python3                              3.8.2-0ubuntu2
python-is-python3                    3.8.2-4
python3-distutils                    3.8.2-1ubuntu1
python3-libvirt                      6.1.0-1
libvirt-daemon-system                6.0.0-0ubuntu8.4
qemu-kvm                             1:4.2-3ubuntu6.6

root@machine20:~# which python
/usr/bin/python 
root@machine20:~# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 Apr 15 12:45 /usr/bin/python -> python3
root@machine20:~# /usr/bin/virt-install --name mvmubu18 --vcpus 2 --memory 4096 --network network=virbrapp,trustGuestRxFilters=yes,model=virtio --mac ae:20:18:10:08:0a --noautoconsole --wait -1 --location http://install/installer-ubuntu1804-amd64/ --disk path=/srv/images/18.04/ubu18_root.img,size=20,format=raw '--extra-args=locale=en_US auto=true priority=critical s390-netdevice/choose_networktype=virtio netcfg/use_autoconfig=true netcfg/disable_dhcp=false network-console/start=true url=http://install/preseeds/mustervm-bionic.seed'
ERROR    '>=' not supported between instances of 'NoneType' and 'str'

这个命令在我所有的 Ubuntu 18.04.4 LTS 主机上都能完美运行。

似乎错误消息是由 --location http://... 参数引起的。例如,如果我使用 --boot cdrom,hd,该命令将按预期工作。

谢谢

python virtualization kvm 20.04
  • 1 个回答
  • 806 Views
Martin Hope
i9pp0
Asked: 2020-10-01 08:15:55 +0800 CST

服务器 20.04 更改 IP 后无法上网

  • 1

我重新组织了我的路由器设置,一切都得到了一个新的 ip(我在这里讨论的是内部 ip)。因此,我在 netplan/50-cloud-init.yaml 中更改了服务器的静态 ip。

network:
  version: 2
  ethernets:
    eno1:
      dhcp4: no

  bridges:
    br0:
      interfaces: [eno1]
      dhcp4: no
      addresses: [192.168.2.50/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1]

这就是我可能犯了一个错误的地方,然后我一直在改变事情以使其工作,并忘记了我开始时它是如何工作的并且它正在与另一个 ip 一起工作。这很奇怪,因为我所做的只是将以前的 ip 更改为原来的新 ip。在那之后互联网没有工作。

我在这台服务器上安装了 KVM 和另外 2 个虚拟机。我希望有人可以帮助我修复我的 netplan 文件并让事情再次正常工作。

networking server kvm
  • 1 个回答
  • 704 Views
Martin Hope
SBT
Asked: 2020-09-04 07:21:45 +0800 CST

“update-rc.d:错误:找不到 libvirtd 的 LSB 脚本”

  • 0

提前致谢。

我正在尝试在我的 ubuntu 机器上安装和配置 KVM。提供下面给定的代码我收到错误。

命令:update-rc.d libvirtd enable

错误:“update-rc.d:错误:找不到 libvirtd 的 LSB 脚本”

我在“/etc/init.d”下检查了与该命令相关的名为“libvirt-bin”的脚本,它有适当的标题,如下所示:

#!/bin/sh
#
# Init script for libvirtd
#
# (c) 2007 Guido Guenther <[email protected]>
# based on the skeletons that comes with dh_make
#
### BEGIN INIT INFO
# Provides:          libvirtd libvirt-bin
# Required-Start:    $network $local_fs $remote_fs $syslog virtlogd
# Required-Stop:     $local_fs $remote_fs $syslog virtlogd
# Should-Start:      avahi-daemon cgconfig
# Should-Stop:       avahi-daemon cgconfig
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: libvirt management daemon
### END INIT INFO

现在我无法解决这个 LSB 脚本错误。

我的操作系统详细信息:Linux 版本 4.15.0-112-generic (buildd@lcy01-amd64-021) (gcc 版本 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)) #113~16.04.1-Ubuntu SMP 2020 年 7 月 10 日星期五 04:37:08 UTC

请帮我解决这个问题。

注意:要安装 KVM,我按照链接“https://www.linuxtechi.com/install-configure-kvm-ubuntu-18-04-server/”中的步骤操作

*我无法更改我的操作系统版本,因为这是办公系统。

virtualization kvm
  • 2 个回答
  • 4180 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve