arighi / virtme-ng

Quickly build and run kernels inside a virtualized snapshot of your live system
GNU General Public License v2.0
443 stars 50 forks source link

vm exit unexpected #188

Open chentao-kernel opened 3 days ago

chentao-kernel commented 3 days ago

when i use vng start the vm in my host, i seems the vm exit unexpected, is there any thing wrong? my host is ubuntu 24.04 x86 in vmware

dylane@2404:~/sdb/linux$ sudo vng -r arch/x86/boot/bzImage -v [ 1.904391] loop: module loaded [ 1.916500] scsi host0: ata_piix [ 1.919282] scsi host1: ata_piix [ 1.920839] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc080 irq 14 lpm-pol 0 [ 1.922715] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc088 irq 15 lpm-pol 0 [ 1.929457] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [ 1.934555] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 1.935631] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 1.940273] rtc_cmos 00:04: RTC can wake from S4 [ 1.947489] rtc_cmos 00:04: registered as rtc0 [ 1.948992] rtc_cmos 00:04: setting system clock to 2024-10-23T07:40:35 UTC (1729669235) [ 1.950838] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 1.952937] rtc_cmos 00:04: alarms up to one day, y3k, 242 bytes nvram, hpet irqs [ 1.955596] fail to initialize ptp_kvm [ 1.957881] i6300ESB timer 0000:00:03.0: initialized. heartbeat=30 sec (nowayout=0) [ 1.960714] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@lists.linux.dev [ 1.963126] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3 [ 1.976760] NET: Registered PF_PACKET protocol family [ 1.978438] 9pnet: Installing 9P2000 support [ 1.980572] Key type dns_resolver registered [ 1.988233] IPI shorthand broadcast: enabled [ 2.016717] sched_clock: Marking stable (2000378677, 15708371)->(2037578244, -21491196) [ 2.025738] registered taskstats version 1 [ 2.027757] Loading compiled-in X.509 certificates [ 2.038417] Demotion targets for Node 0: null [ 2.043616] PM: Magic number: 12:626:673 [ 2.044764] printk: legacy console [netcon0] enabled [ 2.045723] netconsole: network logging started [ 2.049205] ALSA device list: [ 2.049655] No soundcards found. [ 2.091676] ata2: found unknown device (class 0) [ 2.109331] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100 [ 2.122510] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5 [ 2.138885] scsi 1:0:0:0: Attached scsi generic sg0 type 5 [ 2.140622] md: Skipping autodetection of RAID arrays. (raid=autodetect will force) [ 2.143364] 9pnet_virtio: no channels available for device [ 2.152181] VFS: Mounted root (9p filesystem) readonly on device 0:19. [ 2.155770] devtmpfs: mounted [ 2.281837] Freeing unused kernel image (initmem) memory: 3096K [ 2.282867] Write protecting the kernel read-only data: 22528k [ 2.285657] Freeing unused kernel image (rodata/data gap) memory: 28K [ 2.426491] x86/mm: Checked W+X mappings: passed, no W+X pages found. [ 2.427330] Run /usr/lib/python3/dist-packages/virtme/guest/virtme-init as init process [ 2.430227] tsc: Refined TSC clocksource calibration: 2903.995 MHz [ 2.431491] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x29dc0130aa8, max_idle_ns: 44079530716s [ 2.434167] clocksource: Switched to clocksource tsc [ 2.960549] mount (72) used greatest stack depth: 13376 bytes left [ 3.651873] mkdir (78) used greatest stack depth: 13328 bytes left [ 4.400841] virtme-init (97) used greatest stack depth: 13312 bytes left [ 4.613791] virtme-init (105) used greatest stack depth: 13128 bytes left [ 5.100796] virtme-init: basic initialization done [ 5.200278] virtme-init: starting udevd [ 5.216666] virtme-init: running systemd-tmpfiles Starting systemd-udevd version 255.4-1ubuntu8 [ 5.559347] virtme-init: triggering udev coldplug [ 8.699391] virtme-init: waiting for udev to settle [ 10.817327] virtme-init: udev is done [ 11.607218] virtme-init: Setting hostname to virtme-ng... [ 11.785786] ip (188) used greatest stack depth: 12824 bytes left [ 11.873406] random: crng init done [ 14.539712] ACPI: PM: Preparing to enter system sleep state S5 [ 14.541686] kvm: exiting hardware virtualization [ 14.542778] reboot: Power down

chentao-kernel commented 3 days ago

it was ok when i used qemu by my old way

arighi commented 3 days ago

Which version of virtme-ng are you using? Can you try to install the latest version via pip (pip install --break-system-packages virtme-ng).

BTW, you don't necessarily need to run vng using sudo, you can also run it as regular user.

chentao-kernel commented 3 days ago

Which version of virtme-ng are you using? Can you try to install the latest version via pip (pip install --break-system-packages virtme-ng).

BTW, you don't necessarily need to run vng using sudo, you can also run it as regular user.

Hi, arighi, thank you for your reply, the virtime version is 1.22 i use ubuntu 24.04 kernel 6.8.0-39-generic

chentao-kernel commented 3 days ago

it seems ok when i used virtme_ng-1.31 as you suggested, thank you very mush!!! image

matttbe commented 3 days ago

Hello,

This is maybe linked to #152: the version in Ubuntu repo needs to be updated.