Create virtual machine in VirtualBox from real partition

If you already have Windows 10 (Technical Preview) installed on a real partition and you want to boot it from Linux Ubuntu you can do so very easily. I assume you have VirtualBox installed. Get it at https://www.virtualbox.org/wiki/Linux_Downloads otherwise.

At first find out what your Windows 10 parition is. You can use blkid for that.

It will give you output similar to the following:

/dev/sde1: LABEL="win10" UUID="75C..." TYPE="ntfs"
/dev/sdd1: LABEL="Data" UUID="723..." TYPE="ntfs"

When I partitioned my drives I already named the partition “win10” so it is easy to spot later on. In my case the partition is sde1 and the disk is sde.

sudo VBoxManage internalcommands createrawvmdk -filename win10.vmdk -rawdisk /dev/sde

This will create our virtual machine disk from the real partition.

Hit Alt-F2 and enter gksudo VirtualBox (we have to run it as root for physical partitions)

Create a new virtual machine and use Windows 8.1 (64-Bit) as your operating system. (“Other Windows” won’t work and will give you the error 0x0000005D if you try to boot it)

Assign it a proper amount of RAM. Then select “Use an existing virtual hard drive file” and select the previous created vmdk-file. Now boot into your virtual machine. Windows 10 now needs to repair (don’t worry, it’s because of the changed file system) and restart.

You should now be able to boot into Windows 10 from Ubuntu.

Flattr this!

Check_mk and Ubuntu 14.04 Server

If you want a quick monitoring solution with a comprehensive list of automatically generated checks then check_mk is the way to go.

Requirements for this guide

  • Ubuntu 14.04 Server
  • Running Nagios3 installation

Agent

On the systems that you want to monitor you have to install the check-mk-agent and the xinetd package from the Ubuntu repos. Also recommended is the check-mk-agent-logwatch package.

Open the /etc/xinetd.d/check_mk file and change the disabled attribute from yes to no. Also uncomment the only_from attribute and adapt accordingly.

Restart the xinetd daemon:

/etc/init.d/xinetd restart

And check if the agent port is open:

netstat -tulpn | grep 6556

 

Server

On the system where the Nagios installation is running, install the check-mk-server package.

Adapt the check_mk configuration found at:

vim /etc/check_mk/main.mk

Insert the hosts you want to monitor.

Make an inventory of the hosts by running the following command:

su nagios -c "check_mk -I"

Check_mk will now automatically retrieve the possible checks for the hosts! Awesome! 😉

Write out the configuration by running the following:

su nagios -c "check_mk -O"

And restart Nagios. Voilá!

If you want nice visualizations of your data, then you also have to install the pnp4nagios package.

Flattr this!