sexta-feira, setembro 19, 2008

Failed to allocate page for guest RAM error in Linux VMware Workstation

I've been spending increasingly more time running Ubuntu on one of my desktops. It has replaced the Windows Vista I had and so far I quite like the experiment. Out of the box, all of the hardware was properly supported and even the NTFS partitions left from Vsita install are easily available.One of the first things I've decided to install was the trial version of the latest VMware Workstation: 6.0.3 build-80004. And although it installed without a problem, when I tried to run one of the previously created virtual machines, I got the following error:

VMware Workstation unrecoverable error: (vcpu-0)
Failed to allocate page for guest RAM!

As it turned out after a quick investigation, that was a result of running a VM from a NTFS partition, because its default mounting settings don't have the exec option.

Since you shouldn't be running anything critical through an NTFS driver anyway, I simply moved the VM onto one of the ext3 partitions and, sure enough, it fixed the guest RAM allocation error.

Update: if your scenario prevents you from moving a VM to a native partition, use the following option:

mainmem.UseNamedFile = "FALSE"

You should add it to the vmx file of your VM. Thanks for the tip, benito!

quarta-feira, julho 30, 2008

Definindo XP como Padrão em um Dual-Boot com Vista

When you install Windows Vista as a dual-boot with your regular Windows XP partition, Vista is always set as the default OS. If you want to set XP as the default OS instead, there's a quick command you can run to change it back.

First you'll have to open an administrator command prompt. Type cmd into the search box, and then hit Ctrl+Shift + Enter to open it in administrator mode. You should be prompted for the UAC dialog.

Enter in the following command:

bcdedit /default {ntldr}

Example:

C:\Windows\system32>bcdedit /default {ntldr}
The operation completed successfully.

Now when you reboot, it will set XP as the default.

quinta-feira, julho 24, 2008

Acessando VMware Virtual Machine(NAT) Por Um Outro Computador

Se você está executando uma máquina virtual no seu computador, você pode querer acessar esta máquina virtual através de um outro computador. Por exemplo: Digamos que você tenha uma máquina virtual Ubuntu com Apache executando na porta 80, e você quer mostrar para outra pessoa em sua rede o acesso para o website que você está hospedando.

Nós estamos assumindo que a máquina virtual está usando NAT, e tem sido associado um endereço IP de 192.168.23.128.

Primeiro abra o Manage Virtual Networks pelo item do menu iniciar:

Clique na aba NAT, e então clique em Edit. Você verá o diálogo NAT Settings:

Clique no botão Port Forwarding, e você irá ver o diálogo:

Agora estamos finalmente na tela que podemos usar. Nós queremos usar a porta 8080 na máquina host. Entramos o endereço ip da máquina virtual ubuntu, e porta 80. Estas portas poderão ser qualquer uma.

Nós poderemos testar ela indo em http://localhost:8080 no computador hospedeiro. Também podemos trocar a url da máquina hospedeira pelo endereço IP da mesma.