Virtualization With KVM On A Debian Squeeze Server - Page 3

6 Creating A Debian Squeeze Guest (Image-Based) From The Desktop With virt-manager

Instead of creating a virtual machine from the command line (as shown in chapter 4), you can as well create it from the Ubuntu desktop using virt-manager (of course, the virtual machine will be created on the Debian Squeeze KVM host - in case you ask yourself if virt-manager is able to create virtual machines on remote systems).

To do this, click on the following button:

The New VM dialogue comes up. Fill in a name for the VM (e.g. vm11), select Local install media (ISO image or CDROM), and click on Forward:

Next select Linux in the OS type drop-down menu and Debian Squeeze in the Version drop-down menu, then check Use ISO image and click on the Browse... button:

Select the debian-6.0.0-amd64-netinst.iso image that you created in chapter 4 and click on Choose Volume:

Now click on Forward:

Assign memory and the number of CPUs to the virtual machine and click on Forward:

Now we come to the storage. Check Enable storage for this virtual machine, select Create a disk image on the computer's hard drive, specify the size of the hard drive (e.g. 12GB), and check Allocate entire disk now. Then click on Forward:

Now we come to the last step of the New VM dialogue. Go to the Advanced options section. Select Specify shared device name; the Bridge name field will then appear where you fill in br0 (the name of the bridge which we created in chapter 2). Click on Finish afterwards:

The disk image for the VM is now being created:

Afterwards, the VM will start. Type in the root password of the Debian Squeeze KVM host:

You should now be connected to the graphical console of the guest and see the Debian installer:

Now install Debian as you would normally do on a physical system.

Share this page:

3 Comment(s)

Add comment

Comments

From: mverwijs at: 2011-04-05 20:45:31

I kept on running across this error:

 Error creating cdrom disk: Checking installer location failed: Could not find media '/var/lib/libvirt/images/<something>.iso'

 Eventhough the file was there, with correct permissions.

Restarting libvirtd helped: 

 /etc/init.d/libvirt-bin restart

From: agi at: 2011-07-14 09:13:48

 Running "virsh pool-refresh POOL_NAME" should save you the service restart :-)

 Where POOL_NAME would probably be: default

From: at: 2014-05-13 19:36:30

Awesome article. This helped me get started with KVM on Debian. Never used either, and am relatively new to Linux, but have a lot of experience with Windows servers and hence the transition wasn’t too hard.