VirtualBox,支持其他几种文件格式,但暂时不支持.qcow2格式。
Virtmanager 反过来支持当前开源的 .qcow2 格式,但不支持过时的 .qcow 格式。
如何在 VirtualBox 中使用虚拟机 .qcow2 的当前开源文件格式?
评论:
也许,.Qcow2 支持仅按标准只读:
VirtualBox,支持其他几种文件格式,但暂时不支持.qcow2格式。
Virtmanager 反过来支持当前开源的 .qcow2 格式,但不支持过时的 .qcow 格式。
如何在 VirtualBox 中使用虚拟机 .qcow2 的当前开源文件格式?
评论:
也许,.Qcow2 支持仅按标准只读:
我有一个正在使用“仅主机适配器”的虚拟机。我禁用了 VirtualBox 的内置 DHCP 服务器。我已经安装isc-dhcp-server
在我的虚拟机管理程序上。然后我添加了子网
subnet 10.10.54.0 netmask 255.255.255.0 {
range 10.10.54.2 10.10.54.254;
option routers 10.10.54.1;
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
}
并为虚拟机添加了固定地址。
host 10-10-54-11 {
hardware ethernet 08:00:27:de:7e:cc;
fixed-address 10.10.54.11;
}
我的虚拟机有 MAC 地址08:00:27:de:7e:cc
。我正在尝试通过以下命令从我的虚拟机发送 DHCP 请求:nmap --script broadcast-dhcp-discover
。但是,当 DHCPd 收到为 VM 提供 IP 地址的请求时,DHCPd 显示完全不同的 MAC 地址,并且不发送固定地址
root@hypervisor:/etc/dhcp# systemctl status isc-dhcp-server
● isc-dhcp-server.service - ISC DHCP IPv4 server
Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-11-13 12:28:09 +05; 9min ago
Docs: man:dhcpd(8)
Main PID: 12274 (dhcpd)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/isc-dhcp-server.service
└─12274 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
Nov 13 12:28:09 hypervisor dhcpd[12274]: you want, please write a subnet declaration
Nov 13 12:28:09 hypervisor dhcpd[12274]: in your dhcpd.conf file for the network segment
Nov 13 12:28:09 hypervisor dhcpd[12274]: to which interface eth0 is attached. **
Nov 13 12:28:09 hypervisor dhcpd[12274]:
Nov 13 12:28:09 hypervisor dhcpd[12274]: Sending on Socket/fallback/fallback-net
Nov 13 12:28:09 hypervisor dhcpd[12274]: Server starting service.
Nov 13 12:28:14 hypervisor dhcpd[12274]: DHCPDISCOVER from de:ad:c0:de:ca:fe via vboxnet4
Nov 13 12:28:15 hypervisor dhcpd[12274]: DHCPOFFER on 10.10.54.3 to de:ad:c0:de:ca:fe via vboxnet4
Nov 13 12:32:39 hypervisor dhcpd[12274]: DHCPDISCOVER from de:ad:c0:de:ca:fe via vboxnet4
Nov 13 12:32:40 hypervisor dhcpd[12274]: DHCPOFFER on 10.10.54.3 to de:ad:c0:de:ca:fe via vboxnet4
这是一个错误吗?如何解决这个问题?
我在笔记本电脑上安装了 Oracle VM VirtualBox。然后我下载了 Oracle Linux 9.1 版本的完整 ISO 映像(通过https://yum.oracle.com/oracle-linux-isos.html)并使用它来创建 Oracle Linux(64 位)虚拟机。安装成功,我可以登录我的 VM。
我可以从我的笔记本电脑通过 ssh 连接到我的 Linux 虚拟机,没有任何问题。我可以在 Linux 机器上浏览互联网。
我打开了一个终端并执行了以下命令
ping google.com
不幸的是,它不发送任何回复。
[root@localhost ~]# ping google.com
PING google.com(bom12s05-in-x0e.1e100.net (2404:6800:4009:80f::200e)) 56 data bytes
--- google.com ping statistics ---
113 packets transmitted, 0 received, 100% packet loss, time 114760ms
我也nslookup google.com
一样cat /etc/resol.conf
。正确获取名称服务器详细信息
我不确定我是否在这里遗漏了什么,因为我可以通过 Linux VM 中的互联网浏览器访问互联网。
非常感谢您的想法和意见。
resolvectl 状态的结果
[root@localhost ~]# resolvectl status
bash: resolvectl: command not found...
Install package 'systemd-resolved' to provide command 'resolvectl'? [N/y] y
* Waiting in queue...
* Loading list of packages....
The following packages have to be installed:
systemd-resolved-250-12.0.1.el9_1.x86_64 System daemon that provides network name resolution to local applications
Proceed with changes? [N/y] y
* Waiting in queue...
* Waiting for authentication...
* Waiting in queue...
* Downloading packages...
* Requesting data...
* Testing changes...
* Installing packages...
Failed to get global data: Could not activate remote peer.
nslookup google.com 的结果
Server: X.X.X.X
Address: X.X.X.X#98
Non-authoritative answer:
Name: google.com
Address: 142.250.199.174
Name: google.com
Address: 2567:7845:4756:74e::352e
grep nameserver /etc/resolv.conf 的结果
nameserver X.X.X.X
nameserver fe35::f2db:74ff:fe65:576f%enp0s3
请注意,nslookup 和 grep 命令中的 Server 值和 nameserver 值是相同的。
干杯
我已经提取了iso文件“archlinux-2022.06.01-x86_64.iso”。我已经在“airootfs.sfs”文件中进行了更改
现在我要再次创建一个“可引导(dos/MBR 扇区)”iso 映像,就像我提取的原始 iso 文件一样
sudo xorriso -as mkisofs -d -l -r -no-emul-boot
-o archlinux.iso .
-append_partition 2 0xef ../compile-linux/efi_part.img -e "--interval:appended_partition_2:all::" -no-emul-boot ../compile-linux/bios_boot.img
-G ../compile-linux/mbr_code.img
-b syslinux/isolinux.bin
-c syslinux/boot.cat
输出file archlinux.iso
archlinux.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'ISOIMAGE' (bootable)
输出命令xorriso -indev archlinux.iso -report-el-torito plain -report-system-area plain
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 114 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev 'archlinux.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record : El Torito , MBR cyl-align-off
Media summary: 1 session, 445804 data blocks, 871m data, 178g free
Volume id : 'ISOIMAGE'
El Torito catalog : 42 1
El Torito cat path : /syslinux/boot.cat
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 BIOS y none 0x0000 0x00 76 43
El Torito img path : 1 /syslinux/isolinux.bin
System area options: 0x00000a00
System area summary: MBR cyl-align-off
ISO image size/512 : 1783216
Partition offset : 0
MBR heads per cyl : 64
MBR secs per head : 32
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x00 0x83 0 1783216
MBR partition : 2 0x00 0xef 1783216 1600
以上输出是我自己制作的iso文件
我尝试在虚拟机“Efi 选项已禁用”中使用我的 iso 文件,但我收到这些错误。
我是初学者,对此了解不多
这就是为什么我试图找到从原始iso输出制作图像的正确方法,但我没有成功
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : ISO image bears MBR with -boot_image any partition_offset=16
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 113 nodes read in 1 seconds
libisofs: NOTE : Found hidden El-Torito image for EFI.
libisofs: NOTE : EFI image start and size: 396800 * 2048 , 0 * 512
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev '../archlinux-2022.06.01-x86_64.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record : El Torito , MBR isohybrid cyl-align-all GPT
Media summary: 1 session, 440998 data blocks, 861m data, 178g free
Volume id : 'ARCH_202206'
El Torito catalog : 118 1
El Torito cat path : /syslinux/boot.cat
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 BIOS y none 0x0000 0x00 4 119
El Torito boot img : 2 UEFI y none 0x0000 0x00 0 396800
El Torito img path : 1 /syslinux/isolinux.bin
El Torito img opts : 1 boot-info-table isohybrid-suitable
El Torito img blks : 2 44032
System area options: 0x00000302
System area summary: MBR isohybrid cyl-align-all GPT
ISO image size/512 : 1763992
Partition offset : 16
MBR heads per cyl : 64
MBR secs per head : 32
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x80 0x00 64 1587136
MBR partition : 2 0x00 0xef 1587200 176128
GPT : N Info
GPT disk GUID : 3230323230363041b130303533353232
GPT entry array : 2 248 separated
GPT lba range : 64 1763928 1763991
GPT partition name : 1 490053004f00480079006200720069006400
GPT partname local : 1 ISOHybrid
GPT partition GUID : 1 3230323230363041b131303533353232
GPT type GUID : 1 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 1 0x1000000000000001
GPT start and size : 1 64 1587136
GPT partition name : 2 490053004f004800790062007200690064003100
GPT partname local : 2 ISOHybrid1
GPT partition GUID : 2 3230323230363041b132303533353232
GPT type GUID : 2 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 2 0x1000000000000001
GPT start and size : 2 1587200 176128
我哪里做错了?我正在尝试创建我的 ISO 映像文件并实时使用它
谢谢您的帮助
在无头 Ubuntu 22.04 机器上,我想在 VirtualBox 中开始无头安装 NetBSD 9.2。
我有一个准备好的虚拟机,附有一组空白磁盘映像,以及附在 CDROM 驱动器上的可引导 NetBSD 安装 CD。
我的想法是通过串行端口执行安装,使用minicom
,但我无法让安装切换到使用串行控制台。
我正在启动机器
VBoxManage startvm netbsd --type=headless
然后我尝试让它将控制台切换到串行端口:
VBoxManage controlvm netbsd keyboardputfile boot.conf
...boot.conf
包含一行文字的文件在哪里consdev com0
,这是您在 NetBSD 引导提示符上键入以切换到串行控制台的内容。
我知道 NetBSD 的串行控制台设置为使用 9600 8N1,这是我minicom
配置使用的,并且我在虚拟机上设置了串行端口,如下所示:
UART 1: I/O base: 0x03f8, IRQ: 4, attached to pipe (server) '/tmp/netbsd.pipe', 16550A
我开始minicom
使用
minicom -D 'unix#/tmp/netbsd.pipe'
我以相同的方式在另一台虚拟机上成功使用串行控制台,并且minicom
在 NetBSD 机器启动后,我可以看到从“离线”切换到“在线”的状态,但minicom
.
谁能看到问题是什么以及我将如何解决它?我知道替代方法是 PXE 引导机器,但我希望能够避免这样做(因为我目前没有网络引导其他任何东西)。
我通过 vagrant 将 VirtualBox 虚拟机配置为在 192.168.56.100 有一个 private_network 地址,并注意到我可以 ping 该地址,但不能 ssh 到它。
经过一番调查,我发现即使我关闭了 VM,我仍然可以 ping 地址 192.168.56.100,而没有运行 VirtualBox VM。
更奇怪的是,当我重新配置我的 Vagrant 文件以使用地址 192.168.56.101 然后重新启动我的主机时。然后最初在重新启动后 vboxnet0 不存在,我无法 ping 任何 192.168.56.* 地址。然后,当我通过 vagrant up 启动虚拟机时,vboxnet0 在 192.168.56.1 可用,新 VM 在 192.168.56.101 可用。但是我仍然可以ping 192.168.56.100??不存在会使用此地址的虚拟机!
我该如何进一步调试呢?如何找出 192.168.56.100 是什么?vboxnet0 不是 brdige 设备,所以我不能使用 brctl 之类的工具。
谢谢!
PS:我在“Ubuntu 22.04 LTS”上:Linux master 5.15.0-30-generic #31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux。
我在版本 6.1.32_Ubuntu r149290 中使用 VirtualBox。
首先是我之前要求的附加信息vagrant up
。
ip route sh
default via 192.168.178.1 dev wlp4s0 proto dhcp metric 600
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-87529e8f38b0 proto kernel scope link src 172.18.0.1 linkdown
172.20.0.0/16 dev br-09115dd7adf5 proto kernel scope link src 172.20.0.1 linkdown
172.21.0.0/16 dev br-95476c66ec3f proto kernel scope link src 172.21.0.1 linkdown
172.25.0.0/16 dev br-f259d334ba7f proto kernel scope link src 172.25.0.1 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
192.168.178.0/24 dev wlp4s0 proto kernel scope link src 192.168.178.63 metric 600
ip addr show | grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 192.168.178.63/24 brd 192.168.178.255 scope global dynamic noprefixroute wlp4s0
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-09115dd7adf5
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-87529e8f38b0
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-95476c66ec3f
inet 172.25.0.1/16 brd 172.25.255.255 scope global br-f259d334ba7f
ping 192.168.56.100
PING 192.168.56.100 (192.168.56.100) 56(84) bytes of data.
^C
--- 192.168.56.100 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3080ms
之后也是一样vagrant up
:
ip route sh
default via 192.168.178.1 dev wlp4s0 proto dhcp metric 600
169.254.0.0/16 dev virbr0 scope link metric 1000 linkdown
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-87529e8f38b0 proto kernel scope link src 172.18.0.1 linkdown
172.20.0.0/16 dev br-09115dd7adf5 proto kernel scope link src 172.20.0.1 linkdown
172.21.0.0/16 dev br-95476c66ec3f proto kernel scope link src 172.21.0.1 linkdown
172.25.0.0/16 dev br-f259d334ba7f proto kernel scope link src 172.25.0.1 linkdown
192.168.56.0/24 dev vboxnet0 proto kernel scope link src 192.168.56.1
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
192.168.178.0/24 dev wlp4s0 proto kernel scope link src 192.168.178.63 metric 600
ip addr show | grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 192.168.178.63/24 brd 192.168.178.255 scope global dynamic noprefixroute wlp4s0
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
inet 172.20.0.1/16 brd 172.20.255.255 scope global br-09115dd7adf5
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-87529e8f38b0
inet 172.21.0.1/16 brd 172.21.255.255 scope global br-95476c66ec3f
inet 172.25.0.1/16 brd 172.25.255.255 scope global br-f259d334ba7f
inet 192.168.56.1/24 brd 192.168.56.255 scope global vboxnet0
我启动的 VM 具有 IP 192.168.56.101 并按应有的响应:
ping 192.168.56.101
PING 192.168.56.101 (192.168.56.101) 56(84) bytes of data.
64 bytes from 192.168.56.101: icmp_seq=1 ttl=64 time=0.364 ms
64 bytes from 192.168.56.101: icmp_seq=2 ttl=64 time=0.205 ms
但是现在 192.168.56.100 上也有一些响应:
ping 192.168.56.100
PING 192.168.56.100 (192.168.56.100) 56(84) bytes of data.
64 bytes from 192.168.56.100: icmp_seq=1 ttl=255 time=0.108 ms
64 bytes from 192.168.56.100: icmp_seq=2 ttl=255 time=0.078 ms
Virtualbox 5.1.34(及更低版本)崩溃并打印奇怪segementation faults
的错误消息,例如或杀死 x11/wayland 服务器。
ubuntu22、debian bookworm、debian sid、archlinux在将宿主机内核升级到5.18.3后出现这种奇怪的行为。