Virtual Machine Setup

Discussion and Technical Support for general software applications and utilities including OS related issues.
Post Reply
acme
Member
Member
Posts: 13
Joined: December 14th, 2011, 8:38 pm

Virtual Machine Setup

Post by acme »

Have some questions on setting up Virtual Machines.

1- Can I set it up to use part of a current partition?
2- Should I divide the resources (CPU, memory...) among the three or so planned VM's?
3- When I install server it says partition already has LVM logical volumes. Is this the current OS? and if so, how to not delete current install?

More i'm sure

Thanks
Craig
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Virtual Machine Setup

Post by Ian »

Hi Craig,

1. Are you referring to the storage you allocate for the VM? If so, you can put that on any partition, it doesn't have to be the same one as the OS.

2. This depends on how you intend using the VMs. If you intend running them all at the same time then, yes, you should divide the resources amongst them.
You don't have to divide them equally either, it all depends on the level of resources you think they'll require. For example, a simple file server will require much less resources than, say, a VM which is to be used to decode a video stream.
If you do NOT intend running them all at the same time then they can each be allocated resources which add up to more than the total. For example, you can give 3 of them 50% of the total physical RAM.
3. I'm confused by this point. Can you explain more please. For example what tool are you using which throws up this warning/error?

Ian.
acme
Member
Member
Posts: 13
Joined: December 14th, 2011, 8:38 pm

Re: Virtual Machine Setup

Post by acme »

Thanks for your reply. Can I say that this has been an adventure!
Ian wrote:3. I'm confused by this point. Can you explain more please. For example what tool are you using which throws up this warning/error
This is currently not an issue. On the fourth go at install it completed correctly.

I don't know if they will all be run at same time. The main VM will be the media server which will be running most of the time. I went with 100% at this time as it is the only one up now.

I have set things up like the "hero" Ian :clap: I have Server 12.04 as main OS and am trying to migrate/reinstall/copy 11.4 from former setup as VM. What I am stumped with now is that VNC will not connect to VM.
acme
Member
Member
Posts: 13
Joined: December 14th, 2011, 8:38 pm

Re: Virtual Machine Setup

Post by acme »

I would like to copy the whole previous install over to the VM, but still don't have my linux legs under me. Is that possible? I don't know if I have enough space, unless I don't copy over all the data files.
Donrd
Member
Member
Posts: 1
Joined: July 6th, 2012, 4:04 am

Re: Virtual Machine Setup

Post by Donrd »

I have been following the instructions on the server set up and everything is going great. I've been using linux for several years, on and off. I was following the instruction on setting up a virtual machine and everything was going well, until I ran the script. This was the result:

donrd@DfamMedia:~/MyScripts$ sudo ./MyVMBuilder.sh
2012-07-05 23:10:39,731 INFO : Calling hook: preflight_check
2012-07-05 23:10:39,735 INFO : Calling hook: set_defaults
2012-07-05 23:10:39,736 INFO : Calling hook: bootstrap
2012-07-05 23:10:39,896 INFO : Cleaning up
2012-07-05 23:10:39,897 ERROR : Process (['/usr/sbin/debootstrap', '--arch=amd64', 'precise', '/tmp/tmprO4t1b', 'http://archive.ubuntu.com/ubuntu']) returned 1. stdout: I: Retrieving Release
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/precise/Release
, stderr:
Traceback (most recent call last):
File "/usr/bin/vmbuilder", line 24, in <module>
cli.main()
File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 216, in main
distro.build_chroot()
File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 83, in build_chroot
self.call_hooks('bootstrap')
File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
call_hooks(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 165, in call_hooks
getattr(context, func, log_no_such_method)(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 136, in bootstrap
self.suite.debootstrap()
File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 269, in debootstrap
run_cmd(*cmd, **kwargs)
File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.exception.VMBuilderException: Process (['/usr/sbin/debootstrap', '--arch=amd64', 'precise', '/tmp/tmprO4t1b', 'http://archive.ubuntu.com/ubuntu']) returned 1. stdout: I: Retrieving Release
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/precise/Release
, stderr:

Here is my script:

vmbuilder kvm ubuntu \
--dest=/home/donrd/VirtualMachines \
--overwrite \
--mem=1024 \
--cpus=1 \
--rootsize=7168 \
--swapsize=1024 \
--ip=192.168.5.201 \
--mask=255.255.255.0 \
--bcast=192.168.5.255 \
--gw=192.168.5.10 \
--addpkg=openssh-server \
--addpkg=vim \
--addpkg=cron \
--addpkg=acpid \
--arch=amd64 \
--suite=precise \
--flavour virtual \
--components main,universe,restricted \
--hostname IcieMinecraft \
--user donrd \
--pass mypassword \
--libvirt qemu:///system \
--bridge=br0 ;

Any ideas on what happened, would be appreciated. There are a couple questions, though, I don't recognize the '--bridge=br0', I haven't set up a network bridge, if that is what it is reffering to. Thanks in advance.

Don
User avatar
Ian
Moderator
Posts: 752
Joined: January 1st, 2011, 7:00 am

Re: Virtual Machine Setup

Post by Ian »

Hi Don and welcome to the forums.

At first I would have said that it looks like you've not got an active internet connection. However, if you paste the following 2 links into your browser you'll see they look very different from each other, at least on my browser:

Code: Select all

http://archive.ubuntu.com/ubuntu/dists/precise/Release

Code: Select all

http://archive.ubuntu.com/ubuntu/dists/lucid/Release
Can you, as a test, change the "suite" in your script to use lucid and see what happens. So, change it from

Code: Select all

--suite=precise \
to

Code: Select all

--suite=lucid \
Ian.
Post Reply