No.
Flags that can be changed by a user-mode program
Only 8 of the 12 least significant bits can be set by user applications (CF, PF, AF ZF, SF, TF, DF OF), of those 12 bits you cannot set the reserved bits, leaving only 9 and one of these (IF) is privileged.
Most flags can be changed using normal instructions, a user application only needs POPF to set the TF flag.
The higher flags are privileged or readonly and can only be changed by a process running in ring 0.
See: http://www.felixcloutier.com/x86/POPF:POPFD:POPFQ.html
All non-reserved bits except IF, IOPL, VIP, VIF, VM and RF can be modified;
IF, IOPL, VIP, VIF, VM and all reserved bits are unaffected; RF is cleared.
If a POPF/POPFD instruction is executed with insufficient privilege, an exception does not occur but privileged bits do not change.
See: https://en.wikipedia.org/wiki/FLAGS_register
How do I change the VM flag and what is it anyway?
The VM flag has nothing to do with virtual machines, but shows whether the processor is running in 16-bit virtual 8086 mode.
In order to set the VM flag you need to enter Virtual 8086 mode.
See here for example code.
Many of the instructions needed are privileged and can only be executed in Ring 0.
Also you can only enter into real mode from 32 bit mode, not from 64 bit mode.
Exiting from virtual 8086 mode back into protected mode is an even more convoluted affair (scroll down a bit for working code).
Again you need to run in privileged VME mode to be able to do this.