Author Topic: [SOLVED] Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB  (Read 3990 times)

conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Good day to all.

I have searched the forums, the zentyal docs and google and I'm stuck.

I created a virtual Machine using the web interface (I called it win2k8).
I added a network interface (more on that later)
I added a device (created a new hard disk with 80000MB)
I added another device (CD/DVD) pointing to an ISO file (Windows 2008 installation Disk).

I started the Virtual Machine and found out that it shows the hard disk as 0 GB in size!

----

More details:

I got into lots of troubles to do this.

Problem 1: How do I connect to the virtual machine?
Solution: Zentyal Forums post: http://forum.zentyal.org/index.php/topic,7606.msg30196.html#msg30196
Problem 2: How to I add an ISO as CDROM
Solution: Turned out that the iso file did not had correct permissions. I solved this by temporarily copying the iso file to /tmp and mounting from there.

Problem 3: Following the installation of Windows Server 2008 R2 I got stuck in the step where it asks for the Hard Disk where it will be installed and it shows the Hard Disk as 0.0GB (Attached print screen)
Extra steps: I created a new disk and same problem. I MANUALLY created another disk running the command qemu-img create -f qcow2 disk.img 5G and same problem.

Problem 4: Once I have the guest OS up and running, what about the network interface? I can't put eth0 there, and I want to use the "real" interface, not NAT.
And this is where I'm stuck.
Any ideas?
« Last Edit: August 04, 2011, 09:22:52 pm by conan59 »

MPvDdB

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #1 on: August 03, 2011, 02:15:00 pm »

Hello,

Did not try the Virtual Machines facility in Zentyal Beta myself yet.

But sometimes you need to "initialize" a virtual hard disk just as in the old days with the hardware disks first before it can be use by Windows.

Did you try to attach it to the virtual machine and see it booting from an ISO LInux SysRescueCD or something alike?

Further the Zero as for capacity could perhaps be explained as that there is nothing on it yet? If it is a dynamically growing disk the virtual disk-files may be at zero bytes in it until you start writing to the disk.

Success and regards
from Leeuwarden in NL
Peter van Dobben de Bruijn

conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #2 on: August 03, 2011, 05:51:52 pm »
Hi MPvDdb, Thank you for your reply.

What I understand as "Initialize" is creating the partitions, and THAT is made inside the Windows 2008 Installer.

I don't know about qemu / KVM but other virtualizers you start with a 0GB hard disk and grow it as needed until the max size (80GB in my case).

This is REALLY needed in my case, since I need to virtualize windows 2008, and a couple of other servers (Elastix, for example).

What I'm trying is creating the .img on another computer and the bring it to zentyal as a finished product just ready to plug it in. But this would really undermine the usefulness of the VM Module.

