Last active
March 16, 2023 04:24
-
-
Save pccr10001/4d8533c514c481b640921c8f1a7f504f to your computer and use it in GitHub Desktop.
Make QEMU use VMware HDD model and name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/hw/ide/core.c b/hw/ide/core.c | |
+++ qemu/hw/ide/core.c 2023-03-14 16:09:36.562918207 +0800 | |
@@ -2588,12 +2588,7 @@ | |
} | |
blk_set_dev_ops(blk, &ide_hd_block_ops, s); | |
} | |
- if (serial) { | |
- pstrcpy(s->drive_serial_str, sizeof(s->drive_serial_str), serial); | |
- } else { | |
- snprintf(s->drive_serial_str, sizeof(s->drive_serial_str), | |
- "QM%05d", s->drive_serial); | |
- } | |
+ strcpy(s->drive_serial_str, "00000000000000000001"); | |
if (model) { | |
pstrcpy(s->drive_model_str, sizeof(s->drive_model_str), model); | |
} else { | |
@@ -2605,16 +2600,12 @@ | |
strcpy(s->drive_model_str, "QEMU MICRODRIVE"); | |
break; | |
default: | |
- strcpy(s->drive_model_str, "QEMU HARDDISK"); | |
+ strcpy(s->drive_model_str, "VMware Virtual IDE Hard Drive"); | |
break; | |
} | |
} | |
- if (version) { | |
- pstrcpy(s->version, sizeof(s->version), version); | |
- } else { | |
- pstrcpy(s->version, sizeof(s->version), qemu_hw_version()); | |
- } | |
+ strcpy(s->version, "00000001"); | |
ide_reset(s); | |
blk_iostatus_enable(blk); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
apt update && apt upgrade
ceph
dependencies usingpveceph install
librbd-dev
git://git.proxmox.com/git/pve-qemu.git
debian/patches/pve/0063-pve-qemu-kvm-use-vmware-harddrive-model.patch
0063-pve-qemu-kvm-use-vmware-harddrive-model.patch
intodebian/patches/series
apt build-dep .
make