The invention relates to the technical field of 
software acquisition and installation, in particular to a method for automatically acquiring and installing 
software in a 
virtual machine. The method comprises the steps of: manufacturing a 
virtual machine image, arranging a virtual 
serial port in a default mode in the 
virtual machine image, and setting to run a proxy 
client module during starting up; sending a 
software installation command to the virtual 
serial port by a virtual 
machine management program; monitoring the virtual 
serial port by the proxy 
client module on the virtual 
machine, and receiving and analyzing a command of the serial port, wherein the command contains an acquisition address of software to be installed; if the address is valid, acquiring the software and executing silent installation by the proxy 
client module, otherwise, not installing. According to the method disclosed by the invention, the problems that a large quantity of virtual 
machine images are needed to manufacture so as to meet different service requirements, so that viruses and malicious codes are introduced to the virtual machine due to 
software acquisition, the software installation is complicated, and the like can be solved, and the method can be applied to the 
software acquisition and installation of the virtual machine.