Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pccr10001/4d8533c514c481b640921c8f1a7f504f to your computer and use it in GitHub Desktop.
Save pccr10001/4d8533c514c481b640921c8f1a7f504f to your computer and use it in GitHub Desktop.
Make QEMU use VMware HDD model and name.
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);
@pccr10001
Copy link
Author

pccr10001 commented May 25, 2022

Installation

  • make sure you have the latest version of pve apt update && apt upgrade
  • Add ceph dependencies using pveceph install
    • for build dep librbd-dev
  • clone git://git.proxmox.com/git/pve-qemu.git
  • download patch to debian/patches/pve/0063-pve-qemu-kvm-use-vmware-harddrive-model.patch
  • add filename 0063-pve-qemu-kvm-use-vmware-harddrive-model.patch into debian/patches/series
  • install build dep using apt build-dep .
  • compile package make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment