New VM Hardware – part 2

Now that I have a system that will support HVM modules, I can create vm images using an iso. If I want to create an iso from a template, I can also do that.

1) download the templates from otn.oracle.com. Let’s start with the HVM Small x86. This is a 4G installation with 1 CPU and 1G of memory.

2) import the template into the vm master admin page. This is done by logging in as admin and going to the Resources -> Virtual Machine Templates. If we click on the Import button on the top right, we can import from a URL or from a seed_pool directory on the vm server. We will first do an Internal virtual machine template. This is very similar to importing an iso. You select the Server Pool Name then the Virtual Machine Template Name, then Operating system. Along with this you enter a vm username and password for managing this instance. If you create a directory in the /OVS/seed_pool directory called test01 you get an option of the vm template name from the pull down menu. The directory is expected to include a vm.cfg and system.img file where the img file is the disk for the template file. If a vm.cfg file does not exist, you will get Cannot obtain memory size from vm.cfg and stopped from continuing. If you have a vm.cfg file but no system.img file, you will get a Cannot obtain disk name from vm.cfg. If you have a system.img file it allows you to create a template with size of 1MB for the disk file. You can approve and use this test01 template if desired even though it will not do anything. If we use the small HVM template it generates an OVM_EL4U5_X86_HVM_4GB template with 6145 MB size of the disk. When I imported it it was configured to be Red Hat Enterprise Linux 4 with a memory size of 1024 MB. Once this is imported and activated, it is ready to run.

3) We can import from an external URL and it operates the same way that it did with the iso import. The files are copied to the /OVS/seed_pool directory and made ready for use. The files are copied to the vmserver as was done with the iso files.

4) at this point we are ready to create a virtual machine from a template. We will create a vm with the 4GB HVM template. To do this we go to the Virtual Machines tab and click on the Create Virtual Machine tab. We create virtual machine based on virtual machine template. Since we only have one pool, we select the vmserver-1 pool name. We select the OVM_EL4U5_X86_HVM_4GB template. We can expand the + next to the show link to see the os and memory allocation as well as the number of CPUs. Once we select this template we give it a machine name and console password. Once we confirm our creation with the name 4GB_HGM, we see a Creating status for the virtual machine. If we go to the vm server we see a directory /OVS/running_pool/90/4GB_HGM being populated. The two files that are created are the system.img and vm.cfg files. This does take a while because the system consumes 6GB of disk space according to the Size parameter that we see in the virtual machine screen. When the virtual machine is created it is placed in a Powered off state.

5) At this point we have two virtual images, one we created with an iso and one that we created with a template. If we run the template based vm we can manage it from the console. When we start and initialize the console we see the Linux boot sequence as expected. The system boots up to the localhost login: prompt with the banner that it is running Enterprise Linux AS release 4 (October Update 5) with Kernel 2.6.9-55.0.12.100.1.ELsmp. Note that this can be different than the kernel that is running in dom0 and typically is different.

6) If we want to look at the domains that are running on our vm server we can execute the xm list command. This returns two domains, 90_4GB_HGM with id of 9, mem of 1024, VCPUs of one and state of b as well as Domain-0 with id of 0, Mem of 512, VCPUs of 2 and State of r.
7) from the console we can login to the Linux installation with username oracle and password oracle. This takes us into a command line interface. We can do things like df -k to see that there is a 4GB disk (1.8 GB used and 2GB available) along with 512 MB swap area. If we look at the eth0 interface we can see that it did get assigned to the dhcp addresses available from the dhcp server. For our instance we got assigned to 192.168.1.114. We can ping and ssh into this box from out windows desktop and from the vm master. This os image also has X windows installed on it. We can start the windowing system by typing startx.

8) we can monitor the virtual machines that are running on this vm server using the
$ vm top
command. This lists the domains that are running as well as the one that is consuming the most resources. If we want to look at the console for this new machine we can do this by typing
$ xm console 90_4GB_HGM
This brings us to the console for the Linux command line interface. I was able to get X windows running in the console from the vm manager console. When I tried to start X windows from the laptop screen of the vm server I could not because X11 was already running on this box. When I shutdown the Linux operating system, the laptop display brought me back to the dom-0 console. When disconnected the old console to the vm image I was able to reconnect to the console through the VM Manager console and watch the system boot up. I could not see the console using the xm console 90_4GB_HGM command until the system finished booting. When I tried to get the X11 system up and running on the laptop I get the error message
“PAM authentication failed, cannot start X server. Perhaps you do not have console ownership?”. I will trace this down later but it appears that I can start the X windowing system from the VM Master console but not the laptop console. When I look at the users logged in with the “w” command I see that the vm manager console appears on tty1 and the laptop console appears on ttyS0. It looks like I might be able to start the X windowing system but a trick might be involved.

9) I tried a similar thing with the Windows installation. I started the WinXP instance and could attach to the console through the VM Master console. I could verify that the network got assigned to 192.168.1.113 as expected. I could active and register Windows appropriately. Everything looks good but the concept of starting a second console on Windows did not seem to work. When I typed xm console 82_winxp_test it failed the connection. Actually, it just sat there and I did not know how to get back to the Domain-0 console without halting the WindowXP instance. I’m sure that there is a way to get back but it appears that there is not any way to open the Windows desktop through anything other than vnc. I guess that I will have to play with getting X11 installed on domain-0 or trying to see if I can get the console re-routed to the laptop screen.

503 Service Unavailable

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.