Does someone has an advice on how to install windows 2008 R2 on a virtual machine in Zentyal? (seems like the 64 bits is a BIG headache.

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #3 on: August 03, 2011, 06:26:32 pm »
did you try virtualbox instead of qemu is far more stable for running any version of windows...

All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

MPvDdB

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #4 on: August 03, 2011, 09:39:24 pm »
Hi MPvDdb, Thank you for your reply.

What I understand as "Initialize" is creating the partitions, and THAT is made inside the Windows 2008 Installer.

I don't know about qemu / KVM but other virtualizers you start with a 0GB hard disk and grow it as needed until the max size (80GB in my case).

<snipped>

What I'm trying is creating the .img on another computer and the bring it to zentyal as a finished product just ready to plug it in. But this would really undermine the usefulness of the VM Module.


No, the initialisation phase was about adding "drive" characteristics and a drive-number etc. to the drive. Partitioning was not possible without it, as the drive was unknown. Exactly the situation you are in as far as I understood your post.

Why not use a disk- and hardware related distribution as I mentioned (i.e. SysRescueCD or UltimateBootCD and the like) to make sure the "BIOS" of the VM sees a " drive" at all. AFter that put a primary partition on it to make sure that Windows installation finds something familiair.

About your criticism of the usefullness of the VM Module, you may have read this is a module in its early stages of development it may even be called "possible alpha" somewhere in the release notes IIRC. So you rather early with that criticism and should also not build a live production " machine" on it, I think.

I have at times installed VirtualBox, VMWare server etc. on distributions with a Debian heritage. It was always a lot of steps to take and to consider carefully during the process. That improved when VirtualBox came to the repositories. This afternoon I installed VirtualBox on the Zentyal Beta according to the instructions in the release-notes, no pain at all. Did not try it yet, but the install goes smoothly.

kind regards
from Leeuwarden, NL
Peter van Dobben de Bruijn

 

conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #5 on: August 03, 2011, 09:54:29 pm »

The comment goes along the lines of: 'Don't forget that someone (me in this case) will need to do this and at this point I found no way of doing it easily'.

I know it's a beta and that's why this post is not in the "BUGS" zone.

As for VirtualBox, will the resulting drive be compatible (or usable) in Zentyal VM Module?

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #6 on: August 03, 2011, 11:00:56 pm »
as far as i know - the module can be powered by vbox OSE also ...   youd have to remove
the current hypervisor and install virtualbox in its stead... -  you might want search the forum for it...
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #7 on: August 04, 2011, 01:33:21 am »
That will be great ichat.

Are you refering to the post where they show how to install a hypervisor? http://forum.zentyal.org/index.php/topic,6237.msg25928.html#msg25928

That's the only one I could find pertinent to this.

That might solve my actual problem :D
« Last Edit: August 04, 2011, 02:23:52 am by conan59 »

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #8 on: August 04, 2011, 09:02:00 am »
here you go... its in the releasenotes of the  2.2.beta ...

sudo apt-get remove libvirt-bin && sudo apt-get install virtualbox-ose
All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #9 on: August 04, 2011, 02:31:22 pm »
When I tried using the standard KVM VM setup it also showed 0 disk space even though I did setup a disk. 

I installed Virtual box and that works much better.  I now have zentyal running as host system, one VM running as a LAMP server and one VM running Zentyal will very limited modules installed.  All three also have webmin installed and the Lamp server also has Alfresco installed.

The only comment I have about the VM modules in Zentyal is you can't select how many cpu cores are assigned to each VM.  They just use the standard one cpu core each.

The only other issue I am having is trying to setup my VM zentyal server as a slave to the host Zentyal server, but that is a different subject all together.
« Last Edit: August 04, 2011, 02:33:45 pm by vshaulsk »

conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #10 on: August 04, 2011, 05:50:30 pm »
Thank you iChat, I did as you told me (with that code you posted I found the post you where refering to http://forum.zentyal.org/index.php?topic=7311.0).

the only drawback was that I had to reinstall the vm module but now I'm installing windows 2008 R2 64 bits (my original intention) and found that:

1.- It doesn't like spaces in the name of the VM (doesn't start).
2.- Doesn't like 64 bit apps.

Does someone know how to configure the VM so it starts with 64 bits compatibility?

I'm attaching both screenshots, the one that shows that I configured the VM with windows 2008 bit compatibility and the one that shows the error on the install.


conan59

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #11 on: August 04, 2011, 07:40:08 pm »
Now I can Mark this post as "SOLVED".

Thanks to the wonderful suggestion from ichat, I removed qemu and kvm from the server by

Code: [Select]
sudo apt-get remove libvirt-bin && sudo apt-get install virtualbox-ose
then I had to remove kvm references too

Code: [Select]
sudo apt-get remove kvm
I think there where a couple of others like kvm-pexe and qemu-kvm

And Now Everything is working perfectly.

I even added the network eth0 and it's seeing my internal network just fine.

Thanks to all who added their valuable knowledge and specially to iChat who gave me the answer I needed.
« Last Edit: August 04, 2011, 09:22:10 pm by conan59 »

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Zentyal Beta 2.2-RC1 (Virtual Machine Module) - Hard Disk shown as 0GB
« Reply #12 on: August 04, 2011, 07:45:49 pm »
Yes I ran into the issue of it not working with 64bit systems until you completely remove the KVM system.  I still have trouble however when I restart the hole server it requires me to type in a command into the shell (can't remember the command right now). Otherwise the VM does not start or if I try the virtual box directly it tell me that the hypervisor is being used by KVM.  Maybe I did not put in the apt-get remove KVM.... I will try that when I get home.