Ubuntu 11.10 cloudmin KVM instance

I have created an Ubuntu cloudmin KVM instance, but I would like to configure it so that i can received usage information in the cloudmin console and also create a images so I can create an image with the correct details I set up in cloudmin. Currently creating a new instance does not take any settings form the the interface.

Status: 
Closed (fixed)

Comments

Do you mean you want to import this manually created KVM instance to Cloudmin's control? If so, you can do this at Add System -> Add KVM Instance..

I have already created a instance from an ISO, but am not getting any monitoring output from the instance. I would like to create a KVM instance (with some thing like Stacklet Bundler), so it works with cloudmin

What do you mean by not getting any monitoring output? What status cloudmin showing for the VM - normally it is something like "down" or "SSH failed" or "Ping failed".

Also, can you access the VM's console at System State -> Graphical Console?

I am able to acces the Graphical Console via 'System State> Graphical Console' But I am unable to see any data in 'Resources>Statistics Graphs' Also i do not have the option to 'change password' under 'system operations' The option for 'System Configuration' is not present at all.

To get these functions working do I have to install a api or build the KVM instance some package that includes the required files?

Those functions should just work, as long as Cloudmin can login to the VM to collect stats.

What status does it show on the left menu when you select the VM from the list?

The status show: SSH login failed I have changed the setting under Edit System for the VM (Authentication options)

"SSH login failed" means that Cloudmin didn't know the root password for your system.

Make sure you set the correct password at Edit System -> Authentication options. Also, if this is an Ubuntu system, it may not allow direct SSH login as root by default. To fix that, login via the graphical console, sudo to root, edit /etc/ssh/sshd_config and change the PermitRootLogin line to yes . Then restart sshd .

The PermitRootLogin line is already set to 'yes'. The authentication details are correct. I can login to the vm via ssh, with no issue. Are the stats pulled from the VM via ssh??

Can you login to the VM directly as root, or are you logging in as another user and then sudoing to root?

i am loggin in as another user, then 'sudoing' to root.

Ok .. Cloudmin needs to be able to login directly as root via SSH in order to upload or download files.

Make sure you have a root password set, by sudoing to root and running the passwd command. Then make sure that in Cloudmin it is using that password to login to the VM.

Ok, now i am get some where. all th eoption are appearing but the graphical console is not working.

So what is the status shown as now?

It says SSH!! :)

I reboot the VM and the grpahical console is working.

I have rebuild the VM as I am unable to resize the hard drive size, when creating the KVM instance do i have to select a particular option?

Ok, that's progress...

When creating a new VM, you can select the initial disk size on the creation form. Or you can typically resize it on an existing VM, but you will need to shut it down first. Also, resizing of the filesystem won't work unless the disk contains just a single non-LVM non-RAID partition..

OK, i have tried creating an instance, with with no LVM or raid. When resize the disk i get the following error;

Warning - this disk cannot be safely resized. Cloudmin does not know what type of filesystem this disk contains, and so cannot properly resize it. This is most likely because the disk is not mounted on the virtual system.

How can i avoid this?

That's a bit of an improvement I think ..

On the VM, what does the /etc/fstab file contain?

Below is what i have in the file;

1 # /etc/fstab: static file system information.
  2 #
  3 # Use 'blkid' to print the universally unique identifier for a
  4 # device; this may be used with UUID= as a more robust way to name devices
  5 # that works even if disks are added and removed. See fstab(5).
  6 #
  7 # <file system> <mount point>   <type>  <options>       <dump>  <pass>
  8 proc            /proc           proc    nodev,noexec,nosuid 0       0
  9 # / was on /dev/sda1 during installation
10 UUID=70159b3e-55c8-42ab-a53d-ada1c7dd811d /               ext4    errors=rem    ount-ro 0       1
11 # swap was on /dev/sda5 during installation
12 UUID=8a63e90c-4429-4910-967c-b512a6f765f6 none            swap    sw                  0       0

You need to edit that file and change UUID=70159b3e-55c8-42ab-a53d-ada1c7dd811d to /dev/sda1 and UUID=8a63e90c-4429-4910-967c-b512a6f765f6 to /dev/sda5 . Otherwise, Cloudmin has no way of knowing what partition has that UUID when the VM isn't running ..

I have updated the fstab and when i try to resize the disk i get the following error; update failed : Only the last partition on a disk image can be resized

Details; Disk image format Whole disk Current use Mounted on / as Linux EXT4 (new)

What does fdisk -l output when run on the VM?

Like the message says, if a VM's disk contains multiple partitions and the root directory is not mounted on the last partition, it cannot be enlarged. That's why if you are manually installing Linux into a VM, I recommend using just a single partition, instead of having separate /boot and swap partitions.