Tuesday, August 19, 2014

Fedora 21 virt test day moved one day to September 11

To avoid two back to back test days, we've moved the Fedora 21 virt test day to September 11th. Landing page is now here:

https://fedoraproject.org/wiki/Test_Day:2014-09-11_Virtualization

Wednesday, August 6, 2014

Speaking at Flock 2014





I'm in Prague for Fedora Flock 2014. I'll be giving a talk on Saturday at 11am titled 'Virtualization for Fedora Packagers and Developers'. The talk will explain some intermediate virt tips and tricks to simplify certain common Fedora developer tasks like testing packages across Fedora versions, reproducing reported bugs, and others.

If you see me at Flock, feel free to ask me anything virt related!

Wednesday, July 30, 2014

Fedora 21 virt test day rescheduled to September 10th

Due to Fedora 21 slipping 3 weeks, the virt test day has been rescheduled to September 10th. Landing page is now here:

https://fedoraproject.org/wiki/Test_Day:2014-09-10_Virtualization

Sunday, July 27, 2014

virt-install: create disk image without an explicit path

For most of its life, virt-install has required specifying an explicit disk path when creating storage, like:

virt-install --disk /path/to/my/new/disk.img,size=10 ...

However there's a shortcut since version 1.0.0, just specify the size:

virt-install --disk size=10 ...

virt-install will create a disk image in the default pool, and name it based on the VM name and disk image format, typically $vmname.qcow2

Tuesday, July 15, 2014

virt-manager: changing the default storage path and default virtual network

When creating a new virtual machine via virt-manager or virt-install, the tools make some assumptions about the default location for disk images, and the default network source.

For example, in the 'New VM' wizard, the storage page will offer to create a disk image in the default location:


The default location for most uses of virt-manager is /var/lib/libvirt/images, which is created by libvirt and has the expected selinux labelling and permission to run QEMU/KVM VMs.

Behind the scenes, virt-manager is using a libvirt storage pool for creating disk images. When the 'New VM' wizard is first run, virt-manager looks for a storage pool named 'default'; if it doesn't find that it will create a storage pool named 'default' pointing to /var/lib/libvirt/images. It then uses that 'default' pool for the disk provisioning page.

The default virtual network works similarly. The libvirt-daemon-config-network package will dynamically create a libvirt virtual network named 'default'. You can see the XML definition over here in libvirt.git.

When virt-manager reaches the last page of the 'New VM' wizard, if there's a virtual network named 'default', we automatically select it as the network source:


It's also the network source used when no explicit network configuration is passed to virt-install.

Every now and then someone asks how to make virt-manager/virt-install use a different storage pool or network as the default. As the above logic describes, just name the desired virtual network or storage pool 'default', and the tools will do the right thing.

You can rename storage pools and virtual networks using virt-manager's UI from Edit->Connection Details. It only works on a stopped object though. Here's an example renaming a virtual network 'default' to 'new-name':