Virtualization technology is widely used in clusters, data centers and cloud computing environments and enables easy resource allocation to realize the server load balance and high consolidation by allocating virtual machines (VMs) to physical machines (PMs). In this work, motivated by the operation mechanism of the market setting, we study non-cooperative games amongst VMs on multidimensional resource allocation problems which arise in cloud computing environments. In our model, there are a set of VMs controlled by selfish agents, and each VM requires a d-dimensional vector of resource for running a job. The agent can decide to lessen its payoff by relocating the VM to another PM according to a payoff function. We consider two variants of resource allocation games: 1) server load balancing game, in which there are a number of machines, and the payoff function of an agent is the maximum load on any dimension on a machine and each agent would like to minimize its own payoff function by switching machines; 2) virtual machine placement game, in which each bin has a d-dimensional capacity, the payoff function of an agent is proportional to the portion of the bin it occupies in a given packing and the agent attempts to minimize its own payoff by choosing different bins if there is enough space available.We investigate the existence of a pure Nash equilibrium and measure the inefficiency of equilibria by the price of anarchy and the price of stability. The social cost for the server load balancing game is defined to be the maximum load on any dimension on a machine and the social cost for the virtual machine placement game is defined to be the number of bins that are not empty. We show that the price of stability is 1 for both games. The price of anarchy for the server load balancing game is at least d and at most d+1−d/m, where m is the number of machines. The price of anarchy for the virtual machine placement game is at least d and at most d+16/5. Finally, we set up experiments to illustrate the price of anarchy, the price of stability and the average ratio of an equilibria to the optimal solution. The experiment shows that the ratios under the Google trace workload, and the uniform distribution are much smaller than the worst case ratios.