How do you get a VM to simulate a real computer?

offei

New Member
Feb 3, 2023
25
0
1
My software needs to run on a real computer, how to let VM can be fully simulated into a real computer, so that the outside world can not be detected is a virtual machine?
 
Hi,

You have to edit the `/etc/pve/qemu-server/VMID.conf` and set the args as mentioned in the above post thread from the Proxmox VE side.
 
boot: order=scsi0;ide2;net0
cores: 28
cpu: host
ide2: local:iso/ubuntu-20.04.5-live-server-amd64.iso,media=cdrom,size=1373568K
memory: 32768
meta: creation-qemu=7.1.0,ctime=1675764010
name: 1
net0: virtio=06:D9:C6:52:41:BB,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local:100/base-100-disk-0.qcow2,iothread=1,size=1250G
scsihw: virtio-scsi-single
smbios1: uuid=b3a0620c-51fd-4c4b-80e7-511424ceb728
sockets: 2
template: 1
vmgenid: af6bc46f-013a-4742-9c24-17ee82eff781

What do I need to change?
 
The VM config should be as below:

Code:
boot: order=scsi0;ide2;net0
args: -cpu host,-hypervisor,kvm=off
cores: 28
cpu: host
ide2: local:iso/ubuntu-20.04.5-live-server-amd64.iso,media=cdrom,size=1373568K
memory: 32768
meta: creation-qemu=7.1.0,ctime=1675764010
name: 1
net0: virtio=06:D9:C6:52:41:BB,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local:100/base-100-disk-0.qcow2,iothread=1,size=1250G
scsihw: virtio-scsi-single
smbios1: uuid=b3a0620c-51fd-4c4b-80e7-511424ceb728
sockets: 2
template: 1
vmgenid: af6bc46f-013a-4742-9c24-17ee82eff781

Added this `args: -cpu host,-hypervisor,kvm=off` line

Make sure to stop and start the VM again. In order to see if the adding the `args` line take the effect, you can run the below bash script in the ubuntu VM and this will print yes or no.

Bash:
#!/bin/bash

echo -n "Is this a virtual machine? ..... "

hypervisorflag=$(grep flags /proc/cpuinfo 2>/dev/null | grep hypervisor)
if [ "$(command -v systemd-detect-virt 2>/dev/null)" ]; then
    detectedvirt=$(systemd-detect-virt)
    if [ "$hypervisorflag" ]; then printf "Yes ($detectedvirt)\n"; else printf "No\n"; fi
else
    if [ "$hypervisorflag" ]; then printf "Yes\n"; else printf "No\n"; fi
fi
 
  • Like
Reactions: zaphyre
Make sure on the Boot order, you can see by going to Proxmox VE Web UI -> Datacenter -> [NodeName] -> [VMID] -> Options -> Boot Order
 
You have to correct the Boot Order after changning to the LSI Controler an reselt SATA Devices under the options.
Do I need to change the SCSI controller?
 
Now that I've returned the value"No," does that mean my machine is already a physical computer? Do I need to change those“Bios vendor strings” or other information?
It is said that my software supplier is very strict in testing
 
Now that I've returned the value"No," does that mean my machine is already a physical computer?
Yes.

Do I need to change those“Bios vendor strings” or other information?
If the bash script returns NO, you do not need to change anything else.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!