Can i use a vm as a host machine?
Hi : I run a vm created by Vmware WorkStation. For a taste of you benchmark,I compile the code of hyperbench with uncommenting the 'CFLAGS += -D __BARE_METAL' and want to run it in the 'host machine' mode by considering the vm as a host. I wonder if it works?
Hi, It does work when treating QEMU/KVM's virtual machine as the host machine. Although we didn't try it in VMware's virtual machine, I think it should work. Imitate the tips in Section Compiling HyperBench and Section Start on host machine.
-
Uncommenting the 'CFLAGS += -D __BARE_METAL' in the Makefile and type the command make.
-
Copy the ELF file of HyperBench to /boot/ directory of your VM and then adding the following entry in the VM grub configuration file.
menuentry 'HyperBench'{
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
multiboot /boot/hyperbench.64
}
- Reboot the VM and select the option HyperBench in the grub menu.
Good luck! Please feel free to contact me if you have any problems.
Ok, Thanks for your clarification. I make a mistake by using the GRUB instead of GRUB 2. Now my vm cannot seems to boot normally. I will try to use GRUB 2 later.
Hi, Maybe you should modify this statement set root='hd0,msdos1'. Keep it the same as other grub menus which can boot your VM correctly. Modifying grub is really a risky job. We have also encountered the same problem. Taking a snapshot is a viable solution.
Strangely, I add the following entry in ubuntu 14.04's grub configuration file(/boot/grub/grub.cfg, there doesn't exist a /boot/grub2 directory) and it takes no effect.
menuentry 'HyperBench'{
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
multiboot /boot/hyperbench.64
}
Then,I try to do this in a vm with centos7, and i find the entry added to /boot/grub2/grub.cfg shoud be :
menuentry 'HyperBench'{
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
multiboot /hyperbench.64
}
Reboot it and select the HyperBench item, then i see some output like :
I think hyperbench is running correctly. However, it hands in this step for several minutes. Does it have not completed?
Thanks for your feedback!
Originally, HyperBench is tested on Ubuntu-14.04-server and exactly there is no /boot/grub2 directory.
Grub version is examined by typing the command grub-install -V not by the directory name.
Look like so:

For your experiment in the VM with centos7, it may be the problem of x2APIC I guess (I am not sure whether the VMware supports this hardware feature in the VM and I will try to run HyperBench on VMware tomorrow and inform you the result.).
Try to comment the function enable_x2apic() in main.c (line 30 in the following picture) and recompile.

.
My VM does have the cpu feature 'x2apic':

I follow your suggestion to comment the function enable_x2apic() in main.c , but it seems to take no effect. The output hangs in the same step as former.
Hi, It's my negligence. Sorry about that. I have run HyperBench on a VMware virtual machine. The reason is that we set the number of physical cores. The default is 64 which is more than your configuration (8 CPUs I guess). The latest instructions (ReadMe) are available at the Start on host machine section. I will show my results on VMware VM later. Welcome to share your test results.
Thanks for your patient reply.
I follow the latest instructions and the hyperhench succeeds to complete with the following result:
But i don't quite understand what the three columns of data in the picture above exactly mean.Hope for your clarification :)
The last column is the run time (clock cycles) of the corresponding benchmark. The fourth and fifth columns are the data that is measured during the execution of HyperBench. The fifth column minus the fourth column is the final result (the last column). More details about the fourth and fifth columns are explained in our paper titled HyperBench: A Benchmark Suite for Virtualization Capabilities.
Ok, i get it. I have read the paper before and have some conflusion about your work. Now things become much clearer. I will read the paper again in detail. Thanks for your helpful answer.