GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.12k stars 433 forks source link

VDI+BIOS Image and not linked base VM #3626

Closed Raizo62 closed 1 week ago

Raizo62 commented 3 weeks ago

Hi

With the last GNS3 2.2 (on a LiveRaizo)

I tried to run a DEV VM of Win11 with QEMU

            {
                "compute_id": "local",
                "console": 5003,
                "console_auto_start": false,
                "console_type": "spice",
                "custom_adapters": [],
                "first_port_name": "",
                "height": 60,
                "label": {
                    "rotation": 0,
                    "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
                    "text": "Win11-1",
                    "x": -1,
                    "y": -25
                },
                "locked": false,
                "name": "Win11-1",
                "node_id": "4886d8de-5141-49f9-8799-c2272e2b3433",
                "node_type": "qemu",
                "port_name_format": "Ethernet-{port2}",
                "port_segment_size": 0,
                "properties": {
                    "adapter_type": "e1000",
                    "adapters": 2,
                    "bios_image": "/home/user/projects/OVMF-edk2-stable202305.fd",
                    "bios_image_md5sum": "6c4cf1519fec4a4b95525d9ae562963a",
                    "boot_priority": "c",
                    "cdrom_image": "",
                    "cdrom_image_md5sum": null,
                    "cpu_throttling": 0,
                    "cpus": 1,
                    "create_config_disk": false,
                    "hda_disk_image": "/home/user/projects/windows-11-dev-end_20241023.vdi",
                    "hda_disk_image_md5sum": "8807c06e4cac34418c8ef83feae57d3c",
                    "hda_disk_interface": "sata",
                    "hdb_disk_image": "",
                    "hdb_disk_image_md5sum": null,
                    "hdb_disk_interface": "none",
                    "hdc_disk_image": "",
                    "hdc_disk_image_md5sum": null,
                    "hdc_disk_interface": "none",
                    "hdd_disk_image": "",
                    "hdd_disk_image_md5sum": null,
                    "hdd_disk_interface": "none",
                    "initrd": "",
                    "initrd_md5sum": null,
                    "kernel_command_line": "",
                    "kernel_image": "",
                    "kernel_image_md5sum": null,
                    "legacy_networking": false,
                    "linked_clone": false,
                    "mac_address": "0c:86:d8:de:00:00",
                    "on_close": "power_off",
                    "options": "-usb -device usb-tablet",
                    "platform": "x86_64",
                    "process_priority": "normal",
                    "qemu_path": "/usr/bin/qemu-system-x86_64",
                    "ram": 2048,
                    "replicate_network_connection_state": true,
                    "tpm": true,
                    "uefi": false,
                    "usage": "VM de dev : Fin de vie : 23 Octobre 2024"
                },
                "symbol": ":/symbols/affinity/circle/blue/vm.svg",
                "template_id": "056b2276-11de-45e0-bda8-c92ef65c6e87",
                "width": 60,
                "x": 133,
                "y": -158,
                "z": 1
            }

The win11 works. I don't see any problems.

But, if i disable the "Use as a linked base VM" in the template, the win11 doesn't boot : image

grossmj commented 1 week ago

I manually run the node (not linked) and noticed errors like "Could not write to allocated cluster for streamOptimized".

/bin/qemu-system-x86_64 -name Windows-11-Dev-Env2212-2 -m 4096M -smp cpus=4,sockets=1 -enable-kvm -machine smm=off -boot order=c -bios /home/gns3/GNS3/images/QEMU/OVMF-edk2-stable202305.fd -device ahci,id=ahci0 -drive file=/home/gns3/GNS3/images/QEMU/WinDev2212Eval-disk1.vmdk,if=none,id=drive0,index=0,media=disk -device ide-hd,drive=drive0,bus=ahci0.0,id=drive0 -uuid 8b545393-6486-4f7b-bdc8-c53c0451596a -spice addr=localhost,port=5004,disable-ticketing -vga qxl -monitor tcp:127.0.0.1:42701,server,nowait -net none -device e1000,mac=0c:54:53:93:00:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:10001,localaddr=127.0.0.1:10000
qemu-system-x86_64: -spice addr=localhost,port=5004,disable-ticketing: warning: short-form boolean option 'disable-ticketing' deprecated
Please use disable-ticketing=on instead
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
qemu-system-x86_64: Could not write to allocated cluster for streamOptimized
qemu-system-x86_64: Could not write to allocated cluster for streamOptimized
qemu-system-x86_64: Could not write to allocated cluster for streamOptimized
qemu-system-x86_64: Could not write to allocated cluster for streamOptimized
qemu-system-x86_64: Could not write to allocated cluster for streamOptimized

When checking the disk format I also noticed it says streamOptimized.

qemu-img info /home/gns3/GNS3/images/QEMU/WinDev2212Eval-disk1.vmdk
image: /home/gns3/GNS3/images/QEMU/WinDev2212Eval-disk1.vmdk
file format: vmdk
virtual size: 125 GiB (134217728000 bytes)
disk size: 22.9 GiB
cluster_size: 65536
Format specific information:
    cid: 915282386
    parent cid: 4294967295
    create type: streamOptimized
    extents:
        [0]:
            compressed: true
            virtual size: 134217728000
            filename: /home/grossmj/GNS3/images/QEMU/WinDev2212Eval-disk1.vmdk
            cluster size: 65536
            format:

So I guessed the problem comes from the image being VMDK. I converted the base image to qcow2 using qemu-img convert -f vmdk -O qcow2 /home/gns3/GNS3/images/QEMU/WinDev2212Eval-disk1.vmdk /home/gns3/Downloads/WinDev2212Eval-disk1.qcow2 and imported the new image in the node and it booted correctly.

Image

Raizo62 commented 1 week ago

OK. But it's strange: I would have thought that the problem would have appeared with the particular method of starting a VM (snapshots: the linked VM) and not with the traditional method.