I have been making some testing with KVM, and I found out that if I create a virtual machine and add the hard disk with virtio the live snapshots work just fine, but if I create the virtual machine with a sata disk controller they don t, even if I remove the hard disk and recreate it with virtio It doesnt work, I have to delete the virtual machine and recreate it, another thing is that if I first create the virtual machine with a virtio hard drive, remove it and recreate it with sata it works.
the problem is when the virtual machine is first created with sata.
I’m assuming you’re pointing to a real physical SATA disk which should not be done except by experts who understand the pitfalls. For over 90% of all Users, pointing to a physical file system is dangerous and <will certainly> eventually lead to a corrupted file system and almost certain loss of everything in the virtual machine.
If you’re starting with a normally installed OS on physical disk(s), ie a common install without using virtualization, and want to migrate the physical machine to a virtual machine, then the safest way to do this is to use a P2V utility. A P2V utility not only copies the entire contents of a physical file system into a backing file, it should also make common modifications to avoid conflicts if the new virtual and the old physical machines are ever on the same network… like changing the MAC address, the machine name, the hostname and possibly NetBIOS name, etc.
You should also know that the “virtio” terminology is very specific, and refers to a specific virtualized I/O implementation. It is not the same as virtualized I/O in general. Be careful how you use this term, in some cases how you use it may be misleading.
Other than that, the details of whatever you’re doing probably is important… And, I can only guess at that (which I won’t).
OK,
Then can you explain how you’re creating a SATA connection to this qcow2 file?
Either by command line or in a libvirt (virt manager) configuration?
if I create the virtual machine with this configuration it does not work, even if I chage to virtio, I have to delete and recreate the virtual machine with virtio
Apparently someone else about a year ago posted about the same issue (configuring a SATA connection means no support for snapshots), although in the following posting this issue wasn’t addressed directly, only that the default should be reset to use virtio instead of something else.
In general,
When running KVM, using the virtio drivers is highly recommended for performance reasons, and now perhaps also for snapshot support.
Curious that this “feature” doesn’t seem to be discussed or reported anywhere and there doesn’t seem to be any explanation for this… But, it’s probably because everyone automatically enables and uses virtio without much of a second thought.
Another finding is that when configuring multipath for iscsi initiator in a KVM guest resulted in a unbootable SO if you configure the multipath service to start at boot, (enable the service), even if you add the exeption for local disk in the mutipath.conf file, but changing the driver to virtio fixed the problem.
After clicking “Create VM” enter a Name: for your vm, select your Resource Pool (if you have one) and click Next
Select Microsoft Windows 8/2012 in the OS tab and click Next.
Select an ISO Image: for Windows Server 2012 in the CD/DVD tab and click Next.
Select Bus/Device: VIRTIO, Storage: “your preferred storage” and Cache: Write back in the Hard Disk tab (the No cache default is safer, but slower) and click Next.
Select number of Sockets and cores (the default of 1 is mostly sufficient) in the CPU tab and click Next.
Select Automatically allocate memory and set the Maximum memory to a number you may require in the memory tab and click Next.
Select Model: VirtIO (paravirtualized) in the Network tab and click Next
Click finish and go to the Hardware tab of your newly created VM and click Add -> CD/DVD drive
Select Storage:local and ISO image: virtio-win-x.x.iso and click create.
Launch Windows install
Start your newly created virtual machine using the “Start” link in the upper right.
wait until the vm icon has turned white before you login using the “Console” link in the upper right.
Start the server install with “Install Now” and select the Operating System Flavor you like and click next and select “Custom: Install Windows only”
If you do not see “Drive 0 / Unallocated Space” click Load driver, browse to CD named CDROM and select folder WIN8\AMD64 and confirm. Select all three offered drivers (by pressing the CTRL button) “Red Hat VirtIO SCSI controller, Redhat VirtIO NIC and Red Hat Balloon driver” and click next
install Windows to “Drive 0 / Unallocated Space”
Wait until Windows is installed and select a Password for the local Administrator account and login to Windows.